Question

I can not find any information related to this.

I need to display tax rates with their corresponding amounts.

Now I have like this:

enter image description here

But I would like to show the total of both taxes with their amounts, can anyone advice how to achieve that?

Example:

  • Subotal: 41.24€

  • IVA (21%) - x€

  • RE (5.2%) - y€

  • Tax - 10.80€
  • Final price: 52.04€

Thank you very much,

Here's configuration for the taxes in Shopping cart:enter image description here

Was it helpful?

Solution

This is caused by having tax rules at the same priority.

Go to Sales > Tax > Manage Tax Rules

Select one of the rules that are affecting specific customer group. Scroll down to Priority field. As you can see there's a note:

Tax rates at the same priority are added, others are compounded.

Change the priority to a higher/lower number than the main rule is. Now the breakdown in cart checkout will show value for each tax rate that's applied.

OTHER TIPS

I found a solution(only if you don't require tax compounding):

Since the two tax rate display only works when you use compounding (GST priority 1, PST priority 2), I decided to change it to just use normal calculation instead of compounding tax on top of Subtotal.

In my case the taxes are GST and PST. So I setup GST priority 1, PST priority 2.

More on compound tax calculation: https://docs.magento.com/m1/ce/user_guide/tax/tax-compound.html

Changes in Magento CE 1.9.4.0:

File:

/app/code/Mage/Tax/Model/Resource/Calculation.php

Around line 190:

if (!empty($rates[$i]['calculate_subtotal'])) {
    $row['percent'] = $currentRate;
    $totalPercent += $currentRate;
}
else {
   $row['percent'] = $this->_collectPercent($totalPercent, $currentRate);
   $totalPercent += $row['percent'];
}

replace:

$row['percent'] = $this->_collectPercent($totalPercent, $currentRate);
$totalPercent += $row['percent'];

with:

$row['percent'] = $currentRate;
$totalPercent += $currentRate;

Then the tax rate for 2nd tax will be correct and display on front-end / back-end / invoice will be correct too.

I'm not sure what effects this will have on your store, but from my testing it looks ok. We don't use compound tax anywhere so this temp fix works.

PS: obviously you need to put this under /app/code/local/Mage/Tax/Resource/Calculation.php so you wouldn't modify the core code.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top