Fix warnings

This commit is contained in:
Laurent Destailleur 2023-03-19 10:30:49 +01:00
parent 6c110fb2b5
commit 4a61c9687f
3 changed files with 9 additions and 15 deletions

View File

@ -356,8 +356,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
dol_print_error($db);
}
print "<table class=\"noborder\" width=\"100%\">\n";
print "<tr class=\"liste_titre\">\n";
print '<table class="noborder centpercent">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Name").'</td>';
print '<td>'.$langs->trans("Description").'</td>';
print '<td class="center" width="60">'.$langs->trans("Status")."</td>\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 '<tr class="oddeven"><td width="100">';
print '<tr class="oddeven"><td>';
print (empty($module->name) ? $name : $module->name);
print "</td><td>\n";
if (method_exists($module, 'info')) print $module->info($langs);

View File

@ -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;

View File

@ -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);