I see that tax information is kept at order level but I cannot see any setters/getters for it.
It could be related with Quote Items or even with Shipping addresses?
Anybody knows how tax is related to order?
I see that tax information is kept at order level but I cannot see any setters/getters for it.
It could be related with Quote Items or even with Shipping addresses?
Anybody knows how tax is related to order?
There are fields on the sales_order table for taxes after they've been calculated:
| tax_refunded | decimal(12,4)
| tax_canceled | decimal(12,4)
| base_tax_refunded | decimal(12,4)
| base_tax_canceled | decimal(12,4)
| tax_invoiced | decimal(12,4)
| base_tax_invoiced | decimal(12,4)
| shipping_tax_amount | decimal(12,4)
| base_shipping_tax_amount | decimal(12,4)
| shipping_tax_refunded | decimal(12,4)
| base_shipping_tax_refunded | decimal(12,4)
When you have an order object, you can use the normal Magento getters to obtain this data. E.g.
$taxRefunded = $order->getTaxRefunded();
Hope that helps.
Thanks, Joe