Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.0
-
Fix Version/s: 5.0.4
-
Component/s: None
-
Labels:None
Description
Forum post: https://www.blesta.com/forums/index.php?/topic/15184-invoice-shows-wrong-tax-percentage/
To reproduce:
- Enable vat tax in settings
- Make sure at least one tax rule exists
- Add customer with valid VATIN for tax exemption
- Create a service for the client
- View the invoice and see that lines with %0 are included
To resolve change components/invoice_templates/default_invoice/default_invoice_pdf.php starting at line 447 from:
$tax_rules = $this->Invoices->getTaxRules($this->invoice->client_id); foreach ($tax_rules as $tax) { $data[] = [ 'notes' => Language::_('DefaultInvoice.tax_note_reverse_charge', true), 'label' => Language::_('DefaultInvoice.tax_heading', true, $tax->name, 0), 'price' => $this->CurrencyFormat->format(0, $this->invoice->currency) ]; }
to
$this->meta['terms'] .= (empty($this->meta['terms']) ? '' : "\n\n") . Language::_('DefaultInvoice.tax_note_reverse_charge', true);
components/invoice_templates/perforated_invoice/perforated_invoice_pdf.php line 682 from:
$tax_rules = $this->Invoices->getTaxRules($this->invoice->client_id); foreach ($tax_rules as $tax) { $data[] = [ 'notes' => Language::_('PerforatedInvoice.tax_note_reverse_charge', true), 'label' => Language::_('PerforatedInvoice.tax_heading', true, $tax->name, 0), 'price' => $this->CurrencyFormat->format(0, $this->invoice->currency) ]; }
to
$this->meta['terms'] .= (empty($this->meta['terms']) ? '' : "\n\n") . Language::_('PerforatedInvoice.tax_note_reverse_charge', true);
components/invoice_templates/quickbooks_invoice/quickbooks_invoice_pdf.php line 477 from:
$tax_rules = $this->Invoices->getTaxRules($this->invoice->client_id); foreach ($tax_rules as $tax) { $data[] = [ 'notes' => Language::_('QuickbooksInvoice.tax_note_reverse_charge', true), 'label' => Language::_('QuickbooksInvoice.tax_heading', true, $tax->name, 0), 'price' => $this->CurrencyFormat->format(0, $this->invoice->currency) ]; }
to
$this->meta['terms'] .= (empty($this->meta['terms']) ? '' : "\n\n") . Language::_('QuickbooksInvoice.tax_note_reverse_charge', true);