[GNC] Fields present in invoices?
Adrien Monteleone
adrien.monteleone at lusfiber.net
Tue Jan 3 11:44:45 EST 2023
Interesting approach concerning modifying the tax invoice.
I'd say all of that sounds correct to my understanding as well, save I
think you have the Scheme—HTML bit reversed.
The files are in Scheme, which generate the report as an HTML table.
(not the other way around)
I'm pretty sure there are already several RFE's filed, but the ability
to set one's own default report and default spreadsheet would greatly
enhance the reporting system and avoid hacks like re-writing an existing
report. (entirely inaccessible to most folks)
Regards,
Adrien
On 1/3/23 5:03 AM, Steve Brown wrote:
> I've been wrestling with this too, specifically with regard to
> invoices. This is a rather lengthy comment. I hope it is useful. Also,
> if some of this is inaccurate, which is likely, please let me know.
>
> I've looked at the wiki and sifted through the code trying to
> understand how reports work. There appear to be two approaches.
>
> One uses scheme to wrap html around the report variables. These report
> files live in gnucash/report/reports/standard. Each has at least 3
> sections, one to define the report, it's location in the menu and a
> guid identifier, one for the options menu and one to render the report.
> A report file can contain several report definitions that may share the
> same render section. My opinion is that these files are quite opaque
> and very fragile.
>
> The other and apparently newer approach has a report file that contains
> the same report and option sections as above, but preprocesses a html
> document with embedded scheme tags and a companion css file to generate
> scheme for the render section. The template and css files live in
> gnucash/report/reports/support. At this point, only 3 reports have been
> converted/rewritten using this approach. Only one is for invoices.
>
> This second approach is discussed in the eguile section of the wiki but
> seems out of sync with the implementation. A better explanation is in
> the source of the preprocessor. It lives at gnucash/report/eguile.scm.
>
> The report for printing invoices is chosen at Edit->preferences-
>> business->Report for printing. That is a glade screen and is hardwired
> to the guids of 4 specific reports, Printable, Fancy, Easy and Tax.
> Only the latter uses the equile preprocessor. The first 3 are packaged
> in a single file, invoice.scm.
>
> At this point, I plan to modify the tax invoice to meet my needs. This
> seems to be the only way the Print Invoice button on the View Invoice
> screen will generate my custom invoice.
More information about the gnucash-user
mailing list