How to change next invoice number?

  • Posts: 224
  • Thank you received: 8
5 years 10 months ago #302147

Hello,
my invoices numbers reset every year, but I need to change the next invoice number that will be generated
in phpmyadmin for my last invoice I see
order_invoice_id: 4
order_invoice_number: 4 - 2019

see nimb.ws/CWYOcj

should I just change this order_invoice_id value eg. to 10 if I want the next invoice number to be 11 ?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 10 months ago #302148

Hi,

Yes, you need to change the last order_invoice_id of the current year with the value you want minus 1 so that the next order will get the value you want.
If you don't have yet any order with an order_invoice_id in the current year, you would need to create an empty order from the backend and confirm it so that it would generate the order_invoice_id and then change the value of the order_invoice_id for that order.

The following user(s) said Thank You: oloccina

Please Log in or Create an account to join the conversation.

  • Posts: 224
  • Thank you received: 8
5 years 10 months ago #302188

I have already some invoices for 2019, but I want the next one to start from 1 again (without deleting the existing orders for 2019)
Is it ok if I set to " 0 " all the order_invoice_id values for these invoices?
see: nimb.ws/dEg5Ko

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
5 years 10 months ago #302197

Hello,

Yes and no.
Yes you can put the value that you want in the database ; but since you must have invoice ID and invoice number for them, the best is to give them real values.
Otherwise you will have several orders with the same invoice id or invoice number.
So best would be to set "1,2,3,4,5' for these orders, according to their invoice numbers.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 224
  • Thank you received: 8
5 years 10 months ago #302226

Otherwise you will have several orders with the same invoice id or invoice number.

I don't really care. These order invoices have already been processed in 2018. I just need the next invoice to be numbered 1.
Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 10 months ago #302227

Hi,

Then, yes, set their order_invoice_id to 0 and the next order will have its invoice id set to 1.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum