4

On a Magento CE 1.9.2.2 website I'm having an issue where the Grand Total does not include tax, even though the Subtotal does. What this means is that my Subtotal figure is higher than the Grand Total, which is clearly wrong.

I've tried changing every setting in the Admin panel to do with tax and cannot get this to work.

These are some example figures on the shopping cart which also carry through to the checkout:

Subtotal (Excl. Tax)    £909.50
Subtotal (Incl. Tax)    £1,091.40
Tax                     £181.90
Grand Total             £909.50

This is wrong - the Grand Total shold be £1091.40 because that should be the subtotal (£909.50) plus any tax (£181.90)

My configuration and settings are like this:

  • Product price is 909.50
  • Product has a tax class of VAT. The tax rules mean 20% tax is applied, which we can see is happening in "Subtotal (Incl. Tax)".
  • Catalog prices: Excluding tax (this is to specify that the Admin has entered 909.50 as an Ex. Tax price, which is correct).
  • Tax calculation based on: Shipping address. A UK shipping address has been used in this example so this is correct to apply 20% tax.
  • Display Subtotal: Including and Excluding tax. This is correct because the cart and checkout do display both ("Excl. tax" and "Incl. tax")

If I set "Include Tax in Grand Total" to "No" it gives the total above (909.50) which is wrong. However... if I set this to "Yes" it makes the problem even worse - it makes even less sense by outputting this:

Subtotal (Excl. Tax)    £909.50
Subtotal (Incl. Tax)    £1,091.40
Grand Total Excl. Tax   £727.60 (!!!)
Tax                     £181.90
Grand Total             £909.50

Templates have not been modified. Core code has not been modified. Caching is disabled.

Does anyone have any ideas? We are all scratching our heads over this one!

3
  • have you added custom module that change total? Jan 5, 2016 at 12:04
  • @denishvachhani No. I have gone through the list of extensions/modules and there are none which would do this. Also the site was using a theme so I reverted back to the base/default templates to ensure nothing in the template files was doing this, so can also rule that out.
    – Andy F
    Jan 5, 2016 at 12:05
  • check backend grand total from checkout and text. Jan 5, 2016 at 12:07

1 Answer 1

6

This helped me with a similar issue

"We're working in a 1.9 & PHP 7; detected this issue with paypal suspect fraud (due the difference amount).

All correct in front-end (apply taxes); but in checkout and calculation, Magento uses the grand total without taxes.

Actual wrong order calculation:

Product price without taxes + shipping with taxes = total amount to payment

Switch to PHP5 and calculation is correct.

Some idea?

Thanks!"

"On Magento 1.6.2 and PHP 7.0.2 I solved it this way:"

1 - Created first a local config.xml: Copied /app/code/core/Mage/Sales/etc/config.xml into /app/code/local/Mage/Sales/etc/config.xml

2 - Changed it like this enter image description here

enter image description here

Now it calculates correctly:

enter image description here

The correct way to do that is creating a NEW module with the new configuration like this one on https://github.com/hartmut-co-uk/magento-php7-totals-fix

To avoid editing core files.

All credits thanks to => original source

1
  • i am also facing same issue but one out of 1000 orders and it's very rare that we are facing issue in Magento 2.3.5. same issue happened in live site GrandTotal > SubTotal without applying any coupon code. Even in this case it's not taken subtotal without tax price. i completely check in quote and sales_order table but no discount applied. Subtotal: 94.50, Shipping Incl Tax: 5.95, GrandTotal: 91.69 Jul 30, 2020 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.