View Issue Details

IDProjectCategoryView StatusLast Update
0006312OXID eShop (all versions)2.6. Administer orderspublic2019-08-12 16:24
Reportervschmi 
PrioritynormalSeverityfeatureReproducibilityunable to reproduce
Status acknowledgedResolutionopen 
Product Version4.9.6 / 5.2.6 
Target VersionFixed in Version 
Summary0006312: Duplicate invoice numbers
DescriptionOn our system duplicate invoice numbers are generated. OXID does not prevent this from happening. This is a serious issue, especially it is unnoticed.

Suggestion: Create an unique index over OXSHOPID and OXBILLNR to prevent that from happening. An error with log entries is much better than silently creating duplicate invoice numbers.
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP Version5.6
MySQL Version5.6

Activities

vschmi

2016-01-14 16:13

reporter   ~0011430

Also, this issue happens only rarely so it's currently not possible to provide any information how to reproduce this issue, especially because it goes by unnoticed as OXID's database structure allows for duplicate invoice numbers.

From 64250 orders, 14 orders are affected. But that's 14 orders too many.

vschmi

2016-01-14 17:45

reporter   ~0011432

In fact the index alone is not enough, since by default there's no invoice number.

To me this looks like a race condition which is probably caused since we got multiple users working at the same time.

To solve this properly, a separate invoice table would be required.

FibreFoX

2016-01-14 17:59

reporter   ~0011433

This is more a bug than a feature (IMHO)

anton.fedurtsya

2019-04-23 16:12

manager   ~0012863

Hello there. There is a pull request (https://github.com/OXID-eSales/oxideshop_ce/pull/553), which could help solve the problem, but its not prepared to merge. Please check the solution suggested there while working on fixing this issue.

tte

2019-08-12 16:14

reporter   ~0012958

Last edited: 2019-08-12 16:24

View 3 revisions

A few months back, we had a similar problem with duplicate values in the OXORDERNR column. It didn't happen again since then, but adding a UNIQUE constraint might help as a workaround (besides logging if there's a constraint violation for finding the root cause).

OXID version: 6.1.4
Additional payment types: PayPal