Fix warning

This commit is contained in:
Laurent Destailleur 2023-10-19 21:48:55 +02:00
parent 9d83688e21
commit d978c1da88
2 changed files with 17 additions and 10 deletions

View file

@ -1143,6 +1143,8 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$pdf->SetTextColor(0, 0, 60);
$pdf->SetFont('', 'B', $default_font_size + 3);
$w = 110;
$posy = $this->marge_haute;
$posx = $this->page_largeur - $this->marge_droite - 100;
@ -1164,12 +1166,12 @@ class pdf_eagle_proforma extends ModelePDFCommandes
} else {
$pdf->SetTextColor(200, 0, 0);
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
$pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
}
} else {
$text = $this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
$pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
}
}
@ -1177,14 +1179,14 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$title = $outputlangs->transnoentities($titlekey);
$pdf->MultiCell(100, 3, $title, '', 'R');
$pdf->MultiCell($w, 3, $title, '', 'R');
$pdf->SetFont('', 'B', $default_font_size);
$posy += 5;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
$pdf->MultiCell($w, 4, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), '', 'R');
$posy += 1;
$pdf->SetFont('', '', $default_font_size - 1);

View file

@ -60,22 +60,25 @@ $batch = GETPOST('batch');
$qty = GETPOST('qty');
$idline = GETPOST('idline');
// Load variable for pagination
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) {
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
// If $page is not defined, or '' or -1 or if we click on clear filters
$page = 0;
} // If $page is not defined, or '' or -1
}
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortfield) {
$sortfield = 'p.ref';
}
if (!$sortorder) {
$sortorder = 'ASC';
}
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$offset = $limit * $page;
if (GETPOST('init')) {
unset($_SESSION['massstockmove']);
@ -85,6 +88,8 @@ if (!empty($_SESSION['massstockmove'])) {
$listofdata = json_decode($_SESSION['massstockmove'], true);
}
$error = 0;
/*
* Actions