forked from Wavyzz/dolibarr
Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into 22.0
This commit is contained in:
@@ -1829,9 +1829,12 @@ class Commande extends CommonOrder
|
||||
$this->line_order(true, 'DESC');
|
||||
} elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) {
|
||||
// Update all rank of all other lines starting from the same $ranktouse
|
||||
$linecount = count($this->lines);
|
||||
for ($ii = $ranktouse; $ii <= $linecount; $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
foreach ($this->lines as $tmpline) {
|
||||
if ($tmpline->rang >= $ranktouse) {
|
||||
if (!empty($tmpline->id)) {
|
||||
$this->updateRangOfLine($tmpline->id, $tmpline->rang + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user