Post by taggsladder » Fri Dec 05, 2014 9:18 pm

Hello

I have searched this topic and found quite a lot of threads about it but no solution. Where I live the invoicenumbers must be booked in a sequential order with no missing numbers. As it is now sometimes there are skipped invoicenumbers from users who I suspect have abandoned there shoppingcart or refreshed the confirm page etc.

I don't know for sure but I suspect that the invoicenumber is the same as the order id really? I want the invoice number to be independent of the order id and incremant only when the customer has successfully paid the order. At the moment I only accept payment with Paypal standard.

I have bought a extension that autogenerates invoicenumbers but this shouldn't affect anything I believe since it just removes the step of clicking generate invoice number manually.

All replies appriciated.

Thanks

Best regards
Andreas

Newbie

Posts

Joined
Tue Sep 30, 2014 10:20 pm

Post by granddaddy » Fri Dec 05, 2014 10:14 pm

Opencart's invoice numbers are actually different from order numbers, stored in a different field.
The order number is an auto-increment field that looks after itself.
The invoice number field is blank until you click 'generate invoice number', at which point it scans the order table for the highest existing invoice number, then adds 1 to it to get the new number.
This should not be able to go wrong, unless you were in the habit of deleting older orders. For example, if your last invoice was 1234 but you deleted the record (even though you have created an invoice number), then the next invoice will also be 1234. But in this scenario you would have duplicate numbers - not missing numbers.
If you are missing actual invoice numbers something weird must be happening.
Make sure you are not reading order numbers as invoice numbers. It's easy to make that mistake.

Active Member

Posts

Joined
Sat Feb 18, 2012 5:48 pm
Who is online

Users browsing this forum: No registered users and 375 guests