From 8af848c5394b1c213b8764a443ab25a92fcd935c Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 20 May 2022 10:40:59 +0200 Subject: [PATCH] add Ref client in PDF and send to propal on create --- htdocs/comm/propal/card.php | 2 +- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 22a816acc1d..00723597521 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1644,7 +1644,7 @@ if ($action == 'create') { // Ref customer print ''.$langs->trans('RefCustomer').''; - print ''; + print ''; print ''; // Third party diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index e93e5a3e688..29d0cc8cac4 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -612,6 +612,14 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->datec, "day", false, $outputlangs, true), '', 'R'); + if (!empty($object->ref_client)) { + $posy += 4; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer") . " : " . dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65), '', 'R'); + } + + if (empty($conf->global->MAIN_PDF_HIDE_CUSTOMER_CODE) && $object->thirdparty->code_client) { $posy += 4; $pdf->SetXY($posx, $posy);