update code toward php8 compliance

This commit is contained in:
Philippe GRAND 2022-12-30 12:55:00 +01:00
parent 44182f6e50
commit b2f1ac3c73

View File

@ -169,7 +169,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$this->posxdiscount = 162;
$this->postotalht = 174;
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
$this->posxtva = 95;
$this->posxup = 114;
$this->posxqty = 132;
@ -552,7 +552,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell($this->posxunit - $this->posxqty - 0.8, 4, $qty, 0, 'R'); // Enough for 6 chars
// Unit
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
$unit = pdf_getlineunit($object, $i, $outputlangs, $hidedetails, $hookmanager);
$pdf->SetXY($this->posxunit, $curY);
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 4, $unit, 0, 'L');
@ -1097,7 +1097,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->MultiCell($this->posxunit - $this->posxqty - 1, 2, $outputlangs->transnoentities("Qty"), '', 'C');
}
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);