Fixing style errors.

This commit is contained in:
stickler-ci 2022-02-21 14:51:57 +00:00
parent 76e2ee2dde
commit 0eb8eab7f0

View File

@ -177,7 +177,7 @@ if (empty($reshook)) {
//$inventorycode = 'INV'.$object->id; //$inventorycode = 'INV'.$object->id;
$inventorycode = 'INV-'.$object->ref; $inventorycode = 'INV-'.$object->ref;
$price = 0; $price = 0;
if(!empty($line->pmp_real) && !empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) $price = $line->pmp_real; if (!empty($line->pmp_real) && !empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) $price = $line->pmp_real;
$idstockmove = $stockmovment->_create($user, $line->fk_product, $line->fk_warehouse, $stock_movement_qty, $movement_type, $price, $langs->trans('LabelOfInventoryMovemement', $object->ref), $inventorycode, $datemovement, '', '', $line->batch); $idstockmove = $stockmovment->_create($user, $line->fk_product, $line->fk_warehouse, $stock_movement_qty, $movement_type, $price, $langs->trans('LabelOfInventoryMovemement', $object->ref), $inventorycode, $datemovement, '', '', $line->batch);
if ($idstockmove < 0) { if ($idstockmove < 0) {
@ -186,10 +186,10 @@ if (empty($reshook)) {
break; break;
} }
if(!empty($line->pmp_real) && !empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { if (!empty($line->pmp_real) && !empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) {
$sqlpmp = 'UPDATE '.MAIN_DB_PREFIX.'product SET pmp = '.((float) $line->pmp_real).' WHERE rowid = '.((int) $line->fk_product); $sqlpmp = 'UPDATE '.MAIN_DB_PREFIX.'product SET pmp = '.((float) $line->pmp_real).' WHERE rowid = '.((int) $line->fk_product);
$resqlpmp = $db->query($sqlpmp); $resqlpmp = $db->query($sqlpmp);
if(! $resqlpmp) { if (! $resqlpmp) {
$error++; $error++;
setEventMessages($db->lasterror(), null, 'errors'); setEventMessages($db->lasterror(), null, 'errors');
break; break;
@ -880,7 +880,7 @@ if ($object->id > 0) {
print '<td class="right">'; print '<td class="right">';
print $form->textwithpicto($langs->trans("RealQty"), $langs->trans("InventoryRealQtyHelp")); print $form->textwithpicto($langs->trans("RealQty"), $langs->trans("InventoryRealQtyHelp"));
print '</td>'; print '</td>';
if(!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) {
print '<td class="right">'.$langs->trans('PMPExpected').'</td>'; print '<td class="right">'.$langs->trans('PMPExpected').'</td>';
print '<td class="right">'.$langs->trans('ExpectedValuation').'</td>'; print '<td class="right">'.$langs->trans('ExpectedValuation').'</td>';
print '<td class="right">'.$langs->trans('PMPReal').'</td>'; print '<td class="right">'.$langs->trans('PMPReal').'</td>';
@ -916,7 +916,7 @@ if ($object->id > 0) {
print '<td class="right">'; print '<td class="right">';
print '<input type="text" name="qtytoadd" class="maxwidth75" value="">'; print '<input type="text" name="qtytoadd" class="maxwidth75" value="">';
print '</td>'; print '</td>';
if(!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) {
print '<td class="right">'; print '<td class="right">';
print '</td>'; print '</td>';
print '<td class="right">'; print '<td class="right">';
@ -1021,9 +1021,9 @@ if ($object->id > 0) {
print '</a>'; print '</a>';
print '<input type="text" class="maxwidth75 right realqty" name="id_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input" value="'.$qty_view.'">'; print '<input type="text" class="maxwidth75 right realqty" name="id_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input" value="'.$qty_view.'">';
print '</td>'; print '</td>';
if(! empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { if (! empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) {
//PMP Expected //PMP Expected
if(! empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected; if (! empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected;
else $pmp_expected = $product_static->pmp; else $pmp_expected = $product_static->pmp;
$pmp_valuation = $pmp_expected * $valuetoshow; $pmp_valuation = $pmp_expected * $valuetoshow;
print '<td class="right">'; print '<td class="right">';
@ -1037,7 +1037,7 @@ if ($object->id > 0) {
print '<td class="right">'; print '<td class="right">';
if(! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; if (! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real;
else $pmp_real = $product_static->pmp; else $pmp_real = $product_static->pmp;
$pmp_valuation_real = $pmp_real * $qty_view; $pmp_valuation_real = $pmp_real * $qty_view;
print '<input type="text" class="maxwidth75 right realpmp'.$obj->fk_product.'" name="realpmp_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input_pmp" value="'.price2num($pmp_real).'">'; print '<input type="text" class="maxwidth75 right realpmp'.$obj->fk_product.'" name="realpmp_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input_pmp" value="'.price2num($pmp_real).'">';
@ -1060,9 +1060,9 @@ if ($object->id > 0) {
print '<td class="right nowraponall">'; print '<td class="right nowraponall">';
print $obj->qty_view; // qty found print $obj->qty_view; // qty found
print '</td>'; print '</td>';
if(!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) {
//PMP Expected //PMP Expected
if(! empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected; if (! empty($obj->pmp_expected)) $pmp_expected = $obj->pmp_expected;
else $pmp_expected = $product_static->pmp; else $pmp_expected = $product_static->pmp;
$pmp_valuation = $pmp_expected * $valuetoshow; $pmp_valuation = $pmp_expected * $valuetoshow;
print '<td class="right">'; print '<td class="right">';
@ -1074,7 +1074,7 @@ if ($object->id > 0) {
//PMP Real //PMP Real
print '<td class="right">'; print '<td class="right">';
if(! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real; if (! empty($obj->pmp_real)) $pmp_real = $obj->pmp_real;
else $pmp_real = $product_static->pmp; else $pmp_real = $product_static->pmp;
$pmp_valuation_real = $pmp_real * $obj->qty_view; $pmp_valuation_real = $pmp_real * $obj->qty_view;
print price($pmp_real); print price($pmp_real);
@ -1101,7 +1101,7 @@ if ($object->id > 0) {
} else { } else {
dol_print_error($db); dol_print_error($db);
} }
if(!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { if (!empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) {
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td colspan="5">'.$langs->trans("Total").'</td>'; print '<td colspan="5">'.$langs->trans("Total").'</td>';
print '<td class="right" colspan="2">'.price($totalExpectedValuation).'</td>'; print '<td class="right" colspan="2">'.price($totalExpectedValuation).'</td>';
@ -1133,7 +1133,7 @@ if ($object->id > 0) {
print '</form>'; print '</form>';
if(! empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) { if (! empty($conf->global->INVENTORY_MANAGE_REAL_PMP)) {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
$('.realqty').on('change', function () { $('.realqty').on('change', function () {