I have removed the invoice prefix so that I get standard 4 digit invoices.
On my previous website, I am up to about invoice #2850.
After installing Opencart it would start over at 0001.
Is there a way to jump the last invoice number up to 2850 so that invoice number continue in sequence?
eg. 2851, 2852, ...
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
I figured that was the way but looking at the oc_order table, order id is the only one auto incremented.
Looking at it I guess I would have to enable a_i for invoice and then I guess change it.
Nothing something I'm comfortable playing with on my own.
Then, my previous reply regarding custom job would be the right course of action.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
That would be incorrect. The default attribute is not a starting point, it is a default value from everything else than what hasn't been defined as a number during the action. Setting 2850 as default while no other number might be defined until a number gets defined in this field will create a conflict and may create confusion while analyzing the orders.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
If you don't have any orders with invoice numbers, just change this line.
https://github.com/opencart/opencart/bl ... r.php#L420
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
No you don't. The invoice number is never sent to the payment provider. You are getting confused with the order ID.straightlight wrote: ↑Fri Sep 24, 2021 6:19 amTake note that if considering to change the invoice number on the database directly, you must also ensure to change the invoice number as well on the payment provider's end in order to capture the right results via their API.
Code: Select all
ALTER TABLE oc_order AUTO_INCREMENT=100;
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
By doing that, it will be auto-incremented by 100 but will not increment by one afterwards. It will keep increment by 100.paulfeakins wrote: ↑Fri Sep 24, 2021 6:54 pmIt might not be what you need to do, but to set the Auto Increment value, it's done like this:https://www.w3schools.com/sql/sql_autoincrement.aspCode: Select all
ALTER TABLE oc_order AUTO_INCREMENT=100;
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester