0

I have an issue I can't change the sort order of tax in pdf order

I have tried this solution but never worked for me

Rearrange the position of subtotal,shipment,tax in pdf invoice magento 2

I have tried to add this code in vendor/magento/module-sales/etc/pdf.xml

    <total name="tax_amount">
        <title translate="true">Tax</title>
        <source_field>tax_amount</source_field>
        <font_size>7</font_size>
        <display_zero>true</display_zero>
        <sort_order>101</sort_order>
    </total>

but it duplicate tax row it showed up two times

and no data to change the sort order of tax in this file pdf.xml

Please help thanks,

1 Answer 1

0

The sorting of these fields is handled by the sort_order attribute of each totals list item.

The sort_order values are stored in:

app/code/core/Mage/Sales/etc/config.xml

For all rows except the Tax row which is stored in

app/code/core/age/Tax/etc/config.xml

If you copy these files to app/code/local/ and alter these values you can manipulate the order to your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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