From 573d86c725d33579d01d3676bb89c6bd310ec5f6 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Mon, 10 Feb 2020 16:57:59 +0100 Subject: [PATCH] Add project's ref and Title --- .../commande/doc/pdf_eratosthene.modules.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 89f36d34352..8f39828d3f4 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1447,6 +1447,30 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R'); } + if (! empty($conf->global->PDF_SHOW_PROJECT_TITLE)) + { + $object->fetch_projet(); + if (! empty($object->project->ref)) + { + $posy+=3; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("Project")." : " . (empty($object->project->title)?'':$object->projet->title), '', 'R'); + } + } + + if (! empty($conf->global->PDF_SHOW_PROJECT)) + { + $object->fetch_projet(); + if (! empty($object->project->ref)) + { + $posy+=3; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefProject")." : " . (empty($object->project->ref)?'':$object->projet->ref), '', 'R'); + } + } + $posy+=4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60);