From 1fc571504021019de1703acd3a4931c75018ceaa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Sat, 20 Aug 2016 00:30:09 +0200 Subject: [PATCH] Fix date of contract not used --- htdocs/contrat/class/contrat.class.php | 1 + htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index fd92db95dfc..69e969c56d9 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -2127,6 +2127,7 @@ class Contrat extends CommonObject $this->ref_supplier = 'SPECIMENSUPP'; $this->socid = 1; $this->statut= 0; + $this->date_creation = (dol_now() - 3600 * 24 * 7); $this->date_contrat = dol_now(); $this->commercial_signature_id = 1; $this->commercial_suivi_id = 1; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index a2828fb466a..a25c9918408 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -554,7 +554,7 @@ class pdf_strato extends ModelePDFContract $posy+=4; $pdf->SetXY($posx,$posy); $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date_creation,"day",false,$outputlangs,true), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date_contrat,"day",false,$outputlangs,true), '', 'R'); if ($object->thirdparty->code_client) { -- GitLab