Here are the steps to create an invoice without updating total paid of order in Magento 2:

  1. Step 1: Use event sales_order_invoice_pay
  2. Step 2: Write the observer class

In Magento, the total paid by Orders will be increased after created an invoice. That means every time you create a new invoice, Magento records that you received money from customers. However in the case of using partial payment, customers can make the payment many times for an Order. You don’t want that each time they make a payment, you must create a new invoice. So how can we create the invoice without updating the total paid of Order? Just follow a few easy steps below. If want to programmatically create an invoice for an order then the solution is here you can learn here how to create an invoice for an order or a part of your order.

Create an invoice in Magento 2

Create an invoice in Magento 2

Step 1: Use event sales_order_invoice_pay

Declare observer in events.xml of your custom module: /app/code/[NameSpace]/[ModuleName]/etc/events.xml

Step 2: Write the observer class



Ready to foster your knowledge


Is your site still a mess and Magento extensions are not enough to save your site? Save your site with Magento Web Development Services now

magento services

How to Send Order Email to A Custom Email Address
How to Get Stock Items List in Magento 2

Leave a Reply

Your email address will not be published. Required fields are marked *