Merge branch 'NEW/addline_with_position_choice_develop' of github.com:atm-gauthier/dolibarr into NEW/addline_with_position_choice_develop
This commit is contained in:
commit
72614ecc0d
@ -735,7 +735,7 @@ class Propal extends CommonObject
|
||||
// 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
|
||||
} elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
|
||||
@ -1649,7 +1649,7 @@ 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
|
||||
} elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
|
||||
@ -2088,7 +2088,7 @@ class Facture extends CommonInvoice
|
||||
$facligne->rang = -1;
|
||||
$facligne->info_bits = 2;
|
||||
|
||||
if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
$facligne->rang = 1;
|
||||
for ($ii = 1; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
|
||||
@ -3363,7 +3363,7 @@ class Facture extends CommonInvoice
|
||||
// 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
|
||||
} elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
|
||||
@ -311,7 +311,7 @@ if ($nolinesbefore) {
|
||||
echo '</span>';
|
||||
}
|
||||
|
||||
if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
$tab = array(-1 => $langs->trans('AtTheEnd'));
|
||||
if (!empty($object->lines)) {
|
||||
$langs->load('admin');
|
||||
|
||||
@ -1858,8 +1858,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0];
|
||||
$localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
|
||||
|
||||
if ($rang < 0)
|
||||
{
|
||||
if ($rang < 0) {
|
||||
$rangmax = $this->line_max();
|
||||
$rang = $rangmax + 1;
|
||||
}
|
||||
@ -1924,7 +1923,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
// Reorder if child line
|
||||
if (!empty($fk_parent_line)) {
|
||||
$this->line_order(true, 'DESC');
|
||||
} elseif($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines
|
||||
} elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $rang; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
|
||||
@ -1112,7 +1112,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
public function insert_discount($idremise)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
@ -1143,7 +1143,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
$facligne->rang = -1;
|
||||
$facligne->info_bits = 2;
|
||||
|
||||
if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
|
||||
$facligne->rang = 1;
|
||||
for ($ii = 1; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1);
|
||||
@ -2015,7 +2015,7 @@ class FactureFournisseur extends CommonInvoice
|
||||
// Reorder if child line
|
||||
if (!empty($fk_parent_line)) {
|
||||
$this->line_order(true, 'DESC');
|
||||
} elseif($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines
|
||||
} elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $rang; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
|
||||
@ -674,7 +674,7 @@ if (empty($reshook)) {
|
||||
$pu_ttc,
|
||||
$tva_npr,
|
||||
$type,
|
||||
$rank,
|
||||
$rank,
|
||||
0,
|
||||
GETPOST('fk_parent_line'),
|
||||
$fournprice,
|
||||
|
||||
@ -622,7 +622,7 @@ class SupplierProposal extends CommonObject
|
||||
// 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
|
||||
} elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines
|
||||
for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) {
|
||||
$this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user