Jump to content

VAT not showing on invoice


Recommended Posts

We are running 1.7.8.3

I am not exactly sure when this started, but VAT is not showing on our Invoices.

In Orders, the total is correct (say £120 including 20% VAT).

Open the invoice and it shows £100 (ex VAT) with a total of £100. The VAT/Tax is not shown anywhere.

Is anyone else having this issue and how do we fix this?!

Thanks

Link to comment
Share on other sites

I wen't by the same problem. I was already using php7.4 with prestashop 1.7.6 After upgrade to Prestashop 1.7.8.4 VAT disappeared from invoice pdfs.

After activating the debug mode I saw a notice when opening an invoice:

Notice: Undefined index: isTaxEnabled

The undefined was in pdf/invoice.tax-tab and it should not be undefined because it is set in classes/pdf/HTMLTemplateInvoice.php line 59 ... so there had to be some override to that class that wasn't assigning that var. When not assigned is treated as false and that is why there is no tax in the invoice.

 

In my case I found the override done by the module: invoicenumbermng that was redefining the __construct method at override/classes/pdf/HTMLTemplateInvoice.php just adding the former line 59 after 

        $this->smarty = $smarty;

solved the issue.

Probably an override to that same class is the problem too.

 

  • Like 1
Link to comment
Share on other sites

On 3/8/2022 at 11:44 PM, ZhenIT Software said:

I wen't by the same problem. I was already using php7.4 with prestashop 1.7.6 After upgrade to Prestashop 1.7.8.4 VAT disappeared from invoice pdfs.

After activating the debug mode I saw a notice when opening an invoice:

Notice: Undefined index: isTaxEnabled

The undefined was in pdf/invoice.tax-tab and it should not be undefined because it is set in classes/pdf/HTMLTemplateInvoice.php line 59 ... so there had to be some override to that class that wasn't assigning that var. When not assigned is treated as false and that is why there is no tax in the invoice.

 

In my case I found the override done by the module: invoicenumbermng that was redefining the __construct method at override/classes/pdf/HTMLTemplateInvoice.php just adding the former line 59 after 

        $this->smarty = $smarty;

solved the issue.

Probably an override to that same class is the problem too.

 

Many thanks, I'll take a look into this, although strange that it only occurred after update to 1.7.8.4...

Link to comment
Share on other sites

  • 2 months later...

So I have finally found some time to look into this.

In my case, it appears to be the btpartialshipment module causing an issue in overrides/classes/pdf/HTMLTemplateInvoice

The error is: 

      }                $brotherOrder = implode(',', $brotherOrder);           
}
}
if (count($brotherOrder)) {           
$this->sql = ' AND id_order IN ('.$brotherOrder.')';
} else {            $this->sql = '';        }

where the highlighted error is

$this->sql = ' AND id_order IN ('.$brotherOrder.')';

The warning is:

Warning: count(): Parameter must be an array or an object that implements Countable

 

I have two problems! The first is the developer has not responded to messages I've send from over a year ago repeatedly. (I can't find an alternative to this module!)

2. I don't know how to sort this error without disabling the entire over-ride.

Thanks for any offers of help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...