How to Change the Sequence of Custom Field Before “subtotal” in Invoice in Magento 2 Backend

Something went wrong.
Related Posts:
In this example, the “qty” custom field is added and the sequence of “subtotal” changes as “qty” is placed in the first position.
Here, I have taken the example to change the sequence of custom field before “subtotal” in invoice in Magento 2 backend.
The default Magento 2 offers an invoice template as shown below.
If you have any doubts regarding this post, do mention them in the Comments section below.
Such changes in Magento 2 admin panel for invoice helps admin to get all the required details in invoice totals in the sequence of priority.
That’s all!

Steps to Change the Sequence of Custom Field Before “subtotal” in Invoice in Magento 2 Backend:

  1. Create registration.php file at appcodeVendorModule directory
  2. Create module.xml file at appcodeVendorModuleetc directory
  3. Create sales_order_invoice_new.xml file at appcodeVendorModuleviewadminhtmllayout
  4. Create Qty.php file at appcodeVendorModuleBlockSalesOrder

Never miss Magento tips, tricks, tutorials, and news.
Thank you for subscribing.
Using the above code, the QTY field is added to the invoice before subtotal as shown in below image.
Feel free to share the solution with Magento Community via social media.
Thank You.
Custom OP
The admin may want to add custom fields and change the sequence of the existing fields as per the business requirements.
Default Magento output

Get Weekly Updates

An invoice is the legal accounting document that shows the transaction details between a merchant and a customer. Businesses need to craft the invoice design meticulously as it represents the brand and contributes to customers’ trust and shopping experience.

The Magento 2 store admin has to generate invoices for orders placed online. The invoice layout in backend must also be such that helps admin manage the order details easily.
I would be happy to help.

/**/

/*.mfp-bg{background:#000000d4}
/*]]>*/

/*.mfp-bg.mfp-ready{opacity:.6}
/*]]>*/

(based on 0 Reviews)