Fixing style errors.

This commit is contained in:
stickler-ci 2021-11-16 15:15:55 +00:00
parent f664a977c6
commit 19171d4f8e
8 changed files with 12 additions and 13 deletions

View File

@ -734,7 +734,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);
}

View File

@ -1648,7 +1648,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);
}

View File

@ -2087,7 +2087,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);
@ -3362,7 +3362,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);
}

View File

@ -310,7 +310,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');

View File

@ -1857,8 +1857,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;
}
@ -1923,7 +1922,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);
}

View File

@ -1111,7 +1111,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';
@ -1142,7 +1142,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);
@ -2014,7 +2014,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);
}

View File

@ -673,7 +673,7 @@ if (empty($reshook)) {
$pu_ttc,
$tva_npr,
$type,
$rank,
$rank,
0,
GETPOST('fk_parent_line'),
$fournprice,

View File

@ -621,7 +621,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);
}