Skip to content

Taxation details of order totals #444

Closed
@ghost

Description

Magento 1 does not save sufficient information for how it taxed shipping (along with other totals like giftwrapping, etc)

It looks like Magento 2 has the same issue. In the below code

Magento\Tax\Helper\Data

    if ($current && $source) {
        if ($current->getShippingTaxAmount() != 0 && $current->getBaseShippingTaxAmount() != 0) {
            $taxClassAmount[0]['tax_amount']        = $current->getShippingTaxAmount();
            $taxClassAmount[0]['base_tax_amount']   = $current->getBaseShippingTaxAmount();
            if ($current->getShippingHiddenTaxAmount() > 0) {
                $taxClassAmount[0]['hidden_tax_amount'] = $current->getShippingHiddenTaxAmount();
            }
            $taxClassAmount[0]['title']             = __('Shipping & Handling Tax');
            $taxClassAmount[0]['percent']           = null;
        }
    }

Magento should

  1. be able to supply the tax percentage
  2. be able to supply the correct tax rate name (instead of a generic Shipping and Handling Tax)

Overall I would propose looking into making totals first class citizens for taxation. In Magento 1 entries into sales_order_tax_item would be one approach.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions