Generating invoices from OFN

Re: numberseries for invoices. We’ve solved that by having a separate model simply using the id-field and creating a new instance of this model per invoice.

somewhat like this:

invoice = new Invoice
invoice.invoice_number = (new InvoiceNumber).id

Obviously, the more sensible approach (for my system at least) would be to use postgresql sequences directly for the invoice-numbers but I’ve never gotten around to that - for OFN it would probably make sense to be able to register a starting-number when creating an enterprise or a hub(?). In case people would like to/must continue an already existing series.

Come to think of it, one could use the invoice-id directly. But that might interfere with using the invoice-number for other things since the invoice-id won’t exist until the invoice is actually created. Generating KID-numbers (The way one does for Norwegian banks to help track payments electronically) would have to be a two-step process - which is why I’m not doing it that way.

As a sidenote, we’ve been unexpectedly busy here in Bergen and I’m sorry we haven’t been able to do very much for OFN. We’re still very interested and will (mostly) reply to pings though. Besides, you seem to do very well without us.