[GNC] How to customize the default invoice (on print invoice button)

Adrien Monteleone adrien.monteleone at lusfiber.net
Sun Jan 2 04:06:58 EST 2022


Hmm.. This will be interesting. I don't see a way using Gmane with 
Thunderbird that I can CC anyone. I get the option to 'reply' but that 
doesn't properly go through Gmane, or I can 'Followup' which does, but 
doesn't let me CC anyone.

Anyway, I think the issue is one of the Stylesheet has to be set in the 
report preferences. But the bigger issue is you can't set anything other 
than the default stylesheet to be the default. So you have to create a 
'saved report' version of the invoice, then each time you want to print 
one, you have to load that saved report, *then* choose the invoice to print.

Ideally, you should be able to set a default invoice-stylesheet combo so 
that 'printing' an invoice from ANY point in the UI will use that custom 
default. Otherwise, "what's the point?" The user is left with a very 
convoluted and non-obvious way to get invoices to print the way they 
want them to with regularity.

Regards,
Adrien

On 1/1/22 4:08 PM, Shanti wrote:
> Hello,
> 
> I'm trying to configure GNUCash so I can have nice invoices with it, and 
> I used the "taxinvoice" report and I could configure it to my needs. 
> Then, in the GNUCash preferences, business tab, I set the taxinvoice to 
> be the default invoice report for prints.
> 
> What I don't understand is how to apply default settings to the 
> taxinvoice report generated when I click on the print button. Now, I get 
> an unconfigured report. is there a way to specify which report 
> configuration to use by default ?
> 
> If it's not currently possible, can it be added in the code, where 
> should I look to add this feature?
> 
> I could trace it to :
> 
> - function gnc_invoice_window_print_invoice : 
> https://github.com/Gnucash/gnucash/blob/970e9af3423eb50b9823d264cf6685ccad0b2973/gnucash/gnome/dialog-invoice.c#L805 
> 
> - function 
> gnc:invoice-report-createhttps://github.com/Gnucash/gnucash/blob/a85520de7b222ac61fca2bf264143996bddc311b/gnucash/report/reports/reports.scm#L69 
> 
> - function gnc:make-report-options 
> https://github.com/Gnucash/gnucash/blob/a85520de7b222ac61fca2bf264143996bddc311b/gnucash/report/report-core.scm#L417 
> 
> - function gnc:report-template-new-options 
> https://github.com/Gnucash/gnucash/blob/a85520de7b222ac61fca2bf264143996bddc311b/gnucash/report/report-core.scm#L289 
> 
> 
> In the code it seems to create the options from scratch, possibly 
> populating it from a stylesheet. But I don't see a stylesheet type with 
> the same options as a taxinvoice. Is this a feature missing in 
> taxinvoice? Are stylesheets supposed to be the way to populate options 
> for newly created reports? Why not use saved reports?
> 
> Thank you for the information you can provide.
> 
> PS: please Cc me back as I'm not subscribed to the list, thank you



More information about the gnucash-user mailing list