2
0
forked from Wavyzz/dolibarr

FIX : use $linecount = count($this->lines);

This commit is contained in:
Gauthier PC portable 024
2021-11-23 10:44:43 +01:00
parent e75b6ae0b4
commit 74f5c092dc
6 changed files with 20 additions and 12 deletions

View File

@@ -1659,7 +1659,8 @@ class Commande extends CommonOrder
// Reorder if child line
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);
}
}