How to setup Same Invoice Number with Order Number in Magento 2
Magento 2 custom order number is released with the helpful support to store owners make the flexible changes to the Order number increment ID. With the customized formula is built up depending on the targeted messages of a store owner, hence, the business data is more safely protected.
Especially, one of the most highlighted features of this module is creating the same invoice number based on order number. This function leads the steps of the backend to become simplified and time-saving.
- Why is custom order number necessary for online stores?
- How to configure same invoice number depending on order number?
1. Why is custom order number or invoice number useful?
It is widely admitted by a huge number of online shop owners that modifying the formula of orders and relating billing documents (invoice, shipment, credit memo) is necessary. This is the changing of boring default number string like 00000001, 00000002 to more complicated one such as ORD-01-300318-0001 or INV- 01-300318-0001 for an order placed on Mar 30th, 2018.
Such a sensitive kind of number strings follows a secret structure set by each store owner, which will protect their data from competitives. Besides, it also impresses shoppers or visitors by overall professional-looking number systems from order, invoice, shipment to credit memo.
2. How to configure same invoice number depending on order number?
Take a close look at a noted feature of Mageplaza Custom Order Number - matching invoice number with order number. This function allows admins to track all billing documents more efficiently.
The invoice number will be set up synchronically with order number, for example:
The order number is ORD-01082018123, then the invoice number will be INV - 01082018123
Hence, to set up the invoice number, let ’s take a look at the customized formula of custom order number in the admin backend
To configure this extension please go to Login to the Magento Admin, choose
Store > Settings > Configuration > Mageplaza Extensions > Customer Order Number.
At General Configuration section, choosing
Enable box to activate the module.
At Order Number section, choose
Enable box to activate this function.
Then, you will see some boxes with particular functions as follows:
- Enter the format for the Order number. For instance, ORD-[store_id]-[yy]-[mm]-[dd]-[2N]-[2counter]
- Only support some variables as: [store_id], [yy], [mm], [dd], [2N], [2counter], [4AN], [4A], [4N], [store_code], [y], [yyy], [M], [D], [m], [d]
- If the format of supported variables is entered wrong, the order ID will be displayed under the text
- Counter Start From:
- Enter the counter when using the variable [counter]. When the number of digits in this field is less than the number of digits of the variable [counter], the ID is automatically added to the number 0 in front. Example: If you enter as 15 while counter variable is set [4counter], the ID displayed will have the format as 0015.
- The ID of the next order will begin with the number entered and it will incrementally increase based on the
Counter by Stepfield below.
- For example, when you use the variable [2counter], if you enter 04, the order ID after configuring will start from 04
- If you want to change the
Counter Start Fromfield, after entering a new value and saving, admins need to click on
Reset Nowbutton so that the Order ID can get a new
Counter Start Fromvalue.
- Counter by Step:
- Enter the distance number order ID of the next orders
- For example, if you enter 2, the order ID of next orders will be separated by 2 units and gradually increased
- If leaving this field blank, the default ID of orders will be separated by 1 unit.
- Counter by Store:
- If you choose Yes, the order ID of the different stores will be increased separately based on the configuration of each store. For example, store A has an order ID as 50, store B has no order. Customers place the order at the store B, this order ID is 01.
- If you choose No, the order ID of different stores will be merged and increased in succession based on the configuration of Main Website. For instance: Store A has 50 orders and the order ID is 50, store B don’t have any order. When customers purchase the products in the store B, the order ID of store B is 51.
- Reset Counter = Daily: Counter will be reset to the
Counter Start Fromvalue that is using at 00h daily
- Reset Counter = Weekly: Counter will be reset to the
Counter Start Fromvalue that is using at 00h the first day of the week
- Reset Counter = Monthly: Counter will be reset to the
Counter Start Fromvalue that is using at 00h the first day of the month
- Reset Counter = No: Counter will NOT be reset to the
Counter Start Fromvalue that is using.
- Reset Now Button: Counter will be reset to the
Counter Start Fromvalue that is using instantly. For example,
Counter Start Fromfield is 10000 now,
Counter Stepis 5. After a long time to order and click on
Reset Now, the ID of the next order after resetting will start from
Counter Start From + Counter Stepvalues.
Now, you have finished the based step to form the formula of order number. To set up the same invoice, it will be very simple as follows:
Enable box, please choose option
“Same as order number”
Replace box, type the prefix of order number would be changed. At To box, type the replacement value.
For example, The Invoice ID of an Order ID which is ORD-01-10-2005-000123 will be INV-01-10-2005-000123