Add commission datatype and invoice number handling. [skip ci]