From 7fd606b33647c769cf837abdbfc21b2510d349d5 Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 8 Mar 2024 12:34:25 +0100 Subject: [PATCH] Qual: Ignore/workaround SuspiciousParamOrder detection (#28688) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) * Qual: Ignore/workaround SuspiciousParamOrder detction # Qual: Ignore/workaround SuspiciousParamOrder detction Ignore the false positive SuspiciousParamOrder or workaround (rename vars) --- htdocs/accountancy/class/lettering.class.php | 2 +- htdocs/accountancy/customer/lines.php | 3 +- htdocs/accountancy/customer/list.php | 35 +-- htdocs/accountancy/expensereport/lines.php | 5 +- htdocs/accountancy/expensereport/list.php | 3 +- htdocs/accountancy/supplier/lines.php | 3 +- htdocs/accountancy/supplier/list.php | 35 +-- htdocs/adherents/card.php | 15 +- htdocs/adherents/list.php | 104 ++++----- htdocs/adherents/subscription.php | 3 +- htdocs/admin/mails_templates.php | 1 + htdocs/admin/tools/listevents.php | 9 +- htdocs/categories/viewcat.php | 14 +- htdocs/comm/action/card.php | 1 + htdocs/comm/action/rapport/index.php | 3 +- htdocs/comm/mailing/cibles.php | 1 + htdocs/commande/list.php | 137 ++++++------ htdocs/commande/list_det.php | 107 +++++----- htdocs/compta/bank/bankentries_list.php | 61 +++--- htdocs/compta/facture/card.php | 9 +- .../compta/facture/invoicetemplate_list.php | 55 ++--- htdocs/compta/facture/list.php | 164 +++++++------- htdocs/compta/paiement/cheque/list.php | 25 +-- htdocs/compta/paiement/list.php | 33 +-- htdocs/compta/prelevement/card.php | 3 +- htdocs/compta/prelevement/fiche-rejet.php | 1 + htdocs/compta/sociales/list.php | 42 ++-- htdocs/compta/tva/list.php | 31 +-- htdocs/compta/tva/payments.php | 2 +- htdocs/core/login/functions_ldap.php | 1 + .../core/modules/bank/doc/pdf_ban.modules.php | 1 + .../bank/doc/pdf_sepamandate.modules.php | 13 +- .../modules/cheque/doc/pdf_blochet.class.php | 7 +- .../commande/doc/pdf_einstein.modules.php | 13 +- .../commande/doc/pdf_eratosthene.modules.php | 20 +- .../expedition/doc/pdf_espadon.modules.php | 2 +- .../expedition/doc/pdf_merou.modules.php | 11 +- .../expedition/doc/pdf_rouget.modules.php | 11 +- .../doc/pdf_standard.modules.php | 7 +- .../modules/facture/doc/pdf_crabe.modules.php | 3 + .../facture/doc/pdf_sponge.modules.php | 4 + .../fichinter/doc/pdf_soleil.modules.php | 7 +- .../modules/hrm/doc/pdf_standard.modules.php | 9 +- .../movement/doc/pdf_standard.modules.php | 23 +- .../modules/mrp/doc/pdf_vinci.modules.php | 8 +- .../product/doc/pdf_standard.modules.php | 7 +- .../project/doc/pdf_baleine.modules.php | 11 +- .../project/doc/pdf_beluga.modules.php | 201 +++++++++--------- .../project/doc/pdf_timespent.modules.php | 11 +- .../modules/propale/doc/pdf_azur.modules.php | 17 +- .../modules/propale/doc/pdf_cyan.modules.php | 22 +- .../modules/rapport/pdf_paiement.class.php | 13 +- .../reception/doc/pdf_squille.modules.php | 9 +- .../stock/doc/pdf_standard.modules.php | 31 +-- .../stocktransfer/doc/pdf_eagle.modules.php | 1 + .../doc/pdf_eagle_proforma.modules.php | 18 +- .../doc/pdf_canelle.modules.php | 11 +- .../supplier_order/doc/pdf_cornas.modules.php | 22 +- .../doc/pdf_muscadet.modules.php | 15 +- .../doc/pdf_standard.modules.php | 11 +- .../doc/pdf_aurore.modules.php | 13 +- .../doc/pdf_zenith.modules.php | 22 +- htdocs/core/tpl/objectline_create.tpl.php | 94 ++++---- htdocs/don/list.php | 22 +- htdocs/don/paiement/list.php | 31 +-- htdocs/expedition/list.php | 67 +++--- htdocs/expensereport/payment/list.php | 35 +-- htdocs/fichinter/list.php | 57 ++--- htdocs/fourn/facture/card.php | 1 + htdocs/fourn/facture/list-rec.php | 55 ++--- htdocs/fourn/facture/list.php | 125 +++++------ htdocs/fourn/paiement/list.php | 31 +-- htdocs/holiday/view_log.php | 19 +- htdocs/margin/agentMargins.php | 2 +- htdocs/margin/checkMargins.php | 1 + htdocs/margin/customerMargins.php | 2 +- htdocs/margin/productMargins.php | 2 +- htdocs/margin/tabs/thirdpartyMargins.php | 2 +- htdocs/product/agenda.php | 2 +- htdocs/product/price.php | 6 +- htdocs/product/stats/commande.php | 1 + htdocs/product/stats/commande_fournisseur.php | 1 + htdocs/product/stats/contrat.php | 3 +- htdocs/product/stats/facture.php | 5 +- htdocs/product/stats/facture_fournisseur.php | 1 + htdocs/product/stats/facturerec.php | 3 +- htdocs/product/stats/mo.php | 3 +- htdocs/product/stats/propal.php | 1 + htdocs/product/stats/supplier_proposal.php | 1 + .../stock/stats/commande_fournisseur.php | 3 +- htdocs/product/stock/stats/expedition.php | 3 +- htdocs/product/stock/stats/mo.php | 9 +- htdocs/product/stock/stats/reception.php | 3 +- htdocs/public/webportal/tpl/menu.tpl.php | 5 +- htdocs/reception/list.php | 1 + ...tandard_recruitmentjobposition.modules.php | 14 +- htdocs/salaries/list.php | 31 +-- htdocs/societe/notify/card.php | 6 +- htdocs/societe/price.php | 14 +- htdocs/user/notify/card.php | 4 +- 100 files changed, 1141 insertions(+), 1007 deletions(-) diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 07329030e4b..6f669e4833d 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -289,7 +289,7 @@ class Lettering extends BookKeeping { $error = 0; - // Generate a string with n char A where n is ACCOUNTING_LETTERING_NBLETTERS (So 'AA', 'AAA', ...) + // Generate a string with n char A where n is ACCOUNTING_LETTERING_NBLETTERS (So 'AA', 'AAA', ...) @phan-suppress-next-line PhanParamSuspiciousOrder $lettre = str_pad("", getDolGlobalInt('ACCOUNTING_LETTERING_NBLETTERS', 3), "A"); $sql = "SELECT DISTINCT ab2.lettering_code"; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 74753c65977..2aaed4ba014 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -175,7 +175,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, fd.rowid') { $form = new Form($db); $formother = new FormOther($db); -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url); @@ -386,6 +386,7 @@ if ($result) { print ''; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); print ''.$langs->trans("DescVentilDoneCustomer").'
'; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 6ef21c0f21e..22047f60fe5 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -230,7 +230,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') { $form = new Form($db); $formother = new FormOther($db); -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; llxHeader('', $langs->trans("CustomersVentilation"), $help_url); @@ -445,8 +445,8 @@ if ($result) { } $arrayofmassactions = array( - 'ventil'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate") - ,'set_default_account'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount") + 'ventil' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate") + ,'set_default_account' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount") //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); @@ -467,10 +467,11 @@ if ($result) { print ''; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); if ($massaction == 'set_default_account') { - $formquestion[]=array('type' => 'other', + $formquestion[] = array('type' => 'other', 'name' => 'set_default_account', 'label' => $langs->trans("AccountancyCode"), 'value' => $formaccounting->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone')); @@ -599,26 +600,26 @@ if ($result) { $facture_static_det->desc = $objp->description; $accountingAccountArray = array( - 'dom'=>$objp->aarowid, - 'intra'=>$objp->aarowid_intra, - 'export'=>$objp->aarowid_export, - 'thirdparty' =>$objp->aarowid_thirdparty); + 'dom' => $objp->aarowid, + 'intra' => $objp->aarowid_intra, + 'export' => $objp->aarowid_export, + 'thirdparty' => $objp->aarowid_thirdparty); $code_sell_p_notset = ''; $code_sell_t_notset = ''; $suggestedid = 0; - $return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer'); - if (!is_array($return) && $return<0) { + $return = $accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer'); + if (!is_array($return) && $return < 0) { setEventMessage($accountingAccount->error, 'errors'); } else { - $suggestedid=$return['suggestedid']; - $suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor']; - $suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor']; - $code_sell_l=$return['code_l']; - $code_sell_p=$return['code_p']; - $code_sell_t=$return['code_t']; + $suggestedid = $return['suggestedid']; + $suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor']; + $suggestedaccountingaccountbydefaultfor = $return['suggestedaccountingaccountbydefaultfor']; + $code_sell_l = $return['code_l']; + $code_sell_p = $return['code_p']; + $code_sell_t = $return['code_t']; } //var_dump($return); @@ -780,7 +781,7 @@ if ($result) { if (!empty($toselect)) { $ischecked = 0; if (in_array($objp->rowid."_".$i, $toselect)) { - $ischecked=1; + $ischecked = 1; } } diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 2320620fec7..11602a58f1f 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -165,7 +165,7 @@ if (GETPOST('sortfield') == 'erd.date, erd.rowid') { $form = new Form($db); $formother = new FormOther($db); -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"), $help_url); @@ -308,6 +308,7 @@ if ($result) { print ''; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ExpenseReportLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); print ''.$langs->trans("DescVentilDoneExpenseReport").'
'; @@ -438,7 +439,7 @@ if ($result) { $i++; } if ($num_lines == 0) { - $colspan=10; + $colspan = 10; if (getDolGlobalString('ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE')) { $colspan++; } diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 8f996c42412..73d9dd96cb1 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -221,7 +221,7 @@ if (GETPOST('sortfield') == 'erd.date, erd.rowid') { $form = new Form($db); $formother = new FormOther($db); -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url); @@ -376,6 +376,7 @@ if ($result) { print ''; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ExpenseReportLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); print ''.$langs->trans("DescVentilTodoExpenseReport").'

'; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 496a32b9825..09c7aca7af7 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -180,7 +180,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') { $form = new Form($db); $formother = new FormOther($db); -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; llxHeader('', $langs->trans("SuppliersVentilation").' - '.$langs->trans("Dispatched"), $help_url); @@ -394,6 +394,7 @@ if ($result) { print ''; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); print ''.$langs->trans("DescVentilDoneSupplier").'
'; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index db087830144..cf495bf632a 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -232,7 +232,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') { $form = new Form($db); $formother = new FormOther($db); -$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; llxHeader('', $langs->trans("SuppliersVentilation"), $help_url); @@ -452,8 +452,8 @@ if ($result) { } $arrayofmassactions = array( - 'ventil'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate") - ,'set_default_account'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount") + 'ventil' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate") + ,'set_default_account' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount") //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); @@ -474,10 +474,11 @@ if ($result) { print ''; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit); if ($massaction == 'set_default_account') { - $formquestion[]=array('type' => 'other', + $formquestion[] = array('type' => 'other', 'name' => 'set_default_account', 'label' => $langs->trans("AccountancyCode"), 'value' => $formaccounting->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone')); @@ -611,26 +612,26 @@ if ($result) { $facturefourn_static_det->desc = $objp->description; $accountingAccountArray = array( - 'dom'=>$objp->aarowid, - 'intra'=>$objp->aarowid_intra, - 'export'=>$objp->aarowid_export, - 'thirdparty' =>$objp->aarowid_thirdparty); + 'dom' => $objp->aarowid, + 'intra' => $objp->aarowid_intra, + 'export' => $objp->aarowid_export, + 'thirdparty' => $objp->aarowid_thirdparty); $code_buy_p_notset = ''; $code_buy_t_notset = ''; $suggestedid = 0; - $return=$accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier'); - if (!is_array($return) && $return<0) { + $return = $accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier'); + if (!is_array($return) && $return < 0) { setEventMessage($accountingAccount->error, 'errors'); } else { - $suggestedid=$return['suggestedid']; - $suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor']; - $suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor']; - $code_buy_l=$return['code_l']; - $code_buy_p=$return['code_p']; - $code_buy_t=$return['code_t']; + $suggestedid = $return['suggestedid']; + $suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor']; + $suggestedaccountingaccountbydefaultfor = $return['suggestedaccountingaccountbydefaultfor']; + $code_buy_l = $return['code_l']; + $code_buy_p = $return['code_p']; + $code_buy_t = $return['code_t']; } //var_dump($return); @@ -783,7 +784,7 @@ if ($result) { if (!empty($toselect)) { $ischecked = 0; if (in_array($objp->rowid."_".$i, $toselect)) { - $ischecked=1; + $ischecked = 1; } } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 98b92264ceb..a75d6358477 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -130,7 +130,7 @@ $linkofpubliclist = DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.((isModE * Actions */ -$parameters = array('id'=>$id, 'rowid'=>$id, 'objcanvas'=>$objcanvas, 'confirm'=>$confirm); +$parameters = array('id' => $id, 'rowid' => $id, 'objcanvas' => $objcanvas, 'confirm' => $confirm); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -1044,7 +1044,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Gender print ''.$langs->trans("Gender").''; print ''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); + $arraygender = array('man' => $langs->trans("Genderman"), 'woman' => $langs->trans("Genderwoman"), 'other' => $langs->trans("Genderother")); print $form->selectarray('gender', $arraygender, GETPOST('gender', 'alphanohtml'), 1, 0, 0, '', 0, 0, 0, '', '', 1); print ''; @@ -1275,7 +1275,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Gender print ''.$langs->trans("Gender").''; print ''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); + $arraygender = array('man' => $langs->trans("Genderman"), 'woman' => $langs->trans("Genderwoman"), 'other' => $langs->trans("Genderother")); print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ? GETPOST('gender', 'alphanohtml') : $object->gender, 1, 0, 0, '', 0, 0, 0, '', '', 1); print ''; @@ -1480,7 +1480,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { ); if (isModEnabled('societe') && $object->socid > 0) { $object->fetch_thirdparty(); - $formquestion[] = array('label' => $langs->trans("UserWillBe"), 'type' => 'radio', 'name' => 'internalorexternal', 'default'=>'external', 'values' => array('external'=>$langs->trans("External").' - '.$langs->trans("LinkedToDolibarrThirdParty").' '.$object->thirdparty->getNomUrl(1, '', 0, 1), 'internal'=>$langs->trans("Internal"))); + $formquestion[] = array('label' => $langs->trans("UserWillBe"), 'type' => 'radio', 'name' => 'internalorexternal', 'default' => 'external', 'values' => array('external' => $langs->trans("External").' - '.$langs->trans("LinkedToDolibarrThirdParty").' '.$object->thirdparty->getNomUrl(1, '', 0, 1), 'internal' => $langs->trans("Internal"))); } $text = ''; if (isModEnabled('societe') && $object->socid <= 0) { @@ -1563,6 +1563,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $helpcontent .= "
"; $helpcontent .= ''.$langs->trans("Content").':
'; $helpcontent .= dol_htmlentitiesbr($texttosend)."\n"; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $label = $form->textwithpicto($tmp, $helpcontent, 1, 'help'); // Create form popup @@ -1571,10 +1572,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $formquestion[] = array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (getDolGlobalString('ADHERENT_DEFAULT_SENDINFOBYMAIL') ? true : false)); } if (isModEnabled('mailman') && getDolGlobalString('ADHERENT_USE_MAILMAN')) { - $formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value'=>''); + $formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value' => ''); } if (isModEnabled('mailman') && getDolGlobalString('ADHERENT_USE_SPIP')) { - $formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value'=>''); + $formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value' => ''); } print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 'yes', 1, 220); } @@ -1626,6 +1627,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $helpcontent .= "
"; $helpcontent .= ''.$langs->trans("Content").':
'; $helpcontent .= dol_htmlentitiesbr($texttosend)."\n"; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $label = $form->textwithpicto($tmp, $helpcontent, 1, 'help'); // Create an array @@ -1686,6 +1688,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $helpcontent .= "
"; $helpcontent .= ''.$langs->trans("Content").':
'; $helpcontent .= dol_htmlentitiesbr($texttosend)."\n"; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $label = $form->textwithpicto($tmp, $helpcontent, 1, 'help'); // Create an array diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 9e193f1052c..7ce26e570c7 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -132,49 +132,49 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'd.ref'=>'Ref', - 'd.login'=>'Login', - 'd.lastname'=>'Lastname', - 'd.firstname'=>'Firstname', - 'd.societe'=>"Company", - 'd.email'=>'EMail', - 'd.address'=>'Address', - 'd.zip'=>'Zip', - 'd.town'=>'Town', - 'd.phone'=>"Phone", - 'd.phone_perso'=>"PhonePerso", - 'd.phone_mobile'=>"PhoneMobile", - 'd.note_public'=>'NotePublic', - 'd.note_private'=>'NotePrivate', + 'd.ref' => 'Ref', + 'd.login' => 'Login', + 'd.lastname' => 'Lastname', + 'd.firstname' => 'Firstname', + 'd.societe' => "Company", + 'd.email' => 'EMail', + 'd.address' => 'Address', + 'd.zip' => 'Zip', + 'd.town' => 'Town', + 'd.phone' => "Phone", + 'd.phone_perso' => "PhonePerso", + 'd.phone_mobile' => "PhoneMobile", + 'd.note_public' => 'NotePublic', + 'd.note_private' => 'NotePrivate', ); $arrayfields = array( - 'd.ref'=>array('label'=>"Ref", 'checked'=>1), - 'd.civility'=>array('label'=>"Civility", 'checked'=>0), - 'd.lastname'=>array('label'=>"Lastname", 'checked'=>1), - 'd.firstname'=>array('label'=>"Firstname", 'checked'=>1), - 'd.gender'=>array('label'=>"Gender", 'checked'=>0), - 'd.company'=>array('label'=>"Company", 'checked'=>1, 'position'=>70), - 'd.login'=>array('label'=>"Login", 'checked'=>1), - 'd.morphy'=>array('label'=>"MemberNature", 'checked'=>1), - 't.libelle'=>array('label'=>"Type", 'checked'=>1, 'position'=>55), - 'd.address'=>array('label'=>"Address", 'checked'=>0), - 'd.zip'=>array('label'=>"Zip", 'checked'=>0), - 'd.town'=>array('label'=>"Town", 'checked'=>0), - 'd.phone'=>array('label'=>"Phone", 'checked'=>0), - 'd.phone_perso'=>array('label'=>"PhonePerso", 'checked'=>0), - 'd.phone_mobile'=>array('label'=>"PhoneMobile", 'checked'=>0), - 'd.email'=>array('label'=>"Email", 'checked'=>1), - 'state.nom'=>array('label'=>"State", 'checked'=>0, 'position'=>90), - 'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>95), + 'd.ref' => array('label' => "Ref", 'checked' => 1), + 'd.civility' => array('label' => "Civility", 'checked' => 0), + 'd.lastname' => array('label' => "Lastname", 'checked' => 1), + 'd.firstname' => array('label' => "Firstname", 'checked' => 1), + 'd.gender' => array('label' => "Gender", 'checked' => 0), + 'd.company' => array('label' => "Company", 'checked' => 1, 'position' => 70), + 'd.login' => array('label' => "Login", 'checked' => 1), + 'd.morphy' => array('label' => "MemberNature", 'checked' => 1), + 't.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 55), + 'd.address' => array('label' => "Address", 'checked' => 0), + 'd.zip' => array('label' => "Zip", 'checked' => 0), + 'd.town' => array('label' => "Town", 'checked' => 0), + 'd.phone' => array('label' => "Phone", 'checked' => 0), + 'd.phone_perso' => array('label' => "PhonePerso", 'checked' => 0), + 'd.phone_mobile' => array('label' => "PhoneMobile", 'checked' => 0), + 'd.email' => array('label' => "Email", 'checked' => 1), + 'state.nom' => array('label' => "State", 'checked' => 0, 'position' => 90), + 'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 95), /*'d.note_public'=>array('label'=>"NotePublic", 'checked'=>0), 'd.note_private'=>array('label'=>"NotePrivate", 'checked'=>0),*/ - 'd.datefin'=>array('label'=>"EndSubscription"), - 'd.datec'=>array('label'=>"DateCreation"), - 'd.birth'=>array('label'=>"Birthday"), - 'd.tms'=>array('label'=>"DateModificationShort"), - 'd.statut'=>array('label'=>"Status"), - 'd.import_key'=>array('label'=>"ImportId"), + 'd.datefin' => array('label' => "EndSubscription"), + 'd.datec' => array('label' => "DateCreation"), + 'd.birth' => array('label' => "Birthday"), + 'd.tms' => array('label' => "DateModificationShort"), + 'd.statut' => array('label' => "Status"), + 'd.import_key' => array('label' => "ImportId"), ); // Extra fields @@ -195,8 +195,8 @@ foreach ($object->fields as $key => $val) { $visible = (int) dol_eval($val['visible'], 1); $arrayfields[$tableprefix.'.'.$key] = array( 'label' => $val['label'], - 'checked' =>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'checked' => (($visible < 0) ? 0 : 1), + 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => isset($val['help']) ? $val['help'] : '' ); @@ -221,7 +221,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>isset($socid) ? $socid : null); +$parameters = array('socid' => isset($socid) ? $socid : null); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -762,8 +762,8 @@ print ''; $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); if ($user->hasRight('adherent', 'creer')) { $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create'); @@ -893,7 +893,7 @@ if (!empty($arrayfields['d.lastname']['checked'])) { // Gender if (!empty($arrayfields['d.gender']['checked'])) { print ''; - $arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother")); + $arraygender = array('man' => $langs->trans("Genderman"), 'woman' => $langs->trans("Genderwoman"), 'other' => $langs->trans("Genderother")); print $form->selectarray('search_gender', $arraygender, $search_gender, 1); print ''; } @@ -913,7 +913,7 @@ if (!empty($arrayfields['d.login']['checked'])) { // Nature if (!empty($arrayfields['d.morphy']['checked'])) { print ''; - $arraymorphy = array('mor'=>$langs->trans("Moral"), 'phy'=>$langs->trans("Physical")); + $arraymorphy = array('mor' => $langs->trans("Moral"), 'phy' => $langs->trans("Physical")); print $form->selectarray('search_morphy', $arraymorphy, $search_morphy, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); print ''; } @@ -925,6 +925,7 @@ if (!empty($arrayfields['t.libelle']['checked'])) { if (!empty($arrayfields['t.libelle']['checked'])) { print ''; $listetype = $membertypestatic->liste_array(); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray("search_type", $listetype, $search_type, 1, 0, 0, '', 0, 32); print ''; } @@ -989,7 +990,7 @@ if (!empty($arrayfields['d.email']['checked'])) { if (!empty($arrayfields['d.datefin']['checked'])) { print ''; //$selectarray = array('-1'=>'', 'withoutsubscription'=>$langs->trans("WithoutSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate")); - $selectarray = array('-1'=>'', 'waitingsubscription'=>$langs->trans("WaitingSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate")); + $selectarray = array('-1' => '', 'waitingsubscription' => $langs->trans("WaitingSubscription"), 'uptodate' => $langs->trans("UpToDate"), 'outofdate' => $langs->trans("OutOfDate")); print $form->selectarray('search_filter', $selectarray, $search_filter); print ''; } @@ -998,7 +999,7 @@ if (!empty($arrayfields['d.datefin']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -1046,8 +1047,9 @@ if (!empty($arrayfields['d.statut']['checked'])) { Adherent::STATUS_DRAFT => $langs->trans("Draft"), Adherent::STATUS_VALIDATED => $langs->trans("Validated"), Adherent::STATUS_RESILIATED => $langs->trans("MemberStatusResiliatedShort"), - Adherent::STATUS_EXCLUDED =>$langs->trans("MemberStatusExcludedShort") + Adherent::STATUS_EXCLUDED => $langs->trans("MemberStatusExcludedShort") ); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, -3, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage'); print ''; } @@ -1156,7 +1158,7 @@ if (!empty($arrayfields['d.datefin']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'totalarray'=>&$totalarray, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$parameters = array('arrayfields' => $arrayfields, 'totalarray' => &$totalarray, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -1465,7 +1467,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -1551,7 +1553,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql' => $sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 9da83c5faf3..512189bef85 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -1097,7 +1097,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h if (!getDolGlobalString('ADHERENT_VAT_FOR_SUBSCRIPTIONS') || getDolGlobalString('ADHERENT_VAT_FOR_SUBSCRIPTIONS') != 'defaultforfoundationcountry') { print '. '.$langs->trans("NoVatOnSubscription", 0).''; } - if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product')|| isModEnabled('service'))) { + if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product') || isModEnabled('service'))) { $prodtmp = new Product($db); $result = $prodtmp->fetch(getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS')); if ($result < 0) { @@ -1201,6 +1201,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h $langs->load("errors"); $helpcontent .= ''.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).''."\n"; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->textwithpicto($tmp, $helpcontent, 1, 'help', '', 0, 2, 'helpemailtosend'); } print ''; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index af09ef6d283..830a129b74a 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -948,6 +948,7 @@ foreach ($fieldlist as $field => $value) { print ''; } elseif ($value == 'type_template') { print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth125', 1, '', 0, 1); print ''; } elseif (!in_array($value, array('content', 'content_lines'))) { diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index b56acffee17..b1b1242ebcc 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -123,10 +123,10 @@ if ($date_end !== '') { // Add prefix session $arrayfields = array( 'e.prefix_session' => array( - 'label'=>'UserAgent', - 'checked'=>(!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1), - 'enabled'=>(!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1), - 'position'=>110 + 'label' => 'UserAgent', + 'checked' => (!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1), + 'enabled' => (!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1), + 'position' => 110 ) ); @@ -325,6 +325,7 @@ if ($result) { print '
'; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup', 0, '', '', $limit); if ($action == 'purge') { diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index d95e2c17619..efcd10ddbb9 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -409,7 +409,7 @@ if ($cats < 0) { // Define data (format for treeview) $data = array(); - $data[] = array('rowid'=>0, 'fk_menu'=>-1, 'title'=>"racine", 'mainmenu'=>'', 'leftmenu'=>'', 'fk_mainmenu'=>'', 'fk_leftmenu'=>''); + $data[] = array('rowid' => 0, 'fk_menu' => -1, 'title' => "racine", 'mainmenu' => '', 'leftmenu' => '', 'fk_mainmenu' => '', 'fk_leftmenu' => ''); foreach ($fulltree as $key => $val) { $categstatic->id = $val['id']; $categstatic->ref = $val['label']; @@ -539,6 +539,7 @@ if ($type == Categorie::TYPE_PRODUCT) { $nbtotalofrecords = ''; $newcardbutton = dolGetButtonTitle($langs->trans("AddProduct"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&categories[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ProductsAndServices"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit); @@ -626,6 +627,7 @@ if ($type == Categorie::TYPE_CUSTOMER) { $nbtotalofrecords = ''; $newcardbutton = dolGetButtonTitle($langs->trans("AddThirdParty"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&client=3&custcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); print ''."\n"; @@ -690,7 +692,7 @@ if ($type == Categorie::TYPE_SUPPLIER) { print '
'; print ''; print ''; @@ -711,6 +713,7 @@ if ($type == Categorie::TYPE_SUPPLIER) { $nbtotalofrecords = ''; $newcardbutton = dolGetButtonTitle($langs->trans("AddSupplier"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&fournisseur=1&suppcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); print '
'; print $langs->trans("AddSupplierIntoCategory").'  '; - $filter ='(s.fournisseur:=:1)'; + $filter = '(s.fournisseur:=:1)'; print $form->select_company('', 'elemid', $filter); print '
'."\n"; @@ -798,6 +801,7 @@ if ($type == Categorie::TYPE_MEMBER) { $nbtotalofrecords = ''; $newcardbutton = dolGetButtonTitle($langs->trans("AddMember"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create&memcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->hasRight('adherent', 'creer')); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Member"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit); print '
'."\n"; @@ -884,6 +888,7 @@ if ($type == Categorie::TYPE_CONTACT) { $nbtotalofrecords = ''; $newcardbutton = dolGetButtonTitle($langs->trans("AddContact"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create&contcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contact', 0, $newcardbutton, '', $limit); $objsoc = new Societe($db); @@ -977,6 +982,7 @@ if ($type == Categorie::TYPE_ACCOUNT) { $nbtotalofrecords = ''; $newcardbutton = ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Account"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit); print '
'."\n"; @@ -1065,6 +1071,7 @@ if ($type == Categorie::TYPE_PROJECT) { $nbtotalofrecords = ''; $newcardbutton = ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Project"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit); print '
'."\n"; @@ -1152,6 +1159,7 @@ if ($type == Categorie::TYPE_USER) { $nbtotalofrecords = ''; $newcardbutton = ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Users"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'user', 0, '', '', $limit); print '
'."\n"; @@ -1216,6 +1224,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) { $nbtotalofrecords = ''; $newcardbutton = ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Warehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, $newcardbutton, '', $limit); print '
'."\n"; @@ -1302,6 +1311,7 @@ if ($type == Categorie::TYPE_TICKET) { $nbtotalofrecords = ''; $newcardbutton = ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Ticket"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'ticket', 0, $newcardbutton, '', $limit); diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 08a7c49a443..05229a9ab58 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -629,6 +629,7 @@ if (empty($reshook) && $action == 'add') { $repeateventlimitdate = dol_mktime(23, 59, 59, GETPOSTISSET("limitmonth") ? GETPOSTINT("limitmonth") : 1, GETPOSTISSET("limitday") ? GETPOSTINT("limitday") : 1, GETPOSTISSET("limityear") && GETPOSTINT("limityear") < 2100 ? GETPOSTINT("limityear") : 2100, $tzforfullday ? $tzforfullday : 'tzuserrel'); // Set date of end of event $deltatime = num_between_day($object->datep, $datep); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $datef = dol_time_plus_duree($datef, $deltatime, 'd'); while ($datep <= $repeateventlimitdate && !$error) { diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 88e030f7431..5bf0b91974b 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -130,6 +130,7 @@ if ($resql) { print ''; print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("EventReports"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_agenda', 0, '', '', $limit, 0, 0, 1); $moreforfilter = ''; @@ -177,7 +178,7 @@ if ($resql) { print ''; } @@ -1974,7 +1975,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['c.datec']['checked'])) { @@ -2037,20 +2038,20 @@ if (isModEnabled('margin') && ( || !empty($arrayfields['total_margin_rate']['checked']) || !empty($arrayfields['total_mark_rate']['checked']) ) - ) { +) { $with_margin_info = true; } - $total_ht = 0; - $total_margin = 0; +$total_ht = 0; +$total_margin = 0; - // Loop on record - // -------------------------------------------------------------------- - $i = 0; - $savnbfield = $totalarray['nbfield']; - $totalarray = array(); - $totalarray['nbfield'] = 0; - $imaxinloop = ($limit ? min($num, $limit) : $num); +// Loop on record +// -------------------------------------------------------------------- +$i = 0; +$savnbfield = $totalarray['nbfield']; +$totalarray = array(); +$totalarray['nbfield'] = 0; +$imaxinloop = ($limit ? min($num, $limit) : $num); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); if (empty($obj)) { @@ -2580,7 +2581,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -2804,7 +2805,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 75237945ea4..3c0f25f74ac 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -162,14 +162,14 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'c.ref'=>'Ref', - 'c.ref_client'=>'RefCustomerOrder', - 'cdet.description'=>'Description', - 's.nom'=>"ThirdParty", - 's.name_alias'=>"AliasNameShort", - 's.zip'=>"Zip", - 's.town'=>"Town", - 'c.note_public'=>'NotePublic', + 'c.ref' => 'Ref', + 'c.ref_client' => 'RefCustomerOrder', + 'cdet.description' => 'Description', + 's.nom' => "ThirdParty", + 's.name_alias' => "AliasNameShort", + 's.zip' => "Zip", + 's.town' => "Town", + 'c.note_public' => 'NotePublic', ); if (empty($user->socid)) { $fieldstosearchall["c.note_private"] = "NotePrivate"; @@ -178,51 +178,51 @@ if (empty($user->socid)) { $checkedtypetiers = 0; $arrayfields = array( // Détail commande - 'rowid'=> array('label'=>'TechnicalID', 'checked'=>1, 'position'=>1, 'enabled'=>(getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') ? 1 : 0)), - 'pr.ref'=> array('label'=>'ProductRef', 'checked'=>1, 'position'=>1), - 'pr.desc'=> array('label'=>'ProductDescription', 'checked'=>-1, 'position'=>1), - 'cdet.qty'=> array('label'=>'QtyOrdered', 'checked'=>1, 'position'=>1), - 'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5), - 'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10), - 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>20), - 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>25), - 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), - 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31), - 's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35), - 's.zip'=>array('label'=>"Zip", 'checked'=>-1, 'position'=>40), - 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45), - 'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>50), - 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55), - 'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60), - 'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>!getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position'=>65), - 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled('delivery_note')), - 'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67), - 'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68), - 'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69), - 'cdet.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75), - 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80), - 'cdet.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85), - 'c.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>90), - 'c.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>95), - 'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>100), - 'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>105), - 'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>110), - 'c.fk_warehouse'=>array('label'=>'Warehouse', 'checked'=>0, 'enabled'=>(!isModEnabled('stock') && !getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') ? 0 : 1), 'position'=>110), - 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115), - 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116), + 'rowid' => array('label' => 'TechnicalID', 'checked' => 1, 'position' => 1, 'enabled' => (getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') ? 1 : 0)), + 'pr.ref' => array('label' => 'ProductRef', 'checked' => 1, 'position' => 1), + 'pr.desc' => array('label' => 'ProductDescription', 'checked' => -1, 'position' => 1), + 'cdet.qty' => array('label' => 'QtyOrdered', 'checked' => 1, 'position' => 1), + 'c.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 5), + 'c.ref_client' => array('label' => "RefCustomerOrder", 'checked' => -1, 'position' => 10), + 'p.ref' => array('label' => "ProjectRef", 'checked' => -1, 'enabled' => (empty($conf->project->enabled) ? 0 : 1), 'position' => 20), + 'p.title' => array('label' => "ProjectLabel", 'checked' => 0, 'enabled' => (empty($conf->project->enabled) ? 0 : 1), 'position' => 25), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30), + 's.name_alias' => array('label' => "AliasNameShort", 'checked' => -1, 'position' => 31), + 's.town' => array('label' => "Town", 'checked' => -1, 'position' => 35), + 's.zip' => array('label' => "Zip", 'checked' => -1, 'position' => 40), + 'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 45), + 'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 50), + 'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 55), + 'c.date_commande' => array('label' => "OrderDateShort", 'checked' => 1, 'position' => 60), + 'c.date_delivery' => array('label' => "DateDeliveryPlanned", 'checked' => 1, 'enabled' => !getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position' => 65), + 'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66 , 'enabled' => isModEnabled('delivery_note')), + 'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => -1, 'position' => 67), + 'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => -1, 'position' => 68), + 'c.fk_input_reason' => array('label' => "Channel", 'checked' => -1, 'position' => 69), + 'cdet.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 75), + 'c.total_vat' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 80), + 'cdet.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 85), + 'c.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 90), + 'c.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 95), + 'c.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 100), + 'c.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 105), + 'c.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 110), + 'c.fk_warehouse' => array('label' => 'Warehouse', 'checked' => 0, 'enabled' => (!isModEnabled('stock') && !getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') ? 0 : 1), 'position' => 110), + 'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 115), + 'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 116), 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)), 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)), 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)), 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)), - 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120), - 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125), - 'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130), - 'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalString('MAIN_LIST_ALLOW_PUBLIC_NOTES')), 'position'=>135), - 'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalString('MAIN_LIST_ALLOW_PRIVATE_NOTES')), 'position'=>140), - 'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled('delivery_note')), 'position'=>990), - 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position'=>995), - 'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999), - 'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000) + 'c.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 120), + 'c.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 125), + 'c.date_cloture' => array('label' => "DateClosing", 'checked' => 0, 'position' => 130), + 'c.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'enabled' => (!getDolGlobalString('MAIN_LIST_ALLOW_PUBLIC_NOTES')), 'position' => 135), + 'c.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'enabled' => (!getDolGlobalString('MAIN_LIST_ALLOW_PRIVATE_NOTES')), 'position' => 140), + 'shippable' => array('label' => "Shippable", 'checked' => 1,'enabled' => (isModEnabled('delivery_note')), 'position' => 990), + 'c.facture' => array('label' => "Billed", 'checked' => 1, 'enabled' => (!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position' => 995), + 'c.import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 999), + 'c.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000) ); // Extra fields @@ -255,7 +255,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -1202,7 +1202,7 @@ if ($resql) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields); + $parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -1271,6 +1271,7 @@ if ($resql) { Commande::STATUS_CLOSED => $langs->trans("StatusOrderDelivered"), Commande::STATUS_CANCELED => $langs->trans("StatusOrderCanceledShort") ); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, -5, 0, 0, '', 0, 0, 0, '', 'maxwidth125', 1); print ''; } @@ -2025,7 +2026,7 @@ if ($resql) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -2244,7 +2245,7 @@ if ($resql) { $db->free($resql); - $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); + $parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 8a3c2c1c13e..2a3672b0cd9 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -150,21 +150,21 @@ $extrafields->fetch_name_optionals_label('banktransaction'); $search_array_options = $extrafields->getOptionalsFromPost('banktransaction', '', 'search_'); $arrayfields = array( - 'b.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1,'position'=>10), - 'b.label'=>array('label'=>$langs->trans("Description"), 'checked'=>1,'position'=>20), - 'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1,'position'=>30), - 'b.datev'=>array('label'=>$langs->trans("DateValueShort"), 'checked'=>1,'position'=>40), - 'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1,'position'=>50), - 'b.num_chq'=>array('label'=>$langs->trans("Numero"), 'checked'=>1,'position'=>60), - 'bu.label'=>array('label'=>$langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked'=>1, 'position'=>70), - 'ba.ref'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>(($id > 0 || !empty($ref)) ? 0 : 1), 'position'=>80), - 'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>90), - 'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>100), - 'balancebefore'=>array('label'=>$langs->trans("BalanceBefore"), 'checked'=>0, 'position'=>110), - 'balance'=>array('label'=>$langs->trans("Balance"), 'checked'=>1, 'position'=>120), - 'b.num_releve'=>array('label'=>$langs->trans("AccountStatement"), 'checked'=>1, 'position'=>130), - 'b.conciliated'=>array('label'=>$langs->trans("BankLineReconciled"), 'enabled'=> $object->rappro, 'checked'=>($action == 'reconcile' ? 1 : 0), 'position'=>140), - 'b.fk_bordereau'=>array('label'=>$langs->trans("ChequeNumber"), 'checked'=>0, 'position'=>150), + 'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1,'position' => 10), + 'b.label' => array('label' => $langs->trans("Description"), 'checked' => 1,'position' => 20), + 'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => 1,'position' => 30), + 'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1,'position' => 40), + 'type' => array('label' => $langs->trans("Type"), 'checked' => 1,'position' => 50), + 'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 1,'position' => 60), + 'bu.label' => array('label' => $langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked' => 1, 'position' => 70), + 'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => (($id > 0 || !empty($ref)) ? 0 : 1), 'position' => 80), + 'b.debit' => array('label' => $langs->trans("Debit"), 'checked' => 1, 'position' => 90), + 'b.credit' => array('label' => $langs->trans("Credit"), 'checked' => 1, 'position' => 100), + 'balancebefore' => array('label' => $langs->trans("BalanceBefore"), 'checked' => 0, 'position' => 110), + 'balance' => array('label' => $langs->trans("Balance"), 'checked' => 1, 'position' => 120), + 'b.num_releve' => array('label' => $langs->trans("AccountStatement"), 'checked' => 1, 'position' => 130), + 'b.conciliated' => array('label' => $langs->trans("BankLineReconciled"), 'enabled' => $object->rappro, 'checked' => ($action == 'reconcile' ? 1 : 0), 'position' => 140), + 'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => 0, 'position' => 150), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -417,7 +417,7 @@ $formaccounting = new FormAccounting($db); $companystatic = new Societe($db); $bankaccountstatic = new Account($db); -$userstatic= new User($db); +$userstatic = new User($db); $banktransferstatic = new BonPrelevement($db); $societestatic = new Societe($db); @@ -655,18 +655,18 @@ if ($search_fk_bordereau > 0) { $sql .= " AND b.fk_bordereau = " . ((int) $search_fk_bordereau); } if ($search_thirdparty_user) { - $sql.= " AND (b.rowid IN "; - $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; - $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; - $sql.= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)"; - $sql.= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")"; + $sql .= " AND (b.rowid IN "; + $sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; + $sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; + $sql .= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)"; + $sql .= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")"; - $sql.= " OR b.rowid IN "; - $sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; - $sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; - $sql.= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)"; - $sql.= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); - $sql.= "))"; + $sql .= " OR b.rowid IN "; + $sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu"; + $sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank"; + $sql .= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)"; + $sql .= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1); + $sql .= "))"; } if ($search_description) { $search_description_to_use = $search_description; @@ -1017,6 +1017,7 @@ if ($resql) { $picto = ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit, 0, 0, 1); // We can add page now to param @@ -1263,7 +1264,7 @@ if ($resql) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields - $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action edit/delete and select @@ -1827,8 +1828,8 @@ if ($resql) { } // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook + $parameters = array('arrayfields' => $arrayfields, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook print $hookmanager->resPrint; // Action edit/delete and select diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 10b20b58b85..7127c824434 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3477,6 +3477,7 @@ if ($action == 'create') { print '
'; $tmp = ' '; $tmp = $tmp.''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3, 'standardonsmartphone'); print '
'; //print ''.img_pdf().''; - $filearray = array('name'=>basename($file), 'fullname'=>$file, 'type'=>'file'); + $filearray = array('name' => basename($file), 'fullname' => $file, 'type' => 'file'); $out = ''; // Show file name with link to download diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index d1bde067b1e..4096d3ae161 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -677,6 +677,7 @@ if ($object->fetch($id) >= 0) { $massactionbutton = ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $morehtmlcenter, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1); print ''; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 742222ee4e6..ea017fbef3b 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -154,14 +154,14 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'c.ref'=>'Ref', - 'c.ref_client'=>'RefCustomerOrder', - 'pd.description'=>'Description', - 's.nom'=>"ThirdParty", - 's.name_alias'=>"AliasNameShort", - 's.zip'=>"Zip", - 's.town'=>"Town", - 'c.note_public'=>'NotePublic', + 'c.ref' => 'Ref', + 'c.ref_client' => 'RefCustomerOrder', + 'pd.description' => 'Description', + 's.nom' => "ThirdParty", + 's.name_alias' => "AliasNameShort", + 's.zip' => "Zip", + 's.town' => "Town", + 'c.note_public' => 'NotePublic', ); if (empty($user->socid)) { $fieldstosearchall["c.note_private"] = "NotePrivate"; @@ -169,50 +169,50 @@ if (empty($user->socid)) { $checkedtypetiers = 0; $arrayfields = array( - 'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5, 'searchall'=>1), - 'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10, 'searchall'=>1), - 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>20), - 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>25), - 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30, 'searchall'=>1), - 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31, 'searchall'=>1), - 's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0), - 's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35, 'searchall'=>1), - 's.zip'=>array('label'=>"Zip", 'checked'=>-1, 'position'=>40, 'searchall'=>1), - 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45), - 'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>50), - 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55), - 'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60, 'csslist'=>'nowraponall'), - 'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>!getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position'=>65, 'csslist'=>'nowraponall'), - 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled("delivery_note")), - 'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67), - 'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68), - 'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69), - 'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75), - 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80), - 'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85), - 'c.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>90), - 'c.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>95), - 'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>100), - 'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>105), - 'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>110), - 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115), - 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116), + 'c.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 5, 'searchall' => 1), + 'c.ref_client' => array('label' => "RefCustomerOrder", 'checked' => -1, 'position' => 10, 'searchall' => 1), + 'p.ref' => array('label' => "ProjectRef", 'checked' => -1, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 20), + 'p.title' => array('label' => "ProjectLabel", 'checked' => 0, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 25), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30, 'searchall' => 1), + 's.name_alias' => array('label' => "AliasNameShort", 'checked' => -1, 'position' => 31, 'searchall' => 1), + 's2.nom' => array('label' => 'ParentCompany', 'position' => 32, 'checked' => 0), + 's.town' => array('label' => "Town", 'checked' => -1, 'position' => 35, 'searchall' => 1), + 's.zip' => array('label' => "Zip", 'checked' => -1, 'position' => 40, 'searchall' => 1), + 'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 45), + 'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 50), + 'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 55), + 'c.date_commande' => array('label' => "OrderDateShort", 'checked' => 1, 'position' => 60, 'csslist' => 'nowraponall'), + 'c.date_delivery' => array('label' => "DateDeliveryPlanned", 'checked' => 1, 'enabled' => !getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position' => 65, 'csslist' => 'nowraponall'), + 'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66 , 'enabled' => isModEnabled("delivery_note")), + 'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => -1, 'position' => 67), + 'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => -1, 'position' => 68), + 'c.fk_input_reason' => array('label' => "Channel", 'checked' => -1, 'position' => 69), + 'c.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 75), + 'c.total_vat' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 80), + 'c.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 85), + 'c.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 90), + 'c.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 95), + 'c.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 100), + 'c.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 105), + 'c.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 110), + 'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 115), + 'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 116), 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)), 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)), 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)), 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)), - 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120), - 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125), - 'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130), - 'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>135, 'searchall'=>1), - 'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>140), - 'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled("delivery_note")), 'position'=>990), - 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position'=>995), - 'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999), - 'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000) + 'c.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 120), + 'c.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 125), + 'c.date_cloture' => array('label' => "DateClosing", 'checked' => 0, 'position' => 130), + 'c.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position' => 135, 'searchall' => 1), + 'c.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position' => 140), + 'shippable' => array('label' => "Shippable", 'checked' => 1,'enabled' => (isModEnabled("delivery_note")), 'position' => 990), + 'c.facture' => array('label' => "Billed", 'checked' => 1, 'enabled' => (!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position' => 995), + 'c.import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 999), + 'c.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000) ); -$parameters = array('fieldstosearchall'=>$fieldstosearchall); +$parameters = array('fieldstosearchall' => $fieldstosearchall); $reshook = $hookmanager->executeHooks('completeFieldsToSearchAll', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) { $fieldstosearchall = empty($hookmanager->resArray['fieldstosearchall']) ? array() : $hookmanager->resArray['fieldstosearchall']; @@ -254,7 +254,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields); +$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -332,8 +332,8 @@ if (empty($reshook)) { } $uploaddir = $conf->commande->multidir_output[$conf->entity]; $triggersendname = 'ORDER_SENTBYMAIL'; - $year=""; - $month=""; + $year = ""; + $month = ""; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; if ($massaction == 'confirm_createbills') { // Create bills from orders. @@ -348,7 +348,7 @@ if (empty($reshook)) { $TFactThirdNbLines = array(); $nb_bills_created = 0; - $lastid= 0; + $lastid = 0; $lastref = ''; $db->begin(); @@ -1333,8 +1333,8 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( - 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), - 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), ); if ($permissiontovalidate) { $arrayofmassactions['prevalidate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"); @@ -1367,8 +1367,8 @@ if (!empty($socid)) { $url .= '&socid='.$socid; } $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', ($contextpage == 'orderlist' || $contextpage == 'billableorders') && $permissiontoadd); @@ -1739,7 +1739,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -1809,6 +1809,7 @@ if (!empty($arrayfields['c.fk_statut']['checked'])) { Commande::STATUS_CLOSED => $langs->trans("StatusOrderDelivered"), Commande::STATUS_CANCELED => $langs->trans("StatusOrderCanceledShort") ); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, -5, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage', 1); print '
'; print '
'; @@ -3535,6 +3536,7 @@ if ($action == 'create') { print ''; print ''; @@ -3574,6 +3576,7 @@ if ($action == 'create') { print '
'; $tmp = ' '; $tmp = $tmp.''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3, 'firstsituationonsmartphone'); print $desc; print '
'; @@ -3937,13 +3940,13 @@ if ($action == 'create') { print ''; print ''; } diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index d7191fa1590..4bbea222033 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -137,24 +137,24 @@ if (!$sortfield) { } $arrayfields = array( - 'f.titre'=>array('label'=>"Ref", 'checked'=>1), - 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), - 'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), - 'f.total_tva'=>array('label'=>"AmountVAT", 'checked'=>-1), - 'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>1), - 'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0), - 'f.fk_cond_reglement'=>array('label'=>"PaymentTerm", 'checked'=>0), - 'recurring'=>array('label'=>"RecurringInvoice", 'checked'=>1), - 'f.frequency'=>array('label'=>"Frequency", 'checked'=>1), - 'f.unit_frequency'=>array('label'=>"FrequencyUnit", 'checked'=>1), - 'f.nb_gen_done'=>array('label'=>"NbOfGenerationDoneShort", 'checked'=>1), - 'f.date_last_gen'=>array('label'=>"DateLastGenerationShort", 'checked'=>1), - 'f.date_when'=>array('label'=>"NextDateToExecutionShort", 'checked'=>1), - 'f.fk_user_author'=>array('label'=>"UserCreation", 'checked'=>0, 'position'=>500), - 'f.fk_user_modif'=>array('label'=>"UserModification", 'checked'=>0, 'position'=>505), - 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>520), - 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>525), - 'status'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), + 'f.titre' => array('label' => "Ref", 'checked' => 1), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1), + 'f.total_ht' => array('label' => "AmountHT", 'checked' => 1), + 'f.total_tva' => array('label' => "AmountVAT", 'checked' => -1), + 'f.total_ttc' => array('label' => "AmountTTC", 'checked' => 1), + 'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => 0), + 'f.fk_cond_reglement' => array('label' => "PaymentTerm", 'checked' => 0), + 'recurring' => array('label' => "RecurringInvoice", 'checked' => 1), + 'f.frequency' => array('label' => "Frequency", 'checked' => 1), + 'f.unit_frequency' => array('label' => "FrequencyUnit", 'checked' => 1), + 'f.nb_gen_done' => array('label' => "NbOfGenerationDoneShort", 'checked' => 1), + 'f.date_last_gen' => array('label' => "DateLastGenerationShort", 'checked' => 1), + 'f.date_when' => array('label' => "NextDateToExecutionShort", 'checked' => 1), + 'f.fk_user_author' => array('label' => "UserCreation", 'checked' => 0, 'position' => 500), + 'f.fk_user_modif' => array('label' => "UserModification", 'checked' => 0, 'position' => 505), + 'f.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 520), + 'f.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 525), + 'status' => array('label' => "Status", 'checked' => 1, 'position' => 1000), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -530,7 +530,7 @@ $arrayofmassactions = array( //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); +$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend' => $langs->trans("SendByMail"), 'builddoc' => $langs->trans("PDFMerge"))); $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) : ''); // This also change content of $arrayfields @@ -681,7 +681,7 @@ if (!empty($arrayfields['f.date_when']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // User creation @@ -708,10 +708,11 @@ if (!empty($arrayfields['f.tms']['checked'])) { if (!empty($arrayfields['status']['checked'])) { print ''; } @@ -946,9 +947,9 @@ while ($i < $imaxinloop) { if (!empty($arrayfields['f.unit_frequency']['checked'])) { print ''; @@ -1034,7 +1035,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Status @@ -1088,7 +1089,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7c2f594906a..6155dfd9c8a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -188,15 +188,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'f.ref'=>'Ref', - 'f.ref_client'=>'RefCustomer', - 'f.note_public'=>'NotePublic', - 's.nom'=>"ThirdParty", - 's.code_client'=>"CustomerCodeShort", - 's.name_alias'=>"AliasNameShort", - 's.zip'=>"Zip", - 's.town'=>"Town", - 'pd.description'=>'Description', + 'f.ref' => 'Ref', + 'f.ref_client' => 'RefCustomer', + 'f.note_public' => 'NotePublic', + 's.nom' => "ThirdParty", + 's.code_client' => "CustomerCodeShort", + 's.name_alias' => "AliasNameShort", + 's.zip' => "Zip", + 's.town' => "Town", + 'pd.description' => 'Description', ); if (empty($user->socid)) { $fieldstosearchall["f.note_private"] = "NotePrivate"; @@ -204,63 +204,63 @@ if (empty($user->socid)) { $checkedtypetiers = 0; $arrayfields = array( - 'f.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5), - 'f.ref_client'=>array('label'=>"RefCustomer", 'checked'=>-1, 'position'=>10), - 'f.type'=>array('label'=>"Type", 'checked'=>0, 'position'=>15), - 'f.datef'=>array('label'=>"DateInvoice", 'checked'=>1, 'position'=>20), - 'f.date_valid'=>array('label'=>"DateValidation", 'checked'=>0, 'position'=>22), - 'f.subtype'=>array('label'=>"InvoiceSubtype", 'checked'=>0, 'position'=>17), - 'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1, 'position'=>25), - 'f.date_closing'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>30), - 'p.ref'=>array('label'=>"ProjectRef", 'langs'=>'projects', 'checked'=>1, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>40), - 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>41), - 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>50), - 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>51), - 's.code_client'=>array('label'=>"CustomerCodeShort", 'checked'=>-1, 'position'=>52), - 's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0), - 's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>55), - 's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>60), - 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>65), - 'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>70), - 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>75), - 'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>80), - 'f.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>1, 'position'=>85), - 'f.module_source'=>array('label'=>"POSModule", 'langs'=>'cashdesk', 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>"(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position'=>90), - 'f.pos_source'=>array('label'=>"POSTerminal", 'langs'=>'cashdesk', 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>"(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position'=>91), - 'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>95), - 'f.total_tva'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>100), - 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax1_assuj == "1"), 'position'=>110), - 'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax2_assuj == "1"), 'position'=>120), - 'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>130), - 'dynamount_payed'=>array('label'=>"Received", 'checked'=>0, 'position'=>140), - 'rtp'=>array('label'=>"Rest", 'checked'=>0, 'position'=>150), // Not enabled by default because slow - 'f.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>280), - 'f.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>285), - 'f.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>290), - 'f.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>291), - 'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>292), - 'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>295), - 'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>296), // Not enabled by default because slow + 'f.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 5), + 'f.ref_client' => array('label' => "RefCustomer", 'checked' => -1, 'position' => 10), + 'f.type' => array('label' => "Type", 'checked' => 0, 'position' => 15), + 'f.datef' => array('label' => "DateInvoice", 'checked' => 1, 'position' => 20), + 'f.date_valid' => array('label' => "DateValidation", 'checked' => 0, 'position' => 22), + 'f.subtype' => array('label' => "InvoiceSubtype", 'checked' => 0, 'position' => 17), + 'f.date_lim_reglement' => array('label' => "DateDue", 'checked' => 1, 'position' => 25), + 'f.date_closing' => array('label' => "DateClosing", 'checked' => 0, 'position' => 30), + 'p.ref' => array('label' => "ProjectRef", 'langs' => 'projects', 'checked' => 1, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 40), + 'p.title' => array('label' => "ProjectLabel", 'checked' => 0, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 41), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 50), + 's.name_alias' => array('label' => "AliasNameShort", 'checked' => 1, 'position' => 51), + 's.code_client' => array('label' => "CustomerCodeShort", 'checked' => -1, 'position' => 52), + 's2.nom' => array('label' => 'ParentCompany', 'position' => 32, 'checked' => 0), + 's.town' => array('label' => "Town", 'checked' => -1, 'position' => 55), + 's.zip' => array('label' => "Zip", 'checked' => 1, 'position' => 60), + 'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 65), + 'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 70), + 'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 75), + 'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => 1, 'position' => 80), + 'f.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => 1, 'position' => 85), + 'f.module_source' => array('label' => "POSModule", 'langs' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? 1 : 0), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position' => 90), + 'f.pos_source' => array('label' => "POSTerminal", 'langs' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? 1 : 0), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position' => 91), + 'f.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 95), + 'f.total_tva' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 100), + 'f.total_localtax1' => array('label' => $langs->transcountry("AmountLT1", $mysoc->country_code), 'checked' => 0, 'enabled' => ($mysoc->localtax1_assuj == "1"), 'position' => 110), + 'f.total_localtax2' => array('label' => $langs->transcountry("AmountLT2", $mysoc->country_code), 'checked' => 0, 'enabled' => ($mysoc->localtax2_assuj == "1"), 'position' => 120), + 'f.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 130), + 'dynamount_payed' => array('label' => "Received", 'checked' => 0, 'position' => 140), + 'rtp' => array('label' => "Rest", 'checked' => 0, 'position' => 150), // Not enabled by default because slow + 'f.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 280), + 'f.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 285), + 'f.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 290), + 'f.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 291), + 'f.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 292), + 'multicurrency_dynamount_payed' => array('label' => 'MulticurrencyAlreadyPaid', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 295), + 'multicurrency_rtp' => array('label' => 'MulticurrencyRemainderToPay', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 296), // Not enabled by default because slow 'total_pa' => array('label' => ((getDolGlobalString('MARGIN_TYPE') == '1') ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') ? 0 : 1)), 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') ? 0 : 1)), 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)), 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)), - 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), - 'f.tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>502), - 'u.login'=>array('label'=>"UserAuthor", 'checked'=>1, 'position'=>504), - 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>506), + 'f.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 500), + 'f.tms' => array('type' => 'timestamp', 'label' => 'DateModificationShort', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 502), + 'u.login' => array('label' => "UserAuthor", 'checked' => 1, 'position' => 504), + 'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 506), //'f.fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>506), //'f.fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-1, 'notnull'=>-1, 'position'=>508), //'f.fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>510), //'f.fk_user_closing' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>-1, 'position'=>512), - 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>520, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), - 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>521, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), - 'f.fk_fac_rec_source'=>array('label'=>'GeneratedFromTemplate', 'checked'=>0, 'position'=>530, 'enabled'=>'1'), - 'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), + 'f.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 520, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'f.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position' => 521, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), + 'f.fk_fac_rec_source' => array('label' => 'GeneratedFromTemplate', 'checked' => 0, 'position' => 530, 'enabled' => '1'), + 'f.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000), ); if (getDolGlobalString("INVOICE_USE_SITUATION") && getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')) { - $arrayfields['f.retained_warranty'] = array('label'=>$langs->trans("RetainedWarranty"), 'checked'=>0, 'position'=>86); + $arrayfields['f.retained_warranty'] = array('label' => $langs->trans("RetainedWarranty"), 'checked' => 0, 'position' => 86); } // Overwrite $arrayfields from columns into ->fields (transition before removal of $arrayoffields) foreach ($object->fields as $key => $val) { @@ -280,10 +280,10 @@ foreach ($object->fields as $key => $val) { } if ($newkey) { $arrayfields[$newkey] = array( - 'label'=>$val['label'], - 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')), - 'position'=>$val['position'], + 'label' => $val['label'], + 'checked' => (($visible < 0) ? 0 : 1), + 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')), + 'position' => $val['position'], 'help' => empty($val['help']) ? '' : $val['help'], ); } @@ -319,7 +319,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields); +$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -438,7 +438,7 @@ if ($action == 'makepayment_confirm' && $user->hasRight('facture', 'paiement')) $remaintopay = price2num($facture->total_ttc - $totalpay); // hook to finalize the remaining amount, considering e.g. cash discount agreements - $parameters = array('remaintopay'=>$remaintopay); + $parameters = array('remaintopay' => $remaintopay); $reshook = $hookmanager->executeHooks('finalizeAmountOfInvoice', $parameters, $facture, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) { if (!empty($remain = $hookmanager->resArray['remaintopay'])) { @@ -515,7 +515,7 @@ if ($action == 'makepayment_confirm' && $user->hasRight('facture', 'paiement')) $objecttmp->resteapayer = price2num($objecttmp->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits, 'MT'); // hook to finalize the remaining amount, considering e.g. cash discount agreements - $parameters = array('remaintopay'=>$objecttmp->resteapayer); + $parameters = array('remaintopay' => $objecttmp->resteapayer); $reshook = $hookmanager->executeHooks('finalizeAmountOfInvoice', $parameters, $objecttmp, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) { if (!empty($remaintopay = $hookmanager->resArray['remaintopay'])) { @@ -1194,10 +1194,10 @@ $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $param .= $hookmanager->resPrint; $arrayofmassactions = array( - 'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), - 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), - 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), - 'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), + 'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + 'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'presend' => img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); if ($user->hasRight('facture', 'paiement')) { @@ -1227,8 +1227,8 @@ if ($contextpage != 'poslist') { $url .= '&socid='.$socid; } $newcardbutton = ''; - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); + $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); + $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->hasRight("facture", "creer")); } @@ -1266,7 +1266,7 @@ if ($massaction == 'makepayment') { // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), array('type' => 'date', 'name' => 'datepaiment', 'label' => $langs->trans("Date"), 'datenow' => 1), array('type' => 'other', 'name' => 'paiementid', 'label' => $langs->trans("PaymentMode"), 'value' => $form->select_types_paiements(GETPOST('search_paymentmode'), 'paiementid', '', 0, 0, 1, 0, 1, '', 1)), - array('type' => 'other', 'name' => 'bankid', 'label' => $langs->trans("BankAccount"), 'value'=>$form->select_comptes('', 'bankid', 0, '', 0, '', 0, '', 1)), + array('type' => 'other', 'name' => 'bankid', 'label' => $langs->trans("BankAccount"), 'value' => $form->select_comptes('', 'bankid', 0, '', 0, '', 0, '', 1)), //array('type' => 'other', 'name' => 'invoicesid', 'label' => '', 'value'=>''), ); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('MakePaymentAndClassifyPayed'), $langs->trans('EnterPaymentReceivedFromCustomer'), 'makepayment_confirm', $formquestion, 1, 0, 200, 500, 1); @@ -1374,15 +1374,16 @@ if (!empty($arrayfields['f.ref_client']['checked'])) { if (!empty($arrayfields['f.type']['checked'])) { print ''; } @@ -1611,7 +1612,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -1648,7 +1649,8 @@ if (!empty($arrayfields['f.fk_fac_rec_source']['checked'])) { // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { print ''; } @@ -1850,7 +1852,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => $totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['f.datec']['checked'])) { @@ -1902,8 +1904,8 @@ if ($num > 0) { $totalarray['val'] = array(); $totalarray['val']['f.total_ht'] = 0; $totalarray['val']['f.total_tva'] = 0; - $totalarray['val']['f.total_localtax1']=0; - $totalarray['val']['f.total_localtax1']=0; + $totalarray['val']['f.total_localtax1'] = 0; + $totalarray['val']['f.total_localtax1'] = 0; $totalarray['val']['f.total_ttc'] = 0; $totalarray['val']['totalam'] = 0; $totalarray['val']['rtp'] = 0; @@ -2041,7 +2043,7 @@ if ($num > 0) { } } - $arraydata = array('alreadypaid' => $paiement, 'thirdparty' => $companystatic->getNomUrl(1, '', 12), 'userauthor'=>$userstatic->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected)); + $arraydata = array('alreadypaid' => $paiement, 'thirdparty' => $companystatic->getNomUrl(1, '', 12), 'userauthor' => $userstatic->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected)); print $facturestatic->getKanbanView('', $arraydata); if ($i == ($imaxinloop - 1)) { print ''; @@ -2636,7 +2638,7 @@ if ($num > 0) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -2755,7 +2757,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index c7150a80504..284dbefcc54 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -90,13 +90,13 @@ foreach ($arrayofpaymentmodetomanage as $key => $val) { } $arrayfields = array( - 'bc.ref' => array('label'=>"Ref", 'checked'=>1, 'position'=>10), - 'bc.type' => array('label'=>"Type", 'checked'=>1, 'position'=>20), - 'bc.date_bordereau' => array('label'=>"DateCreation", 'checked'=>1, 'position'=>30), - 'ba.label' => array('label'=>"BankAccount", 'checked'=>1, 'position'=>40), - 'bc.nbcheque' => array('label'=>"NbOfCheques", 'checked'=>1, 'position'=>50), - 'bc.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>60), - 'bc.statut' => array('label'=>"Status", 'checked'=>1, 'position'=>70) + 'bc.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 10), + 'bc.type' => array('label' => "Type", 'checked' => 1, 'position' => 20), + 'bc.date_bordereau' => array('label' => "DateCreation", 'checked' => 1, 'position' => 30), + 'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 40), + 'bc.nbcheque' => array('label' => "NbOfCheques", 'checked' => 1, 'position' => 50), + 'bc.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 60), + 'bc.statut' => array('label' => "Status", 'checked' => 1, 'position' => 70) ); $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -108,7 +108,7 @@ $object = new RemiseCheque($db); * Actions */ -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -253,8 +253,8 @@ if ($resql) { $url .= '&socid='.$socid; } $newcardbutton = ''; - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); - $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); + $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); + $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', $url, '', $user->hasRight('banque', 'cheque')); @@ -271,6 +271,7 @@ if ($resql) { print ''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit); $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; @@ -346,7 +347,7 @@ if ($resql) { } // Fields from hook - $parameters = array('arrayfields'=>$arrayfields); + $parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -400,7 +401,7 @@ if ($resql) { } // Hook fields - $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); + $parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index c5c478e4672..b59aff4bfc9 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -92,22 +92,22 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') : // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'p.ref'=>"RefPayment", - 's.nom'=>"ThirdParty", - 'p.num_paiement'=>"Numero", - 'p.amount'=>"Amount", + 'p.ref' => "RefPayment", + 's.nom' => "ThirdParty", + 'p.num_paiement' => "Numero", + 'p.amount' => "Amount", ); $arrayfields = array( - 'p.ref' => array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), - 'p.datep' => array('label'=>"Date", 'checked'=>1, 'position'=>20), - 's.nom' => array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), - 'c.libelle' => array('label'=>"Type", 'checked'=>1, 'position'=>40), - 'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>50, 'enabled'=>(isModEnabled("bank"))), - 'ba.label' => array('label'=>"BankAccount", 'checked'=>1, 'position'=>60, 'enabled'=>(isModEnabled("bank"))), - 'p.num_paiement' => array('label'=>"Numero", 'checked'=>1, 'position'=>70, 'tooltip'=>"ChequeOrTransferNumber"), - 'p.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>80), - 'p.statut' => array('label'=>"Status", 'checked'=>1, 'position'=>90, 'enabled'=>(getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION'))), + 'p.ref' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10), + 'p.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30), + 'c.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 40), + 'transaction' => array('label' => "BankTransactionLine", 'checked' => 1, 'position' => 50, 'enabled' => (isModEnabled("bank"))), + 'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 60, 'enabled' => (isModEnabled("bank"))), + 'p.num_paiement' => array('label' => "Numero", 'checked' => 1, 'position' => 70, 'tooltip' => "ChequeOrTransferNumber"), + 'p.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 80), + 'p.statut' => array('label' => "Status", 'checked' => 1, 'position' => 90, 'enabled' => (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION'))), ); $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -130,7 +130,7 @@ $result = restrictedArea($user, 'facture', $facid, ''); * Actions */ -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -386,6 +386,7 @@ print ''; print ''; print ''; +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1); if ($search_all) { @@ -491,7 +492,7 @@ if (!empty($arrayfields['p.statut']['checked'])) { } // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -559,7 +560,7 @@ if (!empty($arrayfields['p.statut']['checked'])) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index a63f457062f..24e37a37904 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -460,7 +460,7 @@ if ($id > 0 || $ref) { if ($salaryBonPl) { $sql = "SELECT pl.rowid, pl.statut, pl.amount, pl.fk_user,"; $sql .= " u.rowid as socid, u.login as name"; - $sql .=" FROM llx_prelevement_lignes as pl"; + $sql .= " FROM llx_prelevement_lignes as pl"; $sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb"; $sql .= ", ".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE pl.fk_prelevement_bons = ".((int) $id); @@ -527,6 +527,7 @@ if ($id > 0 || $ref) { if (!empty($sortorder)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); print '
'; // You can use div-table-responsive-no-min if you don't need reserved height for your table diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index aafc6f17833..febb51cdc1d 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -240,6 +240,7 @@ $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Rejects"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); print"\n\n"; diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 10cc824c9cd..ea5fe2d3ca9 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -97,20 +97,20 @@ if (!$sortorder) { $filtre = GETPOSTINT("filtre"); $arrayfields = array( - 'cs.rowid' =>array('label'=>"Ref", 'checked'=>1, 'position'=>10), - 'cs.libelle' =>array('label'=>"Label", 'checked'=>1, 'position'=>20), - 'cs.fk_type' =>array('label'=>"Type", 'checked'=>1, 'position'=>30), - 'cs.date_ech' =>array('label'=>"Date", 'checked'=>1, 'position'=>40), - 'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>50), - 'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>60, 'enabled'=>(isModEnabled('project'))), - 'cs.fk_user' =>array('label'=>"Employee", 'checked'=>1, 'position'=>70), - 'cs.fk_mode_reglement' =>array('checked'=>-1, 'position'=>80, 'label'=>"DefaultPaymentMode"), - 'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>100), - 'cs.paye' =>array('label'=>"Status", 'checked'=>1, 'position'=>110), + 'cs.rowid' => array('label' => "Ref", 'checked' => 1, 'position' => 10), + 'cs.libelle' => array('label' => "Label", 'checked' => 1, 'position' => 20), + 'cs.fk_type' => array('label' => "Type", 'checked' => 1, 'position' => 30), + 'cs.date_ech' => array('label' => "Date", 'checked' => 1, 'position' => 40), + 'cs.periode' => array('label' => "PeriodEndDate", 'checked' => 1, 'position' => 50), + 'p.ref' => array('label' => "ProjectRef", 'checked' => 1, 'position' => 60, 'enabled' => (isModEnabled('project'))), + 'cs.fk_user' => array('label' => "Employee", 'checked' => 1, 'position' => 70), + 'cs.fk_mode_reglement' => array('checked' => -1, 'position' => 80, 'label' => "DefaultPaymentMode"), + 'cs.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 100), + 'cs.paye' => array('label' => "Status", 'checked' => 1, 'position' => 110), ); if (isModEnabled("bank")) { - $arrayfields['cs.fk_account'] = array('checked'=>-1, 'position'=>90, 'label'=>"DefaultBankAccount"); + $arrayfields['cs.fk_account'] = array('checked' => -1, 'position' => 90, 'label' => "DefaultBankAccount"); } $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -134,7 +134,7 @@ $result = restrictedArea($user, 'tax', '', 'chargesociales', 'charges'); * Actions */ -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -384,8 +384,8 @@ if ($search_date_limit_endyear) { $url = DOL_URL_ROOT.'/compta/sociales/card.php?action=create'; $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewSocialContribution'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); @@ -411,6 +411,7 @@ print ''; print ''; +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1); if (empty($mysoc->country_id) && empty($mysoc->country_code)) { @@ -537,13 +538,14 @@ if (!empty($arrayfields['cs.amount']['checked'])) { // Filter: Status if (!empty($arrayfields['cs.paye']['checked'])) { print '
'; } // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -618,7 +620,7 @@ if (!empty($arrayfields['cs.paye']['checked'])) { } // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -634,7 +636,7 @@ $i = 0; $savnbfield = $totalarray['nbfield']; $totalarray = array(); $totalarray['nbfield'] = 0; -$totalarray['val'] = array('totalttcfield'=>0); +$totalarray['val'] = array('totalttcfield' => 0); $imaxinloop = ($limit ? min($num, $limit) : $num); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); @@ -659,7 +661,7 @@ while ($i < $imaxinloop) { print '
'; } // Output Kanban - print $chargesociale_static->getKanbanView('', array('project'=> $projectstatic, 'selected' => in_array($chargesociale_static->id, $arrayofselected))); + print $chargesociale_static->getKanbanView('', array('project' => $projectstatic, 'selected' => in_array($chargesociale_static->id, $arrayofselected))); if ($i == ($imaxinloop - 1)) { print '
'; print ''; @@ -860,7 +862,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index d67ac1d12f3..573c3d50289 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -82,16 +82,16 @@ if (!$sortorder) { } $arrayfields = array( - 't.rowid' =>array('checked'=>1, 'position'=>10, 'label'=>"Ref",), - 't.label' =>array('checked'=>1, 'position'=>20, 'label'=>"Label"), - 't.datev' =>array('checked'=>1, 'position'=>30, 'label'=>"PeriodEndDate"), - 't.fk_typepayment' =>array('checked'=>1, 'position'=>50, 'label'=>"DefaultPaymentMode"), - 't.amount' =>array('checked'=>1, 'position'=>90, 'label'=>"Amount"), - 't.status' =>array('checked'=>1, 'position'=>90, 'label'=>"Status"), + 't.rowid' => array('checked' => 1, 'position' => 10, 'label' => "Ref",), + 't.label' => array('checked' => 1, 'position' => 20, 'label' => "Label"), + 't.datev' => array('checked' => 1, 'position' => 30, 'label' => "PeriodEndDate"), + 't.fk_typepayment' => array('checked' => 1, 'position' => 50, 'label' => "DefaultPaymentMode"), + 't.amount' => array('checked' => 1, 'position' => 90, 'label' => "Amount"), + 't.status' => array('checked' => 1, 'position' => 90, 'label' => "Status"), ); if (isModEnabled("bank")) { - $arrayfields['t.fk_account'] = array('checked'=>1, 'position'=>60, 'label'=>"DefaultBankAccount"); + $arrayfields['t.fk_account'] = array('checked' => 1, 'position' => 60, 'label' => "DefaultBankAccount"); } $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -115,7 +115,7 @@ $result = restrictedArea($user, 'tax', '', 'tva', 'charges'); * Actions */ -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -171,8 +171,8 @@ $help_url = ''; // Build and execute select // -------------------------------------------------------------------- $sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.paye as status, t.fk_typepayment as type, t.fk_account,'; -$sql.= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,'; -$sql.= ' t.num_payment, pst.code as payment_code,'; +$sql .= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,'; +$sql .= ' t.num_payment, pst.code as payment_code,'; $sql .= ' SUM(ptva.amount) as alreadypayed'; $sqlfields = $sql; // $sql fields to remove for count total @@ -360,8 +360,8 @@ if (!empty($socid)) { $url .= '&socid='.$socid; } $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewVATPayment'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); @@ -486,6 +486,7 @@ if (!empty($arrayfields['t.amount']['checked'])) { if (!empty($arrayfields['t.status']['checked'])) { print ''; } @@ -494,7 +495,7 @@ if (!empty($arrayfields['t.status']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -552,7 +553,7 @@ if (!empty($arrayfields['t.status']['checked'])) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -770,7 +771,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/compta/tva/payments.php b/htdocs/compta/tva/payments.php index 83f044af16f..fbcb057a859 100644 --- a/htdocs/compta/tva/payments.php +++ b/htdocs/compta/tva/payments.php @@ -146,7 +146,7 @@ if ($resql) { setEventMessages($db->lasterror, null, 'errors'); } -// @phan-suppress-next-line PhanPluginSuspiciousParamPosition +// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $num, 'title_accountancy', 0, '', '', $limit); if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index c2d8db146f6..593f050d4c7 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -106,6 +106,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) if (empty($dolibarr_main_auth_ldap_filter)) { $userSearchFilter = "(".$ldapuserattr."=".$usertotest.")"; } else { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $userSearchFilter = str_replace('%1%', $usertotest, $dolibarr_main_auth_ldap_filter); } diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index 067e4801d24..7f8ae3c09b5 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -180,6 +180,7 @@ class pdf_ban extends ModeleBankAccountDoc $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 08feae6096d..5cc2c4602db 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -100,11 +100,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc // Define column position $this->posxref = $this->marge_gauche; - $this->update_main_doc_field=1; + $this->update_main_doc_field = 1; - $this->heightforinfotot=50; + $this->heightforinfotot = 50; - $this->xPosSignArea=120; + $this->xPosSignArea = 120; $this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT') > 0 ? getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT') : 5); @@ -175,7 +175,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -206,6 +206,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -443,7 +444,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -453,7 +454,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 7268933be1b..037eb35b5b7 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -157,7 +157,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -190,6 +190,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $nboflines = count($this->lines); @@ -226,7 +227,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -236,7 +237,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); $outputlangs->charset_output = $sav_charset_output; return 1; // No error diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index a810b92a8d3..547b3c07d57 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -240,7 +240,7 @@ class pdf_einstein extends ModelePDFCommandes $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -552,15 +552,15 @@ class pdf_einstein extends ModelePDFCommandes if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -637,7 +637,7 @@ class pdf_einstein extends ModelePDFCommandes // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -647,7 +647,7 @@ class pdf_einstein extends ModelePDFCommandes dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1483,6 +1483,7 @@ class pdf_einstein extends ModelePDFCommandes // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 82cc9b1a16a..911c2854206 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -280,7 +280,7 @@ class pdf_eratosthene extends ModelePDFCommandes $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -699,9 +699,9 @@ class pdf_eratosthene extends ModelePDFCommandes $parameters = array( 'object' => $object, 'i' => $i, - 'pdf' =>& $pdf, - 'curY' =>& $curY, - 'nexY' =>& $nexY, + 'pdf' => & $pdf, + 'curY' => & $curY, + 'nexY' => & $nexY, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails ); @@ -761,15 +761,15 @@ class pdf_eratosthene extends ModelePDFCommandes if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); // Add line if (getDolGlobalInt('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } @@ -845,7 +845,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -855,7 +855,7 @@ class pdf_eratosthene extends ModelePDFCommandes dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1672,6 +1672,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection); } @@ -1898,6 +1899,7 @@ class pdf_eratosthene extends ModelePDFCommandes if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 885b61da806..95c106013cf 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -1383,7 +1383,7 @@ class pdf_espadon extends ModelePdfExpedition if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { - // @phan-suppress-next-line PhanPluginSuspiciousParamOrder + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index e2437957220..52878e4de21 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -183,7 +183,7 @@ class pdf_merou extends ModelePdfExpedition $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -227,6 +227,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -315,10 +316,10 @@ class pdf_merou extends ModelePdfExpedition // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -374,7 +375,7 @@ class pdf_merou extends ModelePdfExpedition $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -384,7 +385,7 @@ class pdf_merou extends ModelePdfExpedition dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; } else { diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 7f1cd448e2e..7e1675e40c9 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -253,7 +253,7 @@ class pdf_rouget extends ModelePdfExpedition $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -298,6 +298,7 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -549,10 +550,10 @@ class pdf_rouget extends ModelePdfExpedition // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY - 1, $this->page_largeur - $this->marge_droite, $nexY - 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } // Detect if some page were added automatically and output _tableau for past pages @@ -617,7 +618,7 @@ class pdf_rouget extends ModelePdfExpedition // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -627,7 +628,7 @@ class pdf_rouget extends ModelePdfExpedition dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index afdc64bf80c..692a1c24301 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -227,7 +227,7 @@ class pdf_standard extends ModeleExpenseReport $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -267,6 +267,7 @@ class pdf_standard extends ModeleExpenseReport $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -522,7 +523,7 @@ class pdf_standard extends ModeleExpenseReport // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -532,7 +533,7 @@ class pdf_standard extends ModeleExpenseReport dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index f1e0d0c26ad..f2f05ed7f84 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -367,6 +367,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->setSignature($cert, $certprivate, $this->emetteur->name, '', 2, $info); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount @@ -2123,6 +2124,7 @@ class pdf_crabe extends ModelePDFFactures // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); @@ -2130,6 +2132,7 @@ class pdf_crabe extends ModelePDFFactures // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection); // Show shipping address diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 438123738d4..59266ff83a3 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -392,6 +392,7 @@ class pdf_sponge extends ModelePDFFactures $pdf->setSignature($cert, $certprivate, $this->emetteur->name, '', 2, $info); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount @@ -2374,6 +2375,7 @@ class pdf_sponge extends ModelePDFFactures // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); @@ -2381,6 +2383,7 @@ class pdf_sponge extends ModelePDFFactures // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection); // Show shipping address @@ -2660,6 +2663,7 @@ class pdf_sponge extends ModelePDFFactures if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 8aa4fb74b4c..8c2b45055fc 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -175,7 +175,7 @@ class pdf_soleil extends ModelePDFFicheinter } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -216,6 +216,7 @@ class pdf_soleil extends ModelePDFFicheinter $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -414,7 +415,7 @@ class pdf_soleil extends ModelePDFFicheinter // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -424,7 +425,7 @@ class pdf_soleil extends ModelePDFFicheinter dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; } else { diff --git a/htdocs/core/modules/hrm/doc/pdf_standard.modules.php b/htdocs/core/modules/hrm/doc/pdf_standard.modules.php index bc1d33b87cc..b2bc3a79b7a 100644 --- a/htdocs/core/modules/hrm/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/hrm/doc/pdf_standard.modules.php @@ -185,7 +185,7 @@ class pdf_standard extends ModelePDFEvaluation $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblines with the new command lines content after hook @@ -227,6 +227,7 @@ class pdf_standard extends ModelePDFEvaluation $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -251,7 +252,7 @@ class pdf_standard extends ModelePDFEvaluation $pdf->SetFont('', 'B', $default_font_size); $pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes") . ":", 0, 'L', 0, '', 12, $tab_top); - $tab_top +=4; + $tab_top += 4; $pdf->SetFont('', '', $default_font_size - 1); $pdf->writeHTMLCell(190, 3, $this->posxnotes + 1, $tab_top + 1, dol_htmlentitiesbr($object->note_public), 0, 1); $nexY = $pdf->GetY(); @@ -425,7 +426,7 @@ class pdf_standard extends ModelePDFEvaluation // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -435,7 +436,7 @@ class pdf_standard extends ModelePDFEvaluation dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/movement/doc/pdf_standard.modules.php b/htdocs/core/modules/movement/doc/pdf_standard.modules.php index cfaffb265a2..8b5fd2e39bd 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard.modules.php @@ -374,7 +374,7 @@ class pdf_standard extends ModelePDFMovement $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -411,6 +411,7 @@ class pdf_standard extends ModelePDFMovement $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -611,10 +612,10 @@ class pdf_standard extends ModelePDFMovement // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -666,9 +667,9 @@ class pdf_standard extends ModelePDFMovement $nexY += 5; $curY = $nexY; - $pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(220, 26, 26))); + $pdf->SetLineStyle(array('dash' => '0', 'color' => array(220, 26, 26))); $pdf->line($this->marge_gauche, $curY - 1, $this->page_largeur - $this->marge_droite, $curY - 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); $pdf->SetFont('', 'B', $default_font_size - 1); $pdf->SetTextColor(0, 0, 120); @@ -750,7 +751,7 @@ class pdf_standard extends ModelePDFMovement // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -760,7 +761,7 @@ class pdf_standard extends ModelePDFMovement dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -821,10 +822,10 @@ class pdf_standard extends ModelePDFMovement // Output Rect //$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - $pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(220, 26, 26))); + $pdf->SetLineStyle(array('dash' => '0', 'color' => array(220, 26, 26))); $pdf->SetDrawColor(220, 26, 26); $pdf->line($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite, $tab_top); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); $pdf->SetDrawColor(128, 128, 128); $pdf->SetTextColor(0, 0, 120); @@ -892,9 +893,9 @@ class pdf_standard extends ModelePDFMovement } $pdf->SetDrawColor(220, 26, 26); - $pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(220, 26, 26))); + $pdf->SetLineStyle(array('dash' => '0', 'color' => array(220, 26, 26))); $pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index c718af28473..cc5bc784df0 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -203,7 +203,7 @@ class pdf_vinci extends ModelePDFMo $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -243,6 +243,7 @@ class pdf_vinci extends ModelePDFMo $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Does we have at least one line with discount $this->atleastonediscount @@ -627,7 +628,7 @@ class pdf_vinci extends ModelePDFMo // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -637,7 +638,7 @@ class pdf_vinci extends ModelePDFMo dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1466,6 +1467,7 @@ class pdf_vinci extends ModelePDFMo if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index eba1ee529e0..acd48af037d 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -166,7 +166,7 @@ class pdf_standard extends ModelePDFProduct $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -206,6 +206,7 @@ class pdf_standard extends ModelePDFProduct $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -571,7 +572,7 @@ class pdf_standard extends ModelePDFProduct // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -581,7 +582,7 @@ class pdf_standard extends ModelePDFProduct dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index 639252bd960..498143880a3 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -183,7 +183,7 @@ class pdf_baleine extends ModelePDFProjects $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -234,6 +234,7 @@ class pdf_baleine extends ModelePDFProjects $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -410,10 +411,10 @@ class pdf_baleine extends ModelePDFProjects // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -476,7 +477,7 @@ class pdf_baleine extends ModelePDFProjects // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -486,7 +487,7 @@ class pdf_baleine extends ModelePDFProjects dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 021e855e417..6102bbaf379 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -214,7 +214,7 @@ class pdf_beluga extends ModelePDFProjects $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -267,6 +267,7 @@ class pdf_beluga extends ModelePDFProjects $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -316,106 +317,106 @@ class pdf_beluga extends ModelePDFProjects $nexY = $tab_top + $heightoftitleline + 1; $listofreferent = array( - 'propal'=>array( - 'name'=>"Proposals", - 'title'=>"ListProposalsAssociatedProject", - 'class'=>'Propal', - 'table'=>'propal', - 'datefieldname'=>'datep', - 'test'=> isModEnabled('propal') && $user->hasRight('propal', 'lire'), - 'lang'=>'propal'), - 'order'=>array( - 'name'=>"CustomersOrders", - 'title'=>"ListOrdersAssociatedProject", - 'class'=>'Commande', - 'table'=>'commande', - 'datefieldname'=>'date_commande', - 'test'=> isModEnabled('order') && $user->hasRight('commande', 'lire'), - 'lang'=>'orders'), - 'invoice'=>array( - 'name'=>"CustomersInvoices", - 'title'=>"ListInvoicesAssociatedProject", - 'class'=>'Facture', - 'margin'=>'add', - 'table'=>'facture', - 'datefieldname'=>'datef', - 'test'=> isModEnabled('invoice') && $user->hasRight('facture', 'lire'), - 'lang'=>'bills'), - 'invoice_predefined'=>array( - 'name'=>"PredefinedInvoices", - 'title'=>"ListPredefinedInvoicesAssociatedProject", - 'class'=>'FactureRec', - 'table'=>'facture_rec', - 'datefieldname'=>'datec', - 'test'=> isModEnabled('invoice') && $user->hasRight('facture', 'lire'), - 'lang'=>'bills'), - 'order_supplier'=>array( - 'name'=>"SuppliersOrders", - 'title'=>"ListSupplierOrdersAssociatedProject", - 'class'=>'CommandeFournisseur', - 'table'=>'commande_fournisseur', - 'datefieldname'=>'date_commande', - 'test'=>(isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')), - 'lang'=>'orders'), - 'invoice_supplier'=>array( - 'name'=>"BillsSuppliers", - 'title'=>"ListSupplierInvoicesAssociatedProject", - 'class'=>'FactureFournisseur', - 'margin'=>'minus', - 'table'=>'facture_fourn', - 'datefieldname'=>'datef', - 'test'=>(isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire')), - 'lang'=>'bills'), - 'contract'=>array( - 'name'=>"Contracts", - 'title'=>"ListContractAssociatedProject", - 'class'=>'Contrat', - 'table'=>'contrat', - 'datefieldname'=>'date_contrat', - 'test'=> isModEnabled('contract') && $user->hasRight('contrat', 'lire'), - 'lang'=>'contract'), - 'intervention'=>array( - 'name'=>"Interventions", - 'title'=>"ListFichinterAssociatedProject", - 'class'=>'Fichinter', - 'table'=>'fichinter', - 'datefieldname'=>'date_valid', - 'disableamount'=>1, - 'test'=>isModEnabled('intervention') && $user->hasRight('ficheinter', 'lire'), - 'lang'=>'interventions'), - 'trip'=>array( - 'name'=>"TripsAndExpenses", - 'title'=>"ListExpenseReportsAssociatedProject", - 'class'=>'Deplacement', - 'table'=>'deplacement', - 'datefieldname'=>'dated', - 'margin'=>'minus', - 'disableamount'=>1, - 'test'=>isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire'), - 'lang'=>'trip'), - 'expensereport'=>array( - 'name'=>"ExpensesReports", - 'title'=>"ListExpenseReportsAssociatedProject", - 'class'=>'ExpenseReport', - 'table'=>'expensereport', - 'datefieldname'=>'dated', - 'margin'=>'minus', - 'disableamount'=>1, - 'test'=>isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire'), - 'lang'=>'trip'), - 'agenda'=>array( - 'name'=>"Agenda", - 'title'=>"ListActionsAssociatedProject", - 'class'=>'ActionComm', - 'table'=>'actioncomm', - 'datefieldname'=>'datep', - 'disableamount'=>1, - 'test'=> isModEnabled('agenda') && $user->hasRight('agenda', 'allactions', 'read'), - 'lang'=>'agenda') + 'propal' => array( + 'name' => "Proposals", + 'title' => "ListProposalsAssociatedProject", + 'class' => 'Propal', + 'table' => 'propal', + 'datefieldname' => 'datep', + 'test' => isModEnabled('propal') && $user->hasRight('propal', 'lire'), + 'lang' => 'propal'), + 'order' => array( + 'name' => "CustomersOrders", + 'title' => "ListOrdersAssociatedProject", + 'class' => 'Commande', + 'table' => 'commande', + 'datefieldname' => 'date_commande', + 'test' => isModEnabled('order') && $user->hasRight('commande', 'lire'), + 'lang' => 'orders'), + 'invoice' => array( + 'name' => "CustomersInvoices", + 'title' => "ListInvoicesAssociatedProject", + 'class' => 'Facture', + 'margin' => 'add', + 'table' => 'facture', + 'datefieldname' => 'datef', + 'test' => isModEnabled('invoice') && $user->hasRight('facture', 'lire'), + 'lang' => 'bills'), + 'invoice_predefined' => array( + 'name' => "PredefinedInvoices", + 'title' => "ListPredefinedInvoicesAssociatedProject", + 'class' => 'FactureRec', + 'table' => 'facture_rec', + 'datefieldname' => 'datec', + 'test' => isModEnabled('invoice') && $user->hasRight('facture', 'lire'), + 'lang' => 'bills'), + 'order_supplier' => array( + 'name' => "SuppliersOrders", + 'title' => "ListSupplierOrdersAssociatedProject", + 'class' => 'CommandeFournisseur', + 'table' => 'commande_fournisseur', + 'datefieldname' => 'date_commande', + 'test' => (isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')), + 'lang' => 'orders'), + 'invoice_supplier' => array( + 'name' => "BillsSuppliers", + 'title' => "ListSupplierInvoicesAssociatedProject", + 'class' => 'FactureFournisseur', + 'margin' => 'minus', + 'table' => 'facture_fourn', + 'datefieldname' => 'datef', + 'test' => (isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire')), + 'lang' => 'bills'), + 'contract' => array( + 'name' => "Contracts", + 'title' => "ListContractAssociatedProject", + 'class' => 'Contrat', + 'table' => 'contrat', + 'datefieldname' => 'date_contrat', + 'test' => isModEnabled('contract') && $user->hasRight('contrat', 'lire'), + 'lang' => 'contract'), + 'intervention' => array( + 'name' => "Interventions", + 'title' => "ListFichinterAssociatedProject", + 'class' => 'Fichinter', + 'table' => 'fichinter', + 'datefieldname' => 'date_valid', + 'disableamount' => 1, + 'test' => isModEnabled('intervention') && $user->hasRight('ficheinter', 'lire'), + 'lang' => 'interventions'), + 'trip' => array( + 'name' => "TripsAndExpenses", + 'title' => "ListExpenseReportsAssociatedProject", + 'class' => 'Deplacement', + 'table' => 'deplacement', + 'datefieldname' => 'dated', + 'margin' => 'minus', + 'disableamount' => 1, + 'test' => isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire'), + 'lang' => 'trip'), + 'expensereport' => array( + 'name' => "ExpensesReports", + 'title' => "ListExpenseReportsAssociatedProject", + 'class' => 'ExpenseReport', + 'table' => 'expensereport', + 'datefieldname' => 'dated', + 'margin' => 'minus', + 'disableamount' => 1, + 'test' => isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire'), + 'lang' => 'trip'), + 'agenda' => array( + 'name' => "Agenda", + 'title' => "ListActionsAssociatedProject", + 'class' => 'ActionComm', + 'table' => 'actioncomm', + 'datefieldname' => 'datep', + 'disableamount' => 1, + 'test' => isModEnabled('agenda') && $user->hasRight('agenda', 'allactions', 'read'), + 'lang' => 'agenda') ); $hookmanager->initHooks(array('completeListOfReferent')); - $hookmanager->executeHooks('completeListOfReferent', ['listofreferent'=>$listofreferent], $object, $action); + $hookmanager->executeHooks('completeListOfReferent', ['listofreferent' => $listofreferent], $object, $action); if (!empty($hookmanager->resArray)) { $listofreferent = array_merge($listofreferent, $hookmanager->resArray); } @@ -708,7 +709,7 @@ class pdf_beluga extends ModelePDFProjects // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -718,7 +719,7 @@ class pdf_beluga extends ModelePDFProjects dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 855579aa10f..7d3b887dfd8 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -178,7 +178,7 @@ class pdf_timespent extends ModelePDFProjects $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -229,6 +229,7 @@ class pdf_timespent extends ModelePDFProjects $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -408,10 +409,10 @@ class pdf_timespent extends ModelePDFProjects // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -474,7 +475,7 @@ class pdf_timespent extends ModelePDFProjects // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -484,7 +485,7 @@ class pdf_timespent extends ModelePDFProjects dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index c061fa61c19..ec04f0001a8 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -294,7 +294,7 @@ class pdf_azur extends ModelePDFPropales $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -335,6 +335,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount @@ -664,7 +665,7 @@ class pdf_azur extends ModelePDFPropales if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); if ($posYAfterImage > $posYAfterDescription) { $nexY = $posYAfterImage; @@ -673,10 +674,10 @@ class pdf_azur extends ModelePDFPropales // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -827,7 +828,7 @@ class pdf_azur extends ModelePDFPropales //Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -837,7 +838,7 @@ class pdf_azur extends ModelePDFPropales dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -911,7 +912,7 @@ class pdf_azur extends ModelePDFPropales $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("DateDeliveryPlanned").':'; $pdf->MultiCell(80, 4, $titre, 0, 'L'); - $pdf->SetFont('', '', $default_font_size -$diffsizetitle); + $pdf->SetFont('', '', $default_font_size - $diffsizetitle); $pdf->SetXY($posxval, $posy); $dlp = dol_print_date($object->delivery_date, $displaydate, false, $outputlangs, true); $pdf->MultiCell(80, 4, $dlp, 0, 'L'); @@ -1694,6 +1695,7 @@ class pdf_azur extends ModelePDFPropales // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); @@ -1701,6 +1703,7 @@ class pdf_azur extends ModelePDFPropales // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection); } diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 7814fdebeb7..184d95c45da 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -276,7 +276,7 @@ class pdf_cyan extends ModelePDFPropales $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -317,6 +317,7 @@ class pdf_cyan extends ModelePDFPropales $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount @@ -711,9 +712,9 @@ class pdf_cyan extends ModelePDFPropales $parameters = array( 'object' => $object, 'i' => $i, - 'pdf' =>& $pdf, - 'curY' =>& $curY, - 'nexY' =>& $nexY, + 'pdf' => & $pdf, + 'curY' => & $curY, + 'nexY' => & $nexY, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails ); @@ -784,7 +785,7 @@ class pdf_cyan extends ModelePDFPropales if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); if ($posYAfterImage > $posYAfterDescription) { $nexY = max($nexY, $posYAfterImage); @@ -793,10 +794,10 @@ class pdf_cyan extends ModelePDFPropales // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -940,7 +941,7 @@ class pdf_cyan extends ModelePDFPropales //Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -950,7 +951,7 @@ class pdf_cyan extends ModelePDFPropales dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1771,6 +1772,7 @@ class pdf_cyan extends ModelePDFPropales // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); @@ -1778,6 +1780,7 @@ class pdf_cyan extends ModelePDFPropales // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection); } @@ -2036,6 +2039,7 @@ class pdf_cyan extends ModelePDFPropales if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 8bb3ad2444d..13dc9da2488 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -175,7 +175,7 @@ class pdf_paiement extends CommonDocGenerator $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$this, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $this, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $this, $action); // Note that $action and $this may have been modified by some hooks @@ -337,6 +337,7 @@ class pdf_paiement extends CommonDocGenerator $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetAutoPageBreak(1, 0); @@ -365,7 +366,7 @@ class pdf_paiement extends CommonDocGenerator $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$this, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $this, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -375,7 +376,7 @@ class pdf_paiement extends CommonDocGenerator dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; } @@ -495,7 +496,7 @@ class pdf_paiement extends CommonDocGenerator if ($yp > $this->tab_height - 15) { $pdf->SetFillColor(255, 255, 255); $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); - $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); + $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash' => 1)); $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); $pdf->SetFont('', 'B', $default_font_size - 1); $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp); @@ -556,7 +557,7 @@ class pdf_paiement extends CommonDocGenerator if ((($this->doc_type == 'client' && getDolGlobalString('PAYMENTS_REPORT_GROUP_BY_MOD')) || ($this->doc_type == 'fourn' && getDolGlobalString('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD'))) && ($mod != $lines[$j + 1][2])) { $pdf->SetFillColor(245, 245, 245); $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); - $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); + $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash' => 1)); $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp); $pdf->SetFont('', 'I', $default_font_size - 1); @@ -580,7 +581,7 @@ class pdf_paiement extends CommonDocGenerator $total += $total_page; $pdf->SetFillColor(255, 255, 255); $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); - $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); + $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash' => 1)); $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp); $pdf->SetFont('', 'B'); diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index e104ceeb61c..e79a5b70d5a 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -233,7 +233,7 @@ class pdf_squille extends ModelePdfReception $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -275,6 +275,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -548,10 +549,10 @@ class pdf_squille extends ModelePdfReception // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY - 1, $this->page_largeur - $this->marge_droite, $nexY - 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } // Detect if some page were added automatically and output _tableau for past pages @@ -610,7 +611,7 @@ class pdf_squille extends ModelePdfReception // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index bd06a5c1bd5..09247f96fd3 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -176,7 +176,7 @@ class pdf_standard extends ModelePDFStock $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -216,6 +216,7 @@ class pdf_standard extends ModelePDFStock $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -397,10 +398,10 @@ class pdf_standard extends ModelePDFStock // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -453,9 +454,9 @@ class pdf_standard extends ModelePDFStock $curY = $nexY; if ($nblines > 0) { - $pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(200, 200, 200))); + $pdf->SetLineStyle(array('dash' => '0', 'color' => array(200, 200, 200))); $pdf->line($this->marge_gauche, $curY - 1, $this->page_largeur - $this->marge_droite, $curY - 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); $pdf->SetFont('', 'B', $default_font_size - 1); $pdf->SetTextColor(0, 0, 0); @@ -547,7 +548,7 @@ class pdf_standard extends ModelePDFStock // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -557,7 +558,7 @@ class pdf_standard extends ModelePDFStock dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -617,35 +618,35 @@ class pdf_standard extends ModelePDFStock $pdf->SetFont('', 'B', $default_font_size - 3); // Output Rect - $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter + $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter - $pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(200, 200, 200))); + $pdf->SetLineStyle(array('dash' => '0', 'color' => array(200, 200, 200))); $pdf->SetDrawColor(200, 200, 200); $pdf->line($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite, $tab_top); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); $pdf->SetDrawColor(128, 128, 128); $pdf->SetTextColor(0, 0, 0); if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11); // line takes a position y in 2nd parameter and 4th parameter + $pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11); // line takes a position y in 2nd parameter and 4th parameter $pdf->SetXY($this->posxdesc - 1, $tab_top + 1); $pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities("Ref"), '', 'L'); } - $pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height); + $pdf->line($this->posxlabel - 1, $tab_top, $this->posxlabel - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxlabel - 1, $tab_top + 1); $pdf->MultiCell($this->posxqty - $this->posxlabel - 1, 2, $outputlangs->transnoentities("Label"), '', 'C'); } - $pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); + $pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxqty - 1, $tab_top + 1); $pdf->MultiCell($this->posxup - $this->posxqty - 1, 2, $outputlangs->transnoentities("Units"), '', 'C'); } - $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); + $pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxup - 1, $tab_top + 1); $pdf->MultiCell($this->posxunit - $this->posxup - 1, 2, $outputlangs->transnoentities("AverageUnitPricePMPShort"), '', 'C'); @@ -657,7 +658,7 @@ class pdf_standard extends ModelePDFStock $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', 'C'); } - $pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height); + $pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height); if (empty($hidetop)) { $pdf->SetXY($this->posxdiscount - 1, $tab_top + 1); $pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("SellPriceMin"), '', 'C'); diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index 725abb6a34b..8f14233e320 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -323,6 +323,7 @@ class pdf_eagle extends ModelePDFStockTransfer $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index 1ffd3b41577..bc1442e56b4 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -255,7 +255,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -292,6 +292,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right /// Does we have at least one line with discount $this->atleastonediscount @@ -662,9 +663,9 @@ class pdf_eagle_proforma extends ModelePDFCommandes $parameters = array( 'object' => $object, 'i' => $i, - 'pdf' =>& $pdf, - 'curY' =>& $curY, - 'nexY' =>& $nexY, + 'pdf' => & $pdf, + 'curY' => & $curY, + 'nexY' => & $nexY, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails ); @@ -727,10 +728,10 @@ class pdf_eagle_proforma extends ModelePDFCommandes // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } @@ -796,7 +797,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -806,7 +807,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1650,6 +1651,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index bbb3109d2e6..7ff56fc4a2c 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -220,7 +220,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -267,6 +267,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Set $this->atleastonediscount if you have at least one discount @@ -503,10 +504,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -578,7 +579,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -588,7 +589,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 02583e9fc22..dfe2679983b 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -255,7 +255,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -295,6 +295,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Does we have at least one line with discount $this->atleastonediscount @@ -638,9 +639,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders $parameters = array( 'object' => $object, 'i' => $i, - 'pdf' =>& $pdf, - 'curY' =>& $curY, - 'nexY' =>& $nexY, + 'pdf' => & $pdf, + 'curY' => & $curY, + 'nexY' => & $nexY, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails ); @@ -711,7 +712,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); if ($posYAfterImage > $posYAfterDescription) { $nexY = $posYAfterImage; @@ -720,10 +721,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } // Detect if some page were added automatically and output _tableau for past pages @@ -796,7 +797,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -806,7 +807,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1424,6 +1425,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); @@ -1431,6 +1433,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection); } @@ -1639,6 +1642,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index c8ff2026002..8b735fd88e3 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -266,7 +266,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -307,6 +307,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise @@ -588,7 +589,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); if ($posYAfterImage > $posYAfterDescription) { $nexY = $posYAfterImage; @@ -597,10 +598,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -675,7 +676,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -685,7 +686,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1338,6 +1339,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); @@ -1345,6 +1347,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection); } 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 2fcd927b72c..b1b6e28514f 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -223,7 +223,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -263,6 +263,7 @@ class pdf_standard extends ModelePDFSuppliersPayments $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right @@ -383,10 +384,10 @@ class pdf_standard extends ModelePDFSuppliersPayments // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -456,7 +457,7 @@ class pdf_standard extends ModelePDFSuppliersPayments // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -466,7 +467,7 @@ class pdf_standard extends ModelePDFSuppliersPayments dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { 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 be2c6e38937..c9a8dc17770 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -258,7 +258,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -297,6 +297,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Positionne $this->atleastonediscount si on a au moins une remise @@ -575,7 +576,7 @@ class pdf_aurore extends ModelePDFSupplierProposal if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); if ($posYAfterImage > $posYAfterDescription) { $nexY = $posYAfterImage; @@ -584,10 +585,10 @@ class pdf_aurore extends ModelePDFSupplierProposal // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } $nexY += 2; // Add space between lines @@ -665,7 +666,7 @@ class pdf_aurore extends ModelePDFSupplierProposal //Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -675,7 +676,7 @@ class pdf_aurore extends ModelePDFSupplierProposal dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php index f42c862bb9e..1c77541020b 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php @@ -254,7 +254,7 @@ class pdf_zenith extends ModelePDFSupplierProposal $hookmanager = new HookManager($this->db); } $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -294,6 +294,7 @@ class pdf_zenith extends ModelePDFSupplierProposal $pdf->SetCompression(false); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // Does we have at least one line with discount $this->atleastonediscount @@ -637,9 +638,9 @@ class pdf_zenith extends ModelePDFSupplierProposal $parameters = array( 'object' => $object, 'i' => $i, - 'pdf' =>& $pdf, - 'curY' =>& $curY, - 'nexY' =>& $nexY, + 'pdf' => & $pdf, + 'curY' => & $curY, + 'nexY' => & $nexY, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails ); @@ -710,7 +711,7 @@ class pdf_zenith extends ModelePDFSupplierProposal if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; } - $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); + $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne); if ($posYAfterImage > $posYAfterDescription) { $nexY = $posYAfterImage; @@ -719,10 +720,10 @@ class pdf_zenith extends ModelePDFSupplierProposal // Add line if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) { $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + $pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80))); //$pdf->SetDrawColor(190,190,200); $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); - $pdf->SetLineStyle(array('dash'=>0)); + $pdf->SetLineStyle(array('dash' => 0)); } // Detect if some page were added automatically and output _tableau for past pages @@ -795,7 +796,7 @@ class pdf_zenith extends ModelePDFSupplierProposal // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -805,7 +806,7 @@ class pdf_zenith extends ModelePDFSupplierProposal dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1413,6 +1414,7 @@ class pdf_zenith extends ModelePDFSupplierProposal // Show recipient name $pdf->SetXY($posx + 2, $posy + 3); $pdf->SetFont('', 'B', $default_font_size); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection); $posy = $pdf->getY(); @@ -1420,6 +1422,7 @@ class pdf_zenith extends ModelePDFSupplierProposal // Show recipient information $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetXY($posx + 2, $posy); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection); } @@ -1610,6 +1613,7 @@ class pdf_zenith extends ModelePDFSupplierProposal if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index f2412524f12..8fb61bdb4e0 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -290,7 +290,7 @@ if ($nolinesbefore) { // $senderissupplier=2 is the same as 1 but disables test on minimum qty, disable autofill qty with minimum and autofill unit price if ($senderissupplier != 2) { $ajaxoptions = array( - 'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key + 'update' => array('qty' => 'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key 'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done 'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo) ); @@ -344,6 +344,7 @@ if ($nolinesbefore) { if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // @FIXME Not working yet $tmpbacktopagejsfields = 'addproduct:id,search_id'; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print dolButtonToOpenUrlInDialogPopup('addproduct', $langs->transnoentitiesnoconv('AddProduct'), $newbutton, $url, '', '', $tmpbacktopagejsfields); } else { print ''; @@ -355,6 +356,7 @@ if ($nolinesbefore) { if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // @FIXME Not working yet $tmpbacktopagejsfields = 'addproduct:id,search_id'; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print dolButtonToOpenUrlInDialogPopup('addproduct', $langs->transnoentitiesnoconv('AddService'), $newbutton, $url, '', '', $tmpbacktopagejsfields); } else { print ''; @@ -382,14 +384,14 @@ if ($nolinesbefore) { } if (is_object($hookmanager) && empty($senderissupplier)) { - $parameters = array('fk_parent_line'=>GETPOSTINT('fk_parent_line')); + $parameters = array('fk_parent_line' => GETPOSTINT('fk_parent_line')); $reshook = $hookmanager->executeHooks('formCreateProductOptions', $parameters, $object, $action); if (!empty($hookmanager->resPrint)) { print $hookmanager->resPrint; } } if (is_object($hookmanager) && !empty($senderissupplier)) { - $parameters = array('htmlname'=>'addproduct'); + $parameters = array('htmlname' => 'addproduct'); $reshook = $hookmanager->executeHooks('formCreateProductSupplierOptions', $parameters, $object, $action); if (!empty($hookmanager->resPrint)) { print $hookmanager->resPrint; @@ -441,7 +443,7 @@ if ($nolinesbefore) { if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier' || $object->element == 'invoice_supplier_rec') { // We must have same test in printObjectLines $coldisplay++; ?> - '; $coldisplay++; @@ -475,7 +477,7 @@ if ($nolinesbefore) { - @@ -510,21 +512,21 @@ if ($nolinesbefore) { $coldisplay++; ?> - %'; - $coldisplay++; - } - if (getDolGlobalString('DISPLAY_MARK_RATES')) { - echo ''; - $coldisplay++; - } + %'; + $coldisplay++; + } + if (getDolGlobalString('DISPLAY_MARK_RATES')) { + echo ''; + $coldisplay++; + } } } $coldisplay += $colspan; @@ -536,15 +538,15 @@ if ($nolinesbefore) { element == 'contrat')) && $dateSelector && GETPOST('type') != '0') { // We show date field if required - print ''."\n"; + print ''."\n"; if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { print ''; } - print ''; - print ''."\n"; + print ''; + print ''; + print ''."\n"; } @@ -778,7 +780,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) { } } }); - /* When changing predefined product, we reload list of supplier prices required for margin combo */ $("#idprod, #idprodfournprice").change(function() @@ -890,18 +892,18 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) { console.log("stringforvatrateselection="+stringforvatrateselection+" -> value of option label for this key="+$('#tva_tx option[value="'+stringforvatrateselection+'"]').val()); $('#tva_tx option[value="'+stringforvatrateselection+'"]').prop('selected', true); - - var proddesc = data.desc_trans; - - var proddesc = data.desc; - - console.log("objectline_create.tpl Load description into text area : "+proddesc); + if (getDolGlobalInt('PRODUIT_AUTOFILL_DESC') == 1) { + if (getDolGlobalInt('MAIN_MULTILANGS') && getDolGlobalString('PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE')) { ?> + var proddesc = data.desc_trans; + + var proddesc = data.desc; + + console.log("objectline_create.tpl Load description into text area : "+proddesc); + if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined") { var editor = CKEDITOR.instances['dp_desc']; @@ -909,25 +911,25 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) { editor.setData(proddesc); } } - + jQuery('#dp_desc').text(proddesc); + - + if (getDolGlobalString('PRODUCT_LOAD_EXTRAFIELD_INTO_OBJECTLINES')) { ?> jQuery.each(data.array_options, function( key, value ) { jQuery('div[class*="det'+key.replace('options_','_extras_')+'"] > #'+key).val(value); }); - + }, 'json' ); } - hasRight('margins', 'creer')) { @@ -1036,7 +1038,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) { }, 'json'); - diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 6a40d1bbe97..13ffaf15511 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -84,10 +84,10 @@ $hookmanager->initHooks(array('donationlist')); // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'd.rowid'=>'Id', - 'd.ref'=>'Ref', - 'd.lastname'=>'Lastname', - 'd.firstname'=>'Firstname', + 'd.rowid' => 'Id', + 'd.ref' => 'Ref', + 'd.lastname' => 'Lastname', + 'd.firstname' => 'Firstname', ); // Security check @@ -288,13 +288,14 @@ print ''; print ''; $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); if ($user->hasRight('don', 'creer')) { $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create'); } +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1); if ($search_all) { @@ -350,11 +351,12 @@ if (isModEnabled('project')) { print ''; print ''; if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { diff --git a/htdocs/don/paiement/list.php b/htdocs/don/paiement/list.php index 2762f271fa2..4e25ab90823 100644 --- a/htdocs/don/paiement/list.php +++ b/htdocs/don/paiement/list.php @@ -81,21 +81,21 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') : // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'pd.rowid'=>"RefPayment", - 's.nom'=>"ThirdParty", - 'pd.num_paiement'=>"Numero", - 'pd.amount'=>"Amount", + 'pd.rowid' => "RefPayment", + 's.nom' => "ThirdParty", + 'pd.num_paiement' => "Numero", + 'pd.amount' => "Amount", ); $arrayfields = array( - 'pd.rowid' => array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), - 'pd.datep' => array('label'=>"Date", 'checked'=>1, 'position'=>20), - 's.nom' => array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), - 'c.code' => array('label'=>"Type", 'checked'=>1, 'position'=>40), - 'pd.num_paiement' => array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"), - 'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>60, 'enabled'=>(isModEnabled("bank"))), - 'ba.label' => array('label'=>"BankAccount", 'checked'=>1, 'position'=>70, 'enabled'=>(isModEnabled("bank"))), - 'pd.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>80), + 'pd.rowid' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10), + 'pd.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30), + 'c.code' => array('label' => "Type", 'checked' => 1, 'position' => 40), + 'pd.num_paiement' => array('label' => "Numero", 'checked' => 1, 'position' => 50, 'tooltip' => "ChequeOrTransferNumber"), + 'transaction' => array('label' => "BankTransactionLine", 'checked' => 1, 'position' => 60, 'enabled' => (isModEnabled("bank"))), + 'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 70, 'enabled' => (isModEnabled("bank"))), + 'pd.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 80), ); $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -116,7 +116,7 @@ $permissiontodelete = $user->hasRight('don', 'delete'); * Actions */ -$parameters = array('socid'=>$paiementid); +$parameters = array('socid' => $paiementid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -316,6 +316,7 @@ print ''; print ''; print ''; +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("DonationPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1); if ($search_all) { @@ -412,7 +413,7 @@ if (!empty($arrayfields['pd.amount']['checked'])) { } // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -477,7 +478,7 @@ if (!empty($arrayfields['pd.amount']['checked'])) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index c68cef6ebb6..37e1c6a4e17 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -108,11 +108,11 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'e.ref'=>"Ref", - 's.nom'=>"ThirdParty", - 'e.note_public'=>'NotePublic', + 'e.ref' => "Ref", + 's.nom' => "ThirdParty", + 'e.note_public' => 'NotePublic', //'e.fk_shipping_method'=>'SendingMethod', // TODO fix this, does not work - 'e.tracking_number'=>"TrackingNumber", + 'e.tracking_number' => "TrackingNumber", ); if (empty($user->socid)) { $fieldstosearchall["e.note_private"] = "NotePrivate"; @@ -120,24 +120,24 @@ if (empty($user->socid)) { $checkedtypetiers = 0; $arrayfields = array( - 'e.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>1), - 'e.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1, 'position'=>2), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>3), - 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1, 'position'=>4), - 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1, 'position'=>5), - 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0, 'position'=>6), - 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>7), - 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers, 'position'=>8), - 'e.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'position'=>9), - 'e.fk_shipping_method'=>array('label'=>$langs->trans('SendingMethod'), 'checked'=>1, 'position'=>10), - 'e.tracking_number'=>array('label'=>$langs->trans("TrackingNumber"), 'checked'=>1, 'position'=>11), - 'e.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0, 'position'=>12), - 'e.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'e.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), - 'l.ref'=>array('label'=>$langs->trans("DeliveryRef"), 'checked'=>1, 'position'=>1010, 'enabled'=>(getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)), - 'l.date_delivery'=>array('label'=>$langs->trans("DateReceived"), 'position'=>1020, 'checked'=>1, 'enabled'=>(getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)), - 'e.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1100, 'enabled'=>'getDolGlobalString("WORKFLOW_BILL_ON_SHIPMENT") !== "0"') + 'e.ref' => array('label' => $langs->trans("Ref"), 'checked' => 1, 'position' => 1), + 'e.ref_customer' => array('label' => $langs->trans("RefCustomer"), 'checked' => 1, 'position' => 2), + 's.nom' => array('label' => $langs->trans("ThirdParty"), 'checked' => 1, 'position' => 3), + 's.town' => array('label' => $langs->trans("Town"), 'checked' => 1, 'position' => 4), + 's.zip' => array('label' => $langs->trans("Zip"), 'checked' => 1, 'position' => 5), + 'state.nom' => array('label' => $langs->trans("StateShort"), 'checked' => 0, 'position' => 6), + 'country.code_iso' => array('label' => $langs->trans("Country"), 'checked' => 0, 'position' => 7), + 'typent.code' => array('label' => $langs->trans("ThirdPartyType"), 'checked' => $checkedtypetiers, 'position' => 8), + 'e.date_delivery' => array('label' => $langs->trans("DateDeliveryPlanned"), 'checked' => 1, 'position' => 9), + 'e.fk_shipping_method' => array('label' => $langs->trans('SendingMethod'), 'checked' => 1, 'position' => 10), + 'e.tracking_number' => array('label' => $langs->trans("TrackingNumber"), 'checked' => 1, 'position' => 11), + 'e.weight' => array('label' => $langs->trans("Weight"), 'checked' => 0, 'position' => 12), + 'e.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => 0, 'position' => 500), + 'e.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 500), + 'e.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => 1, 'position' => 1000), + 'l.ref' => array('label' => $langs->trans("DeliveryRef"), 'checked' => 1, 'position' => 1010, 'enabled' => (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)), + 'l.date_delivery' => array('label' => $langs->trans("DateReceived"), 'position' => 1020, 'checked' => 1, 'enabled' => (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)), + 'e.billed' => array('label' => $langs->trans("Billed"), 'checked' => 1, 'position' => 1100, 'enabled' => 'getDolGlobalString("WORKFLOW_BILL_ON_SHIPMENT") !== "0"') ); // Extra fields @@ -168,7 +168,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -215,7 +215,7 @@ if (empty($reshook)) { // If massaction is close if ($massaction == 'classifyclose') { - $error=0; + $error = 0; $selectids = GETPOST('toselect', 'array'); foreach ($selectids as $selectid) { // $object->fetch($selectid); @@ -600,8 +600,8 @@ $massactionbutton = $form->selectMassAction('', $arrayofmassactions); // if (!empty($socid)) $url .= '&socid='.$socid; // $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url, '', $user->rights->expedition->creer); $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2', '', $user->hasRight('expedition', 'creer')); @@ -617,6 +617,7 @@ print ''; print ''; print ''; +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dolly', 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "SendShippingRef"; @@ -799,7 +800,7 @@ if (!empty($arrayfields['l.date_delivery']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -815,7 +816,7 @@ if (!empty($arrayfields['e.tms']['checked'])) { // Status if (!empty($arrayfields['e.fk_statut']['checked'])) { print ''; } // Status billed @@ -903,7 +904,7 @@ if (!empty($arrayfields['l.date_delivery']['checked'])) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, '$totalarray'=>&$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, '$totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['e.datec']['checked'])) { @@ -946,7 +947,7 @@ while ($i < $imaxinloop) { $shipment->id = $obj->rowid; $shipment->ref = $obj->ref; - $shipment->shipping_method_id=$obj->fk_shipping_method; + $shipment->shipping_method_id = $obj->fk_shipping_method; $companystatic->id = $obj->socid; $companystatic->ref = $obj->name; @@ -1093,7 +1094,7 @@ while ($i < $imaxinloop) { } if (!empty($arrayfields['e.fk_shipping_method']['checked'])) { // Get code using getLabelFromKey - $code=$langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); + $code = $langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code'); print ''; } @@ -714,7 +715,7 @@ if (!empty($arrayfields['f.description']['checked'])) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['f.datec']['checked'])) { @@ -921,7 +922,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -1033,7 +1034,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 6c097c907d8..c6b9c6457e5 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2434,6 +2434,7 @@ if ($action == 'create') { '; $tmp = $tmp.''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3); print '
'; $tmp = $tmp.''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3, 'depositonsmartphone'); print $desc; print ''; $incoterm_id = GETPOST('incoterm_id'); - $incoterm_location = GETPOST('location_incoterms'); + $location_incoterms = GETPOST('location_incoterms'); if (empty($incoterm_id)) { $incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms); - $incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms); + $location_incoterms = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms); } print img_picto('', 'incoterm', 'class="pictofixedwidth"'); - print $form->select_incoterms($incoterm_id, $incoterm_location); + print $form->select_incoterms($incoterm_id, $location_incoterms); print '
'; $liststatus = array( - 0=>$langs->trans("Draft"), - 1=>$langs->trans("Active"), - -1=>$langs->trans("Disabled"), + 0 => $langs->trans("Draft"), + 1 => $langs->trans("Active"), + -1 => $langs->trans("Disabled"), ); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, -2, 0, 0, '', 0, 0, 0, '', 'width100 onrightofpage'); print ''; if ($objp->frequency > 1) { - $dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); + $dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years")); } else { - $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); + $dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year")); } print($objp->frequency > 0 ? $dur[$objp->unit_frequency] : ''); print ''; $listtype = array( - Facture::TYPE_STANDARD=>$langs->trans("InvoiceStandard"), - Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"), - Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"), - Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"), + Facture::TYPE_STANDARD => $langs->trans("InvoiceStandard"), + Facture::TYPE_DEPOSIT => $langs->trans("InvoiceDeposit"), + Facture::TYPE_CREDIT_NOTE => $langs->trans("InvoiceAvoir"), + Facture::TYPE_REPLACEMENT => $langs->trans("InvoiceReplacement"), ); if (getDolGlobalString('INVOICE_USE_SITUATION')) { $listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation"); } //$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order. + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); print ''; - $liststatus = array('0'=>$langs->trans("BillShortStatusDraft"), '0,1'=>$langs->trans("BillShortStatusDraft").'+'.$langs->trans("BillShortStatusNotPaid"), '1'=>$langs->trans("BillShortStatusNotPaid"), '1,2'=>$langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); + $liststatus = array('0' => $langs->trans("BillShortStatusDraft"), '0,1' => $langs->trans("BillShortStatusDraft").'+'.$langs->trans("BillShortStatusNotPaid"), '1' => $langs->trans("BillShortStatusNotPaid"), '1,2' => $langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '2' => $langs->trans("BillShortStatusPaid"), '3' => $langs->trans("BillShortStatusCanceled")); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage', 1); print ''; - $liststatus = array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid")); + $liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid")); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage', 1); print '
'; $liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid")); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage'); print '"> "> - + - + "> %%
'; - $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); - $date_end = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); + print ''; + $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); + $date_end = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - $prefillDates = false; + $prefillDates = false; if (getDolGlobalString('MAIN_FILL_SERVICE_DATES_FROM_LAST_SERVICE_LINE') && !empty($object->lines)) { for ($i = count($object->lines) - 1; $i >= 0; $i--) { @@ -576,7 +578,7 @@ if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelecto echo ' '.$langs->trans('FillWithLastServiceDates').''; } - print ''; - print '
'; $liststatus = array( - Don::STATUS_DRAFT=>$langs->trans("DonationStatusPromiseNotValidated"), - Don::STATUS_VALIDATED=>$langs->trans("DonationStatusPromiseValidated"), - Don::STATUS_PAID=>$langs->trans("DonationStatusPaid"), - Don::STATUS_CANCELED=>$langs->trans("Canceled") + Don::STATUS_DRAFT => $langs->trans("DonationStatusPromiseNotValidated"), + Don::STATUS_VALIDATED => $langs->trans("DonationStatusPromiseValidated"), + Don::STATUS_PAID => $langs->trans("DonationStatusPaid"), + Don::STATUS_CANCELED => $langs->trans("Canceled") ); +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'search_status maxwidth100 onrightofpage'); print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage'); + print $form->selectarray('search_status', array('0' => $langs->trans('StatusSendingDraftShort'), '1' => $langs->trans('StatusSendingValidatedShort'), '2' => $langs->trans('StatusSendingProcessedShort')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage'); print ''; if ($shipment->shipping_method_id > 0) { print $langs->trans("SendingMethod".strtoupper($code)); @@ -1138,7 +1139,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -1208,7 +1209,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'totalarray' => $totalarray, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'totalarray' => $totalarray, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/expensereport/payment/list.php b/htdocs/expensereport/payment/list.php index 1dc7e453e5f..d0c10e49a56 100644 --- a/htdocs/expensereport/payment/list.php +++ b/htdocs/expensereport/payment/list.php @@ -95,20 +95,20 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') : // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'pndf.rowid'=>"RefPayment", - 'u.login'=>"User", - 'pndf.num_payment'=>"Numero", - 'pndf.amount'=>"Amount", + 'pndf.rowid' => "RefPayment", + 'u.login' => "User", + 'pndf.num_payment' => "Numero", + 'pndf.amount' => "Amount", ); $arrayfields = array( - 'pndf.rowid' =>array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), - 'pndf.datep' =>array('label'=>"Date", 'checked'=>1, 'position'=>20), - 'u.login' =>array('label'=>"User", 'checked'=>1, 'position'=>30), - 'c.libelle' =>array('label'=>"Type", 'checked'=>1, 'position'=>40), - 'pndf.num_payment' =>array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"), - 'ba.label' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>60, 'enable'=>(isModEnabled("bank"))), - 'pndf.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70), + 'pndf.rowid' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10), + 'pndf.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20), + 'u.login' => array('label' => "User", 'checked' => 1, 'position' => 30), + 'c.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 40), + 'pndf.num_payment' => array('label' => "Numero", 'checked' => 1, 'position' => 50, 'tooltip' => "ChequeOrTransferNumber"), + 'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 60, 'enable' => (isModEnabled("bank"))), + 'pndf.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 70), ); $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -138,7 +138,7 @@ if (!$user->hasRight('expensereport', 'lire')) { $childids = $user->getAllChildIds(1); -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -203,7 +203,7 @@ if ($search_date_start) { $sql .= " AND pndf.datep >= '" . $db->idate($search_date_start) . "'"; } if ($search_date_end) { - $sql .=" AND pndf.datep <= '" . $db->idate($search_date_end) . "'"; + $sql .= " AND pndf.datep <= '" . $db->idate($search_date_end) . "'"; } if ($search_user) { @@ -324,9 +324,10 @@ print ''; print ''; $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('ExpenseReportPayments'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'expensereport', 0, $newcardbutton, '', $limit, 0, 0, 1); if ($search_all) { @@ -425,7 +426,7 @@ if (!empty($arrayfields['pndf.amount']['checked'])) { } // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -481,7 +482,7 @@ if (!empty($arrayfields['pndf.amount']['checked'])) { } // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index d554bcb4927..20ac051bb84 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -113,11 +113,11 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'f.ref'=>'Ref', - 's.nom'=>"ThirdParty", - 'f.description'=>'Description', - 'f.note_public'=>'NotePublic', - 'fd.description'=>'DescriptionOfLine', + 'f.ref' => 'Ref', + 's.nom' => "ThirdParty", + 'f.description' => 'Description', + 'f.note_public' => 'NotePublic', + 'fd.description' => 'DescriptionOfLine', ); if (empty($user->socid)) { $fieldstosearchall["f.note_private"] = "NotePrivate"; @@ -128,20 +128,20 @@ if (getDolGlobalString('FICHINTER_DISABLE_DETAILS')) { // Definition of fields for list $arrayfields = array( - 'f.ref'=>array('label'=>'Ref', 'checked'=>1), - 'f.ref_client'=>array('label'=>'RefCustomer', 'checked'=>1), - 's.nom'=>array('label'=>'ThirdParty', 'checked'=>1), - 'pr.ref'=>array('label'=>'Project', 'checked'=>1, 'enabled'=>(!isModEnabled('project') ? 0 : 1)), - 'c.ref'=>array('label'=>'Contract', 'checked'=>1, 'enabled'=>(empty($conf->contrat->enabled) ? 0 : 1)), - 'f.description'=>array('label'=>'Description', 'checked'=>1), - 'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500), - 'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500), - 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), - 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), - 'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000), - 'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), - 'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), - 'fd.duree'=>array('label'=>'DurationOfLine', 'type'=> 'duration', 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), //type duration is here because in database, column 'duree' is double + 'f.ref' => array('label' => 'Ref', 'checked' => 1), + 'f.ref_client' => array('label' => 'RefCustomer', 'checked' => 1), + 's.nom' => array('label' => 'ThirdParty', 'checked' => 1), + 'pr.ref' => array('label' => 'Project', 'checked' => 1, 'enabled' => (!isModEnabled('project') ? 0 : 1)), + 'c.ref' => array('label' => 'Contract', 'checked' => 1, 'enabled' => (empty($conf->contrat->enabled) ? 0 : 1)), + 'f.description' => array('label' => 'Description', 'checked' => 1), + 'f.datec' => array('label' => 'DateCreation', 'checked' => 0, 'position' => 500), + 'f.tms' => array('label' => 'DateModificationShort', 'checked' => 0, 'position' => 500), + 'f.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 510, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), + 'f.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position' => 511, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), + 'f.fk_statut' => array('label' => 'Status', 'checked' => 1, 'position' => 1000), + 'fd.description' => array('label' => "DescriptionOfLine", 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), + 'fd.date' => array('label' => 'DateOfLine', 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), + 'fd.duree' => array('label' => 'DurationOfLine', 'type' => 'duration', 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), //type duration is here because in database, column 'duree' is double ); '@phan-var-force array{label:string,type?:string,checked:int,position?:int,enabled?:int,langfile?:string,help:string} $arrayfields'; // Extra fields @@ -174,7 +174,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -486,8 +486,8 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( - 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), - 'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), + 'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), //'presend'=>$langs->trans("SendByMail"), ); if (!empty($permissiontodelete)) { @@ -519,8 +519,8 @@ if (!empty($socid)) { $url .= '&socid='.$socid; } $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->hasRight('ficheinter', 'creer')); @@ -612,7 +612,7 @@ if (!empty($arrayfields['f.description']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['f.datec']['checked'])) { @@ -647,6 +647,7 @@ if (!empty($arrayfields['f.fk_statut']['checked'])) { if (!getDolGlobalString('FICHINTER_CLASSIFY_BILLED')) { unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1 } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1, 0, 0, '', 'search_status width100 onrightofpage'); print '
'; print ''; } @@ -942,9 +943,9 @@ while ($i < $imaxinloop) { if (!empty($arrayfields['f.unit_frequency']['checked'])) { print ''; @@ -1030,7 +1031,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Status @@ -1085,7 +1086,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 3aa79940b91..901419f4013 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -156,12 +156,12 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'f.ref'=>'Ref', - 'f.ref_supplier'=>'RefSupplier', - 'f.note_public'=>'NotePublic', - 's.nom'=>"ThirdParty", - 's.code_fournisseur'=>"SupplierCodeShort", - 'pd.description'=>'Description', + 'f.ref' => 'Ref', + 'f.ref_supplier' => 'RefSupplier', + 'f.note_public' => 'NotePublic', + 's.nom' => "ThirdParty", + 's.code_fournisseur' => "SupplierCodeShort", + 'pd.description' => 'Description', ); if (empty($user->socid)) { $fieldstosearchall["f.note_private"] = "NotePrivate"; @@ -169,42 +169,42 @@ if (empty($user->socid)) { $checkedtypetiers = 0; $arrayfields = array( - 'f.ref'=>array('label'=>"Ref", 'checked'=>1), - 'f.ref_supplier'=>array('label'=>"RefSupplier", 'checked'=>1), - 'f.type'=>array('label'=>"Type", 'checked'=>0), - 'f.subtype'=>array('label'=>"InvoiceSubtype", 'checked'=>0,), - 'f.label'=>array('label'=>"Label", 'checked'=>0), - 'f.datef'=>array('label'=>"DateInvoice", 'checked'=>1), - 'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1), - 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>0), - 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>41), - 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>0, 'position'=>42), - 's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>43), - 's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>44), - 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45), - 'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>46), - 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>49), - 'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>52), - 'f.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>1, 'position'=>50), - 'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>105), - 'f.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>110), - 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax1_assuj == "1", 'position'=>95), - 'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax2_assuj == "1", 'position'=>100), - 'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>115), - 'dynamount_payed'=>array('label'=>"Paid", 'checked'=>0, 'position'=>116), - 'rtp'=>array('label'=>"Rest", 'checked'=>0, 'position'=>117), - 'f.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'position'=>205, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), - 'f.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'position'=>206, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), - 'f.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'position'=>207, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), - 'f.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'position'=>208, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), - 'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'position'=>209, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), - 'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'position'=>210, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), - 'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'position'=>211, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), // Not enabled by default because slow - 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>500), - 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>501), - 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502), - 'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), - 'f.nb_docs'=>array('label'=>"Documents", 'checked'=>1, 'position'=>510), + 'f.ref' => array('label' => "Ref", 'checked' => 1), + 'f.ref_supplier' => array('label' => "RefSupplier", 'checked' => 1), + 'f.type' => array('label' => "Type", 'checked' => 0), + 'f.subtype' => array('label' => "InvoiceSubtype", 'checked' => 0,), + 'f.label' => array('label' => "Label", 'checked' => 0), + 'f.datef' => array('label' => "DateInvoice", 'checked' => 1), + 'f.date_lim_reglement' => array('label' => "DateDue", 'checked' => 1), + 'p.ref' => array('label' => "ProjectRef", 'checked' => 0), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 41), + 's.name_alias' => array('label' => "AliasNameShort", 'checked' => 0, 'position' => 42), + 's.town' => array('label' => "Town", 'checked' => -1, 'position' => 43), + 's.zip' => array('label' => "Zip", 'checked' => 1, 'position' => 44), + 'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 45), + 'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 46), + 'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 49), + 'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => 1, 'position' => 52), + 'f.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => 1, 'position' => 50), + 'f.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 105), + 'f.total_vat' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 110), + 'f.total_localtax1' => array('label' => $langs->transcountry("AmountLT1", $mysoc->country_code), 'checked' => 0, 'enabled' => $mysoc->localtax1_assuj == "1", 'position' => 95), + 'f.total_localtax2' => array('label' => $langs->transcountry("AmountLT2", $mysoc->country_code), 'checked' => 0, 'enabled' => $mysoc->localtax2_assuj == "1", 'position' => 100), + 'f.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 115), + 'dynamount_payed' => array('label' => "Paid", 'checked' => 0, 'position' => 116), + 'rtp' => array('label' => "Rest", 'checked' => 0, 'position' => 117), + 'f.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'position' => 205, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), + 'f.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'position' => 206, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), + 'f.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'position' => 207, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), + 'f.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'position' => 208, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), + 'f.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'position' => 209, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), + 'multicurrency_dynamount_payed' => array('label' => 'MulticurrencyAlreadyPaid', 'position' => 210, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), + 'multicurrency_rtp' => array('label' => 'MulticurrencyRemainderToPay', 'checked' => 0, 'position' => 211, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), // Not enabled by default because slow + 'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 500), + 'f.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 501), + 'f.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 502), + 'f.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000), + 'f.nb_docs' => array('label' => "Documents", 'checked' => 1, 'position' => 510), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -241,7 +241,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields); +$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -332,7 +332,7 @@ if (empty($reshook)) { $objecttmp->resteapayer = price2num($objecttmp->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits, 'MT'); // hook to finalize the remaining amount, considering e.g. cash discount agreements - $parameters = array('remaintopay'=>$objecttmp->resteapayer); + $parameters = array('remaintopay' => $objecttmp->resteapayer); $reshook = $hookmanager->executeHooks('finalizeAmountOfInvoice', $parameters, $objecttmp, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) { // print $hookmanager->resPrint; @@ -947,8 +947,8 @@ $param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( - 'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), - 'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), + 'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), + 'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); @@ -987,8 +987,8 @@ print ''; print ''; $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer"))); @@ -1094,10 +1094,10 @@ if (!empty($arrayfields['f.ref_supplier']['checked'])) { if (!empty($arrayfields['f.type']['checked'])) { print ''; } - // Invoice Subtype +// Invoice Subtype if (!empty($arrayfields['f.subtype']['checked'])) { print ''; } @@ -1468,7 +1469,7 @@ if (!empty($arrayfields['multicurrency_rtp']['checked'])) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (!empty($arrayfields['f.datec']['checked'])) { @@ -1503,11 +1504,11 @@ $savnbfield = $totalarray['nbfield']; $totalarray = array(); $totalarray['nbfield'] = 0; $totalarray['val'] = array(); -$totalarray['val']['f.total_ht']=0; -$totalarray['val']['f.total_vat']=0; -$totalarray['val']['f.total_localtax1']=0; -$totalarray['val']['f.total_localtax1']=0; -$totalarray['val']['f.total_ttc']=0; +$totalarray['val']['f.total_ht'] = 0; +$totalarray['val']['f.total_vat'] = 0; +$totalarray['val']['f.total_localtax1'] = 0; +$totalarray['val']['f.total_localtax1'] = 0; +$totalarray['val']['f.total_ttc'] = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); @@ -1987,7 +1988,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 28665f0a8c5..466f7beaedd 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -90,20 +90,20 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') : // List of fields to search into when doing a "search in all" $fieldstosearchall = array( - 'p.ref'=>"RefPayment", - 's.nom'=>"ThirdParty", - 'p.num_paiement'=>"Numero", - 'p.amount'=>"Amount", + 'p.ref' => "RefPayment", + 's.nom' => "ThirdParty", + 'p.num_paiement' => "Numero", + 'p.amount' => "Amount", ); $arrayfields = array( - 'p.ref' =>array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), - 'p.datep' =>array('label'=>"Date", 'checked'=>1, 'position'=>20), - 's.nom' =>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), - 'c.libelle' =>array('label'=>"Type", 'checked'=>1, 'position'=>40), - 'p.num_paiement' =>array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"), - 'ba.label' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>60, 'enable'=>(isModEnabled("bank"))), - 'p.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70), + 'p.ref' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10), + 'p.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20), + 's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30), + 'c.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 40), + 'p.num_paiement' => array('label' => "Numero", 'checked' => 1, 'position' => 50, 'tooltip' => "ChequeOrTransferNumber"), + 'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 60, 'enable' => (isModEnabled("bank"))), + 'p.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 70), ); $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -139,7 +139,7 @@ if ((!$user->hasRight("fournisseur", "facture", "lire") && !getDolGlobalString(' * Actions */ -$parameters = array('socid'=>$socid); +$parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -214,7 +214,7 @@ if ($search_date_start) { $sql .= " AND p.datep >= '" . $db->idate($search_date_start) . "'"; } if ($search_date_end) { - $sql .=" AND p.datep <= '" . $db->idate($search_date_end) . "'"; + $sql .= " AND p.datep <= '" . $db->idate($search_date_end) . "'"; } if ($search_company) { @@ -351,6 +351,7 @@ print ''; print ''; print ''; +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'supplier_invoice', 0, '', '', $limit, 0, 0, 1); if ($search_all) { @@ -458,7 +459,7 @@ if (!empty($arrayfields['p.amount']['checked'])) { } // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; @@ -517,7 +518,7 @@ if (!empty($arrayfields['p.amount']['checked'])) { } // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 589d1b0d82e..16157d26be6 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -157,15 +157,15 @@ if (empty($reshook)) { // Definition of fields for lists $arrayfields = array( - 'cpl.rowid'=>array('label'=>"ID", 'checked'=>1), - 'cpl.date_action'=>array('label'=>"Date", 'checked'=>1), - 'cpl.fk_user_action'=>array('label'=>"ActionByCP", 'checked'=>1), - 'cpl.fk_user_update'=>array('label'=>"UserUpdateCP", 'checked'=>1), - 'cpl.type_action'=>array('label'=>"Description", 'checked'=>1), - 'cpl.fk_type'=>array('label'=>"Type", 'checked'=>1), - 'cpl.prev_solde'=>array('label'=>"PrevSoldeCP", 'checked'=>1), - 'variation'=>array('label'=>"Variation", 'checked'=>1), - 'cpl.new_solde'=>array('label'=>"NewSoldeCP", 'checked'=>1), + 'cpl.rowid' => array('label' => "ID", 'checked' => 1), + 'cpl.date_action' => array('label' => "Date", 'checked' => 1), + 'cpl.fk_user_action' => array('label' => "ActionByCP", 'checked' => 1), + 'cpl.fk_user_update' => array('label' => "UserUpdateCP", 'checked' => 1), + 'cpl.type_action' => array('label' => "Description", 'checked' => 1), + 'cpl.fk_type' => array('label' => "Type", 'checked' => 1), + 'cpl.prev_solde' => array('label' => "PrevSoldeCP", 'checked' => 1), + 'variation' => array('label' => "Variation", 'checked' => 1), + 'cpl.new_solde' => array('label' => "NewSoldeCP", 'checked' => 1), ); @@ -286,6 +286,7 @@ print ''; print ''; $newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=create', '', $user->rights->holiday->write); +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('LogCP'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1); print '
'.$langs->trans('LastUpdateCP').': '; diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 5385c924a28..af35d75201f 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -233,7 +233,7 @@ if ($result) { $num = $db->num_rows($result); print '
'; - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1); if (getDolGlobalString('MARGIN_TYPE') == "1") { diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index 730f5ea1479..de7822b6198 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -248,6 +248,7 @@ if ($result) { $num = $db->num_rows($result); print '
'; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); if (getDolGlobalString('MARGIN_TYPE') == "1") { diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 9561ddf2f28..d30ef558ecf 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -303,7 +303,7 @@ if ($result) { $num = $db->num_rows($result); print '
'; - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1); if (getDolGlobalString('MARGIN_TYPE') == "1") { diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index b66bee3b605..fb1604c6d9f 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -253,7 +253,7 @@ if ($result) { $num = $db->num_rows($result); print '
'; - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1); //var_dump($conf->global->MARGIN_TYPE); diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index c2ec6485cf7..83b646baf29 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -199,7 +199,7 @@ if ($socid > 0) { if ($result) { $num = $db->num_rows($result); - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "&socid=".$object->id, $sortfield, $sortorder, '', $num, $num, ''); $i = 0; diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index 5d9fe35343b..9a11c59abd1 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -214,7 +214,7 @@ if ($id > 0 || $ref) { $param .= '&limit='.$limit; } - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ActionsOnProduct"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1); // List of all actions diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 5b6acca46ea..747604f0f70 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1705,10 +1705,10 @@ if ((!getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || $action == 'showlog_defau $backbutton = ''.$langs->trans("Back").''; if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("DefaultPriceLog"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, 0, $num, 'title_accountancy.png'); } else { - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, $num, 'title_accountancy.png'); } @@ -2140,6 +2140,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { $backbutton = ''.$langs->trans("Back").''; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $option, $sortfield, $sortorder, $backbutton, count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png'); if (count($prodcustprice->lines) > 0) { @@ -2259,6 +2260,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { $option = '&search_soc='.$search_soc.'&id='.$object->id; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('PriceByCustomer'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png'); print '
'; diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 0e7f8c297b5..315f39590d3 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -223,6 +223,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index b71ab30826b..d377ae40e0a 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -223,6 +223,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 8223a333022..870e7f81fda 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -81,7 +81,7 @@ if ($id > 0 || !empty($ref)) { $object = $product; - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -191,6 +191,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index b0b5ba6ea89..ad3e190e851 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -132,7 +132,7 @@ if ($id > 0 || !empty($ref)) { $object = $product; - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -297,6 +297,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { @@ -331,7 +332,7 @@ if ($id > 0 || !empty($ref)) { print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder); // Hook fields - $parameters = array('param'=>$option, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); + $parameters = array('param' => $option, 'sortfield' => $sortfield, 'sortorder' => $sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print "
\n"; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 7f68d34490d..faf752b71e9 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -205,6 +205,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stats/facturerec.php b/htdocs/product/stats/facturerec.php index 6ba186fb886..f25c3076b63 100644 --- a/htdocs/product/stats/facturerec.php +++ b/htdocs/product/stats/facturerec.php @@ -97,7 +97,7 @@ if ($id > 0 || !empty($ref)) { $object = $product; - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -223,6 +223,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index 998ca70a3db..d6727842ead 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -92,7 +92,7 @@ if ($id > 0 || !empty($ref)) { $object = $product; - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -201,6 +201,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index becd2350fdd..7ac396da333 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -207,6 +207,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php index 704ec0457c4..5e162e08339 100644 --- a/htdocs/product/stats/supplier_proposal.php +++ b/htdocs/product/stats/supplier_proposal.php @@ -206,6 +206,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stock/stats/commande_fournisseur.php b/htdocs/product/stock/stats/commande_fournisseur.php index 2d77dc86512..174be7e4486 100644 --- a/htdocs/product/stock/stats/commande_fournisseur.php +++ b/htdocs/product/stock/stats/commande_fournisseur.php @@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) { } $result = $object->fetch($id, $objectid, $batch); - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -283,6 +283,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stock/stats/expedition.php b/htdocs/product/stock/stats/expedition.php index 75be59f5d18..cc2a10c0592 100644 --- a/htdocs/product/stock/stats/expedition.php +++ b/htdocs/product/stock/stats/expedition.php @@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) { } $result = $object->fetch($id, $objectid, $batch); - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -282,6 +282,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Shipments"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/product/stock/stats/mo.php b/htdocs/product/stock/stats/mo.php index 174dea1507c..e48d44127c0 100644 --- a/htdocs/product/stock/stats/mo.php +++ b/htdocs/product/stock/stats/mo.php @@ -98,7 +98,7 @@ if ($id > 0 || !empty($ref)) { } $result = $object->fetch($id, $objectid, $batch); - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -224,6 +224,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { @@ -261,7 +262,7 @@ if ($id > 0 || !empty($ref)) { $motmp = new Mo($db); - $total_consumed=$total_produced=0; + $total_consumed = $total_produced = 0; if ($num > 0) { while ($i < min($num, $limit)) { @@ -271,8 +272,8 @@ if ($id > 0 || !empty($ref)) { $motmp->ref = $objp->ref; $motmp->status = $objp->status; - $total_consumed+=$objp->nb_consumed; - $total_produced+=$objp->nb_produced; + $total_consumed += $objp->nb_consumed; + $total_produced += $objp->nb_produced; print ''; print ''; // Date End print ''; @@ -539,6 +539,7 @@ print ''; @@ -546,7 +547,7 @@ print ''; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -592,7 +593,7 @@ $totalarray['nbfield']++; // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); +$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -784,7 +785,7 @@ while ($i < $imaxinloop) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column @@ -829,7 +830,7 @@ if ($num == 0) { $db->free($resql); -$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index d2bad348b37..0e0031e6f9c 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -75,7 +75,7 @@ $hookmanager->initHooks(array('thirdpartynotification', 'globalcard')); * Actions */ -$parameters = array('id'=>$socid); +$parameters = array('id' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -286,7 +286,7 @@ if ($result > 0) { print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone'); print ''; print ''; print ''; @@ -447,7 +447,7 @@ if ($result > 0) { print ''; print ''; - // List of active notifications + // List of active notifications @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); // Line with titles diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index fdafc97e55b..55d0091a80b 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -74,7 +74,7 @@ $error = 0; * Actions */ -$parameters = array('id'=>$socid); +$parameters = array('id' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -467,6 +467,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { $option = '&socid='.GETPOSTINT('socid').'&prodid='.GETPOSTINT('prodid'); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('PriceByCustomerLog'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords); if (count($prodcustprice->lines) > 0) { @@ -544,11 +545,11 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { if (!empty($val['visible'])) { $visible = (int) dol_eval($val['visible'], 1, 1, '1'); $arrayfields['t.'.$key] = array( - 'label'=>$val['label'], - 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')), - 'position'=>$val['position'], - 'help'=> isset($val['help']) ? $val['help'] : '' + 'label' => $val['label'], + 'checked' => (($visible < 0) ? 0 : 1), + 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')), + 'position' => $val['position'], + 'help' => isset($val['help']) ? $val['help'] : '' ); } } @@ -569,6 +570,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { print ''."\n"; + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('PriceForEachProduct'), $page, $_SERVER['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, ''); print ''; diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index d3588e83ff4..8112a219016 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -273,7 +273,7 @@ if ($result > 0) { // List of active notifications //print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', ''); - // @phan-suppress-next-line PhanPluginSuspiciousParamPosition + // @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1); // Line with titles @@ -472,7 +472,7 @@ if ($result > 0) { print ''; print ''; - // List of notifications done + // List of notifications done @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'email', 0, '', '', $limit); // Line with titles
'; diff --git a/htdocs/fourn/facture/list-rec.php b/htdocs/fourn/facture/list-rec.php index 578d58a0117..00e7c8c0a67 100644 --- a/htdocs/fourn/facture/list-rec.php +++ b/htdocs/fourn/facture/list-rec.php @@ -135,24 +135,24 @@ if (!$sortfield) { $sortfield = 'f.titre'; } $arrayfields = array( - 'f.titre'=>array('label'=>'Ref', 'checked'=>1), - 's.nom'=>array('label'=>'ThirdParty', 'checked'=>1), - 'f.total_ht'=>array('label'=>'AmountHT', 'checked'=>1), - 'f.total_tva'=>array('label'=>'AmountVAT', 'checked'=>1), - 'f.total_ttc'=>array('label'=>'AmountTTC', 'checked'=>1), - 'f.fk_mode_reglement'=>array('label'=>'PaymentMode', 'checked'=>0), - 'f.fk_cond_reglement'=>array('label'=>'PaymentTerm', 'checked'=>0), - 'recurring'=>array('label'=>'RecurringInvoice', 'checked'=>1), - 'f.frequency'=>array('label'=>'Frequency', 'checked'=>1), - 'f.unit_frequency'=>array('label'=>'FrequencyUnit', 'checked'=>1), - 'f.nb_gen_done'=>array('label'=>'NbOfGenerationDoneShort', 'checked'=>1), - 'f.date_last_gen'=>array('label'=>'DateLastGenerationShort', 'checked'=>1), - 'f.date_when'=>array('label'=>'NextDateToExecutionShort', 'checked'=>1), - 'f.fk_user_author'=>array('label'=>'UserCreation', 'checked'=>0, 'position'=>500), - 'f.fk_user_modif'=>array('label'=>'UserModification', 'checked'=>0, 'position'=>505), - 'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>520), - 'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>525), - 'status'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000), + 'f.titre' => array('label' => 'Ref', 'checked' => 1), + 's.nom' => array('label' => 'ThirdParty', 'checked' => 1), + 'f.total_ht' => array('label' => 'AmountHT', 'checked' => 1), + 'f.total_tva' => array('label' => 'AmountVAT', 'checked' => 1), + 'f.total_ttc' => array('label' => 'AmountTTC', 'checked' => 1), + 'f.fk_mode_reglement' => array('label' => 'PaymentMode', 'checked' => 0), + 'f.fk_cond_reglement' => array('label' => 'PaymentTerm', 'checked' => 0), + 'recurring' => array('label' => 'RecurringInvoice', 'checked' => 1), + 'f.frequency' => array('label' => 'Frequency', 'checked' => 1), + 'f.unit_frequency' => array('label' => 'FrequencyUnit', 'checked' => 1), + 'f.nb_gen_done' => array('label' => 'NbOfGenerationDoneShort', 'checked' => 1), + 'f.date_last_gen' => array('label' => 'DateLastGenerationShort', 'checked' => 1), + 'f.date_when' => array('label' => 'NextDateToExecutionShort', 'checked' => 1), + 'f.fk_user_author' => array('label' => 'UserCreation', 'checked' => 0, 'position' => 500), + 'f.fk_user_modif' => array('label' => 'UserModification', 'checked' => 0, 'position' => 505), + 'f.datec' => array('label' => 'DateCreation', 'checked' => 0, 'position' => 520), + 'f.tms' => array('label' => 'DateModificationShort', 'checked' => 0, 'position' => 525), + 'status' => array('label' => 'Status', 'checked' => 1, 'position' => 1000), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -524,7 +524,7 @@ $arrayofmassactions = array( //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); +$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend' => $langs->trans("SendByMail"), 'builddoc' => $langs->trans("PDFMerge"))); $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) : ''); // This also change content of $arrayfields @@ -675,7 +675,7 @@ if (!empty($arrayfields['f.date_when']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // User creation @@ -702,10 +702,11 @@ if (!empty($arrayfields['f.tms']['checked'])) { if (!empty($arrayfields['status']['checked'])) { print ''; $liststatus = array( - 0=>$langs->trans("Draft"), - 1=>$langs->trans("Active"), - -1=>$langs->trans("Disabled"), + 0 => $langs->trans("Draft"), + 1 => $langs->trans("Active"), + -1 => $langs->trans("Disabled"), ); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, -2, 0, 0, '', 0, 0, 0, '', 'width100 onrightofpage'); print ''; if ($objp->frequency > 1) { - $dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); + $dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years")); } else { - $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); + $dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year")); } print($objp->frequency > 0 ? $dur[$objp->unit_frequency] : ''); print ''; $listtype = array( - FactureFournisseur::TYPE_STANDARD=>$langs->trans("InvoiceStandard"), - FactureFournisseur::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"), - FactureFournisseur::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"), - FactureFournisseur::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"), + FactureFournisseur::TYPE_STANDARD => $langs->trans("InvoiceStandard"), + FactureFournisseur::TYPE_REPLACEMENT => $langs->trans("InvoiceReplacement"), + FactureFournisseur::TYPE_CREDIT_NOTE => $langs->trans("InvoiceAvoir"), + FactureFournisseur::TYPE_DEPOSIT => $langs->trans("InvoiceDeposit"), ); /* if (!empty($conf->global->INVOICE_USE_SITUATION)) @@ -1109,7 +1109,7 @@ if (!empty($arrayfields['f.type']['checked'])) { print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100'); print ''; print $form->selectarray('search_subtype', $subtypearray, $search_subtype, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); @@ -1289,7 +1289,7 @@ if (!empty($arrayfields['multicurrency_rtp']['checked'])) { include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; // Fields from hook -$parameters = array('arrayfields'=>$arrayfields); +$parameters = array('arrayfields' => $arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation @@ -1305,7 +1305,8 @@ if (!empty($arrayfields['f.tms']['checked'])) { // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { print ''; - $liststatus = array('0'=>$langs->trans("Draft"), '1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid")); + $liststatus = array('0' => $langs->trans("Draft"), '1' => $langs->trans("Unpaid"), '2' => $langs->trans("Paid")); + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'center search_status width100 onrightofpage', 1); print '
'; diff --git a/htdocs/product/stock/stats/reception.php b/htdocs/product/stock/stats/reception.php index 26e6455ad32..08839af5749 100644 --- a/htdocs/product/stock/stats/reception.php +++ b/htdocs/product/stock/stats/reception.php @@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) { } $result = $object->fetch($id, $objectid, $batch); - $parameters = array('id'=>$id); + $parameters = array('id' => $id); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -281,6 +281,7 @@ if ($id > 0 || !empty($ref)) { print ''; } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Receptions"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); if (!empty($page)) { diff --git a/htdocs/public/webportal/tpl/menu.tpl.php b/htdocs/public/webportal/tpl/menu.tpl.php index 2275d8e8496..91edea91acb 100644 --- a/htdocs/public/webportal/tpl/menu.tpl.php +++ b/htdocs/public/webportal/tpl/menu.tpl.php @@ -112,10 +112,13 @@ $parameters = array( ); $reshook = $hookmanager->executeHooks('PrintTopMenu', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook -if ($reshook < 0) $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} if (empty($reshook)) { if (!empty($hookmanager->resArray)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $navMenu = array_replace($navMenu, $hookmanager->resArray); } diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index 347ed2c756a..f1b8c29eb6c 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -886,6 +886,7 @@ print ''; print ''; print ''; +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans('ListOfReceptions'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dollyrevert', 0, $newcardbutton, '', $limit, 0, 0, 1); if ($massaction == 'createbills') { diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index e9707f39d44..fd5a1a88d06 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -297,7 +297,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio if (file_exists($dir)) { // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks // Set nblines with the new facture lines content after hook @@ -358,6 +358,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info); } + // @phan-suppress-next-line PhanPluginSuspiciousParamOrder $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right // New page @@ -627,9 +628,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio $parameters = array( 'object' => $object, 'i' => $i, - 'pdf' =>& $pdf, - 'curY' =>& $curY, - 'nexY' =>& $nexY, + 'pdf' => & $pdf, + 'curY' => & $curY, + 'nexY' => & $nexY, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails ); @@ -711,7 +712,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // Add pdfgeneration hook $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); global $action; $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { @@ -721,7 +722,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio dolChmod($file); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // No error } else { @@ -1261,6 +1262,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } elseif (empty($reshook)) { + // @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys } else { $this->cols = $hookmanager->resArray; diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 80e4dd7baf1..3b1beab890d 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -128,11 +128,11 @@ foreach ($object->fields as $key => $val) { if (!empty($val['visible'])) { $visible = (int) dol_eval($val['visible'], 1); $arrayfields['t.'.$key] = array( - 'label'=>$val['label'], - 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), - 'position'=>$val['position'], - 'help'=> isset($val['help']) ? $val['help'] : '' + 'label' => $val['label'], + 'checked' => (($visible < 0) ? 0 : 1), + 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'position' => $val['position'], + 'help' => isset($val['help']) ? $val['help'] : '' ); } } @@ -439,8 +439,8 @@ if (!empty($socid)) { } $newcardbutton = ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition')); -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitleSeparator(); $newcardbutton .= dolGetButtonTitle($langs->trans('NewSalary'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd); @@ -499,20 +499,20 @@ print ''; print '
'; - print $form->selectDate($search_date_start_from ? $search_date_start_from : -1, 'search_date_start_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); +print $form->selectDate($search_date_start_from ? $search_date_start_from : -1, 'search_date_start_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
'; print '
'; - print $form->selectDate($search_date_start_to ? $search_date_start_to : -1, 'search_date_start_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); +print $form->selectDate($search_date_start_to ? $search_date_start_to : -1, 'search_date_start_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
'; print '
'; print '
'; - print $form->selectDate($search_date_end_from ? $search_date_end_from : -1, 'search_date_end_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); +print $form->selectDate($search_date_end_from ? $search_date_end_from : -1, 'search_date_end_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
'; print '
'; - print $form->selectDate($search_date_end_to ? $search_date_end_to : -1, 'search_date_end_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); +print $form->selectDate($search_date_end_to ? $search_date_end_to : -1, 'search_date_end_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
'; print '
'; $liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid")); +// @phan-suppress-next-line PhanPluginSuspiciousParamOrder print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage'); print ''; - $type = array('email'=>$langs->trans("EMail")); + $type = array('email' => $langs->trans("EMail")); print $form->selectarray("typeid", $type, '', 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); print '