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:
commit
2c2f456827
@ -736,7 +736,8 @@ class Propal extends CommonObject
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2090,7 +2090,8 @@ class Facture extends CommonInvoice
|
||||
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
$facligne->rang = 1;
|
||||
for ($ii = 1; $ii <= count($this->lines); $ii++) {
|
||||
$linecount = count($this->lines);
|
||||
for ($ii = 1; $ii <= $linecount; $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
|
||||
}
|
||||
}
|
||||
@ -3364,7 +3365,8 @@ class Facture extends CommonInvoice
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1925,7 +1925,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
if (!empty($fk_parent_line)) {
|
||||
$this->line_order(true, 'DESC');
|
||||
} elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $rang; $ii <= count($this->lines); $ii++) {
|
||||
$linecount = count($this->lines);
|
||||
for ($ii = $rang; $ii <= $linecount; $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1145,7 +1145,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
$facligne->rang = 1;
|
||||
for ($ii = 1; $ii <= count($this->lines); $ii++) {
|
||||
$linecount = count($this->lines);
|
||||
for ($ii = 1; $ii <= $linecount; $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
|
||||
}
|
||||
}
|
||||
@ -2016,7 +2017,8 @@ class FactureFournisseur extends CommonInvoice
|
||||
if (!empty($fk_parent_line)) {
|
||||
$this->line_order(true, 'DESC');
|
||||
} elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $rang; $ii <= count($this->lines); $ii++) {
|
||||
$linecount = count($this->lines);
|
||||
for ($ii = $rang; $ii <= $linecount; $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -623,7 +623,8 @@ class SupplierProposal extends CommonObject
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user