diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index fb922f7b268..3c06a658b96 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -436,13 +436,13 @@ class Boms extends DolibarrApi //Check the rowid is a line of current bom object $lineIdIsFromObject = false; foreach ($this->bom->lines as $bl) { - if ($bl->id == $lineid){ + if ($bl->id == $lineid) { $lineIdIsFromObject = true; break; } } if (!$lineIdIsFromObject) { - throw new RestException(500,'Line to delete (rowid: '.$lineid.') is not a line of BOM (id: '.$this->bom->id.')'); + throw new RestException(500, 'Line to delete (rowid: '.$lineid.') is not a line of BOM (id: '.$this->bom->id.')'); } $updateRes = $this->bom->deleteline(DolibarrApiAccess::$user, $lineid); diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 2dcc9368e5b..e774e4ddacf 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -668,8 +668,8 @@ class BOM extends CommonObject $this->line->context = $this->context; // Rank to use - $rankToUse = (int)$position; - if($rankToUse != $line->oldcopy->position) { // check if position have a new value + $rankToUse = (int) $position; + if ($rankToUse != $line->oldcopy->position) { // check if position have a new value foreach ($this->lines as $bl) { if ($bl->position >= $rankToUse AND $bl->position < ($line->oldcopy->position + 1)) { // move rank up $bl->position++; @@ -1386,7 +1386,6 @@ class BOM extends CommonObject } } } - }