View Issue Details

IDProjectCategoryView StatusLast Update
0004239OXID eShop (all versions)2.6. Administer orderspublic2012-12-10 13:17
Reporteraggrosoft 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.6.2 revision 46646 
Target Version4.7.0_5.0.0_RC2Fixed in Version4.7.0_5.0.0_RC2 
Summary0004239: Date of PDF Bill generation needs to be fixiated
DescriptionCurrently when you generate a pdf invoice the oxbillnr is being stored, this fine so far. But you also need to store the date when you generated the invoice - if an invoice is generated this date needs to be stored. Otherwise you can end up with multiple invoices with the same number but a different date, this is not allowed by law (at least in germany).

This might happen if you send one invoice to the customer and print one for your archive on different dates.
Steps To ReproduceGenerate an invoice today, do the same tomorrow - different dates rights besides the city.
Additional InformationFix is easy:

- Add new field to oxorder => oxbilldate
- Add to myorder::genPDF() where billnr is being set


 if ( !$this->oxorder__oxbillnr->value ) {
            $this->oxorder__oxbillnr->setValue($this->getNextBillNum());
            $oUtilsDate = oxUtilsDate::getInstance();
            $this->oxorder__oxbilldate = new oxField( date( 'Y-m-d H:i:s', $oUtilsDate->getTime() ), oxField::T_RAW);
            $this->save();
        }

- Output this besides the city:


// shop city
        $aOrderDate = explode( ' ', $this->oxorder__oxbilldate->value );
        $sOrderDate = oxUtilsDate::getInstance()->formatDBDate( $aOrderDate[0]);
        
        $sText = $oShop->oxshops__oxcity->getRawValue().', '.$sOrderDate;
TagsPDF Invoice
ThemeBoth
BrowserAll
PHP Versionany
MySQL Versionany

Activities

Linas Kukulskis

2012-10-10 15:27

reporter   ~0007586

added new field to db, and billdate setting to db