GNOME Bugzilla – Bug 640061
Invoice items are not saved
Last modified: 2018-06-29 22:52:31 UTC
When creating an invoice the corresponding transaction is correctly created. When I close the program and want to see the invoice almost all of the data is lost. The lines "Rechnungseinträge" (like the splitlines or transactionlines in ledgers) are missing where the items are specified (I don't know the english names, i use the german version and i don't know how to change the language). The note is missing "Bemerkung". I use the SQL-Backend with MySQL. I tried XML : There it works. I tried Sqlite : there it's the same as with MySQL. I use SVN rev 20122.
Which Linux distribution? Which version of the libdbi package? (There is a known issue with some versions of libdbi...) Also, did I understand correctly: With sqlite, the entries in the invoice are again lost, just as they did with mysql?
(In reply to comment #1) > Which Linux distribution? OpenSuse 11.3 > Which version of the libdbi package? Informationen für Paket libdbi0: Repository: @System Name: libdbi0 Version: 0.8.3-3.11 Arch: i586 Hersteller: obs://build.opensuse.org/openSUSE:Factory:Contrib Installiert: Ja Status: aktuell Installierte Größe: 96,0 KiB Zusammenfassung: Database Independent Abstraction Layer for C Beschreibung: libdbi implements a database-independent abstraction layer in C, similar to the DBI/DBD layer in Perl. Writing one generic set of code, programmers can leverage the power of multiple databases and multiple simultaneous database connections by using this framework. > (There is a > known issue with some versions of libdbi...) > Also, did I understand correctly: With sqlite, the entries in the invoice are > again lost, just as they did with mysql? Correct.
Created attachment 178841 [details] "make check" results in errors in libdbi.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 611936 ***
Created attachment 179632 [details] [review] This patch forces invoices to be loaded before entries I saw in the logfile : * 12:54:17 DEBUG <gnc.backend.dbi> [conn_execute_select_statement] SQL: SELECT * FROM entries ... * 12:54:17 WARN <gnc.backend.sql> [load_invoice_guid()] Invoice ref 'da696198453447bf281addbda5aaecdb' not found These WARNs appeared several times. The data loss was actually that when i tried to restore an invoice it all entries missing. Here it seemed to me that maybe the entries couldn't be loaded correctly because the invoices couldn't be accessed. Manually looking at the Mysql database i found the entries in a correct way. Because the data from the MySql database is loaded into memory at the startup and accessed there, i guessed that they were not found because they hadn't been loaded. I found that forcing the invoices to be loaded before the entries fixes the problem. I get no WARNs anymore and i can access the entries in the gui. I think that the Classification of this bug report as a duplicate of the fastmath bug is at least partially an error.
OK, I've reopened this pending review and commitment of your patch.
Review of attachment 179632 [details] [review]: This fixes the problem of missing invoices. There is a special fixed_order array for the business objects though, so I have taken your changes and applied them there. Credits for solving the problem are yours though. Thanks.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=640061. Please update any external references or bookmarks.