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

#   How to change the next invoice number?

##

- **[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")**
- [![oloccina's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23273.jpg)](/forum/user/23273-oloccina "View oloccina's Profile") Topic Author
- [ Offline](/forum/user/23273-oloccina)

Less More

- Posts: 224
- Thank you received: 8
-
-

3 years 11 months ago [\#346605](#346605) by [oloccina](/forum/user/23273-oloccina "View oloccina's Profile")  *[How to change the next invoice number?](/forum/25-install-update/905356-how-to-change-the-next-invoice-number#346605 "Hello, is there an easy way to change the next invoice number via the dashboard? I cannot find any option.  If this needs to be done in the database, can you provide some guidance?  Thanks")* was created by *[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")*

Hello,
is there an easy way to change the next invoice number via the dashboard?
I cannot find any option.

If this needs to be done in the database, can you provide some guidance?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTM1Ni1ob3ctdG8tY2hhbmdlLXRoZS1uZXh0LWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

3 years 11 months ago [\#346613](#346613) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the next invoice number?](/forum/25-install-update/905356-how-to-change-the-next-invoice-number#346613 "Hello, is there an easy way to change the next invoice number via the dashboard? I cannot find any option.  If this needs to be done in the database, can you provide some guidance?  Thanks")*

Hi,

It depends. The invoice number is generated based on the "invoice number format" setting in the HikaShop configuration. So to be able to say how to change the next invoice number, we would first need to need what format you're using for it.
Could you provide that information ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTM1Ni1ob3ctdG8tY2hhbmdlLXRoZS1uZXh0LWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")**
- [![oloccina's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23273.jpg)](/forum/user/23273-oloccina "View oloccina's Profile") Topic Author
- [ Offline](/forum/user/23273-oloccina)

Less More

- Posts: 224
- Thank you received: 8
-
-

3 years 11 months ago [\#346626](#346626) by [oloccina](/forum/user/23273-oloccina "View oloccina's Profile")  Replied by *[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")* on topic *[How to change the next invoice number?](/forum/25-install-update/905356-how-to-change-the-next-invoice-number#346626 "Hello, is there an easy way to change the next invoice number via the dashboard? I cannot find any option.  If this needs to be done in the database, can you provide some guidance?  Thanks")*

I am using
{id} - {date format="Y"}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTM1Ni1ob3ctdG8tY2hhbmdlLXRoZS1uZXh0LWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

3 years 11 months ago [\#346634](#346634) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the next invoice number?](/forum/25-install-update/905356-how-to-change-the-next-invoice-number#346634 "Hello, is there an easy way to change the next invoice number via the dashboard? I cannot find any option.  If this needs to be done in the database, can you provide some guidance?  Thanks")*

So, if you use {id} it will be replaced by the max order_invoice_id + 1.
If you want the next order's number to be bigger than the current one, you can create an order and change its order_invoice_id to be one lower. For example, if you want the next order's number to start with 2000, you want to set 1999 in the order_invoice_id of your order via PHPMyAdmin.
If you want the next order's number to be lower than the current one, then it's a bit more difficult. You would need to change the order_invoice_id of all the existing orders to be lower than the order_invoice_id you want. It's possible with a MySQL query (or a mass action with an "update the values" action on the order_invoice_id column).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTM1Ni1ob3ctdG8tY2hhbmdlLXRoZS1uZXh0LWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")**
- [![oloccina's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar23273.jpg)](/forum/user/23273-oloccina "View oloccina's Profile") Topic Author
- [ Offline](/forum/user/23273-oloccina)

Less More

- Posts: 224
- Thank you received: 8
-
-

3 years 11 months ago -  3 years 11 months ago [\#346642](#346642) by [oloccina](/forum/user/23273-oloccina "View oloccina's Profile")  Replied by *[oloccina](/forum/user/23273-oloccina "View oloccina's Profile")* on topic *[How to change the next invoice number?](/forum/25-install-update/905356-how-to-change-the-next-invoice-number#346642 "Hello, is there an easy way to change the next invoice number via the dashboard? I cannot find any option.  If this needs to be done in the database, can you provide some guidance?  Thanks")*

Thanks.

See here [ tinyurl.com/2pjyz5ke](https://tinyurl.com/2pjyz5ke)

My last order_invoice_id is 14
So the next invoice number should be 15, right?

This would be correct

I asked because I generated a new order plus an invoice with number 15 to make a test, and then deleted it.
But I was worried the system would now generate starting from number 16.

Looking at the database though, I guess if I delete a confirmed order the next order will take it's place in term of invoice numbering?

Last edit: 3 years 11 months ago by [oloccina](/forum/user/23273-oloccina "View oloccina's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTM1Ni1ob3ctdG8tY2hhbmdlLXRoZS1uZXh0LWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

3 years 11 months ago [\#346643](#346643) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to change the next invoice number?](/forum/25-install-update/905356-how-to-change-the-next-invoice-number#346643 "Hello, is there an easy way to change the next invoice number via the dashboard? I cannot find any option.  If this needs to be done in the database, can you provide some guidance?  Thanks")*

Hi,

Yes.
If the order was deleted, then yes, the next one will have the same order_invoice_id.
Only the order_id will keep incrementing even if you delete the last order.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTM1Ni1ob3ctdG8tY2hhbmdlLXRoZS1uZXh0LWludm9pY2UtbnVtYmVyP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) 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.069 seconds

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