Details
-
Type: Bug
-
Status: Closed
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.1
-
Component/s: None
-
Labels:None
Description
[2021-10-25T16:03:59.352568+00:00] general.ERROR: Uncaught Exception Error: "Call to undefined method TaxProviders::getNotes()" at .../components/invoice_templates/perforated_invoice/perforated_invoice_pdf.php line 678 {"exception":"[object] (Error(code: 0): Call to undefined method TaxProviders::getNotes() at .../components/invoice_templates/perforated_invoice/perforated_invoice_pdf.php:678)"}
To reproduce:
- Change invoice style to quickbooks or perforated
- Download/view an invoice
To resolve update perforated_invoice_pdf.php and quickbooks_invoice_pdf.php and change:
// Set tax notes $notes = $this->TaxProviders->getNotes($this->invoice->id); foreach ($notes as $note) { $data[] = [ 'notes' => $note ]; }
To
if (($tax_provider = $this->TaxProviders->getByCountry($this->invoice->client->country))) { // Set tax notes $notes = $tax_provider->getNotes($this->invoice); foreach ($notes as $note) { $data[] = [ 'notes' => $note ]; } }