update code toward php8 compliance

This commit is contained in:
Philippe GRAND
2022-12-30 12:55:53 +01:00
parent 5256f30c3d
commit b407712e5a

View File

@@ -127,7 +127,7 @@ if ($nolinesbefore) {
<?php } ?>
<td class="linecolqty right"><?php echo $langs->trans('Qty'); ?></td>
<?php
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
print '<td class="linecoluseunit left">';
print '<span id="title_units">';
print $langs->trans('Unit');
@@ -424,7 +424,7 @@ if ($nolinesbefore) {
<input type="text" name="qty" id="qty" class="flat width40 right" value="<?php echo (GETPOSTISSET("qty") ? GETPOST("qty", 'alpha', 2) : 1); ?>">
</td>
<?php
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
if (getDolGlobalInt('PRODUCT_USE_UNITS')) {
$coldisplay++;
print '<td class="nobottom linecoluseunit left">';
print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, "units");