GNOME Bugzilla – Bug 760398
Cancelling the creation of a duplicate bill or invoice doesn't reset the invoice number counter
Last modified: 2018-06-29 23:46:07 UTC
To reproduce: Open a bill, or invoice. Duplicate the invoice and note the Invoice ID in the dialog. Cancel the action in the dialog. Duplicate the invoice and note that the Invoice ID has incremented again. In order to maintain consecutive invoice numbers the counter should have been decremented when the new invoice dialog was cancelled.
The invoice ID is set in the gnc_ui_invoice_duplicate() method in dialog-invoice.c whereas for a new new invoice it's not set until the user clicks OK in the dialog. By not setting the ID in gnc_ui_invoice_duplicate() the counter is not updated until actual invoice creation and the desired behavior is achieved. Which props me to ask; is there ever a situation where the invoice ID should be duplicated?
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=760398. Please update any external references or bookmarks.