فهرست منبع

FIX : Tracking number label shouldn't be displaied on "espadon" model if shipping tracking number is empty

Gauthier PC portable 024 4 سال پیش
والد
کامیت
657972b79b
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      htdocs/core/modules/expedition/doc/pdf_espadon.modules.php

+ 5 - 1
htdocs/core/modules/expedition/doc/pdf_espadon.modules.php

@@ -364,7 +364,11 @@ class pdf_espadon extends ModelePdfExpedition
 					$tab_top_alt = $tab_top;
 
 					$pdf->SetFont('', 'B', $default_font_size - 2);
-					$pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L');
+					if(!empty($object->tracking_number)) {
+						$pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L');
+					} else {
+						$pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top - 5, '', 0, 1, false, true, 'L');
+					}
 
 					$tab_top_alt = $pdf->GetY();
 					//$tab_top_alt += 1;