madpugger Posted March 8, 2022 Share Posted March 8, 2022 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 More sharing options...
Nickz Posted March 8, 2022 Share Posted March 8, 2022 22 minutes ago, madpugger said: I am not exactly sure when this started, but VAT is not showing on our Invoices. Have a look into Serverlogs or ask the server if they upgraded a PHP Version. Link to comment Share on other sites More sharing options...
madpugger Posted March 8, 2022 Author Share Posted March 8, 2022 I updated the server PHP from 7.3 to 7.4 when I moved to 1.7.8.0 I think it may have something to do with the latest Prestashop Checkout update, as there are PayPal payment details in a strange place on the invoice too... Link to comment Share on other sites More sharing options...
Nickz Posted March 8, 2022 Share Posted March 8, 2022 Well Prestashop might run OK with php7.4, but will those modules do that? Why did you update PHP? Link to comment Share on other sites More sharing options...
ZhenIT Software Posted March 8, 2022 Share Posted March 8, 2022 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. 1 Link to comment Share on other sites More sharing options...
madpugger Posted March 16, 2022 Author Share Posted March 16, 2022 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 More sharing options...
madpugger Posted May 25, 2022 Author Share Posted May 25, 2022 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now