Fixing style errors.

This commit is contained in:
stickler-ci 2023-04-19 16:22:47 +00:00
parent fde16f42c9
commit a5c4ec5dcf
3 changed files with 6 additions and 6 deletions

View File

@ -171,10 +171,10 @@ if (empty($reshook)) {
$efficiency = price2num(GETPOST('efficiency', 'alpha')); $efficiency = price2num(GETPOST('efficiency', 'alpha'));
$fk_unit = GETPOST('fk_unit', 'alphanohtml'); $fk_unit = GETPOST('fk_unit', 'alphanohtml');
if(!empty($idprod)){ if (!empty($idprod)) {
$product = new Product($db); $product = new Product($db);
$res = $product->fetch($idprod); $res = $product->fetch($idprod);
if($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation; if ($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation;
} }
if ($qty == '') { if ($qty == '') {

View File

@ -741,7 +741,7 @@ class Mo extends CommonObject
$moline->position = $line->position; $moline->position = $line->position;
$moline->qty_frozen = $line->qty_frozen; $moline->qty_frozen = $line->qty_frozen;
$moline->disable_stock_change = $line->disable_stock_change; $moline->disable_stock_change = $line->disable_stock_change;
if(!empty($line->fk_default_workstation)) $moline->fk_default_workstation = $line->fk_default_workstation; if (!empty($line->fk_default_workstation)) $moline->fk_default_workstation = $line->fk_default_workstation;
$resultline = $moline->create($user, false); // Never use triggers here $resultline = $moline->create($user, false); // Never use triggers here
if ($resultline <= 0) { if ($resultline <= 0) {

View File

@ -169,10 +169,10 @@ if (empty($reshook)) {
$moline->origin_type = 'free'; // free consume line $moline->origin_type = 'free'; // free consume line
$moline->position = 0; $moline->position = 0;
if(!empty($moline->fk_product)){ if (!empty($moline->fk_product)) {
$product = new Product($db); $product = new Product($db);
$product->fetch($moline->fk_product); $product->fetch($moline->fk_product);
if($product->type == Product::TYPE_SERVICE) $moline->fk_default_workstation = $product->fk_default_workstation; if ($product->type == Product::TYPE_SERVICE) $moline->fk_default_workstation = $product->fk_default_workstation;
} }
$resultline = $moline->create($user, false); // Never use triggers here $resultline = $moline->create($user, false); // Never use triggers here