Taxes on invoices problem in 1.6.3

I’m using version 1.6.3, having problem with with taxes.

I would like to put taxes only on invoice, not on items. When I do this, the invoice shows correctly but the taxes stays at 0, event if I selected default tax rate before creating the invoice. The invoice tax always stays 0.

Also, there’s not way to “remove” the “Invoice tax” on an invoice, there should be a drop down box on the invoice form to select the “tax on invoice” applied.

So 2 problems with taxes in 1.6.3.

I barely understand your problems.
Try to demonstrate then with the default template: application/views/invoice_templates/pdf/InvoicePlane.php

At any time when you’re doing local development you can use dd($variable) so you can see what data comes from the model or from the controller.

Screenshots help as well demonstrating your problem

1 Like

I’ve selected this tax as default invoice tax, no tax on items, and here it is, 0.00$ as taxes … should be 14.98$ and I would be happy :slight_smile:

1 Like

In your tenplate where you made that nice circle in your image do a dd($variable)
Also screenshot the invoice itself, so it’s a good example.

If you’ve used the .zip file from the site you cannot use dd($variable), just use

print_r($variable);
die("stop script execution);

It’s probably this piece in your template:

<?php
foreach ($invoice_tax_rates as $invoice_tax_rate) {
?>
        <tr>
            <td class="text-right" colspan="<?php echo $colspan ?>">
                <?php echo htmlsc($invoice_tax_rate->invoice_tax_rate_name) . ' (' . format_amount($invoice_tax_rate->invoice_tax_rate_percent) . '%)'; ?>
            </td>
            <td class="text-right">
                <?php echo format_currency($invoice_tax_rate->invoice_tax_rate_amount); ?>
            </td>
        </tr>
<?php
}
?>

So i would just
dd($invoice) or dd($invoice_tax_rates)

And of course if you used the .zip file, use print_r instead.

You have to die() because you have to stop the script execution before it renders that PDF

And those screenshots help a lot

Thank you for your help.
Here is the result

invoice_tax_rate_amount isn’t calculated

That means you have to edit your invoice and make a screenshot of that screen.

Remove your print_r from the invoice template.
It’s time to focus on the invoice screen

Taxes sur les aricles is 0.00
And i don’t know what Taux de Taxe is, but it’s Aucun

Yes tax by item it 0.00 but the default tax rate for the whole invoice is supposed to be 15% but totaled at 0.00$ … there seems to be a problem with the calculation it was workign well before

1 Like

# Default Global Amounts Calculation mode - Since 1.6.3
# This change Taxes and discounts calcuation mode
# true  : Taxes: Global Y, Item Y. Use classic calculation for Discounts & Taxes : Use same calculation as previous v1.6.3 (Default)
# false : Taxes: Global N, Item Y. Use simple item tax calculation system : Calculate Global discount before Item discount (without tax) and apply item tax on discounted total price
# Notes :
#   • "when the client use e-invoice": This is automatically overriden to false by default to use "simple tax" calculation system. It for valid xml data for european models***
#   • Dev Note: If you realy need to override by true, just add 'legacy_calculation' => true in `$xml_settings`. (See helpers/XMLconfigs/README.md)
#   • *** When use Facturx10Xml and Ubl24Xml XMLtemplates based. Download here: https://github.com/InvoicePlane/InvoicePlane-e-invoices
LEGACY_CALCULATION=true

Open your ipconfig.php and set LEGACY_CALCULATION to false`, see if that helps?

I’m going by what i see on your screenshot. especially the “0.00” on the Invoice Page and the Aucun for the Taux de Taxe

Your goal is to show the exact amount for taxes that you want on your PDF in your Invoice Screen

^^ that one

If Taxes sur les articles says “0.00”, your PDF will show “0.00”