diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php index 02c73bb2a76..77e823d0457 100644 --- a/htdocs/admin/stocktransfer.php +++ b/htdocs/admin/stocktransfer.php @@ -356,8 +356,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { dol_print_error($db); } - print "
| '.$langs->trans("Name").' | '; print ''.$langs->trans("Description").' | '; print ''.$langs->trans("Status")." | \n"; @@ -396,7 +396,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; if ($modulequalified) { - print '
| '; + print ' | ||
| '; print (empty($module->name) ? $name : $module->name); print " | \n"; if (method_exists($module, 'info')) print $module->info($langs); diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index b6e38438a69..449bd69f17d 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -207,7 +207,7 @@ class pdf_eagle extends ModelePdfStockTransfer // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch", "stocks", "stocktransfer@stocktransfer")); - $nblines = count($object->lines); + $nblines = is_array($object->lines) ? count($object->lines) : 0; // Loop on each lines to detect if there is at least one image to show $realpatharray = array(); @@ -287,7 +287,7 @@ class pdf_eagle extends ModelePdfStockTransfer $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblines with the new facture lines content after hook - $nblines = count($object->lines); + $nblines = is_array($object->lines) ? count($object->lines) : 0; $pdf = pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -777,7 +777,7 @@ class pdf_eagle extends ModelePdfStockTransfer /** * Show table for lines * - * @param PDF $pdf Object PDF + * @param TCPDF $pdf Object PDF * @param string $tab_top Top position of table * @param string $tab_height Height of table (rectangle) * @param int $nexY Y @@ -971,17 +971,11 @@ class pdf_eagle extends ModelePdfStockTransfer $pdf->SetFont('', 'B', $default_font_size + 2); $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $title = $outputlangs->transnoentities("StockTransferSheet"); + $title = $outputlangs->transnoentities("StockTransferSheet").' '.$object->ref; $pdf->MultiCell($w, 4, $title, '', 'R'); $pdf->SetFont('', '', $default_font_size + 1); - $posy += 5; - - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 4, $outputlangs->transnoentities("Ref")." : ".$object->ref, '', 'R'); - // Date prévue depart if (!empty($object->date_prevue_depart)) { $posy += 4; diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index c705e4c9b41..8b0a032c4c9 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -209,7 +209,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $outputlangsbis->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); } - $nblines = count($object->lines); + $nblines = is_array($object->lines) ? count($object->lines) : 0; $hidetop = 0; if (!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)) { @@ -1551,7 +1551,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes // Adapt dynamically the width of subprice, if text is too long. $tmpwidth = 0; - $nblines = count($object->lines); + $nblines = is_array($object->lines) ? count($object->lines) : 0; for ($i = 0; $i < $nblines; $i++) { $tmpwidth2 = dol_strlen(dol_string_nohtmltag(pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails))); $tmpwidth = max($tmpwidth, $tmpwidth2); |