- Posts: 49
- Thank you received: 2
Invoice number reset (new year)
- CorneliaML
-
Topic Author
- Offline
Less
More
7 years 9 months ago #301694
by CorneliaML
Invoice number reset (new year) was created by CorneliaML
-- url of the page with the problem -- :
www.cornelia-lachnitt.de
-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.2
Hi there,
I want the invoice numbers (not the order numbers) to be reset on the 1st of January next year.
The configuration is as follows:
Is there anything else I have to configure?
Many thanks in advance
Torsten
-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
-- PHP version -- : 7.2
Hi there,
I want the invoice numbers (not the order numbers) to be reset on the 1st of January next year.
The configuration is as follows:
Is there anything else I have to configure?
Many thanks in advance
Torsten
Please Log in or Create an account to join the conversation.
7 years 9 months ago #301699
by nicolas
Replied by nicolas on topic Invoice number reset (new year)
Hi,
This won't work. In the "invoice number format", you have the "order_id" tag instead of "id" or "order_invoice_id". What the "invoice numver reset frequency" resets is actually the order_invoice_id, the order_id is never reset.
So you would have to change the format to use id or order_invoice_id.
Note however that when you do, your new orders' invoice number will probably not match with the previous ones. To avoid that, you would have to modify the order_invoice_id of the last order in the hikashop_order table via your phpmyadmin and set it to the order_id value of that last order. That way, for the next order, it will automatically use the the same id/number as it would have if basing itself on the order_id.
This won't work. In the "invoice number format", you have the "order_id" tag instead of "id" or "order_invoice_id". What the "invoice numver reset frequency" resets is actually the order_invoice_id, the order_id is never reset.
So you would have to change the format to use id or order_invoice_id.
Note however that when you do, your new orders' invoice number will probably not match with the previous ones. To avoid that, you would have to modify the order_invoice_id of the last order in the hikashop_order table via your phpmyadmin and set it to the order_id value of that last order. That way, for the next order, it will automatically use the the same id/number as it would have if basing itself on the order_id.
Please Log in or Create an account to join the conversation.
- CorneliaML
-
Topic Author
- Offline
Less
More
- Posts: 49
- Thank you received: 2
7 years 9 months ago #301748
by CorneliaML
Replied by CorneliaML on topic Invoice number reset (new year)
Please Log in or Create an account to join the conversation.
7 years 9 months ago #301749
by nicolas
Replied by nicolas on topic Invoice number reset (new year)
Hi,
The change I was talking in the hikashop_order is only if you have a discrepency in the numbering (the format itself won't be a problem), but it might not be the case, or you might not care about it.
So if the result is ok for you like that, then no need to change the database.
The change I was talking in the hikashop_order is only if you have a discrepency in the numbering (the format itself won't be a problem), but it might not be the case, or you might not care about it.
So if the result is ok for you like that, then no need to change the database.
The following user(s) said Thank You: CorneliaML
Please Log in or Create an account to join the conversation.
- CorneliaML
-
Topic Author
- Offline
Less
More
- Posts: 49
- Thank you received: 2
7 years 9 months ago #301844
by CorneliaML
Replied by CorneliaML on topic Invoice number reset (new year)
Thanks again for your help, Nicolas 
I will get back to you if I encounter any problems or errors.
Best regards
Torsten
I will get back to you if I encounter any problems or errors.
Best regards
Torsten
Please Log in or Create an account to join the conversation.
- CorneliaML
-
Topic Author
- Offline
Less
More
- Posts: 49
- Thank you received: 2
7 years 8 months ago #303068
by CorneliaML
Replied by CorneliaML on topic Invoice number reset (new year)
Hi Nicolas,
somehow, the changes to the live site got lost and after our holiday, the first invoice number has the wrong format.
The first invoice of the year should start with "00012019", now we´ve got "01632019" as the last invoice in 2018 was "01622018".
How can I fix this?
Many thanks in advance
Torsten
somehow, the changes to the live site got lost and after our holiday, the first invoice number has the wrong format.
The first invoice of the year should start with "00012019", now we´ve got "01632019" as the last invoice in 2018 was "01622018".
How can I fix this?
Many thanks in advance
Torsten
Please Log in or Create an account to join the conversation.
7 years 8 months ago #303085
by nicolas
Replied by nicolas on topic Invoice number reset (new year)
Hi,
If you want to change the invoice ids and numbers, you can either open the hikashop_order table via your phpmyadmin and change the values of each order manually, or you can do that with a "display the results" action on the order data and select the columns you want to see/change via the menu System>Mass actions.
Once you finish the changes, make sure that you configured the "Invoice number reset frequency" setting to "every year", otherwise, it will continue with 01632019 instead of picking up the new numbering of 2019.
If you want to change the invoice ids and numbers, you can either open the hikashop_order table via your phpmyadmin and change the values of each order manually, or you can do that with a "display the results" action on the order data and select the columns you want to see/change via the menu System>Mass actions.
Once you finish the changes, make sure that you configured the "Invoice number reset frequency" setting to "every year", otherwise, it will continue with 01632019 instead of picking up the new numbering of 2019.
Please Log in or Create an account to join the conversation.
- CorneliaML
-
Topic Author
- Offline
Less
More
- Posts: 49
- Thank you received: 2
7 years 8 months ago #303147
by CorneliaML
Replied by CorneliaML on topic Invoice number reset (new year)
Hi Nicolas,
many thanks for your hints, helpful as always
I´ve change the configuration to the following (and also made sure that it was saved
)
So I guess I will try the "mass action"-method, this is the configuration:
If I click on process and edit the list, it will be saved to the database? And if I change the wrong "01632019" to "00012019", the next invoice number will be "00022019"?
Many thanks in advance
Torsten
many thanks for your hints, helpful as always
I´ve change the configuration to the following (and also made sure that it was saved
So I guess I will try the "mass action"-method, this is the configuration:
If I click on process and edit the list, it will be saved to the database? And if I change the wrong "01632019" to "00012019", the next invoice number will be "00022019"?
Many thanks in advance
Torsten
Please Log in or Create an account to join the conversation.
7 years 8 months ago #303154
by nicolas
Replied by nicolas on topic Invoice number reset (new year)
Hi,
Yes, it's exactly that. If you change cells in the results table and validate it will update the database, as if you were doing it from phpmyadmin.
Note that it's not only 01632019 that you need to change. You need to change all the invoice ids and numbers created since the beginning of the year. Only after that will it be able to pick up from there. That's because the system works like that:
When an order is confirmed, it will load the highest invoice id amongst all the orders created since the beginning of the year and increment that value to set it as the invoice id of that newly confirmed order.
Yes, it's exactly that. If you change cells in the results table and validate it will update the database, as if you were doing it from phpmyadmin.
Note that it's not only 01632019 that you need to change. You need to change all the invoice ids and numbers created since the beginning of the year. Only after that will it be able to pick up from there. That's because the system works like that:
When an order is confirmed, it will load the highest invoice id amongst all the orders created since the beginning of the year and increment that value to set it as the invoice id of that newly confirmed order.
Please Log in or Create an account to join the conversation.
- CorneliaML
-
Topic Author
- Offline
Less
More
- Posts: 49
- Thank you received: 2
7 years 8 months ago #303190
by CorneliaML
Replied by CorneliaML on topic Invoice number reset (new year)
Please Log in or Create an account to join the conversation.
7 years 8 months ago #303215
by nicolas
Replied by nicolas on topic Invoice number reset (new year)
Hi,
If you get zeros, it means that these orders were never confirmed and went straight from created to cancelled. Thus, no invoice number was generated for them so you can ignore them.
If you get zeros, it means that these orders were never confirmed and went straight from created to cancelled. Thus, no invoice number was generated for them so you can ignore them.
The following user(s) said Thank You: CorneliaML
Please Log in or Create an account to join the conversation.
- CorneliaML
-
Topic Author
- Offline
Less
More
- Posts: 49
- Thank you received: 2
7 years 8 months ago #303258
by CorneliaML
Replied by CorneliaML on topic Invoice number reset (new year)
Thank you Nicolas 
Best regards
Torsten
Best regards
Torsten
Please Log in or Create an account to join the conversation.
Time to create page: 0.231 seconds