Jump to content

Prestashop STILL applying Tax BEFORE discount!


ukbaz

Recommended Posts

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

post-21762-0-09514800-1375432943_thumb.jpg

post-21762-0-42119200-1375433030_thumb.jpg

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...

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

  • 7 months later...
  • 2 weeks later...

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

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

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

  • 9 months later...

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

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 by cyremia (see edit history)
Link to comment
Share on other sites

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

  • 3 years later...

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 by z72diego (see edit history)
Link to comment
Share on other sites

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

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

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

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

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...