Post by kevc978 » Mon Dec 19, 2022 5:25 am

Hi,

I tried to change my Invoices to help with accounting and also because its a new business i dont really want orders starting from #0
I changed the INVOICE ID in Settings>(Site)>Checkout to UKPHARMA-2023-1468
So now when i create an invoice id expect the next order to be UKPHARMA-2023-1469
However when i login to a customer account and make an order in the Order history area it only shows as Order ID #1
When i go to the admin area and look at the orders (Sales>Orders) and open order id #1 if i click on the view button and then the cog beside Invoice it THEN labels the order as UKPHARMA-2023-14681
So thats kind of sorted it although i dont see why i should need to click on the cog to create the invoice ID..
The Issue is though is that when i go back to the client area and view the order again it now shows as:
Invoice No.: UKPHARMA-2023-14681
Order ID: #1

I thought Order ID and Invoice ID should be matching? and if not, how do i change order ID to match Invoice ID? as i dont really need both

Using Opencart version 4.0.2.0 although latest shows as 4.0.1.1?

WEIRD!

Thanks for any help

Newbie

Posts

Joined
Mon Dec 19, 2022 5:14 am

Post by IP_CAM » Mon Dec 19, 2022 6:01 pm

It has been mentioned many times around this forum, that OC v.4.x is still in a developing stage, and it should not yet be used as production Code.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ADD Creative » Mon Dec 19, 2022 6:06 pm

Order IDs and invoice numbers are two different things. Order ID are generated for every order, even if that order didn't complete, maybe because payment failed. A unique order ID is needed to match the order to the payment, so a new order ID will generate on on each checkout attempt.

In some countries, by law the invoice number must be sequential without gaps, so you could not use the order ID for this. OpenCart gives the option of using a separate unique and sequential invoice number.

If you don't require sequential invoice numbers without gaps, you could skip the generate invoice and just use the order ID as the invoice number.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by MadControl » Thu Jan 05, 2023 11:43 am

But does the customer even see that extra ID number anyway or is it just an internal (admin) number?

Newbie

Posts

Joined
Mon Nov 21, 2022 1:33 am

Post by MadControl » Thu Jan 05, 2023 11:45 am

I see that indeed the customer does see it...

Newbie

Posts

Joined
Mon Nov 21, 2022 1:33 am

Post by grgr » Thu Jan 05, 2023 9:04 pm

You can also reset the auto increment number on the order table. Though order id and invoice number still won't for reasons stated above.

ALTER TABLE oc_order AUTO_INCREMENT = 1468;

-
Image Image Image Image
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS


User avatar
Active Member

Posts

Joined
Mon Mar 28, 2011 4:08 pm
Location - UK
Who is online

Users browsing this forum: No registered users and 25 guests