View Issue Details

IDProjectCategoryView StatusLast Update
0000977OXID eShop (all versions)2.6. Administer orderspublic2012-12-10 13:17
Status resolvedResolutionfixed 
Product Version4.1.0 revision 17976 
Target VersionFixed in Version4.1.3 revision 19918 
Summary0000977: Generation of invoice number restarts with 1 and ends when reaching 1000
DescriptionAfter updating to Rev. 17976 the generation of invoice numbers will restart with 1. There were small changes in myorder.php (see "Additional Information"). OXBILLNR is now used instead of OXINVOICENR. However, oxbillnr fields are empty. When executing "update oxorder set oxbillnr=oxinvoicenr;" old invoices are generated with their correct invoice numbers. But new invoice numbers are always generated with the same value "1000" (at least in our system were we already had higher invoice numbers).

Additional Informationpublic function genPdf( $sFilename, $iSelLang = 0 ){
        // setting invoice number
        if ( !$this->oxorder__oxbillnr->value ) {
TagsPDF Invoice
PHP Version5.2.6
Database Version5.0.33



2009-06-12 13:12

reporter   ~0001053

since oxbillnr is varchar in DB, added cast to unsigned before selecting MAX in oxorder.php getNextBillNum, so it selects integer maximum.

before it was so that 999 > 1000 (because 9>1)