1

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

  • Could you post screenshot of your settings under Sales > Tax > Shopping cart display settings? Are there 2 products with different tax classes in cart? Here's how it looks on a default sample data, 2 products with 2 different tax rates (one higher added for a test purpose): imgur.com/T5aSreK – versedi Jan 19 '17 at 9:43
  • @versedi Added a screenshot for the configuration. – Artur Rain Jan 19 '17 at 9:46
  • I've reproduced your error but only one time - just after adding the new tax class and applying it to item that was already in customer's cart. Could you try removing both items and adding them again to cart? – versedi Jan 19 '17 at 9:49
  • Its the same... Removed everything from cart and added another item and still the same... Also, can it be, because the 2nd tax is applied to the customer group? – Artur Rain Jan 19 '17 at 9:52
  • Yes, that is the reason. I've assumed that you've created a separate tax class for product (in some countries different product types have lowered/normal/higher tax rate). In this case the tax will be displayed as a single row. I'll look into it and try to provide you with a solution. – versedi Jan 19 '17 at 10:08
1

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.

  • Yeah, that shows it, but the issue now is that the 2nd tax is calculated from the Price + 1st tax and I need to calculate it from the price without taxes. Any ideas how to solve this? Because the final price with both taxes isn't correct. – Artur Rain Jan 19 '17 at 10:23
  • From user experience point of view: In my humble opinion if it's calculated of the subtotal for both taxes then it should be compounded and displayed as one tax value. From technical point of view: It is possible but it would require rewritting of whole tax calculation process - the priority and tax compounding is deep down in the Tax model and then passed accordingly in that prepared form to block class. – versedi Jan 19 '17 at 10:34
  • Ok, thank you very much! I will take a look into it. – Artur Rain Jan 19 '17 at 10:51
  • if we use same priority also, than it will work fine in invoice page but not working in order view page, can you please check here & help me..... – Baby in Magento Jul 17 '17 at 7:23
  • user experience or not(mosty not because customers request lines be separated), but in Canada, BC it is required to have a break down of GST vs PST tax by line. Why didnt Magento solve this issue? – Kalvin Klien Dec 14 '18 at 20:55
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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