From 4ffb024369ea2a3b904c86b6d7dde35c9d895a28 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:12:06 +0300 Subject: [PATCH] fix #30456 add Not Validated warning when in draft, remove pointless info (#30475) * fix #30456 add Not Validated warning when in draft, remove pointless info * fix Dolibarr#30456 add Not Validated warning when in draft, remove pointless info * remove whitspace --- .../modules/supplier_order/doc/pdf_cornas.modules.php | 11 +++++++++-- .../supplier_order/doc/pdf_muscadet.modules.php | 10 ++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 4a48c93fc38..067211b1cc1 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -1236,6 +1236,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref); + if ($object->status == $object::STATUS_DRAFT) { + $pdf->SetTextColor(128, 0, 0); + $title .= ' - '.$outputlangs->transnoentities("NotValidated"); + } $pdf->MultiCell($w, 3, $title, '', 'R'); $posy += 1; @@ -1277,12 +1281,15 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date_commande, "day", false, $outputlangs, true), '', 'R'); - } else { + } + // no point in having this here this a document sent to supplier + /*} else { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(255, 0, 0); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R'); - } + }*/ + $pdf->SetTextColor(0, 0, 60); $usehourmin = 'day'; diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 1bbb8cbf623..6ba444a712d 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -1159,6 +1159,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $title = $outputlangs->transnoentities("SupplierOrder")." ".$outputlangs->convToOutputCharset($object->ref); + if ($object->status == $object::STATUS_DRAFT) { + $pdf->SetTextColor(128, 0, 0); + $title .= ' - '.$outputlangs->transnoentities("NotValidated"); + } $pdf->MultiCell($w, 3, $title, '', 'R'); $posy += 1; @@ -1200,12 +1204,14 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderDate")." : ".dol_print_date($object->date_commande, "day", false, $outputlangs, true), '', 'R'); - } else { + } + // no point in having this here this a document sent to supplier + /*} else { $posy += 5; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(255, 0, 0); $pdf->MultiCell($w, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R'); - } + }*/ $pdf->SetTextColor(0, 0, 60); $usehourmin = 'day';