I came accross a problem with one of our customers order on magento There seems to be two problems.

  1. In backend there 5 items. 3 of the items has discount applied on them. 2 items do not have any discount applied on them + they both have exactly the same prices. But one of the items Row Total is not correct (it has some additional amount). But at the same time Grand Total is correct (Grand total is ignoring the extra amount on row total for this item)

  2. After debugging i found in the database for this items both quote item and order item tables has hidden_tax_amount set.

To me this seems like a bug. From my understanding hidden_tax_amount cannot be applied on the itemsif there is no discount applied to the item. Second somehow even magento thinks it is wrong that is why not calculating this hidden_tax_ammount in Grand Total. Any thoughts will be appreciated.