ukbaz Posted August 2, 2013 Share Posted August 2, 2013 I have a BIG issue with Prestashop Tax and Disount Voucher codes. All our prices are displayed to customer excluding tax - tax is added at checkout. When a discount code is added the total amout due displayed in Admin/Orders is calculated by deducting the discount after tax has been added - It thus discounts both the prduct AND the tax! Discounts should be applied to the product only - and THEN the tax added. More confusingly on the PDF Invoice discount and tax are applied correctly as the tax is added AFTER the discount has been applied to just the products and not the products including Tax amount. I need the amounts showing in admin orders to reflect those shown correctly in the PDF invoice. Where / how can I correct this? What code do I need to edit to correct it? I am using Prestashop v1.4.9 See attached screenshots which illustrate what I mean: Amount due in Admin orders shows as £23.54 (incorrect!) Amount due in PDF Invoice shows as £24.30 (Correct!) Thanks Link to comment Share on other sites More sharing options...
serv0 Posted September 11, 2013 Share Posted September 11, 2013 Did you ever figure this out? Link to comment Share on other sites More sharing options...
pandorrah Posted April 6, 2014 Share Posted April 6, 2014 Still having the problem in 1.5.6.1.Tax is not calculated correctly with discounts. It calculates before discount, not after. Link to comment Share on other sites More sharing options...
vekia Posted April 6, 2014 Share Posted April 6, 2014 what about this: http://www.prestashop.com/forums/topic/319321-solved-when-using-a-specific-price-discount-amount-tax-is-incorrect/ i think that it's related to this topic, am i right? Link to comment Share on other sites More sharing options...
pandorrah Posted April 6, 2014 Share Posted April 6, 2014 I don't think so, but i will test this solution.Let me get back to you in a few minutes... Link to comment Share on other sites More sharing options...
pandorrah Posted April 6, 2014 Share Posted April 6, 2014 No, not the same problem.See attachment. After the discount the 21% VAT should be € 8,68 in taxes (=21%). PDF invoice makes € 10,32 of it. Link to comment Share on other sites More sharing options...
pandorrah Posted April 6, 2014 Share Posted April 6, 2014 Even standard tax is calculated wrong:21% over € 60,00 should be € 10,41, it calculates € 10,32. Price rounding is set to 'classic'.When applying a discount of € 10,00, total should be: € 50,00, of which 21% tax should be € 8,68; it calculates €10,32. Link to comment Share on other sites More sharing options...
Mister Denial Posted November 26, 2014 Share Posted November 26, 2014 Is it correct that 1.6.0.9 now applies discounts BEFORE tax? That would be the correct order according to my expert accountant. Link to comment Share on other sites More sharing options...
mojweb Posted December 8, 2014 Share Posted December 8, 2014 1.6.0. applies discount after tax. If this will be changed, must be option in BO. In our country if i advertise -5€ discount, it means -5€ on price with tax. Link to comment Share on other sites More sharing options...
Mister Denial Posted December 9, 2014 Share Posted December 9, 2014 1.6.0. applies discount after tax. If this will be changed, must be option in BO. In our country if i advertise -5€ discount, it means -5€ on price with tax. Hi Mojweb - are you sure about that? Because it does not make any difference for the customer wether you apply the discount before or after tax, for him the total discount will always be the same, but for the merchant, you will have more tax to pay. According to my expert accountant, deductions and discounts should always be calculated on the ex-vat price. I also checked with our government's tax bureau, they confirmed that. Link to comment Share on other sites More sharing options...
mojweb Posted December 9, 2014 Share Posted December 9, 2014 You are right. I want to say, that discount must be shown to customer as i stated. Maybe in US customers are used to see discount deducted on price without tax, but here they not Sorry for my english, im not native speaker. Link to comment Share on other sites More sharing options...
Mister Denial Posted December 9, 2014 Share Posted December 9, 2014 No problem, your English is fine! :-) Any you're right, the customer must see the total discount, the only difference is how much of that discount is product value, and how much is tax. I don't think the customer really cares, as long as he get's his 20% off or something, but it makes quite a difference on how much taxes you have to pay to the government. And if you're in a 18-25% VAT country, that can make a difference of thousands and thousands of Euros per year. Link to comment Share on other sites More sharing options...
Alterni Posted September 22, 2015 Share Posted September 22, 2015 Hello, I want to show the discount in invoice.product-tab to be inclusive of GST. The discount inclusiv of GST is supposed to be RM5.00 but is is shown as RM 4.72 (excl. GST) Reference Product GST Rate Base price (Tax incl.) Unit Price (Tax incl.) Qty Total (Tax incl.) IRISTAL PLUS - Select Size : 120 capsules 6 % -- RM88.20 1 RM88.20 Discounts Alterni Online Rewards Voucher - RM4.72 I believe below is the code that we need to change. I changed cart_rule.value_tax_excl to cart_rule.value_tax_incl but there were no figures shown at all. ------------------------------------------------------------------------------------------------------------ {l s='Discounts' pdf='true'} </th> </tr> {/if} <tr class="discount"> <td class="white right" colspan="{$layout._colCount - 1}"> {$cart_rule.name} </td> <td class="right white"> - {displayPrice currency=$order->id_currency price=$cart_rule.value_tax_excl} </td> </tr> {/foreach} </tbody></table> ------------------------------------------------------------------------------------------------------------ I appreciate if someone can help me on this matter. Thanks. Link to comment Share on other sites More sharing options...
cyremia Posted September 29, 2015 Share Posted September 29, 2015 (edited) Hi, Assuming the Discounts includes VAT, I found a solution. It is still being tested so be careful when you use it. I found that the problem come from the confirmation emails and the variable {total_tax_paid} which does not take into account the discounts. The calculation for {total_tax_paid} in the file mailalerts.php does not seem to make any reference to the tax on discounts. See below: '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $currency, false), (note that it should be a negative number because $order->total_products_wt - $order->total_products should be <0 ) I changed it to: '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl) + ($order->total_discounts_tax_excl - $order->total_discounts_tax_incl), $currency, false), (Note how I added the calculation with the discount tax) And it seems to work. As I said. It MUST be tested! Edited September 29, 2015 by cyremia (see edit history) Link to comment Share on other sites More sharing options...
ukbaz Posted September 30, 2015 Author Share Posted September 30, 2015 No problem, your English is fine! :-) Any you're right, the customer must see the total discount, the only difference is how much of that discount is product value, and how much is tax. I don't think the customer really cares, as long as he get's his 20% off or something, but it makes quite a difference on how much taxes you have to pay to the government. And if you're in a 18-25% VAT country, that can make a difference of thousands and thousands of Euros per year. I quite agree re this - Is there a solution yet to correctly apply discount before tax? Baz Link to comment Share on other sites More sharing options...
z72diego Posted May 9, 2019 Share Posted May 9, 2019 (edited) Hi, sorry for raising such an old thread, but in PS 1.6.123 this still happens. There is no way to configure if the discount is applied "after-tax" or "before-tax". In my case, i need to apply discounts before tax, and searching i found this thread. If any expert has an idea, it will be well received Thanks! Edited May 9, 2019 by z72diego (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted May 9, 2019 Share Posted May 9, 2019 @z72diego This is normal and correct behavior, so in fact not an issue. Did you tried to apply the codesnippet named herein before ? It should work for you. Link to comment Share on other sites More sharing options...
z72diego Posted May 9, 2019 Share Posted May 9, 2019 hace 10 horas, selectshop.at dijo: @z72diego This is normal and correct behavior, so in fact not an issue. Did you tried to apply the codesnippet named herein before ? It should work for you. Thanks for your reply @selectshop.at yeah, i know it is, but i would like to apply discounts to the pre-tax price. For example if I have an order: Product A - Unit price (without tax) $ 10 - Quantity 1 TAX 21% Discount 20% Actually PS takes the product in this way: $10 * 1.21 = $12.10 and for that price applies the 20% discount, so $ 9.68 will be the total to pay. I want the discount to be calculated in the price without taxes and these are then applied. $ 10 -20% = $ 8 * 1.21 = $ 9.68 I know that the total is the same, but not the total of the tax. In the first case, the total of the tax it's $ 2.10 and in the second case, $ 1.68. For final consumers this does not affect, but when (in my country) a commerce that receives taxes sells to another that also receives taxes, there is a very important difference. Link to comment Share on other sites More sharing options...
selectshop.at Posted May 9, 2019 Share Posted May 9, 2019 What's about the code snippet mentioned in here 4 posts before ? They do not work for you ? After change the code delete browser cache and smarty cache on your back-office. Link to comment Share on other sites More sharing options...
z72diego Posted May 9, 2019 Share Posted May 9, 2019 En 29/9/2015 a las 12:42 PM, cyremia dijo: Hi, Assuming the Discounts includes VAT, I found a solution. It is still being tested so be careful when you use it. I found that the problem come from the confirmation emails and the variable {total_tax_paid} which does not take into account the discounts. The calculation for {total_tax_paid} in the file mailalerts.php does not seem to make any reference to the tax on discounts. See below: '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $currency, false), (note that it should be a negative number because $order->total_products_wt - $order->total_products should be <0 ) I changed it to: '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl) + ($order->total_discounts_tax_excl - $order->total_discounts_tax_incl), $currency, false), (Note how I added the calculation with the discount tax) And it seems to work. As I said. It MUST be tested! Do u mean this code snippet? Link to comment Share on other sites More sharing options...
selectshop.at Posted May 9, 2019 Share Posted May 9, 2019 Yes. Link to comment Share on other sites More sharing options...
z72diego Posted May 9, 2019 Share Posted May 9, 2019 I'll do the test but I do not know, since that code snippet refers to a modification in the file mailalerts.php This that we speak rather should affect the whole store, modifying I imagine product.php for example I will do the test and then share the results here. Thanks, If you can think of something else, please let me know. Link to comment Share on other sites More sharing options...
selectshop.at Posted May 11, 2019 Share Posted May 11, 2019 On 5/9/2019 at 9:51 PM, z72diego said: This that we speak rather should affect the whole store, modifying I imagine product.php for example Yeah, you should also read what was written before (April 2014 - vekia) 😉. There is a reference to another post and the solution was posted here: https://www.prestashop.com/forums/topic/296338-how-to-disable-tax-on-amount-of-discount/?tab=comments#comment-1497024 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