1

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?

Naeem Ul Wahhab
  • 2,465
  • 4
  • 32
  • 59
Elzo Valugi
  • 27,240
  • 15
  • 95
  • 114

1 Answers1

10

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

Joe Mastey
  • 26,809
  • 13
  • 80
  • 104