Invoicenumber

add configurable invoice number to bill and lots of code reformatting