Select invoice template programmatically

i need for a few reasons i need select programmatically the invoice template, this is possible?

if it is possible how and where ?

porblem solved

This isn’t very helpful. Thanks for letting us know you found out how to solve it, but it would have been interesting to take five seconds to inform us how you did it as well. :smiley: Just in case anybody had the same issue.

your right, i will inform how this can be done

in the file mailer/controllers/mailer.php

in the function send_invoice($invoice_id) just force the $pdf_template to the name os the template

something like this

  $pdf_template = "default"; 


 $pdf_template = $this->input->post('pdf_template');

in the 1st you are forcing the default template( you can use any template) and in the 2nd you are using the selected in the form

and sorry for my English

Nice, thanks for the update, appreciate it. Never checked it out myself, I assumed that functionality was already in the software, I’m sure this will be caught by the devs and added as a feature if necessary. :wink:

@goncaloaaf so in this way you can set a specific pdf/guest template to a specified invoice group?

is this actually implemented on invoiceplane?

No, this is not yet implemented

in the meantime I’m going to try this: