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 793947 - Impossible to render printable invoice
Impossible to render printable invoice
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
git-master
Other Linux
: Normal critical
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2018-03-01 00:57 UTC by djfd
Modified: 2018-06-30 00:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
format error log (1.80 KB, text/x-log)
2018-03-01 00:57 UTC, djfd
  Details
a fix proposal (476 bytes, patch)
2018-03-01 01:18 UTC, djfd
rejected Details | Review

Description djfd 2018-03-01 00:57:12 UTC
Created attachment 369126 [details]
format error log

Error is occurring when trying to make printable invoice (both posted, and un-posted), see the log file attached

When using following the patch an error disappears. Maybe it is not the best, maybe need to fix the number somehow to be an integer, but at least it works.

Also, one would like to have not a pure numeric invoice numbers, eg. '#123/2018/03/01', or it is not supported by design?

https://github.com/Gnucash/gnucash/blob/master/gnucash/report/business-reports/invoice.scm#L689

#broken-invoice.patch
```patch
--- a/gnucash/report/business-reports/invoice.scm       2018-03-01 10:01:39.544627183 +1000
+++ b/gnucash/report/business-reports/invoice.scm       2018-03-01 10:02:06.371027405 +1000
@@ -686,7 +686,7 @@
 
     (set! title (title-string default-title custom-title))))
 
-    (gnc:html-document-set-title! document (format #f (_"~a #~d") title
+    (gnc:html-document-set-title! document (format #f (_"~a #~a") title
                                                    (gncInvoiceGetID invoice)))
 
     (if (not (null? invoice))
```

Thanks
Comment 1 djfd 2018-03-01 01:18:07 UTC
Created attachment 369127 [details] [review]
a fix proposal
Comment 2 John Ralls 2018-03-01 01:20:09 UTC
Comment on attachment 369127 [details] [review]
a fix proposal

There are some more places where I made the same error. If you want to hunt them all down, go ahead; otherwise mark the patch obsolete and I'll do it.
Comment 3 djfd 2018-03-01 01:26:43 UTC
@John Ralls, okay, my friend, likely you know better where precisely this have to be fixed,
so please, go ahead! Thanks!

I cannot find how to mark it obsolete, thus leaving it as is, sorry, not very familiar with bugzilla
Comment 4 John Ralls 2018-03-01 02:51:37 UTC
Comment on attachment 369127 [details] [review]
a fix proposal

OK, pushed. Thanks for the report and at least giving a try to patching it.

To modify an attachment click "details" next to the attachment link in the box. On the next screen click "edit details" to get the edit controls.
Comment 5 John Ralls 2018-03-01 02:51:53 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 6 John Ralls 2018-06-30 00:05:04 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=793947. Please update any external references or bookmarks.