2

I want to rearrange the position of subtotal,shipment,tax in pdf invoice. enter image description here

I want to move "tax" before grand total.

1 Answer 1

6

The sorting of the totals in the pdf is driven by the sort order assigned in the pdf.xml files. To for example change the sort order of tax create a new custom module and place into it the following etc/pdf.xml file

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Sales:etc/pdf_file.xsd">
    <totals>
        <total name="tax">
            <sort_order>650</sort_order>
        </total>
    </totals>
</config>

You also want to provide a sequence in your module so that it gets sorted after Magento_Tax.

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.