Fixing style errors.
This commit is contained in:
parent
17c5f30689
commit
f0dd152f11
@ -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);
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user