After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760398 - Cancelling the creation of a duplicate bill or invoice doesn't reset the invoice number counter
Cancelling the creation of a duplicate bill or invoice doesn't reset the invo...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Business
git-maint
Other Linux
: Normal normal
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2016-01-10 14:49 UTC by Mike Evans
Modified: 2018-06-29 23:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike Evans 2016-01-10 14:49:20 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.
Comment 1 Mike Evans 2016-01-10 16:30:57 UTC
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?
Comment 2 John Ralls 2016-01-10 22:46:12 UTC
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.
Comment 3 John Ralls 2018-06-29 23:46:07 UTC
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.