Automatic invoice number in invoice group broken in v1.4.7

I have upgrade my Invoiceplane installation from v1.4.4 to v1.4.7 and now the automatic insertion of invoice numbers (following the settings in settings → invoice groups doesn’t work anymore. When I create a new invoice the invoice number is left empty instead of being prefilled like before.

This behaviour can be replicated in the demo server at https://demo.invoiceplane.com/

Hmm… This seems to be a new feature: IP-255.

Sorry for the noise.

Yes it is, you should be able to change this behaviour in the invoice system settings.

My settings are configured:

Generate the invoice number for draft invoices = yes

But it still does not generate the inv no until the invoice is sent. The invoice # field says “not set yet” …

Update: if you go to invoice view, then an inv no is shown but still not in draft view.

Reopened the corresponding ticket, will take a look at it.

https://development.invoiceplane.com/browse/IP-255

I maybe found the solution:

In file: application/modules/invoices/models/mdl_invoices.php
line: 319 there is a comparison but the variable $generate_invoice_number returns a string and no integer.

On my system i changed $generate_invoice_number === 1 to $generate_invoice_number === ‘1’

I made the same with file: application/modules/quotes/models/mdl_quotes.php
in line: 264

3 Likes

IT-Support. thank you very much - this has fixed the draft invoice no. as well as my other issue here:

https://community2.invoiceplane.com/t/topic/2916

1 Like

I have upgrade my Invoiceplane installation from v1.4.4 to v1.4.7 and now the automatic insertion of invoice numbers (following the settings in settings → invoice groups doesn’t work anymore. Can someone tell me how to correct this. I am not a developer … :(.
Thanks
D

The fix is posted earlier in this thread:
https://community2.invoiceplane.com/t/topic/2906/7

Thank’s, it works.

This is now fixed with version 1.4.8.
Please update.