Fixing style errors.

This commit is contained in:
stickler-ci 2022-01-26 14:15:53 +00:00
parent 6d3066a312
commit 9342fa8781
3 changed files with 17 additions and 17 deletions

View File

@ -149,10 +149,10 @@ if (empty($reshook)) {
// Set if we used free entry or predefined product // Set if we used free entry or predefined product
$bom_child_id = (int) GETPOST('bom_id', 'int'); $bom_child_id = (int) GETPOST('bom_id', 'int');
if($bom_child_id > 0){ if ($bom_child_id > 0) {
$bom_child = new BOM($db); $bom_child = new BOM($db);
$res = $bom_child->fetch($bom_child_id); $res = $bom_child->fetch($bom_child_id);
if($res){ if ($res) {
$idprod = $bom_child->fk_product; $idprod = $bom_child->fk_product;
} }
} else { } else {

View File

@ -1064,7 +1064,7 @@ class BOM extends CommonObject
$tmpproduct->cost_price = 0; $tmpproduct->cost_price = 0;
$tmpproduct->pmp = 0; $tmpproduct->pmp = 0;
if(empty($line->fk_bom_child)){ if (empty($line->fk_bom_child)) {
$result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1); // We discard selling price and language loading $result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1); // We discard selling price and language loading
if ($result < 0) { if ($result < 0) {
$this->error = $tmpproduct->error; $this->error = $tmpproduct->error;
@ -1083,7 +1083,7 @@ class BOM extends CommonObject
} else { } else {
$bom_child= new BOM($this->db); $bom_child= new BOM($this->db);
$res = $bom_child->fetch($line->fk_bom_child); $res = $bom_child->fetch($line->fk_bom_child);
if($res>0){ if ($res>0) {
$bom_child->calculateCosts(); $bom_child->calculateCosts();
$this->total_cost += $bom_child->total_cost; $this->total_cost += $bom_child->total_cost;
} else { } else {

View File

@ -203,7 +203,7 @@ if ($resql) {
// Product OR BOM // Product OR BOM
print '<td style="padding-left: 5%" id="sub_bom_product_'.$sub_bom_line->id.'">'; print '<td style="padding-left: 5%" id="sub_bom_product_'.$sub_bom_line->id.'">';
if(!empty($obj->fk_bom_child)){ if (!empty($obj->fk_bom_child)) {
print $sub_bom_product->getNomUrl(1); print $sub_bom_product->getNomUrl(1);
print ' '.$langs->trans('or').' '; print ' '.$langs->trans('or').' ';
print $sub_bom->getNomUrl(1); print $sub_bom->getNomUrl(1);