[Skip to main content](#vessel-content)

#   order\_invoice\_id / order\_invoice\_number

##

- **[nicobraam](/forum/user/50754-nicobraam "View nicobraam's Profile")**
- [![nicobraam's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/50754-nicobraam "View nicobraam's Profile") Topic Author
- [ Offline](/forum/user/50754-nicobraam)

Less More

- Posts: 49
- Thank you received: 3
-
-

5 years 8 months ago [\#330708](#330708) by [nicobraam](/forum/user/50754-nicobraam "View nicobraam's Profile")  *[order\_invoice\_id / order\_invoice\_number](/forum/35-orders-management/902159-order-invoice-id-order-invoice-number#330708 "-- url of the page with the problem -- :   www.coloresunidos.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.8  Hello,  I need to reset all invoice numbers and start like C21-0001. As the order&#95;invoice&#95;number comes from the order&#95;invoice&#95;id I need to reset the id to 0 so the next invoice number will be 1. I set the settings of &quot;reset invoice id&quot; to daily but the next morning it started from 526 again. The two invoices that are correct I changed them in the database &quot;hikashop&#95;order&quot; table. Is there a solution for this?  &#42;&#42;The Hikashop account for my website   www.coloresunidos.com  has activated again.")* was created by *[nicobraam](/forum/user/50754-nicobraam "View nicobraam's Profile")*

-- url of the page with the problem -- : [ www.coloresunidos.com](http://www.coloresunidos.com)
-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.8

Hello,

I need to reset all invoice numbers and start like C21-0001. As the order_invoice_number comes from the order_invoice_id I need to reset the id to 0 so the next invoice number will be 1. I set the settings of "reset invoice id" to daily but the next morning it started from 526 again. The two invoices that are correct I changed them in the database "hikashop_order" table. Is there a solution for this?

**The Hikashop account for my website [ www.coloresunidos.com](http://www.coloresunidos.com) has activated again.

- [ ![Pantallazo12-03-202111.17.37.png](/forum/attachment/52260) ](/forum/attachment/52260 "...2111.17.37.png") [ ](/forum/attachment/52260?download=1 "...2111.17.37.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjE1OS1vcmRlci1pbnZvaWNlLWlkLW9yZGVyLWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

5 years 8 months ago [\#330713](#330713) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[order\_invoice\_id / order\_invoice\_number](/forum/35-orders-management/902159-order-invoice-id-order-invoice-number#330713 "-- url of the page with the problem -- :   www.coloresunidos.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.8  Hello,  I need to reset all invoice numbers and start like C21-0001. As the order&#95;invoice&#95;number comes from the order&#95;invoice&#95;id I need to reset the id to 0 so the next invoice number will be 1. I set the settings of &quot;reset invoice id&quot; to daily but the next morning it started from 526 again. The two invoices that are correct I changed them in the database &quot;hikashop&#95;order&quot; table. Is there a solution for this?  &#42;&#42;The Hikashop account for my website   www.coloresunidos.com  has activated again.")*

Hi,

At first, reading your message, I thought you meant that the daily reset of the invoice id didn't work.
But looking at your screenshot it seems it worked for 21-0001 and 21-0002
And checking the code on our end for that capability, I don't see any problem with it.
So after thinking about it and rereading your message several times, it seems that you're not saying that this doesn't work, but that if you set it to daily for a day and then you change it again, it continues the increment again were it was left before.
And that's normal based on how the reset system works.
When HikaShop needs to generate the order_invoice_id, it will get the higher order_invoice_id already in the database for the period selected in the reset frequency option. So if you have "daily" selected, it will get the higher order_invoice_id of the current day.
But if you set it to "yearly", it will get the higher_order_invoice_id of the current year.

So if you want to reset the increment regardless of what order_invoice_ids were generated up until now, the best is to set them to 0 for all the orders already created. Since you're using the order_invoice_number for reference and not the order_invoice_id, it should not change anything for your customers or your accounting, but then HikaShop will start again from 0.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjE1OS1vcmRlci1pbnZvaWNlLWlkLW9yZGVyLWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicobraam](/forum/user/50754-nicobraam "View nicobraam's Profile")**
- [![nicobraam's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/50754-nicobraam "View nicobraam's Profile") Topic Author
- [ Offline](/forum/user/50754-nicobraam)

Less More

- Posts: 49
- Thank you received: 3
-
-

5 years 8 months ago [\#330758](#330758) by [nicobraam](/forum/user/50754-nicobraam "View nicobraam's Profile")  Replied by *[nicobraam](/forum/user/50754-nicobraam "View nicobraam's Profile")* on topic *[order\_invoice\_id / order\_invoice\_number](/forum/35-orders-management/902159-order-invoice-id-order-invoice-number#330758 "-- url of the page with the problem -- :   www.coloresunidos.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.8  Hello,  I need to reset all invoice numbers and start like C21-0001. As the order&#95;invoice&#95;number comes from the order&#95;invoice&#95;id I need to reset the id to 0 so the next invoice number will be 1. I set the settings of &quot;reset invoice id&quot; to daily but the next morning it started from 526 again. The two invoices that are correct I changed them in the database &quot;hikashop&#95;order&quot; table. Is there a solution for this?  &#42;&#42;The Hikashop account for my website   www.coloresunidos.com  has activated again.")*

Hello,

Is there a way to set the order_invoice_id table to 0 all at once instead of doing it manually?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjE1OS1vcmRlci1pbnZvaWNlLWlkLW9yZGVyLWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

5 years 8 months ago [\#330786](#330786) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[order\_invoice\_id / order\_invoice\_number](/forum/35-orders-management/902159-order-invoice-id-order-invoice-number#330786 "-- url of the page with the problem -- :   www.coloresunidos.com  -- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.8  Hello,  I need to reset all invoice numbers and start like C21-0001. As the order&#95;invoice&#95;number comes from the order&#95;invoice&#95;id I need to reset the id to 0 so the next invoice number will be 1. I set the settings of &quot;reset invoice id&quot; to daily but the next morning it started from 526 again. The two invoices that are correct I changed them in the database &quot;hikashop&#95;order&quot; table. Is there a solution for this?  &#42;&#42;The Hikashop account for my website   www.coloresunidos.com  has activated again.")*

Hi,

Sure. You can run a mass action via the menu system&gt;Mass actions for that.
The mass action will have to be of the type "order", and you'll just need an action of the type "update the values" on the column "order_invoice_id" and the value 0 with the type being "int".

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50LzkwMjE1OS1vcmRlci1pbnZvaWNlLWlkLW9yZGVyLWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.047 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
