From 49db277368b0bcc89eabf0930d019963c43f592f Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Wed, 26 Jun 2019 16:42:14 +0200 Subject: [PATCH 01/16] FIX ending slash --- htdocs/core/lib/order.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/order.lib.php b/htdocs/core/lib/order.lib.php index 93a7aaa71e0..cbb33bb6615 100644 --- a/htdocs/core/lib/order.lib.php +++ b/htdocs/core/lib/order.lib.php @@ -68,7 +68,7 @@ function commande_prepare_head(Commande $object) if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text.='/'; if ($conf->livraison_bon->enabled) $text.=$langs->trans("Receivings"); if ($nbShipments > 0 || $nbReceiption > 0) $text.= ' '.($nbShipments?$nbShipments:0); - if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled) $text.='/'; + if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.='/'; if ($conf->expedition_bon->enabled && $conf->livraison_bon->enabled && ($nbShipments > 0 || $nbReceiption > 0)) $text.= ($nbReceiption?$nbReceiption:0); if ($nbShipments > 0 || $nbReceiption > 0) $text.= ''; $head[$h][1] = $text; From fc1d4704a52ddce4e8d5ed5b6ba0b94efb0a6295 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 27 Jun 2019 17:33:47 +0200 Subject: [PATCH 02/16] Fix invoice list filter on withdrawal card --- htdocs/compta/prelevement/factures.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 64811c7604a..48bc508455e 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -160,7 +160,7 @@ $sql.= " AND pl.fk_prelevement_bons = p.rowid"; $sql.= " AND f.fk_soc = s.rowid"; $sql.= " AND pf.fk_facture = f.rowid"; $sql.= " AND f.entity = ".$conf->entity; -if ($prev_id) $sql.= " AND p.rowid=".$prev_id; +if ($object->id) $sql.= " AND p.rowid=".$object->id; if ($socid) $sql.= " AND s.rowid = ".$socid; $sql.= $db->order($sortfield,$sortorder); From a33071d7792079351849291616c41447427f805f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 28 Jun 2019 12:52:35 +0200 Subject: [PATCH 03/16] FIX #11421 --- htdocs/bom/class/bom.class.php | 8 ++++---- htdocs/emailcollector/class/emailcollector.class.php | 4 ++-- .../emailcollector/class/emailcollectoraction.class.php | 6 +++--- .../emailcollector/class/emailcollectorfilter.class.php | 4 ++-- htdocs/modulebuilder/template/class/myobject.class.php | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 5d9f1f50cbc..73682c7698c 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -183,9 +183,9 @@ class BOM extends CommonObject // Translate some data of arrayofkeyval foreach($this->fields as $key => $val) { - if (is_array($this->fields[$key]['arrayofkeyval'])) + if (is_array($val['arrayofkeyval'])) { - foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) + foreach($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); } @@ -1084,9 +1084,9 @@ class BOMLine extends CommonObject // Translate some data of arrayofkeyval foreach($this->fields as $key => $val) { - if (is_array($this->fields[$key]['arrayofkeyval'])) + if (is_array($val['arrayofkeyval'])) { - foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) + foreach($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index b22d7b23607..86b7e5a547d 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -209,9 +209,9 @@ class EmailCollector extends CommonObject // Translate some data of arrayofkeyval foreach($this->fields as $key => $val) { - if (is_array($this->fields[$key]['arrayofkeyval'])) + if (is_array($val['arrayofkeyval'])) { - foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) + foreach($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); } diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 96f650c9fc0..e8062497534 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -164,11 +164,11 @@ class EmailCollectorAction extends CommonObject // Translate some data of arrayofkeyval foreach($this->fields as $key => $val) { - if (is_array($this->fields[$key]['arrayofkeyval'])) + if (is_array($val['arrayofkeyval'])) { - foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) + foreach($val['arrayofkeyval'] as $key2 => $val2) { - $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); + $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); } } } diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index 5c7c7184ffc..69ab957040d 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -133,9 +133,9 @@ class EmailCollectorFilter extends CommonObject // Translate some data of arrayofkeyval foreach($this->fields as $key => $val) { - if (is_array($this->fields[$key]['arrayofkeyval'])) + if (is_array($val['arrayofkeyval'])) { - foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) + foreach($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); } diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 0025c00165d..13157b2c18f 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -225,9 +225,9 @@ class MyObject extends CommonObject // Translate some data of arrayofkeyval foreach($this->fields as $key => $val) { - if (is_array($this->fields[$key]['arrayofkeyval'])) + if (is_array($val['arrayofkeyval'])) { - foreach($this->fields[$key]['arrayofkeyval'] as $key2 => $val2) + foreach($val['arrayofkeyval'] as $key2 => $val2) { $this->fields[$key]['arrayofkeyval'][$key2]=$langs->trans($val2); } From 97827f5172d227981d936c7a6daeaf3a7e350837 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 01:44:49 +0200 Subject: [PATCH 04/16] Fix print --- htdocs/product/stats/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 399cc59b7c2..c8b34a1182d 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -388,7 +388,7 @@ if ($result || empty($id)) } else { - print $dategenerated=($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")); + $dategenerated=($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")); } $linktoregenerate='id).((string) $type != ''?'&type='.$type:'').'&action=recalcul&mode='.$mode.'&search_year='.$search_year.'&search_categ='.$search_categ.'">'.img_picto($langs->trans("ReCalculate").' ('.$dategenerated.')', 'refresh').''; From 8aebcc45b229f783c6d62ac88b8051a9bbd2adf5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 01:54:38 +0200 Subject: [PATCH 05/16] Fix message to not show sometimes --- htdocs/product/stats/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index c8b34a1182d..b95613c0e68 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -350,9 +350,9 @@ if ($result || empty($id)) dol_print_error($db, 'Error for calculating graph on key='.$key.' - '.$object->error); } } - } - $mesg = $langs->trans("ChartGenerated"); + //setEventMessages($langs->trans("ChartGenerated"), null, 'mesgs'); + } } // Show graphs @@ -390,7 +390,7 @@ if ($result || empty($id)) { $dategenerated=($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")); } - $linktoregenerate='id).((string) $type != ''?'&type='.$type:'').'&action=recalcul&mode='.$mode.'&search_year='.$search_year.'&search_categ='.$search_categ.'">'.img_picto($langs->trans("ReCalculate").' ('.$dategenerated.')', 'refresh').''; + $linktoregenerate='id).((string) $type != ''?'&type='.$type:'').'&action=recalcul&mode='.$mode.'&search_year='.$search_year.'&search_categ='.$search_categ.'">'.img_picto($langs->trans("ReCalculate").' ('.$dategenerated.')', 'refresh').''; // Show graph print ''; From 93b0e452468beb61c1cc75feb6a622df71db3c09 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 02:27:58 +0200 Subject: [PATCH 06/16] Fix duplicate class in some cases --- htdocs/product/class/product.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 02de9b4d47d..fc966f7f19a 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4033,7 +4033,7 @@ class Product extends CommonObject } $linkclose.= ' title="'.dol_escape_htmltag($label, 1, 1).'"'; - $linkclose.= ' class="classfortooltip"'; + $linkclose.= ' class="nowraponall classfortooltip"'; /* $hookmanager->initHooks(array('productdao')); @@ -4042,6 +4042,10 @@ class Product extends CommonObject if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ } + else + { + $linkclose = ' class="nowraponall"'; + } if ($option == 'supplier' || $option == 'category') { $url = DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id; @@ -4062,7 +4066,7 @@ class Product extends CommonObject } } - $linkstart = ''; $linkend=''; From b37f55d13a775cda146aa252304464ed4267cfbb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 16:06:40 +0200 Subject: [PATCH 07/16] Add log --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 9890df8b607..8252403ea3f 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -237,6 +237,8 @@ class pdf_crabe extends ModelePDFFactures // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); + if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; From 046f32df4474b921bbbf53eecec48b897a169d83 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 16:29:32 +0200 Subject: [PATCH 08/16] Work on nblignes -> nblines --- htdocs/admin/boxes.php | 2 +- htdocs/cashdesk/include/environnement.php | 2 +- htdocs/comm/propal/class/propal.class.php | 4 ++-- htdocs/comm/remx.php | 4 ++-- htdocs/commande/class/commande.class.php | 4 ++-- .../facture/class/facture-rec.class.php | 6 +++--- htdocs/compta/facture/class/facture.class.php | 6 +++--- htdocs/contrat/card.php | 2 -- htdocs/contrat/class/contrat.class.php | 8 ++++---- htdocs/core/boxes/box_services_contracts.php | 20 +++++++++---------- htdocs/core/class/CMailFile.class.php | 3 +-- htdocs/core/db/Database.interface.php | 6 +++--- htdocs/core/db/mssql.class.php | 4 ++-- htdocs/core/db/mysqli.class.php | 4 ++-- htdocs/core/db/pgsql.class.php | 4 ++-- htdocs/core/lib/files.lib.php | 6 +++--- htdocs/core/lib/pdf.lib.php | 4 ++-- .../core/modules/bank/doc/pdf_ban.modules.php | 2 +- .../bank/doc/pdf_sepamandate.modules.php | 2 +- .../commande/doc/pdf_einstein.modules.php | 12 +++++------ .../commande/doc/pdf_eratosthene.modules.php | 14 ++++++------- .../expedition/doc/pdf_espadon.modules.php | 12 +++++------ .../expedition/doc/pdf_merou.modules.php | 6 +++--- .../expedition/doc/pdf_rouget.modules.php | 12 +++++------ .../doc/pdf_standard.modules.php | 8 ++++---- .../modules/facture/doc/pdf_crabe.modules.php | 18 ++++++++--------- .../facture/doc/pdf_sponge.modules.php | 16 +++++++-------- .../fichinter/doc/pdf_soleil.modules.php | 4 ++-- .../livraison/doc/pdf_typhon.modules.php | 2 +- .../product/doc/pdf_standard.modules.php | 8 ++++---- .../project/doc/pdf_baleine.modules.php | 14 ++++++------- .../project/doc/pdf_beluga.modules.php | 8 ++++---- .../project/doc/pdf_timespent.modules.php | 14 ++++++------- .../modules/propale/doc/pdf_azur.modules.php | 16 +++++++-------- .../modules/propale/doc/pdf_cyan.modules.php | 14 ++++++------- .../reception/doc/pdf_squille.modules.php | 12 +++++------ .../stock/doc/pdf_standard.modules.php | 20 +++++++++---------- .../stock/doc/pdf_stdmovement.modules.php | 16 +++++++-------- .../pdf/pdf_canelle.modules.php | 14 ++++++------- .../supplier_order/pdf/pdf_cornas.modules.php | 16 +++++++-------- .../pdf/pdf_muscadet.modules.php | 18 ++++++++--------- .../doc/pdf_standard.modules.php | 10 +++++----- .../doc/pdf_aurore.modules.php | 16 +++++++-------- htdocs/debugbar/class/TraceableDB.php | 4 ++-- htdocs/expedition/class/expedition.class.php | 4 ++-- .../class/expensereport.class.php | 10 +++++----- htdocs/fichinter/card-rec.php | 2 +- htdocs/fichinter/card.php | 5 ++--- htdocs/fourn/class/paiementfourn.class.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/holiday/class/holiday.class.php | 4 ++-- htdocs/livraison/class/livraison.class.php | 2 +- htdocs/opensurvey/results.php | 8 ++++---- htdocs/product/fournisseurs.php | 3 +-- htdocs/public/opensurvey/studs.php | 6 +++--- htdocs/reception/class/reception.class.php | 2 +- htdocs/resource/class/dolresource.class.php | 2 +- .../class/supplier_proposal.class.php | 2 +- htdocs/ticket/class/ticket.class.php | 10 +++++----- 59 files changed, 228 insertions(+), 233 deletions(-) diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 70672f9b6fb..2e81a2c6dad 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -169,7 +169,7 @@ if ($action == 'delete') if ($action == 'switch') { - // On permute les valeur du champ box_order des 2 lignes de la table boxes + // We switch values of field box_order for the 2 lines of table boxes $db->begin(); $objfrom=new ModeleBoxes($db); diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index 6442d1776e3..e06bd7d3704 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -44,7 +44,7 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO // View parameters -$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?1000:$conf->global->PRODUIT_LIMIT_SIZE); // Nombre max de lignes a afficher dans les listes +$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?1000:$conf->global->PRODUIT_LIMIT_SIZE); // Number max of lines to show in lists $conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes // Add hidden option to force decrease of stock whatever is user setup diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 25b04c7c1e2..753d92131cb 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -415,7 +415,7 @@ class Propal extends CommonObject * @param float $remise_percent Pourcentage de remise de la ligne * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits for type of lines * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) @@ -1715,7 +1715,7 @@ class Propal extends CommonObject $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index eabb217fb99..bd143b551ae 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -734,7 +734,7 @@ if ($socid > 0) print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); } - // Remises liees a lignes de factures + // Discount linked to invoice lines $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; $sql.= " rc.fk_facture_source,"; @@ -904,7 +904,7 @@ if ($socid > 0) print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } - // Remises liees a lignes de factures + // Discount linked to invoice lines $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,"; $sql.= " rc.fk_invoice_supplier_source,"; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8469dc0cd1f..f1f9dbd1b00 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1312,7 +1312,7 @@ class Commande extends CommonOrder * @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) * @param int $fk_product Id of product * @param float $remise_percent Percentage discount of the line - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_remise_except Id remise * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC @@ -1985,7 +1985,7 @@ class Commande extends CommonOrder $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index c1cc9df9e5c..f6b148d308c 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -510,7 +510,7 @@ class FactureRec extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Recupere les lignes de factures predefinies dans this->lines + * Get lines of template invoices into this->lines * * @return int 1 if OK, < 0 if KO */ @@ -876,7 +876,7 @@ class FactureRec extends CommonInvoice * @param int $fk_product Product/Service ID predefined * @param double $remise_percent Percentage discount of the line * @param string $price_base_type HT or TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_remise_except Id remise * @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note) * @param int $type Type of line (0=product, 1=service) @@ -1807,7 +1807,7 @@ class FactureLigneRec extends CommonInvoiceLine /** - * Recupere les lignes de factures predefinies dans this->lines + * Get line of template invoice * * @param int $rowid Id of invoice * @return int 1 if OK, < 0 if KO diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a502b885ab3..e54e11896b5 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -917,7 +917,7 @@ class Facture extends CommonInvoice $facture->origin = $this->origin; $facture->origin_id = $this->origin_id; - $facture->lines = $this->lines; // Tableau des lignes de factures + $facture->lines = $this->lines; // Array of lines of invoice $facture->products = $this->lines; // Tant que products encore utilise $facture->situation_counter = $this->situation_counter; $facture->situation_cycle_ref=$this->situation_cycle_ref; @@ -1563,7 +1563,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); @@ -2661,7 +2661,7 @@ class Facture extends CommonInvoice * @param int $date_start Date start of service * @param int $date_end Date end of service * @param int $ventil Code of dispatching into accountancy - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_remise_except Id discount used * @param string $price_base_type 'HT' or 'TTC' * @param double $pu_ttc Unit price with tax (> 0 even for credit note) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 5c9ac3375dd..671888545c8 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1096,8 +1096,6 @@ $form = new Form($db); $formfile = new FormFile($db); if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db); -$objectlignestatic=new ContratLigne($db); - // Load object modContract $module=(! empty($conf->global->CONTRACT_ADDON)?$conf->global->CONTRACT_ADDON:'mod_contract_serpis'); if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e16187412a0..7273ffc3a8e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -832,7 +832,7 @@ class Contrat extends CommonObject // Retreive all extrafields for contract // fetch optionals attributes and labels $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); @@ -1361,7 +1361,7 @@ class Contrat extends CommonObject * @param int $date_end Date de fin prevue * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_fournprice Fourn price id * @param int $pa_ht Buying price HT * @param array $array_options extrafields array @@ -1579,7 +1579,7 @@ class Contrat extends CommonObject * @param int|string $date_debut_reel Date de debut reelle * @param int|string $date_fin_reel Date de fin reelle * @param string $price_base_type HT or TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_fournprice Fourn price id * @param int $pa_ht Buying price HT * @param array $array_options extrafields array @@ -2542,7 +2542,7 @@ class Contrat extends CommonObject /** - * Classe permettant la gestion des lignes de contrats + * Class to manage lines of contracts */ class ContratLigne extends CommonObjectLine { diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index b1330192a11..3fcd8001227 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -84,7 +84,7 @@ class box_services_contracts extends ModeleBoxes if ($user->rights->service->lire && $user->rights->contrat->lire) { $contractstatic=new Contrat($db); - $contratlignestatic=new ContratLigne($db); + $contractlinestatic=new ContratLigne($db); $thirdpartytmp = new Societe($db); $productstatic = new Product($db); @@ -116,13 +116,13 @@ class box_services_contracts extends ModeleBoxes $objp = $db->fetch_object($result); $datem=$db->jdate($objp->datem); - $contratlignestatic->id=$objp->cdid; - $contratlignestatic->fk_contrat=$objp->rowid; - $contratlignestatic->label=$objp->label; - $contratlignestatic->description=$objp->description; - $contratlignestatic->type=$objp->type; - $contratlignestatic->product_id=$objp->product_id; - $contratlignestatic->product_ref=$objp->product_ref; + $contractlinestatic->id=$objp->cdid; + $contractlinestatic->fk_contrat=$objp->rowid; + $contractlinestatic->label=$objp->label; + $contractlinestatic->description=$objp->description; + $contractlinestatic->type=$objp->type; + $contractlinestatic->product_id=$objp->product_id; + $contractlinestatic->product_ref=$objp->product_ref; $contractstatic->statut=$objp->contract_status; $contractstatic->id=$objp->rowid; @@ -153,7 +153,7 @@ class box_services_contracts extends ModeleBoxes if ($resultd) { $objtp = $db->fetch_object($resultd); - if ($objtp->label != '') $contratlignestatic->label = $objtp->label; + if ($objtp->label != '') $contractlinestatic->label = $objtp->label; } } @@ -215,7 +215,7 @@ class box_services_contracts extends ModeleBoxes $this->info_box_contents[$i][] = array( 'td' => 'class="right" width="18"', - 'text' => $contratlignestatic->LibStatut($objp->statut, 3) + 'text' => $contractlinestatic->LibStatut($objp->statut, 3) ); $i++; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index bf9b617693f..eabe0440dca 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -286,8 +286,7 @@ class CMailFile // We now define $this->headers and $this->message $this->headers = $smtp_headers . $mime_headers; // On nettoie le header pour qu'il ne se termine pas par un retour chariot. - // Ceci evite aussi les lignes vides en fin qui peuvent etre interpretees - // comme des injections mail par les serveurs de messagerie. + // This avoid also empty lines at end that can be interpreted as mail injection by email servers. $this->headers = preg_replace("/([\r\n]+)$/i", "", $this->headers); //$this->message = $this->eol.'This is a message with multiple parts in MIME format.'.$this->eol; diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index 75a6fa14ec1..55e7fe27b0b 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -101,11 +101,11 @@ interface Database // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Curseur de la requete voulue - * @return int Nombre de lignes - * @see num_rows + * @return int Number of lines + * @see num_rows() */ public function affected_rows($resultset); // phpcs:enable diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index efffd5059c6..d8261b8034e 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -523,10 +523,10 @@ class DoliDBMssql extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Curseur de la requete voulue - * @return int Nombre de lignes + * @return int Number of lines * @see num_rows() */ public function affected_rows($resultset) diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 98f2e5c5a1b..96763077e66 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -363,10 +363,10 @@ class DoliDBMysqli extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param mysqli_result $resultset Curseur de la requete voulue - * @return int Nombre de lignes + * @return int Number of lines * @see num_rows() */ public function affected_rows($resultset) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 2777f2d0365..250429ce422 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -617,11 +617,11 @@ class DoliDBPgsql extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Result set of request * @return int Nb of lines - * @see num_rows + * @see num_rows() */ public function affected_rows($resultset) { diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index f4a25334e00..8fe5f5b0db4 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1435,16 +1435,16 @@ function dol_meta_create($object) if (is_dir($dir)) { - $nblignes = count($object->lines); + $nblines = count($object->lines); $client = $object->thirdparty->name . " " . $object->thirdparty->address . " " . $object->thirdparty->zip . " " . $object->thirdparty->town; $meta = "REFERENCE=\"" . $object->ref . "\" DATE=\"" . dol_print_date($object->date, '') . "\" - NB_ITEMS=\"" . $nblignes . "\" + NB_ITEMS=\"" . $nblines . "\" CLIENT=\"" . $client . "\" AMOUNT_EXCL_TAX=\"" . $object->total_ht . "\" AMOUNT=\"" . $object->total_ttc . "\"\n"; - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { //Pour les articles $meta .= "ITEM_" . $i . "_QUANTITY=\"" . $object->lines[$i]->qty . "\" diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index db3b8763941..c1b5f4c489d 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2045,10 +2045,10 @@ function pdf_getTotalQty($object, $type, $outputlangs) global $hookmanager; $total=0; - $nblignes=count($object->lines); + $nblines=count($object->lines); // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->special_code != 3) { diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 5deb40fc7ad..c750ac4e6c5 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -111,7 +111,7 @@ class pdf_ban extends ModeleBankAccountDoc if ($conf->bank->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks // Definition of $dir and $file if ($object->specimen) diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 9783c4690b2..40f18d7f158 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -114,7 +114,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc if (! empty($conf->bank->dir_output)) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks // Definition of $dir and $file if ($object->specimen) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 8677a16db38..0e064991444 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -219,7 +219,7 @@ class pdf_einstein extends ModelePDFCommandes public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; + global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -228,7 +228,7 @@ class pdf_einstein extends ModelePDFCommandes // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->commande->dir_output) { @@ -308,7 +308,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -400,7 +400,7 @@ class pdf_einstein extends ModelePDFCommandes $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -429,7 +429,7 @@ class pdf_einstein extends ModelePDFCommandes $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -540,7 +540,7 @@ class pdf_einstein extends ModelePDFCommandes $this->tva[$vatrate] += $tvaligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 71345305579..ad9f2f5fbf4 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -194,7 +194,7 @@ class pdf_eratosthene extends ModelePDFCommandes public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; + global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -203,7 +203,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Translations $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -217,7 +217,7 @@ class pdf_eratosthene extends ModelePDFCommandes { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -541,7 +541,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -599,7 +599,7 @@ class pdf_eratosthene extends ModelePDFCommandes $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -738,7 +738,7 @@ class pdf_eratosthene extends ModelePDFCommandes $this->tva[$vatrate] += $tvaligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -747,7 +747,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 87f04dca016..745c09c8130 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -168,7 +168,7 @@ class pdf_espadon extends ModelePdfExpedition // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -176,7 +176,7 @@ class pdf_espadon extends ModelePdfExpedition { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -254,7 +254,7 @@ class pdf_espadon extends ModelePdfExpedition $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -404,7 +404,7 @@ class pdf_espadon extends ModelePdfExpedition $nexY = $tab_top + $this->tabTitleHeight + 2; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -464,7 +464,7 @@ class pdf_espadon extends ModelePdfExpedition //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -548,7 +548,7 @@ class pdf_espadon extends ModelePdfExpedition if ($weighttxt && $voltxt) $nexY+=2; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80))); diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 235e7e5c66c..bd46fc5a75e 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -222,7 +222,7 @@ class pdf_merou extends ModelePdfExpedition global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format, 'mm', 'l'); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -347,7 +347,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'C', 0); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -356,7 +356,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index ea5efb359d0..d255c4486fd 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -197,7 +197,7 @@ class pdf_rouget extends ModelePdfExpedition // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -205,7 +205,7 @@ class pdf_rouget extends ModelePdfExpedition { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -283,7 +283,7 @@ class pdf_rouget extends ModelePdfExpedition $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -423,7 +423,7 @@ class pdf_rouget extends ModelePdfExpedition $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -481,7 +481,7 @@ class pdf_rouget extends ModelePdfExpedition //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -563,7 +563,7 @@ class pdf_rouget extends ModelePdfExpedition if ($weighttxt && $voltxt) $nexY+=2; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index e0bba62df3b..99d2ab322e0 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -220,7 +220,7 @@ class pdf_standard extends ModeleExpenseReport // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "trips", "projects", "dict", "bills", "banks")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->expensereport->dir_output) { // Definition of $dir and $file @@ -351,7 +351,7 @@ class pdf_standard extends ModeleExpenseReport $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) { + for ($i = 0 ; $i < $nblines ; $i++) { $pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); @@ -374,7 +374,7 @@ class pdf_standard extends ModeleExpenseReport //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) { // There is no space left for total+free text - if ($i == ($nblignes-1)) { + if ($i == ($nblines-1)) { // No more lines, and no space left to show total, so we create a new page $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -401,7 +401,7 @@ class pdf_standard extends ModeleExpenseReport //$nblineFollowComment = 1; // Cherche nombre de lignes a venir pour savoir si place suffisante - // if ($i < ($nblignes - 1)) // If it's not last line + // if ($i < ($nblines - 1)) // If it's not last line // { // //Fetch current description to know on which line the next one should be placed // $follow_comment = $object->lines[$i]->comments; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 8252403ea3f..4536add16bb 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -235,7 +235,7 @@ class pdf_crabe extends ModelePDFFactures public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); @@ -246,13 +246,13 @@ class pdf_crabe extends ModelePDFFactures // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -319,7 +319,7 @@ class pdf_crabe extends ModelePDFFactures $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $nbpayments = count($object->getListOfPayments()); // Create pdf instance @@ -360,7 +360,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -467,7 +467,7 @@ class pdf_crabe extends ModelePDFFactures $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -523,7 +523,7 @@ class pdf_crabe extends ModelePDFFactures //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -652,7 +652,7 @@ class pdf_crabe extends ModelePDFFactures if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -661,7 +661,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 1413bd3c777..422060ab30b 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -209,7 +209,7 @@ class pdf_sponge extends ModelePDFFactures public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -218,7 +218,7 @@ class pdf_sponge extends ModelePDFFactures // Translations $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -232,7 +232,7 @@ class pdf_sponge extends ModelePDFFactures { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -330,7 +330,7 @@ class pdf_sponge extends ModelePDFFactures $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $nbpayments = count($object->getListOfPayments()); // Create pdf instance @@ -572,7 +572,7 @@ class pdf_sponge extends ModelePDFFactures // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; @@ -630,7 +630,7 @@ class pdf_sponge extends ModelePDFFactures //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -782,7 +782,7 @@ class pdf_sponge extends ModelePDFFactures $nexY = max($nexY, $posYAfterImage); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -791,7 +791,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 41edc6c0a1d..fa32d3df0d2 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -216,7 +216,7 @@ class pdf_soleil extends ModelePDFFicheinter global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); // Create pdf instance $pdf=pdf_getInstance($this->format); @@ -274,7 +274,7 @@ class pdf_soleil extends ModelePDFFicheinter complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index a2124b801a6..0a339a9a61f 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -479,7 +479,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 89f0f67ae53..6089a9fe66e 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -172,7 +172,7 @@ class pdf_standard extends ModelePDFProduct // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->product->dir_output) { @@ -346,7 +346,7 @@ class pdf_standard extends ModelePDFProduct // Loop on each lines /* - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage @@ -375,7 +375,7 @@ class pdf_standard extends ModelePDFProduct $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('','',true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -484,7 +484,7 @@ class pdf_standard extends ModelePDFProduct $this->tva[$vatrate] += $tvaligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index c7005206fcc..257b477a8df 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -188,7 +188,7 @@ class pdf_baleine extends ModelePDFProjects if ($conf->projet->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; @@ -250,7 +250,7 @@ class pdf_baleine extends ModelePDFProjects } $object->lines=$tasksarray; - $nblignes=count($object->lines); + $nblines=count($object->lines); $pdf->Open(); $pagenb=0; @@ -287,7 +287,7 @@ class pdf_baleine extends ModelePDFProjects complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -313,7 +313,7 @@ class pdf_baleine extends ModelePDFProjects $nexY = $tab_top + $heightoftitleline + 1; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -352,7 +352,7 @@ class pdf_baleine extends ModelePDFProjects $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -428,7 +428,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -437,7 +437,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index dfbe97c3fd5..1d7e3d983fb 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -160,7 +160,7 @@ class pdf_beluga extends ModelePDFProjects if ($conf->projet->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; @@ -223,7 +223,7 @@ class pdf_beluga extends ModelePDFProjects } $object->lines=$tasksarray; - $nblignes=count($object->lines); + $nblines=count($object->lines); $pdf->Open(); $pagenb=0; @@ -260,7 +260,7 @@ class pdf_beluga extends ModelePDFProjects complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -642,7 +642,7 @@ class pdf_beluga extends ModelePDFProjects } } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 2c69fbd6bab..14946ca5cf3 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -120,7 +120,7 @@ class pdf_timespent extends ModelePDFProjects if ($conf->projet->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; @@ -181,7 +181,7 @@ class pdf_timespent extends ModelePDFProjects } $object->lines=$tasksarray; - $nblignes=count($object->lines); + $nblines=count($object->lines); $pdf->Open(); $pagenb=0; @@ -218,7 +218,7 @@ class pdf_timespent extends ModelePDFProjects complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -244,7 +244,7 @@ class pdf_timespent extends ModelePDFProjects $nexY = $tab_top + $heightoftitleline + 1; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -283,7 +283,7 @@ class pdf_timespent extends ModelePDFProjects $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -359,7 +359,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -368,7 +368,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 54fe56421ea..4ad23a1704e 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -218,7 +218,7 @@ class pdf_azur extends ModelePDFPropales public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -227,7 +227,7 @@ class pdf_azur extends ModelePDFPropales // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -235,7 +235,7 @@ class pdf_azur extends ModelePDFPropales { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -362,7 +362,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -470,7 +470,7 @@ class pdf_azur extends ModelePDFPropales $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -527,7 +527,7 @@ class pdf_azur extends ModelePDFPropales //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -640,7 +640,7 @@ class pdf_azur extends ModelePDFPropales if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -649,7 +649,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 14a2456157a..3ddc8a45a52 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -193,7 +193,7 @@ class pdf_cyan extends ModelePDFPropales public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -206,7 +206,7 @@ class pdf_cyan extends ModelePDFPropales $outputlangs->load("propal"); $outputlangs->load("products"); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -220,7 +220,7 @@ class pdf_cyan extends ModelePDFPropales { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -557,7 +557,7 @@ class pdf_cyan extends ModelePDFPropales // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -617,7 +617,7 @@ class pdf_cyan extends ModelePDFPropales //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -755,7 +755,7 @@ class pdf_cyan extends ModelePDFPropales if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -764,7 +764,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index dec1f35e7b0..10be4430aea 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -131,7 +131,7 @@ class pdf_squille extends ModelePdfReception $outputlangs->load("receptions"); $outputlangs->load("productbatch"); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -139,7 +139,7 @@ class pdf_squille extends ModelePdfReception { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -217,7 +217,7 @@ class pdf_squille extends ModelePdfReception $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -357,7 +357,7 @@ class pdf_squille extends ModelePdfReception $fk_commandefourndet=0; $totalOrdered=0; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -416,7 +416,7 @@ class pdf_squille extends ModelePdfReception //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -496,7 +496,7 @@ class pdf_squille extends ModelePdfReception if ($weighttxt && $voltxt) $nexY+=2; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index e1181aa6fe2..4be99b07c11 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -201,7 +201,7 @@ class pdf_standard extends ModelePDFStock // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->stock->dir_output) { @@ -323,8 +323,8 @@ class pdf_standard extends ModelePDFStock { $num = $db->num_rows($resql); $i = 0; - $nblignes = $num; - for ($i = 0 ; $i < $nblignes ; $i++) + $nblines = $num; + for ($i = 0 ; $i < $nblines ; $i++) { $objp = $db->fetch_object($resql); @@ -372,7 +372,7 @@ class pdf_standard extends ModelePDFStock $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -452,7 +452,7 @@ class pdf_standard extends ModelePDFStock $totalvaluesell+=price2num($pricemin*$objp->value, 'MT'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -550,7 +550,7 @@ class pdf_standard extends ModelePDFStock complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); @@ -576,7 +576,7 @@ class pdf_standard extends ModelePDFStock // Loop on each lines /* - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage @@ -605,7 +605,7 @@ class pdf_standard extends ModelePDFStock $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('','',true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -644,7 +644,7 @@ class pdf_standard extends ModelePDFStock $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -653,7 +653,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 2a1819a3aa0..5efa1b0b312 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -331,7 +331,7 @@ class pdf_stdmovement extends ModelePDFMovement * END TODO **/ - //$nblignes = count($object->lines); + //$nblines = count($object->lines); if ($conf->stock->dir_output) { @@ -481,8 +481,8 @@ class pdf_stdmovement extends ModelePDFMovement { $num = $db->num_rows($resql); $i = 0; - $nblignes = $num; - for ($i = 0 ; $i < $nblignes ; $i++) + $nblines = $num; + for ($i = 0 ; $i < $nblines ; $i++) { $objp = $db->fetch_object($resql); @@ -530,7 +530,7 @@ class pdf_stdmovement extends ModelePDFMovement $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -639,9 +639,9 @@ class pdf_stdmovement extends ModelePDFMovement $totalvaluesell+=price2num($pricemin*$objp->value, 'MT'); - $nexY+=3.5; // Passe espace entre les lignes + $nexY+=3.5; // Add space between lines // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -650,7 +650,7 @@ class pdf_stdmovement extends ModelePDFMovement $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) @@ -724,7 +724,7 @@ class pdf_stdmovement extends ModelePDFMovement complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 5c0904baba8..4c4fe7106a7 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -199,7 +199,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$hookmanager,$nblines; // Get source company if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); @@ -259,7 +259,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -296,7 +296,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -370,7 +370,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -397,7 +397,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -495,7 +495,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->localtax2[$localtax2rate]+=$localtax2ligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -504,7 +504,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php index 612595b8c44..e96f5ef4eab 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php @@ -185,7 +185,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; + global $user,$langs,$conf,$hookmanager,$mysoc,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -194,7 +194,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Load translation files required by the page $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -205,7 +205,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -284,7 +284,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -496,7 +496,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -553,7 +553,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -689,7 +689,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80))); @@ -698,7 +698,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 0c9e8e0967a..9f9f0cfad38 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -213,7 +213,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; + global $user,$langs,$conf,$hookmanager,$mysoc,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -222,13 +222,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Load translation files required by the page $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -307,7 +307,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -344,7 +344,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -418,7 +418,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -481,7 +481,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -591,7 +591,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -600,7 +600,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 79ad993ef81..e4b6b73fbc1 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -264,7 +264,7 @@ class pdf_standard extends ModelePDFSuppliersPayments global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -325,7 +325,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -354,7 +354,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -412,7 +412,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -421,7 +421,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index d8d489c1bbf..e486474d1d5 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -209,7 +209,7 @@ class pdf_aurore extends ModelePDFSupplierProposal public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -218,13 +218,13 @@ class pdf_aurore extends ModelePDFSupplierProposal // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_PROPOSAL_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -333,7 +333,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -403,7 +403,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -469,7 +469,7 @@ class pdf_aurore extends ModelePDFSupplierProposal //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -587,7 +587,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -596,7 +596,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/debugbar/class/TraceableDB.php b/htdocs/debugbar/class/TraceableDB.php index 4edc39a74af..775c2a7c300 100644 --- a/htdocs/debugbar/class/TraceableDB.php +++ b/htdocs/debugbar/class/TraceableDB.php @@ -148,10 +148,10 @@ class TraceableDB extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number o flines into the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Curseur de la requete voulue - * @return int Nombre de lignes + * @return int Number of lines * @see num_rows() */ public function affected_rows($resultset) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index a17da1c84b4..c83a1172a03 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -347,7 +347,7 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { - // Insertion des lignes + // Insert of lines $num=count($this->lines); for ($i = 0; $i < $num; $i++) { @@ -2355,7 +2355,7 @@ class Expedition extends CommonObject /** - * Classe de gestion des lignes de bons d'expedition + * Classe to manage lines of shipment */ class ExpeditionLigne extends CommonObjectLine { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index c09d2897980..c3e7ed4eb29 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2112,16 +2112,16 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::periode_existe sql=".$sql); $result = $this->db->query($sql); if ($result) { - $num_lignes = $this->db->num_rows($result); $i = 0; + $num_rows = $this->db->num_rows($result); $i = 0; - if ($num_lignes>0) + if ($num_rows > 0) { $date_d_form = $date_debut; $date_f_form = $date_fin; $existe = false; - while ($i < $num_lignes) + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); @@ -2175,8 +2175,8 @@ class ExpenseReport extends CommonObject $result = $this->db->query($sql); if($result) { - $num_lignes = $this->db->num_rows($result); $i = 0; - while ($i < $num_lignes) + $num_rows = $this->db->num_rows($result); $i = 0; + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); array_push($users_validator, $objp->fk_user); diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 2afd0745c8e..6ee445d68a1 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -183,7 +183,7 @@ if ($action == 'add') { $newfichinterid = $newinter->create($user); if ($newfichinterid > 0) { - // on ajoute les lignes de détail ensuite + // Now we add line of details foreach ($object->lines as $ficheinterligne) $newinter->addline($user, $newfichinterid, $ficheinterligne->desc, "", $ficheinterligne->duree, ''); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index abcea896c06..e64b86340f3 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -679,9 +679,8 @@ if (empty($reshook)) } /* - * Ordonnancement des lignes - */ - + * Set position of lines + */ elseif ($action == 'up' && $user->rights->ficheinter->creer) { $object->line_up($lineid); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 45ad69f6c64..e4d70ff255a 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -312,7 +312,7 @@ class PaiementFourn extends Paiement /** - * Supprime un paiement ainsi que les lignes qu'il a genere dans comptes + * Delete a payment and lines generated into accounts * Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse * Si le paiement porte sur au moins une facture a "payee", on refuse * diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index dfab5ebf2ac..a0a966e7210 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1415,7 +1415,7 @@ if (empty($reshook)) $totalpaye = $object->getSommePaiement(); $resteapayer = $object->total_ttc - $totalpaye; - // On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees + // We check that lines of invoices are exported in accountancy //$ventilExportCompta = $object->getVentilExportCompta(); // On verifie si aucun paiement n'a ete effectue diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 05083877b32..533f6c9c748 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1899,8 +1899,8 @@ class Holiday extends CommonObject $result = $this->db->query($sql); if($result) { - $num_lignes = $this->db->num_rows($result); $i = 0; - while ($i < $num_lignes) + $num_rows = $this->db->num_rows($result); $i = 0; + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); array_push($users_validator, $objp->fk_user); diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 9a5780b351d..5d01dffa886 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -942,7 +942,7 @@ class Livraison extends CommonObject { $objSourceLine = $this->db->fetch_object($resultSourceLine); - // Recupere les lignes de la source deja livrees + // Get lines of sources alread delivered $sql = "SELECT ld.fk_origin_line, sum(ld.qty) as qty"; $sql.= " FROM ".MAIN_DB_PREFIX."livraisondet as ld, ".MAIN_DB_PREFIX."livraison as l,"; $sql.= " ".MAIN_DB_PREFIX.$this->linked_object[0]['type']." as c"; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 1b3034bb82c..2376de4ef16 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -42,7 +42,7 @@ $object=new Opensurveysondage($db); $result=$object->fetch(0, $numsondage); if ($result <= 0) dol_print_error('', 'Failed to get survey id '.$numsondage); -$nblignes=$object->fetch_lines(); +$nblines=$object->fetch_lines(); /* @@ -108,7 +108,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $testmodifier = false; $testligneamodifier = false; $ligneamodifier = -1; -for ($i=0; $i<$nblignes; $i++) +for ($i=0; $i<$nblines; $i++) { if (isset($_POST['modifierligne'.$i])) { @@ -271,7 +271,7 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") } // Delete line -for ($i = 0; $i < $nblignes; $i++) +for ($i = 0; $i < $nblines; $i++) { if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) // effacelignei for chrome, effacelignei_x for firefox { @@ -916,7 +916,7 @@ while ($compteur < $num) } //demande de confirmation pour modification de ligne - for ($i=0; $i<$nblignes; $i++) + for ($i=0; $i<$nblines; $i++) { if (isset($_POST["modifierligne".$i])) { diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index f1e27c02501..283d81f2713 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -783,10 +783,9 @@ SCRIPT; // Suppliers list title print '
'; print '
'; - if ($object->isProduct()) $nblignefour=4; - else $nblignefour=4; $param="&id=".$object->id; + print ''; print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 56c43556c6e..d4b4ccde404 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -42,7 +42,7 @@ if (GETPOST('sondage')) $object=new Opensurveysondage($db); $result=$object->fetch(0, $numsondage); -$nblignes=$object->fetch_lines(); +$nblines=$object->fetch_lines(); //If the survey has not yet finished, then it can be modified $canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED); @@ -184,7 +184,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $testmodifier = false; $testligneamodifier = false; $ligneamodifier = -1; -for ($i=0; $i<$nblignes; $i++) +for ($i=0; $i < $nblines; $i++) { if (isset($_POST['modifierligne'.$i])) { @@ -557,7 +557,7 @@ while ($compteur < $num) } //demande de confirmation pour modification de ligne - for ($i=0; $i<$nblignes; $i++) + for ($i=0; $i < $nblines; $i++) { if (isset($_POST["modifierligne".$i])) { diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index f1877ace179..d0baa948950 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -259,7 +259,7 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { - // Insertion des lignes + // Insert of lines $num=count($this->lines); for ($i = 0; $i < $num; $i++) { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 2f45be04542..4cb115ef378 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -899,7 +899,7 @@ class Dolresource extends CommonObject /** * Load in cache resource type code (setup in dictionary) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function load_cache_code_type_resource() { diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index ca16348dcd6..74073c0d7e4 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -377,7 +377,7 @@ class SupplierProposal extends CommonObject * @param double $remise_percent Percentage discount of the line * @param string $price_base_type HT or TTC * @param double $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $type Type of line (product, service) * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 69708e06516..bb5f673d57e 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1034,7 +1034,7 @@ class Ticket extends CommonObject /** * Charge dans cache la liste des types de tickets (paramétrable dans dictionnaire) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheTypesTickets() { @@ -1074,7 +1074,7 @@ class Ticket extends CommonObject /** * Charge dans cache la liste des catégories de tickets (paramétrable dans dictionnaire) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheCategoriesTickets() { @@ -1114,7 +1114,7 @@ class Ticket extends CommonObject /** * Charge dans cache la liste des sévérité de tickets (paramétrable dans dictionnaire) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheSeveritiesTickets() { @@ -1561,7 +1561,7 @@ class Ticket extends CommonObject /** * Charge la liste des actions sur le ticket * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheLogsTicket() { @@ -1662,7 +1662,7 @@ class Ticket extends CommonObject /** * Charge la liste des messages sur le ticket * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheMsgsTicket() { From adb3062a9f803a0861fdc9cfe21646c6a135dcfa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 16:29:32 +0200 Subject: [PATCH 09/16] Work on nblignes -> nblines --- htdocs/admin/boxes.php | 2 +- htdocs/cashdesk/include/environnement.php | 2 +- htdocs/comm/propal/class/propal.class.php | 4 ++-- htdocs/comm/remx.php | 4 ++-- htdocs/commande/class/commande.class.php | 4 ++-- .../contrat/admin/contract_extrafields.php | 0 .../contrat/admin/contractdet_extrafields.php | 0 .../{ => commande}/contrat/admin/index.html | 0 htdocs/{ => commande}/contrat/card.php | 2 -- .../contrat/class/api_contracts.class.php | 0 .../contrat/class/contrat.class.php | 8 ++++---- .../{ => commande}/contrat/class/index.html | 0 htdocs/{ => commande}/contrat/contact.php | 0 htdocs/{ => commande}/contrat/document.php | 0 htdocs/{ => commande}/contrat/index.php | 0 htdocs/{ => commande}/contrat/info.php | 0 htdocs/{ => commande}/contrat/list.php | 0 htdocs/{ => commande}/contrat/note.php | 0 .../{ => commande}/contrat/services_list.php | 0 htdocs/{ => commande}/contrat/tpl/index.html | 0 .../contrat/tpl/linkedobjectblock.tpl.php | 0 .../facture/class/facture-rec.class.php | 6 +++--- htdocs/compta/facture/class/facture.class.php | 6 +++--- htdocs/core/boxes/box_services_contracts.php | 20 +++++++++---------- htdocs/core/class/CMailFile.class.php | 3 +-- htdocs/core/db/Database.interface.php | 6 +++--- htdocs/core/db/mssql.class.php | 4 ++-- htdocs/core/db/mysqli.class.php | 4 ++-- htdocs/core/db/pgsql.class.php | 4 ++-- htdocs/core/lib/files.lib.php | 6 +++--- htdocs/core/lib/pdf.lib.php | 4 ++-- .../core/modules/bank/doc/pdf_ban.modules.php | 4 ++-- .../bank/doc/pdf_sepamandate.modules.php | 4 ++-- .../commande/doc/pdf_einstein.modules.php | 12 +++++------ .../commande/doc/pdf_eratosthene.modules.php | 14 ++++++------- .../expedition/doc/pdf_espadon.modules.php | 12 +++++------ .../expedition/doc/pdf_merou.modules.php | 6 +++--- .../expedition/doc/pdf_rouget.modules.php | 12 +++++------ .../doc/pdf_standard.modules.php | 8 ++++---- .../modules/facture/doc/pdf_crabe.modules.php | 18 ++++++++--------- .../facture/doc/pdf_sponge.modules.php | 16 +++++++-------- .../fichinter/doc/pdf_soleil.modules.php | 4 ++-- .../livraison/doc/pdf_typhon.modules.php | 2 +- .../product/doc/pdf_standard.modules.php | 8 ++++---- .../project/doc/pdf_baleine.modules.php | 14 ++++++------- .../project/doc/pdf_beluga.modules.php | 8 ++++---- .../project/doc/pdf_timespent.modules.php | 14 ++++++------- .../modules/propale/doc/pdf_azur.modules.php | 16 +++++++-------- .../modules/propale/doc/pdf_cyan.modules.php | 14 ++++++------- .../reception/doc/pdf_squille.modules.php | 12 +++++------ .../stock/doc/pdf_standard.modules.php | 20 +++++++++---------- .../stock/doc/pdf_stdmovement.modules.php | 16 +++++++-------- .../pdf/pdf_canelle.modules.php | 14 ++++++------- .../supplier_order/pdf/pdf_cornas.modules.php | 16 +++++++-------- .../pdf/pdf_muscadet.modules.php | 18 ++++++++--------- .../doc/pdf_standard.modules.php | 10 +++++----- .../doc/pdf_aurore.modules.php | 16 +++++++-------- htdocs/debugbar/class/TraceableDB.php | 4 ++-- htdocs/expedition/class/expedition.class.php | 4 ++-- .../class/expensereport.class.php | 10 +++++----- htdocs/fichinter/card-rec.php | 2 +- htdocs/fichinter/card.php | 5 ++--- htdocs/fourn/class/paiementfourn.class.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/holiday/class/holiday.class.php | 4 ++-- htdocs/livraison/class/livraison.class.php | 2 +- htdocs/opensurvey/results.php | 8 ++++---- htdocs/product/fournisseurs.php | 3 +-- htdocs/public/opensurvey/studs.php | 6 +++--- htdocs/reception/class/reception.class.php | 2 +- htdocs/resource/class/dolresource.class.php | 2 +- .../class/supplier_proposal.class.php | 2 +- htdocs/ticket/class/ticket.class.php | 10 +++++----- 73 files changed, 230 insertions(+), 235 deletions(-) rename htdocs/{ => commande}/contrat/admin/contract_extrafields.php (100%) rename htdocs/{ => commande}/contrat/admin/contractdet_extrafields.php (100%) rename htdocs/{ => commande}/contrat/admin/index.html (100%) rename htdocs/{ => commande}/contrat/card.php (99%) rename htdocs/{ => commande}/contrat/class/api_contracts.class.php (100%) rename htdocs/{ => commande}/contrat/class/contrat.class.php (99%) rename htdocs/{ => commande}/contrat/class/index.html (100%) rename htdocs/{ => commande}/contrat/contact.php (100%) rename htdocs/{ => commande}/contrat/document.php (100%) rename htdocs/{ => commande}/contrat/index.php (100%) rename htdocs/{ => commande}/contrat/info.php (100%) rename htdocs/{ => commande}/contrat/list.php (100%) rename htdocs/{ => commande}/contrat/note.php (100%) rename htdocs/{ => commande}/contrat/services_list.php (100%) rename htdocs/{ => commande}/contrat/tpl/index.html (100%) rename htdocs/{ => commande}/contrat/tpl/linkedobjectblock.tpl.php (100%) diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 70672f9b6fb..2e81a2c6dad 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -169,7 +169,7 @@ if ($action == 'delete') if ($action == 'switch') { - // On permute les valeur du champ box_order des 2 lignes de la table boxes + // We switch values of field box_order for the 2 lines of table boxes $db->begin(); $objfrom=new ModeleBoxes($db); diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index 6442d1776e3..e06bd7d3704 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -44,7 +44,7 @@ $conf_fkaccount_cb = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CB"]))?$_SESSIO // View parameters -$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?1000:$conf->global->PRODUIT_LIMIT_SIZE); // Nombre max de lignes a afficher dans les listes +$conf_taille_listes = (empty($conf->global->PRODUIT_LIMIT_SIZE)?1000:$conf->global->PRODUIT_LIMIT_SIZE); // Number max of lines to show in lists $conf_nbr_car_listes = 60; // Nombre max de caracteres par ligne dans les listes // Add hidden option to force decrease of stock whatever is user setup diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 25b04c7c1e2..753d92131cb 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -415,7 +415,7 @@ class Propal extends CommonObject * @param float $remise_percent Pourcentage de remise de la ligne * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits for type of lines * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) @@ -1715,7 +1715,7 @@ class Propal extends CommonObject $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index eabb217fb99..bd143b551ae 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -734,7 +734,7 @@ if ($socid > 0) print load_fiche_titre($langs->trans("CustomerDiscounts"), '', ''); } - // Remises liees a lignes de factures + // Discount linked to invoice lines $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,"; $sql.= " rc.fk_facture_source,"; @@ -904,7 +904,7 @@ if ($socid > 0) print load_fiche_titre($langs->trans("SupplierDiscounts"), '', ''); } - // Remises liees a lignes de factures + // Discount linked to invoice lines $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,"; $sql.= " rc.fk_invoice_supplier_source,"; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 8469dc0cd1f..f1f9dbd1b00 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1312,7 +1312,7 @@ class Commande extends CommonOrder * @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) * @param int $fk_product Id of product * @param float $remise_percent Percentage discount of the line - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_remise_except Id remise * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC @@ -1985,7 +1985,7 @@ class Commande extends CommonOrder $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/commande/contrat/admin/contract_extrafields.php similarity index 100% rename from htdocs/contrat/admin/contract_extrafields.php rename to htdocs/commande/contrat/admin/contract_extrafields.php diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/commande/contrat/admin/contractdet_extrafields.php similarity index 100% rename from htdocs/contrat/admin/contractdet_extrafields.php rename to htdocs/commande/contrat/admin/contractdet_extrafields.php diff --git a/htdocs/contrat/admin/index.html b/htdocs/commande/contrat/admin/index.html similarity index 100% rename from htdocs/contrat/admin/index.html rename to htdocs/commande/contrat/admin/index.html diff --git a/htdocs/contrat/card.php b/htdocs/commande/contrat/card.php similarity index 99% rename from htdocs/contrat/card.php rename to htdocs/commande/contrat/card.php index 5c9ac3375dd..671888545c8 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/commande/contrat/card.php @@ -1096,8 +1096,6 @@ $form = new Form($db); $formfile = new FormFile($db); if (! empty($conf->projet->enabled)) $formproject = new FormProjets($db); -$objectlignestatic=new ContratLigne($db); - // Load object modContract $module=(! empty($conf->global->CONTRACT_ADDON)?$conf->global->CONTRACT_ADDON:'mod_contract_serpis'); if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/commande/contrat/class/api_contracts.class.php similarity index 100% rename from htdocs/contrat/class/api_contracts.class.php rename to htdocs/commande/contrat/class/api_contracts.class.php diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/commande/contrat/class/contrat.class.php similarity index 99% rename from htdocs/contrat/class/contrat.class.php rename to htdocs/commande/contrat/class/contrat.class.php index e16187412a0..7273ffc3a8e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/commande/contrat/class/contrat.class.php @@ -832,7 +832,7 @@ class Contrat extends CommonObject // Retreive all extrafields for contract // fetch optionals attributes and labels $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); @@ -1361,7 +1361,7 @@ class Contrat extends CommonObject * @param int $date_end Date de fin prevue * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_fournprice Fourn price id * @param int $pa_ht Buying price HT * @param array $array_options extrafields array @@ -1579,7 +1579,7 @@ class Contrat extends CommonObject * @param int|string $date_debut_reel Date de debut reelle * @param int|string $date_fin_reel Date de fin reelle * @param string $price_base_type HT or TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_fournprice Fourn price id * @param int $pa_ht Buying price HT * @param array $array_options extrafields array @@ -2542,7 +2542,7 @@ class Contrat extends CommonObject /** - * Classe permettant la gestion des lignes de contrats + * Class to manage lines of contracts */ class ContratLigne extends CommonObjectLine { diff --git a/htdocs/contrat/class/index.html b/htdocs/commande/contrat/class/index.html similarity index 100% rename from htdocs/contrat/class/index.html rename to htdocs/commande/contrat/class/index.html diff --git a/htdocs/contrat/contact.php b/htdocs/commande/contrat/contact.php similarity index 100% rename from htdocs/contrat/contact.php rename to htdocs/commande/contrat/contact.php diff --git a/htdocs/contrat/document.php b/htdocs/commande/contrat/document.php similarity index 100% rename from htdocs/contrat/document.php rename to htdocs/commande/contrat/document.php diff --git a/htdocs/contrat/index.php b/htdocs/commande/contrat/index.php similarity index 100% rename from htdocs/contrat/index.php rename to htdocs/commande/contrat/index.php diff --git a/htdocs/contrat/info.php b/htdocs/commande/contrat/info.php similarity index 100% rename from htdocs/contrat/info.php rename to htdocs/commande/contrat/info.php diff --git a/htdocs/contrat/list.php b/htdocs/commande/contrat/list.php similarity index 100% rename from htdocs/contrat/list.php rename to htdocs/commande/contrat/list.php diff --git a/htdocs/contrat/note.php b/htdocs/commande/contrat/note.php similarity index 100% rename from htdocs/contrat/note.php rename to htdocs/commande/contrat/note.php diff --git a/htdocs/contrat/services_list.php b/htdocs/commande/contrat/services_list.php similarity index 100% rename from htdocs/contrat/services_list.php rename to htdocs/commande/contrat/services_list.php diff --git a/htdocs/contrat/tpl/index.html b/htdocs/commande/contrat/tpl/index.html similarity index 100% rename from htdocs/contrat/tpl/index.html rename to htdocs/commande/contrat/tpl/index.html diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/commande/contrat/tpl/linkedobjectblock.tpl.php similarity index 100% rename from htdocs/contrat/tpl/linkedobjectblock.tpl.php rename to htdocs/commande/contrat/tpl/linkedobjectblock.tpl.php diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index c1cc9df9e5c..f6b148d308c 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -510,7 +510,7 @@ class FactureRec extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Recupere les lignes de factures predefinies dans this->lines + * Get lines of template invoices into this->lines * * @return int 1 if OK, < 0 if KO */ @@ -876,7 +876,7 @@ class FactureRec extends CommonInvoice * @param int $fk_product Product/Service ID predefined * @param double $remise_percent Percentage discount of the line * @param string $price_base_type HT or TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_remise_except Id remise * @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note) * @param int $type Type of line (0=product, 1=service) @@ -1807,7 +1807,7 @@ class FactureLigneRec extends CommonInvoiceLine /** - * Recupere les lignes de factures predefinies dans this->lines + * Get line of template invoice * * @param int $rowid Id of invoice * @return int 1 if OK, < 0 if KO diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a502b885ab3..e54e11896b5 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -917,7 +917,7 @@ class Facture extends CommonInvoice $facture->origin = $this->origin; $facture->origin_id = $this->origin_id; - $facture->lines = $this->lines; // Tableau des lignes de factures + $facture->lines = $this->lines; // Array of lines of invoice $facture->products = $this->lines; // Tant que products encore utilise $facture->situation_counter = $this->situation_counter; $facture->situation_cycle_ref=$this->situation_cycle_ref; @@ -1563,7 +1563,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; $line->fetch_optionals(); - + // multilangs if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($objp->fk_product) && ! empty($loadalsotranslation)) { $line = new Product($this->db); @@ -2661,7 +2661,7 @@ class Facture extends CommonInvoice * @param int $date_start Date start of service * @param int $date_end Date end of service * @param int $ventil Code of dispatching into accountancy - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $fk_remise_except Id discount used * @param string $price_base_type 'HT' or 'TTC' * @param double $pu_ttc Unit price with tax (> 0 even for credit note) diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index b1330192a11..3fcd8001227 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -84,7 +84,7 @@ class box_services_contracts extends ModeleBoxes if ($user->rights->service->lire && $user->rights->contrat->lire) { $contractstatic=new Contrat($db); - $contratlignestatic=new ContratLigne($db); + $contractlinestatic=new ContratLigne($db); $thirdpartytmp = new Societe($db); $productstatic = new Product($db); @@ -116,13 +116,13 @@ class box_services_contracts extends ModeleBoxes $objp = $db->fetch_object($result); $datem=$db->jdate($objp->datem); - $contratlignestatic->id=$objp->cdid; - $contratlignestatic->fk_contrat=$objp->rowid; - $contratlignestatic->label=$objp->label; - $contratlignestatic->description=$objp->description; - $contratlignestatic->type=$objp->type; - $contratlignestatic->product_id=$objp->product_id; - $contratlignestatic->product_ref=$objp->product_ref; + $contractlinestatic->id=$objp->cdid; + $contractlinestatic->fk_contrat=$objp->rowid; + $contractlinestatic->label=$objp->label; + $contractlinestatic->description=$objp->description; + $contractlinestatic->type=$objp->type; + $contractlinestatic->product_id=$objp->product_id; + $contractlinestatic->product_ref=$objp->product_ref; $contractstatic->statut=$objp->contract_status; $contractstatic->id=$objp->rowid; @@ -153,7 +153,7 @@ class box_services_contracts extends ModeleBoxes if ($resultd) { $objtp = $db->fetch_object($resultd); - if ($objtp->label != '') $contratlignestatic->label = $objtp->label; + if ($objtp->label != '') $contractlinestatic->label = $objtp->label; } } @@ -215,7 +215,7 @@ class box_services_contracts extends ModeleBoxes $this->info_box_contents[$i][] = array( 'td' => 'class="right" width="18"', - 'text' => $contratlignestatic->LibStatut($objp->statut, 3) + 'text' => $contractlinestatic->LibStatut($objp->statut, 3) ); $i++; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index bf9b617693f..eabe0440dca 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -286,8 +286,7 @@ class CMailFile // We now define $this->headers and $this->message $this->headers = $smtp_headers . $mime_headers; // On nettoie le header pour qu'il ne se termine pas par un retour chariot. - // Ceci evite aussi les lignes vides en fin qui peuvent etre interpretees - // comme des injections mail par les serveurs de messagerie. + // This avoid also empty lines at end that can be interpreted as mail injection by email servers. $this->headers = preg_replace("/([\r\n]+)$/i", "", $this->headers); //$this->message = $this->eol.'This is a message with multiple parts in MIME format.'.$this->eol; diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index 75a6fa14ec1..55e7fe27b0b 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -101,11 +101,11 @@ interface Database // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Curseur de la requete voulue - * @return int Nombre de lignes - * @see num_rows + * @return int Number of lines + * @see num_rows() */ public function affected_rows($resultset); // phpcs:enable diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index efffd5059c6..d8261b8034e 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -523,10 +523,10 @@ class DoliDBMssql extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Curseur de la requete voulue - * @return int Nombre de lignes + * @return int Number of lines * @see num_rows() */ public function affected_rows($resultset) diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 98f2e5c5a1b..96763077e66 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -363,10 +363,10 @@ class DoliDBMysqli extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param mysqli_result $resultset Curseur de la requete voulue - * @return int Nombre de lignes + * @return int Number of lines * @see num_rows() */ public function affected_rows($resultset) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 2777f2d0365..250429ce422 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -617,11 +617,11 @@ class DoliDBPgsql extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number of lines in the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Result set of request * @return int Nb of lines - * @see num_rows + * @see num_rows() */ public function affected_rows($resultset) { diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index f4a25334e00..8fe5f5b0db4 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1435,16 +1435,16 @@ function dol_meta_create($object) if (is_dir($dir)) { - $nblignes = count($object->lines); + $nblines = count($object->lines); $client = $object->thirdparty->name . " " . $object->thirdparty->address . " " . $object->thirdparty->zip . " " . $object->thirdparty->town; $meta = "REFERENCE=\"" . $object->ref . "\" DATE=\"" . dol_print_date($object->date, '') . "\" - NB_ITEMS=\"" . $nblignes . "\" + NB_ITEMS=\"" . $nblines . "\" CLIENT=\"" . $client . "\" AMOUNT_EXCL_TAX=\"" . $object->total_ht . "\" AMOUNT=\"" . $object->total_ttc . "\"\n"; - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { //Pour les articles $meta .= "ITEM_" . $i . "_QUANTITY=\"" . $object->lines[$i]->qty . "\" diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index db3b8763941..c1b5f4c489d 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2045,10 +2045,10 @@ function pdf_getTotalQty($object, $type, $outputlangs) global $hookmanager; $total=0; - $nblignes=count($object->lines); + $nblines=count($object->lines); // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->special_code != 3) { diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 5deb40fc7ad..7be15c048ef 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -111,7 +111,7 @@ class pdf_ban extends ModeleBankAccountDoc if ($conf->bank->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks // Definition of $dir and $file if ($object->specimen) @@ -287,7 +287,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) + protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 9783c4690b2..96254c3a9d6 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -114,7 +114,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc if (! empty($conf->bank->dir_output)) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks // Definition of $dir and $file if ($object->specimen) @@ -430,7 +430,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) + protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 8677a16db38..0e064991444 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -219,7 +219,7 @@ class pdf_einstein extends ModelePDFCommandes public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; + global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -228,7 +228,7 @@ class pdf_einstein extends ModelePDFCommandes // Load translation files required by the page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->commande->dir_output) { @@ -308,7 +308,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -400,7 +400,7 @@ class pdf_einstein extends ModelePDFCommandes $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -429,7 +429,7 @@ class pdf_einstein extends ModelePDFCommandes $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -540,7 +540,7 @@ class pdf_einstein extends ModelePDFCommandes $this->tva[$vatrate] += $tvaligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 71345305579..ad9f2f5fbf4 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -194,7 +194,7 @@ class pdf_eratosthene extends ModelePDFCommandes public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes; + global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -203,7 +203,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Translations $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -217,7 +217,7 @@ class pdf_eratosthene extends ModelePDFCommandes { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -541,7 +541,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -599,7 +599,7 @@ class pdf_eratosthene extends ModelePDFCommandes $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -738,7 +738,7 @@ class pdf_eratosthene extends ModelePDFCommandes $this->tva[$vatrate] += $tvaligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -747,7 +747,7 @@ class pdf_eratosthene extends ModelePDFCommandes $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 87f04dca016..745c09c8130 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -168,7 +168,7 @@ class pdf_espadon extends ModelePdfExpedition // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -176,7 +176,7 @@ class pdf_espadon extends ModelePdfExpedition { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -254,7 +254,7 @@ class pdf_espadon extends ModelePdfExpedition $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -404,7 +404,7 @@ class pdf_espadon extends ModelePdfExpedition $nexY = $tab_top + $this->tabTitleHeight + 2; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -464,7 +464,7 @@ class pdf_espadon extends ModelePdfExpedition //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -548,7 +548,7 @@ class pdf_espadon extends ModelePdfExpedition if ($weighttxt && $voltxt) $nexY+=2; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80))); diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 235e7e5c66c..bd46fc5a75e 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -222,7 +222,7 @@ class pdf_merou extends ModelePdfExpedition global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format, 'mm', 'l'); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -347,7 +347,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'C', 0); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -356,7 +356,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index ea5efb359d0..d255c4486fd 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -197,7 +197,7 @@ class pdf_rouget extends ModelePdfExpedition // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -205,7 +205,7 @@ class pdf_rouget extends ModelePdfExpedition { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -283,7 +283,7 @@ class pdf_rouget extends ModelePdfExpedition $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -423,7 +423,7 @@ class pdf_rouget extends ModelePdfExpedition $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -481,7 +481,7 @@ class pdf_rouget extends ModelePdfExpedition //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -563,7 +563,7 @@ class pdf_rouget extends ModelePdfExpedition if ($weighttxt && $voltxt) $nexY+=2; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index e0bba62df3b..99d2ab322e0 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -220,7 +220,7 @@ class pdf_standard extends ModeleExpenseReport // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "trips", "projects", "dict", "bills", "banks")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->expensereport->dir_output) { // Definition of $dir and $file @@ -351,7 +351,7 @@ class pdf_standard extends ModeleExpenseReport $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) { + for ($i = 0 ; $i < $nblines ; $i++) { $pdf->SetFont('', '', $default_font_size - 2); // Into loop to work with multipage $pdf->SetTextColor(0, 0, 0); @@ -374,7 +374,7 @@ class pdf_standard extends ModeleExpenseReport //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) { // There is no space left for total+free text - if ($i == ($nblignes-1)) { + if ($i == ($nblines-1)) { // No more lines, and no space left to show total, so we create a new page $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -401,7 +401,7 @@ class pdf_standard extends ModeleExpenseReport //$nblineFollowComment = 1; // Cherche nombre de lignes a venir pour savoir si place suffisante - // if ($i < ($nblignes - 1)) // If it's not last line + // if ($i < ($nblines - 1)) // If it's not last line // { // //Fetch current description to know on which line the next one should be placed // $follow_comment = $object->lines[$i]->comments; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 8252403ea3f..4536add16bb 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -235,7 +235,7 @@ class pdf_crabe extends ModelePDFFactures public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); @@ -246,13 +246,13 @@ class pdf_crabe extends ModelePDFFactures // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -319,7 +319,7 @@ class pdf_crabe extends ModelePDFFactures $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $nbpayments = count($object->getListOfPayments()); // Create pdf instance @@ -360,7 +360,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -467,7 +467,7 @@ class pdf_crabe extends ModelePDFFactures $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -523,7 +523,7 @@ class pdf_crabe extends ModelePDFFactures //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -652,7 +652,7 @@ class pdf_crabe extends ModelePDFFactures if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -661,7 +661,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 1413bd3c777..422060ab30b 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -209,7 +209,7 @@ class pdf_sponge extends ModelePDFFactures public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -218,7 +218,7 @@ class pdf_sponge extends ModelePDFFactures // Translations $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -232,7 +232,7 @@ class pdf_sponge extends ModelePDFFactures { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -330,7 +330,7 @@ class pdf_sponge extends ModelePDFFactures $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $nbpayments = count($object->getListOfPayments()); // Create pdf instance @@ -572,7 +572,7 @@ class pdf_sponge extends ModelePDFFactures // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; @@ -630,7 +630,7 @@ class pdf_sponge extends ModelePDFFactures //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -782,7 +782,7 @@ class pdf_sponge extends ModelePDFFactures $nexY = max($nexY, $posYAfterImage); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -791,7 +791,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 41edc6c0a1d..fa32d3df0d2 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -216,7 +216,7 @@ class pdf_soleil extends ModelePDFFicheinter global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); // Create pdf instance $pdf=pdf_getInstance($this->format); @@ -274,7 +274,7 @@ class pdf_soleil extends ModelePDFFicheinter complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index a2124b801a6..0a339a9a61f 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -479,7 +479,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index 89f0f67ae53..6089a9fe66e 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -172,7 +172,7 @@ class pdf_standard extends ModelePDFProduct // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->product->dir_output) { @@ -346,7 +346,7 @@ class pdf_standard extends ModelePDFProduct // Loop on each lines /* - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage @@ -375,7 +375,7 @@ class pdf_standard extends ModelePDFProduct $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('','',true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -484,7 +484,7 @@ class pdf_standard extends ModelePDFProduct $this->tva[$vatrate] += $tvaligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index c7005206fcc..257b477a8df 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -188,7 +188,7 @@ class pdf_baleine extends ModelePDFProjects if ($conf->projet->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; @@ -250,7 +250,7 @@ class pdf_baleine extends ModelePDFProjects } $object->lines=$tasksarray; - $nblignes=count($object->lines); + $nblines=count($object->lines); $pdf->Open(); $pagenb=0; @@ -287,7 +287,7 @@ class pdf_baleine extends ModelePDFProjects complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -313,7 +313,7 @@ class pdf_baleine extends ModelePDFProjects $nexY = $tab_top + $heightoftitleline + 1; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -352,7 +352,7 @@ class pdf_baleine extends ModelePDFProjects $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -428,7 +428,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -437,7 +437,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index dfbe97c3fd5..1d7e3d983fb 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -160,7 +160,7 @@ class pdf_beluga extends ModelePDFProjects if ($conf->projet->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; @@ -223,7 +223,7 @@ class pdf_beluga extends ModelePDFProjects } $object->lines=$tasksarray; - $nblignes=count($object->lines); + $nblines=count($object->lines); $pdf->Open(); $pagenb=0; @@ -260,7 +260,7 @@ class pdf_beluga extends ModelePDFProjects complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -642,7 +642,7 @@ class pdf_beluga extends ModelePDFProjects } } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 2c69fbd6bab..14946ca5cf3 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -120,7 +120,7 @@ class pdf_timespent extends ModelePDFProjects if ($conf->projet->dir_output) { - //$nblignes = count($object->lines); // This is set later with array of tasks + //$nblines = count($object->lines); // This is set later with array of tasks $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->projet->dir_output; @@ -181,7 +181,7 @@ class pdf_timespent extends ModelePDFProjects } $object->lines=$tasksarray; - $nblignes=count($object->lines); + $nblines=count($object->lines); $pdf->Open(); $pagenb=0; @@ -218,7 +218,7 @@ class pdf_timespent extends ModelePDFProjects complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top -= 2; $pdf->SetFont('', '', $default_font_size - 1); @@ -244,7 +244,7 @@ class pdf_timespent extends ModelePDFProjects $nexY = $tab_top + $heightoftitleline + 1; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -283,7 +283,7 @@ class pdf_timespent extends ModelePDFProjects $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -359,7 +359,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->posxdateend, 3, $dateend, 0, 'C'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -368,7 +368,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 54fe56421ea..4ad23a1704e 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -218,7 +218,7 @@ class pdf_azur extends ModelePDFPropales public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -227,7 +227,7 @@ class pdf_azur extends ModelePDFPropales // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -235,7 +235,7 @@ class pdf_azur extends ModelePDFPropales { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -362,7 +362,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -470,7 +470,7 @@ class pdf_azur extends ModelePDFPropales $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -527,7 +527,7 @@ class pdf_azur extends ModelePDFPropales //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -640,7 +640,7 @@ class pdf_azur extends ModelePDFPropales if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -649,7 +649,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 14a2456157a..3ddc8a45a52 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -193,7 +193,7 @@ class pdf_cyan extends ModelePDFPropales public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -206,7 +206,7 @@ class pdf_cyan extends ModelePDFPropales $outputlangs->load("propal"); $outputlangs->load("products"); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -220,7 +220,7 @@ class pdf_cyan extends ModelePDFPropales { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -557,7 +557,7 @@ class pdf_cyan extends ModelePDFPropales // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -617,7 +617,7 @@ class pdf_cyan extends ModelePDFPropales //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforsignature+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -755,7 +755,7 @@ class pdf_cyan extends ModelePDFPropales if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -764,7 +764,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index dec1f35e7b0..10be4430aea 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -131,7 +131,7 @@ class pdf_squille extends ModelePdfReception $outputlangs->load("receptions"); $outputlangs->load("productbatch"); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); @@ -139,7 +139,7 @@ class pdf_squille extends ModelePdfReception { $objphoto = new Product($this->db); - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -217,7 +217,7 @@ class pdf_squille extends ModelePdfReception $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblignes with the new facture lines content after hook - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -357,7 +357,7 @@ class pdf_squille extends ModelePdfReception $fk_commandefourndet=0; $totalOrdered=0; // Loop on each lines - for ($i = 0; $i < $nblignes; $i++) + for ($i = 0; $i < $nblines; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -416,7 +416,7 @@ class pdf_squille extends ModelePdfReception //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -496,7 +496,7 @@ class pdf_squille extends ModelePdfReception if ($weighttxt && $voltxt) $nexY+=2; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index e1181aa6fe2..4be99b07c11 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -201,7 +201,7 @@ class pdf_standard extends ModelePDFStock // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries")); - $nblignes = count($object->lines); + $nblines = count($object->lines); if ($conf->stock->dir_output) { @@ -323,8 +323,8 @@ class pdf_standard extends ModelePDFStock { $num = $db->num_rows($resql); $i = 0; - $nblignes = $num; - for ($i = 0 ; $i < $nblignes ; $i++) + $nblines = $num; + for ($i = 0 ; $i < $nblines ; $i++) { $objp = $db->fetch_object($resql); @@ -372,7 +372,7 @@ class pdf_standard extends ModelePDFStock $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -452,7 +452,7 @@ class pdf_standard extends ModelePDFStock $totalvaluesell+=price2num($pricemin*$objp->value, 'MT'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -550,7 +550,7 @@ class pdf_standard extends ModelePDFStock complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); @@ -576,7 +576,7 @@ class pdf_standard extends ModelePDFStock // Loop on each lines /* - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage @@ -605,7 +605,7 @@ class pdf_standard extends ModelePDFStock $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('','',true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -644,7 +644,7 @@ class pdf_standard extends ModelePDFStock $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 4, $qty, 0, 'R'); // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -653,7 +653,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php index 2a1819a3aa0..5efa1b0b312 100644 --- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php @@ -331,7 +331,7 @@ class pdf_stdmovement extends ModelePDFMovement * END TODO **/ - //$nblignes = count($object->lines); + //$nblines = count($object->lines); if ($conf->stock->dir_output) { @@ -481,8 +481,8 @@ class pdf_stdmovement extends ModelePDFMovement { $num = $db->num_rows($resql); $i = 0; - $nblignes = $num; - for ($i = 0 ; $i < $nblignes ; $i++) + $nblines = $num; + for ($i = 0 ; $i < $nblines ; $i++) { $objp = $db->fetch_object($resql); @@ -530,7 +530,7 @@ class pdf_stdmovement extends ModelePDFMovement $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -639,9 +639,9 @@ class pdf_stdmovement extends ModelePDFMovement $totalvaluesell+=price2num($pricemin*$objp->value, 'MT'); - $nexY+=3.5; // Passe espace entre les lignes + $nexY+=3.5; // Add space between lines // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -650,7 +650,7 @@ class pdf_stdmovement extends ModelePDFMovement $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) @@ -724,7 +724,7 @@ class pdf_stdmovement extends ModelePDFMovement complete_substitutions_array($substitutionarray, $outputlangs, $object); $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - + $tab_top = 88; $pdf->SetFont('', '', $default_font_size - 1); diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 5c0904baba8..4c4fe7106a7 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -199,7 +199,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$hookmanager,$nblines; // Get source company if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); @@ -259,7 +259,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -296,7 +296,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -370,7 +370,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -397,7 +397,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -495,7 +495,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->localtax2[$localtax2rate]+=$localtax2ligne; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -504,7 +504,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php index 612595b8c44..e96f5ef4eab 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_cornas.modules.php @@ -185,7 +185,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; + global $user,$langs,$conf,$hookmanager,$mysoc,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -194,7 +194,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Load translation files required by the page $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); - $nblignes = count($object->lines); + $nblines = count($object->lines); $hidetop=0; if(!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)){ @@ -205,7 +205,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -284,7 +284,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -496,7 +496,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Loop on each lines $pageposbeforeprintlines=$pdf->getPage(); $pagenb = $pageposbeforeprintlines; - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -553,7 +553,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -689,7 +689,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80,80,80))); @@ -698,7 +698,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 0c9e8e0967a..9f9f0cfad38 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -213,7 +213,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes; + global $user,$langs,$conf,$hookmanager,$mysoc,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -222,13 +222,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Load translation files required by the page $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "dict", "products")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -307,7 +307,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -344,7 +344,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -418,7 +418,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -481,7 +481,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -591,7 +591,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -600,7 +600,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php index 79ad993ef81..e4b6b73fbc1 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -264,7 +264,7 @@ class pdf_standard extends ModelePDFSuppliersPayments global $action; $reshook=$hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $nblignes = count($object->lines); + $nblines = count($object->lines); $pdf=pdf_getInstance($this->format); $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance @@ -325,7 +325,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -354,7 +354,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $posyafter=$pdf->GetY(); if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -412,7 +412,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -421,7 +421,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index d8d489c1bbf..e486474d1d5 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -209,7 +209,7 @@ class pdf_aurore extends ModelePDFSupplierProposal public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable - global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; + global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblines; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -218,13 +218,13 @@ class pdf_aurore extends ModelePDFSupplierProposal // Load traductions files requiredby by page $outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal")); - $nblignes = count($object->lines); + $nblines = count($object->lines); // Loop on each lines to detect if there is at least one image to show $realpatharray=array(); if (! empty($conf->global->MAIN_GENERATE_SUPPLIER_PROPOSAL_WITH_PICTURE)) { - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if (empty($object->lines[$i]->fk_product)) continue; @@ -333,7 +333,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { if ($object->lines[$i]->remise_percent) { @@ -403,7 +403,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $nexY = $tab_top + 7; // Loop on each lines - for ($i = 0 ; $i < $nblignes ; $i++) + for ($i = 0 ; $i < $nblines ; $i++) { $curY = $nexY; $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage @@ -469,7 +469,7 @@ class pdf_aurore extends ModelePDFSupplierProposal //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text { - if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page + if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page { $pdf->AddPage('', '', true); if (! empty($tplidx)) $pdf->useTemplate($tplidx); @@ -587,7 +587,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if ($posYAfterImage > $posYAfterDescription) $nexY=$posYAfterImage; // Add line - if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1)) + if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); $pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(80,80,80))); @@ -596,7 +596,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetLineStyle(array('dash'=>0)); } - $nexY+=2; // Passe espace entre les lignes + $nexY+=2; // Add space between lines // Detect if some page were added automatically and output _tableau for past pages while ($pagenb < $pageposafter) diff --git a/htdocs/debugbar/class/TraceableDB.php b/htdocs/debugbar/class/TraceableDB.php index 4edc39a74af..775c2a7c300 100644 --- a/htdocs/debugbar/class/TraceableDB.php +++ b/htdocs/debugbar/class/TraceableDB.php @@ -148,10 +148,10 @@ class TraceableDB extends DoliDB // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE + * Return the number o flines into the result of a request INSERT, DELETE or UPDATE * * @param resource $resultset Curseur de la requete voulue - * @return int Nombre de lignes + * @return int Number of lines * @see num_rows() */ public function affected_rows($resultset) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index a17da1c84b4..c83a1172a03 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -347,7 +347,7 @@ class Expedition extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { - // Insertion des lignes + // Insert of lines $num=count($this->lines); for ($i = 0; $i < $num; $i++) { @@ -2355,7 +2355,7 @@ class Expedition extends CommonObject /** - * Classe de gestion des lignes de bons d'expedition + * Classe to manage lines of shipment */ class ExpeditionLigne extends CommonObjectLine { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index c09d2897980..c3e7ed4eb29 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2112,16 +2112,16 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::periode_existe sql=".$sql); $result = $this->db->query($sql); if ($result) { - $num_lignes = $this->db->num_rows($result); $i = 0; + $num_rows = $this->db->num_rows($result); $i = 0; - if ($num_lignes>0) + if ($num_rows > 0) { $date_d_form = $date_debut; $date_f_form = $date_fin; $existe = false; - while ($i < $num_lignes) + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); @@ -2175,8 +2175,8 @@ class ExpenseReport extends CommonObject $result = $this->db->query($sql); if($result) { - $num_lignes = $this->db->num_rows($result); $i = 0; - while ($i < $num_lignes) + $num_rows = $this->db->num_rows($result); $i = 0; + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); array_push($users_validator, $objp->fk_user); diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 2afd0745c8e..6ee445d68a1 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -183,7 +183,7 @@ if ($action == 'add') { $newfichinterid = $newinter->create($user); if ($newfichinterid > 0) { - // on ajoute les lignes de détail ensuite + // Now we add line of details foreach ($object->lines as $ficheinterligne) $newinter->addline($user, $newfichinterid, $ficheinterligne->desc, "", $ficheinterligne->duree, ''); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index abcea896c06..e64b86340f3 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -679,9 +679,8 @@ if (empty($reshook)) } /* - * Ordonnancement des lignes - */ - + * Set position of lines + */ elseif ($action == 'up' && $user->rights->ficheinter->creer) { $object->line_up($lineid); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 45ad69f6c64..e4d70ff255a 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -312,7 +312,7 @@ class PaiementFourn extends Paiement /** - * Supprime un paiement ainsi que les lignes qu'il a genere dans comptes + * Delete a payment and lines generated into accounts * Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse * Si le paiement porte sur au moins une facture a "payee", on refuse * diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index dfab5ebf2ac..a0a966e7210 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -1415,7 +1415,7 @@ if (empty($reshook)) $totalpaye = $object->getSommePaiement(); $resteapayer = $object->total_ttc - $totalpaye; - // On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees + // We check that lines of invoices are exported in accountancy //$ventilExportCompta = $object->getVentilExportCompta(); // On verifie si aucun paiement n'a ete effectue diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 05083877b32..533f6c9c748 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1899,8 +1899,8 @@ class Holiday extends CommonObject $result = $this->db->query($sql); if($result) { - $num_lignes = $this->db->num_rows($result); $i = 0; - while ($i < $num_lignes) + $num_rows = $this->db->num_rows($result); $i = 0; + while ($i < $num_rows) { $objp = $this->db->fetch_object($result); array_push($users_validator, $objp->fk_user); diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 9a5780b351d..5d01dffa886 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -942,7 +942,7 @@ class Livraison extends CommonObject { $objSourceLine = $this->db->fetch_object($resultSourceLine); - // Recupere les lignes de la source deja livrees + // Get lines of sources alread delivered $sql = "SELECT ld.fk_origin_line, sum(ld.qty) as qty"; $sql.= " FROM ".MAIN_DB_PREFIX."livraisondet as ld, ".MAIN_DB_PREFIX."livraison as l,"; $sql.= " ".MAIN_DB_PREFIX.$this->linked_object[0]['type']." as c"; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 1b3034bb82c..2376de4ef16 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -42,7 +42,7 @@ $object=new Opensurveysondage($db); $result=$object->fetch(0, $numsondage); if ($result <= 0) dol_print_error('', 'Failed to get survey id '.$numsondage); -$nblignes=$object->fetch_lines(); +$nblines=$object->fetch_lines(); /* @@ -108,7 +108,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $testmodifier = false; $testligneamodifier = false; $ligneamodifier = -1; -for ($i=0; $i<$nblignes; $i++) +for ($i=0; $i<$nblines; $i++) { if (isset($_POST['modifierligne'.$i])) { @@ -271,7 +271,7 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") } // Delete line -for ($i = 0; $i < $nblignes; $i++) +for ($i = 0; $i < $nblines; $i++) { if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) // effacelignei for chrome, effacelignei_x for firefox { @@ -916,7 +916,7 @@ while ($compteur < $num) } //demande de confirmation pour modification de ligne - for ($i=0; $i<$nblignes; $i++) + for ($i=0; $i<$nblines; $i++) { if (isset($_POST["modifierligne".$i])) { diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index f1e27c02501..283d81f2713 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -783,10 +783,9 @@ SCRIPT; // Suppliers list title print '
'; print '
'; - if ($object->isProduct()) $nblignefour=4; - else $nblignefour=4; $param="&id=".$object->id; + print ''; print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 56c43556c6e..d4b4ccde404 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -42,7 +42,7 @@ if (GETPOST('sondage')) $object=new Opensurveysondage($db); $result=$object->fetch(0, $numsondage); -$nblignes=$object->fetch_lines(); +$nblines=$object->fetch_lines(); //If the survey has not yet finished, then it can be modified $canbemodified = ((empty($object->date_fin) || $object->date_fin > dol_now()) && $object->status != Opensurveysondage::STATUS_CLOSED); @@ -184,7 +184,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout $testmodifier = false; $testligneamodifier = false; $ligneamodifier = -1; -for ($i=0; $i<$nblignes; $i++) +for ($i=0; $i < $nblines; $i++) { if (isset($_POST['modifierligne'.$i])) { @@ -557,7 +557,7 @@ while ($compteur < $num) } //demande de confirmation pour modification de ligne - for ($i=0; $i<$nblignes; $i++) + for ($i=0; $i < $nblines; $i++) { if (isset($_POST["modifierligne".$i])) { diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index f1877ace179..d0baa948950 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -259,7 +259,7 @@ class Reception extends CommonObject dol_syslog(get_class($this)."::create", LOG_DEBUG); if ($this->db->query($sql)) { - // Insertion des lignes + // Insert of lines $num=count($this->lines); for ($i = 0; $i < $num; $i++) { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 2f45be04542..4cb115ef378 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -899,7 +899,7 @@ class Dolresource extends CommonObject /** * Load in cache resource type code (setup in dictionary) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function load_cache_code_type_resource() { diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index ca16348dcd6..74073c0d7e4 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -377,7 +377,7 @@ class SupplierProposal extends CommonObject * @param double $remise_percent Percentage discount of the line * @param string $price_base_type HT or TTC * @param double $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes + * @param int $info_bits Bits of type of lines * @param int $type Type of line (product, service) * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 69708e06516..bb5f673d57e 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1034,7 +1034,7 @@ class Ticket extends CommonObject /** * Charge dans cache la liste des types de tickets (paramétrable dans dictionnaire) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheTypesTickets() { @@ -1074,7 +1074,7 @@ class Ticket extends CommonObject /** * Charge dans cache la liste des catégories de tickets (paramétrable dans dictionnaire) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheCategoriesTickets() { @@ -1114,7 +1114,7 @@ class Ticket extends CommonObject /** * Charge dans cache la liste des sévérité de tickets (paramétrable dans dictionnaire) * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheSeveritiesTickets() { @@ -1561,7 +1561,7 @@ class Ticket extends CommonObject /** * Charge la liste des actions sur le ticket * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheLogsTicket() { @@ -1662,7 +1662,7 @@ class Ticket extends CommonObject /** * Charge la liste des messages sur le ticket * - * @return int Nb lignes chargees, 0 si deja chargees, <0 si ko + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheMsgsTicket() { From 7de92070d7333c1a8848219c4b2d983a6dcd8cbd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 16:46:16 +0200 Subject: [PATCH 10/16] Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop Conflicts: htdocs/contrat/card.php htdocs/contrat/class/contrat.class.php --- htdocs/{commande => }/contrat/admin/contract_extrafields.php | 0 htdocs/{commande => }/contrat/admin/contractdet_extrafields.php | 0 htdocs/{commande => }/contrat/admin/index.html | 0 htdocs/{commande => }/contrat/card.php | 0 htdocs/{commande => }/contrat/class/api_contracts.class.php | 0 htdocs/{commande => }/contrat/class/contrat.class.php | 0 htdocs/{commande => }/contrat/class/index.html | 0 htdocs/{commande => }/contrat/contact.php | 0 htdocs/{commande => }/contrat/document.php | 0 htdocs/{commande => }/contrat/index.php | 0 htdocs/{commande => }/contrat/info.php | 0 htdocs/{commande => }/contrat/list.php | 0 htdocs/{commande => }/contrat/note.php | 0 htdocs/{commande => }/contrat/services_list.php | 0 htdocs/{commande => }/contrat/tpl/index.html | 0 htdocs/{commande => }/contrat/tpl/linkedobjectblock.tpl.php | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename htdocs/{commande => }/contrat/admin/contract_extrafields.php (100%) rename htdocs/{commande => }/contrat/admin/contractdet_extrafields.php (100%) rename htdocs/{commande => }/contrat/admin/index.html (100%) rename htdocs/{commande => }/contrat/card.php (100%) rename htdocs/{commande => }/contrat/class/api_contracts.class.php (100%) rename htdocs/{commande => }/contrat/class/contrat.class.php (100%) rename htdocs/{commande => }/contrat/class/index.html (100%) rename htdocs/{commande => }/contrat/contact.php (100%) rename htdocs/{commande => }/contrat/document.php (100%) rename htdocs/{commande => }/contrat/index.php (100%) rename htdocs/{commande => }/contrat/info.php (100%) rename htdocs/{commande => }/contrat/list.php (100%) rename htdocs/{commande => }/contrat/note.php (100%) rename htdocs/{commande => }/contrat/services_list.php (100%) rename htdocs/{commande => }/contrat/tpl/index.html (100%) rename htdocs/{commande => }/contrat/tpl/linkedobjectblock.tpl.php (100%) diff --git a/htdocs/commande/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php similarity index 100% rename from htdocs/commande/contrat/admin/contract_extrafields.php rename to htdocs/contrat/admin/contract_extrafields.php diff --git a/htdocs/commande/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php similarity index 100% rename from htdocs/commande/contrat/admin/contractdet_extrafields.php rename to htdocs/contrat/admin/contractdet_extrafields.php diff --git a/htdocs/commande/contrat/admin/index.html b/htdocs/contrat/admin/index.html similarity index 100% rename from htdocs/commande/contrat/admin/index.html rename to htdocs/contrat/admin/index.html diff --git a/htdocs/commande/contrat/card.php b/htdocs/contrat/card.php similarity index 100% rename from htdocs/commande/contrat/card.php rename to htdocs/contrat/card.php diff --git a/htdocs/commande/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php similarity index 100% rename from htdocs/commande/contrat/class/api_contracts.class.php rename to htdocs/contrat/class/api_contracts.class.php diff --git a/htdocs/commande/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php similarity index 100% rename from htdocs/commande/contrat/class/contrat.class.php rename to htdocs/contrat/class/contrat.class.php diff --git a/htdocs/commande/contrat/class/index.html b/htdocs/contrat/class/index.html similarity index 100% rename from htdocs/commande/contrat/class/index.html rename to htdocs/contrat/class/index.html diff --git a/htdocs/commande/contrat/contact.php b/htdocs/contrat/contact.php similarity index 100% rename from htdocs/commande/contrat/contact.php rename to htdocs/contrat/contact.php diff --git a/htdocs/commande/contrat/document.php b/htdocs/contrat/document.php similarity index 100% rename from htdocs/commande/contrat/document.php rename to htdocs/contrat/document.php diff --git a/htdocs/commande/contrat/index.php b/htdocs/contrat/index.php similarity index 100% rename from htdocs/commande/contrat/index.php rename to htdocs/contrat/index.php diff --git a/htdocs/commande/contrat/info.php b/htdocs/contrat/info.php similarity index 100% rename from htdocs/commande/contrat/info.php rename to htdocs/contrat/info.php diff --git a/htdocs/commande/contrat/list.php b/htdocs/contrat/list.php similarity index 100% rename from htdocs/commande/contrat/list.php rename to htdocs/contrat/list.php diff --git a/htdocs/commande/contrat/note.php b/htdocs/contrat/note.php similarity index 100% rename from htdocs/commande/contrat/note.php rename to htdocs/contrat/note.php diff --git a/htdocs/commande/contrat/services_list.php b/htdocs/contrat/services_list.php similarity index 100% rename from htdocs/commande/contrat/services_list.php rename to htdocs/contrat/services_list.php diff --git a/htdocs/commande/contrat/tpl/index.html b/htdocs/contrat/tpl/index.html similarity index 100% rename from htdocs/commande/contrat/tpl/index.html rename to htdocs/contrat/tpl/index.html diff --git a/htdocs/commande/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php similarity index 100% rename from htdocs/commande/contrat/tpl/linkedobjectblock.tpl.php rename to htdocs/contrat/tpl/linkedobjectblock.tpl.php From 72084f4684afeca200b0f135741eb9ca162c1444 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 16:49:32 +0200 Subject: [PATCH 11/16] Fix protected --- htdocs/core/modules/bank/doc/pdf_ban.modules.php | 6 +++--- .../core/modules/bank/doc/pdf_sepamandate.modules.php | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 5deb40fc7ad..a6ec1eabcd9 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -287,7 +287,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) + protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -303,7 +303,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param Translate $outputlangs Object lang for output * @return void */ - private function _pagehead(&$pdf, $object, $showaddress, $outputlangs) + protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { global $langs,$conf,$mysoc; @@ -389,7 +389,7 @@ class pdf_ban extends ModeleBankAccountDoc * @param int $hidefreetext 1=Hide free text * @return integer */ - private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) + protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 9783c4690b2..657a3146e6e 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -430,7 +430,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param int $hidebottom Hide bottom bar of array * @return void */ - private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) + protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { global $conf,$mysoc; @@ -448,7 +448,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param Translate $outputlangs Langs object * @return void */ - private function _tableau_info(&$pdf, $object, $posy, $outputlangs) + protected function _tableau_info(&$pdf, $object, $posy, $outputlangs) { // phpcs:enable global $conf, $mysoc; @@ -485,7 +485,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param Translate $outputlangs Objet langs * @return int Position pour suite */ - private function _signature_area(&$pdf, $object, $posy, $outputlangs) + protected function _signature_area(&$pdf, $object, $posy, $outputlangs) { // phpcs:enable $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -526,7 +526,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param Translate $outputlangs Object lang for output * @return void */ - private function _pagehead(&$pdf, $object, $showaddress, $outputlangs) + protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { global $langs,$conf,$mysoc; @@ -618,7 +618,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param int $hidefreetext 1=Hide free text * @return integer */ - private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) + protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { global $conf; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; From e9c6a10bdd68ff75fcdacdd20aea356cca091934 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 18:35:36 +0200 Subject: [PATCH 12/16] Fix phpcs --- htdocs/core/modules/bank/doc/pdf_ban.modules.php | 7 +++++++ .../modules/bank/doc/pdf_sepamandate.modules.php | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index a6ec1eabcd9..dfe612b0012 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -275,6 +275,7 @@ class pdf_ban extends ModeleBankAccountDoc } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show table for lines * @@ -289,11 +290,13 @@ class pdf_ban extends ModeleBankAccountDoc */ protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { + // phpcs:enable global $conf,$mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show top header of page. * @@ -306,6 +309,7 @@ class pdf_ban extends ModeleBankAccountDoc protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { global $langs,$conf,$mysoc; + // phpcs:enable $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -380,6 +384,7 @@ class pdf_ban extends ModeleBankAccountDoc */ } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show footer of page. Need this->emetteur object * @@ -391,7 +396,9 @@ class pdf_ban extends ModeleBankAccountDoc */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { + // phpcs:enable global $conf; + $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; //return pdf_pagefoot($pdf,$outputlangs,'BANK_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext); } diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 657a3146e6e..df8a7993dce 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -418,6 +418,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show table for lines * @@ -432,13 +433,15 @@ class pdf_sepamandate extends ModeleBankAccountDoc */ protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0) { + // phpcs:enable global $conf,$mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show miscellaneous information (payment mode, payment term, ...) * @@ -475,7 +478,8 @@ class pdf_sepamandate extends ModeleBankAccountDoc - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show area for the customer to sign * @@ -517,6 +521,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show top header of page. * @@ -528,6 +533,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { + // phpcs:enable global $langs,$conf,$mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -609,6 +615,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc */ } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show footer of page. Need this->emetteur object * @@ -620,7 +627,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { + // phpcs:enable global $conf; + $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; return pdf_pagefoot($pdf, $outputlangs, 'PAYMENTORDER_FREE_TEXT', null, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } From 09d420307db71d178aa81a38860911d219a56d56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 23:16:07 +0200 Subject: [PATCH 13/16] =?UTF-8?q?Fix=20error=20"fatal:=20ni=20ceci=20ni=20?= =?UTF-8?q?aucun=20de=20ses=20r=C3=A9pertoires=20parents=20n'est=20un=20d?= =?UTF-8?q?=C3=A9p=C3=B4t=20git=C2=A0:=20.git"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/makepack-dolibarr.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index b787d439243..3884969eceb 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -382,11 +382,14 @@ if ($nboftargetok) { } } } - + # Build xml check file #----------------------- if ($CHOOSEDTARGET{'-CHKSUM'}) { + print "Go to directory $SOURCE\n"; + $olddir=getcwd(); + chdir("$SOURCE"); $ret=`git ls-files . --exclude-standard --others`; if ($ret) { From fdc958a17215dde76d7d55ebfe5c5ee375831efc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 23:17:36 +0200 Subject: [PATCH 14/16] Fix launch of ISCC.ex if not into path --- build/makepack-dolibarr.pl | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 7ba988231cc..14d4924136a 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -22,7 +22,7 @@ $PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr"; $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files"; -#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages +#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages @LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages %REQUIREMENTPUBLISH=( "SF"=>"git ssh rsync", @@ -36,8 +36,8 @@ $PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpd "RPM_FEDORA"=>"rpmbuild", "RPM_MANDRIVA"=>"rpmbuild", "RPM_OPENSUSE"=>"rpmbuild", -"DEB"=>"dpkg", -"APS"=>"zip", +"DEB"=>"dpkg dpatch", +"FLATPACK"=>"flatpack", "EXEDOLIWAMP"=>"ISCC.exe", "SNAPSHOT"=>"tar" ); @@ -142,7 +142,6 @@ $FILENAMETGZ = "$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEZIP = "$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEXZ = "$PROJECT-$MAJOR.$MINOR.$BUILD"; $FILENAMEDEB = "see later"; -$FILENAMEAPS = "$PROJECT-$MAJOR.$MINOR.$BUILD.app"; $FILENAMEEXEDOLIWAMP = "DoliWamp-$MAJOR.$MINOR.$BUILD"; # For RPM $ARCH='noarch'; @@ -358,16 +357,16 @@ if ($nboftargetok) { } else { - print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:'\n"; + print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with command:\n"; } if (! $BUILD || $BUILD eq '0-rc') # For a major version { - print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; + print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; } else # For a maintenance release { #print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; - print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; + print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. | grep -v "Merge branch" | grep -v "Merge pull" | grep "^ " | sed -e "s/^[0-9a-z]* *//" | grep -e \'^FIX\|NEW\|CLOSE\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; } print "\n"; @@ -388,6 +387,7 @@ if ($nboftargetok) { #----------------------- if ($CHOOSEDTARGET{'-CHKSUM'}) { + chdir("$SOURCE"); print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; $ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`; print $ret."\n"; @@ -536,6 +536,8 @@ if ($nboftargetok) { $ret=`find $BUILDROOT/$PROJECT/htdocs/custom/* -type l -exec rm -fr {} \\; >/dev/null 2>&1`; # For custom we want to remove all subdirs, even symbolic links, but not files # Removed known external modules to avoid any error when packaging from env where external modules are tested + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/abricot*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`; @@ -550,11 +552,14 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ndf*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nomenclature*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/of/`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/oscim*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; @@ -586,6 +591,8 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`; @@ -692,7 +699,7 @@ if ($nboftargetok) { print "Go to directory $BUILDROOT\n"; $olddir=getcwd(); chdir("$BUILDROOT"); - $cmd= "xz -9 -r $BUILDROOT/$FILENAMEAPS.xz \*"; + $cmd= "xz -9 -r $BUILDROOT/$FILENAMEXZ.xz \*"; print $cmd."\n"; $ret= `$cmd`; chdir("$olddir"); @@ -1140,7 +1147,7 @@ if ($nboftargetok) { $ret=`cat "$SOURCE/build/exe/doliwamp/doliwamp.iss" | sed -e 's/__FILENAMEEXEDOLIWAMP__/$FILENAMEEXEDOLIWAMP/g' > "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`; print "Compil exe $FILENAMEEXEDOLIWAMP.exe file from iss file \"$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\"\n"; - $cmd= "ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; + $cmd= "wine ISCC.exe \"Z:$SOURCEBACK\\build\\exe\\doliwamp\\doliwamp.tmp.iss\""; print "$cmd\n"; $ret= `$cmd`; #print "$ret\n"; From 0aeb27ba9707fca4849d7698bb4f009c32a80ae6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 23:25:07 +0200 Subject: [PATCH 15/16] Fix merge --- build/makepack-dolibarr.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index df58566c2d5..bf593192507 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -387,7 +387,8 @@ if ($nboftargetok) { #----------------------- if ($CHOOSEDTARGET{'-CHKSUM'}) { -<<<<<<< HEAD + chdir("$SOURCE"); + $ret=`git ls-files . --exclude-standard --others`; if ($ret) { @@ -397,9 +398,6 @@ if ($nboftargetok) { exit; } -======= - chdir("$SOURCE"); ->>>>>>> branch '8.0' of git@github.com:Dolibarr/dolibarr.git print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n"; $ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`; print $ret."\n"; From 6537faa35eb00d00e6201c794e89f840a4a3beae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Jun 2019 23:26:14 +0200 Subject: [PATCH 16/16] Fix merge --- build/makepack-dolibarr.pl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index bf593192507..138c1cd21d5 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -570,10 +570,6 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`; -<<<<<<< HEAD -======= - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`; ->>>>>>> branch '8.0' of git@github.com:Dolibarr/dolibarr.git $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; # Removed other test files