Merge branch 'NEW/addline_with_position_choice' of github.com:atm-gauthier/dolibarr into NEW/addline_with_position_choice_develop

This commit is contained in:
Gauthier PC portable 024
2021-11-23 11:10:01 +01:00
6 changed files with 16 additions and 8 deletions

View File

@@ -1650,7 +1650,8 @@ class Commande extends CommonOrder
if (!empty($fk_parent_line)) {
$this->line_order(true, 'DESC');
} elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines
for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) {
$linecount = count($this->lines);
for ($ii = $ranktouse; $ii <= $linecount; $ii++) {
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
}
}