View Issue Details

IDProjectCategoryView StatusLast Update
0004999OXID eShop (all versions)2.3. Extensions (modules, themes)public2013-04-02 17:45
Reporterray Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.7.3 / 5.0.3 revision 54408 
Target Version4.7.4 / 5.0.4 revision 57063Fixed in Version4.7.5 / 5.0.5 
Summary0004999: wrong date saved as invoice date (oxorder_oxbilldate)
Descriptionhttp://forum.oxid-esales.com/showthread.php?p=118413#post119083

Problem:
The invoice date is set with +7 which is wrong (due date?), it should set actual date when invoice is created.
But - of course you would need the due date for payment to be shown in invoice.
Additional Informationpossible solution:

- in myorder.php delete the "+7" in line 853

- replace in line 1062:
  '.date( 'd.m.Y' );
  with
  '.date( 'd.m.Y', strtotime($this->oxorder__oxbilldate->value));

- replace in line 619:
  $text = $this->_oData->translate( 'ORDER_OVERVIEW_PDF_PAYUPTO' ) . $this->_oData->oxorder__oxbilldate->value; //date( 'd.m.Y', mktime( 0, 0, 0, date ( 'm' ), date ( 'd' ) + 7, date( 'Y' ) ) );
  with
  $text = $this->_oData->translate( 'ORDER_OVERVIEW_PDF_PAYUPTO' ) .date('d.m.Y' ,strtotime('+7 day', strtotime($this->_oData->oxorder__oxbilldate->value)));

  even better, make the due date configurable (+7) in module settings

- take out:
  // payment date
        $oPdf->setFont( $oPdfBlock->getFont(), '', 10 );
        $text = $this->translate( 'ORDER_OVERVIEW_PDF_PAYUPTO' ).date( 'd.m.Y', mktime( 0, 0, 0, date ( 'm' ), date ( 'd' ) + 7, date( 'Y' ) ) );
        $oPdf->text( 15, $siteH + 4, $text );
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

mantas.vaitkunas

2013-04-02 13:02

reporter   ~0008551

Created method getPaymentTerm(), it returns config param iPaymentTerm. By default method returns 7.