update code toward php8 compliance

This commit is contained in:
Philippe GRAND 2022-12-30 12:44:36 +01:00
parent 4c51b2bb6b
commit 0710031b32

View File

@ -1513,7 +1513,7 @@ if ($action == 'create') {
// print '<td width="80" class="right">'.$langs->trans("PriceUHTCurrency").'</td>'; // print '<td width="80" class="right">'.$langs->trans("PriceUHTCurrency").'</td>';
//} //}
print '<td width="30" class="center">'.$langs->trans("Qty").'</td>'; print '<td width="30" class="center">'.$langs->trans("Qty").'</td>';
if (!empty($conf->global->PRODUCT_USE_UNITS)) { if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
print '<td width="30" class="left">'.$langs->trans("Unit").'</td>'; print '<td width="30" class="left">'.$langs->trans("Unit").'</td>';
} }
print '<td width="50" class="right">'.$langs->trans("ReductionShort").'</td>'; print '<td width="50" class="right">'.$langs->trans("ReductionShort").'</td>';
@ -1594,7 +1594,7 @@ if ($action == 'create') {
// Quantity // Quantity
print '<td class="center">'.$objp->qty.'</td>'; print '<td class="center">'.$objp->qty.'</td>';
// Unit // Unit
if (!empty($conf->global->PRODUCT_USE_UNITS)) { if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
print '<td class="left">'.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).'</td>'; print '<td class="left">'.$langs->trans($object->lines[$cursorline - 1]->getLabelOfUnit()).'</td>';
} }
// Discount // Discount
@ -1739,7 +1739,7 @@ if ($action == 'create') {
print '<td class="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>'; print '<td class="center"><input size="2" type="text" name="elqty" value="'.$objp->qty.'"></td>';
// Unit // Unit
if (!empty($conf->global->PRODUCT_USE_UNITS)) { if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
print '<td class="left">'; print '<td class="left">';
print $form->selectUnits($objp->fk_unit, "unit"); print $form->selectUnits($objp->fk_unit, "unit");
print '</td>'; print '</td>';
@ -1765,7 +1765,7 @@ if ($action == 'create') {
if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) { if (isModEnabled('margin') && !empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) {
$colspan++; $colspan++;
} }
if (!empty($conf->global->PRODUCT_USE_UNITS)) { if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
$colspan++; $colspan++;
} }