SimpleInvoices Group Forum › Forums › Fearless359 SimpleInvoices Discussion Group › Question about templates for PDF output › Reply To: Question about templates for PDF output
I’m a bit flummoxed with the complication that using namespaces appears to have introduced.
Given this, the simplest approach might be to add logic in the extension modules\invoices\manage.php file to take the $invoices array and add a loop to run through it, taking the index_id, accessing the Invoice::getOne() method to read the invoice record, pull the custom fields and add them to the row being processed. Effectively updating what Invoice::manageTable() returns with the additional fields. This is kind of ugly, in that it means reading the invoice records twice to display once. But given how namespaces work with autoloading, I can’t think of a more elegant resolution off hand.
Note that if you to this, you are working with the index_id field to get the invoice. So you need to set the $useIndexId parameter to true.
-
This reply was modified 4 months, 2 weeks ago by
fearless359.
-
This reply was modified 4 months, 2 weeks ago by
fearless359.
Recent Comments