From d770d37e298842e861f4b2db3368ab0e6f73ef01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 15 Jan 2026 16:05:06 +0100 Subject: [PATCH] add phpcs rule extension (#36561) * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * add phpcs rule extension * test * test * test * test * test * test * fix * fix * fix * fix * fix * fix * fix translations * fix translations * translate * translate * translate * translate * translate * translate * translate * Update propal.class.php --- .../CheckIsModEnabledArgumentSniff.php | 103 ++++++++++++++++ .../Dolibarr/LanguageOfCommentsSniff.php | 112 ++++++++++++++++++ dev/setup/codesniffer/ruleset.xml | 29 +++-- htdocs/accountancy/admin/accountmodel.php | 13 +- htdocs/accountancy/admin/productaccount.php | 77 ++++++------ htdocs/adherents/class/adherent.class.php | 19 +-- htdocs/adherents/class/subscription.class.php | 2 +- htdocs/asset/accountancy_codes.php | 2 +- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/comm/propal/class/propal.class.php | 41 +++---- .../comm/propal/class/propaleligne.class.php | 18 +-- htdocs/commande/class/commande.class.php | 29 ++--- htdocs/commande/class/orderline.class.php | 6 +- htdocs/compta/bank/class/account.class.php | 8 +- .../deplacement/class/deplacement.class.php | 4 +- .../facture/class/facture-rec.class.php | 13 +- htdocs/compta/facture/class/facture.class.php | 36 +++--- .../compta/localtax/class/localtax.class.php | 6 +- .../cheque/class/remisecheque.class.php | 6 +- .../compta/paiement/class/paiement.class.php | 2 +- .../class/bonprelevement.class.php | 2 +- .../class/paymentsocialcontribution.class.php | 2 +- htdocs/compta/tva/class/paymentvat.class.php | 2 +- htdocs/contrat/class/contrat.class.php | 21 ++-- htdocs/contrat/class/contratligne.class.php | 11 +- .../accountancy/mod_bookkeeping_helium.php | 4 +- .../core/modules/asset/mod_asset_advanced.php | 4 +- htdocs/core/modules/bom/mod_bom_advanced.php | 4 +- .../cheque/mod_chequereceipt_thyme.php | 4 +- .../modules/commande/mod_commande_saphir.php | 4 +- .../modules/delivery/mod_delivery_jade.php | 2 +- .../modules/delivery/mod_delivery_saphir.php | 6 +- .../expedition/mod_expedition_ribera.php | 4 +- .../expedition/mod_expedition_safor.php | 2 +- .../expensereport/mod_expensereport_jade.php | 2 +- .../expensereport/mod_expensereport_sand.php | 6 +- htdocs/core/modules/fichinter/mod_arctic.php | 4 +- htdocs/core/modules/fichinter/mod_pacific.php | 2 +- .../modules/hrm/mod_evaluation_advanced.php | 4 +- .../core/modules/member/mod_member_custom.php | 3 +- htdocs/core/modules/mrp/mod_mo_advanced.php | 4 +- .../core/modules/payment/mod_payment_ant.php | 3 +- .../modules/payment/mod_payment_cicada.php | 2 +- .../product/mod_codeproduct_elephant.php | 18 +-- .../product_batch/mod_lot_advanced.php | 4 +- .../modules/product_batch/mod_sn_advanced.php | 4 +- .../modules/project/mod_project_simple.php | 2 +- .../modules/project/mod_project_universal.php | 4 +- .../project/task/mod_task_universal.php | 4 +- .../modules/propale/mod_propale_marbre.php | 2 +- .../modules/propale/mod_propale_saphir.php | 6 +- .../societe/mod_codeclient_elephant.php | 6 +- .../mod_stocktransfer_advanced.php | 4 +- .../mod_facture_fournisseur_cactus.php | 4 +- .../mod_facture_fournisseur_tulip.php | 4 +- .../mod_commande_fournisseur_muguet.php | 2 +- .../mod_commande_fournisseur_orchidee.php | 6 +- .../mod_supplier_payment_brodator.php | 6 +- .../mod_supplier_payment_bronan.php | 2 +- .../mod_supplier_proposal_marbre.php | 2 +- .../mod_supplier_proposal_saphir.php | 5 +- .../core/modules/ticket/mod_ticket_simple.php | 2 +- .../modules/ticket/mod_ticket_universal.php | 4 +- .../workstation/mod_workstation_advanced.php | 4 +- htdocs/delivery/class/delivery.class.php | 4 +- htdocs/don/class/don.class.php | 4 +- htdocs/ecm/class/ecmdirectory.class.php | 2 +- .../class/expensereport.class.php | 2 +- .../class/paymentexpensereport.class.php | 4 +- .../fichinter/class/fichinterligne.class.php | 6 +- htdocs/fichinter/class/fichinterrec.class.php | 9 +- .../class/fournisseur.commande.class.php | 26 ++-- .../class/fournisseur.facture-rec.class.php | 14 +-- .../fourn/class/fournisseur.facture.class.php | 20 ++-- .../class/fournisseur.facture.ligne.class.php | 10 +- .../class/fournisseur.orderline.class.php | 4 +- htdocs/fourn/class/paiementfourn.class.php | 41 ++++--- htdocs/holiday/class/holiday.class.php | 16 +-- htdocs/imports/class/import.class.php | 12 +- .../mod_knowledgerecord_advanced.php | 4 +- htdocs/opensurvey/results.php | 77 ++++++------ .../partnership/mod_partnership_advanced.php | 4 +- htdocs/projet/class/task.class.php | 4 +- htdocs/reception/class/reception.class.php | 2 +- .../mod_recruitmentcandidature_advanced.php | 4 +- .../mod_recruitmentjobposition_advanced.php | 4 +- .../class/html.formresource.class.php | 10 +- htdocs/salaries/class/paymentsalary.class.php | 2 +- .../class/supplier_proposal.class.php | 53 ++++----- htdocs/user/class/user.class.php | 15 +-- test/phpunit/CommandeTest.php | 2 +- test/phpunit/FactureTest.php | 2 +- 92 files changed, 639 insertions(+), 443 deletions(-) create mode 100644 dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php create mode 100644 dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php diff --git a/dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php b/dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php new file mode 100644 index 00000000000..0f5c435a9a8 --- /dev/null +++ b/dev/setup/codesniffer/Sniffs/Dolibarr/CheckIsModEnabledArgumentSniff.php @@ -0,0 +1,103 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +namespace codesniffer\Sniffs\Dolibarr; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +/** + * CheckIsModEnabledArgumentSniff + */ +class CheckIsModEnabledArgumentSniff implements Sniff +{ + // Nom de la fonction cible + protected $targetFunction = 'ismodenabled'; + + protected $deprecatedModulesNames = [ + 'actioncomm' => 'agenda', + 'adherent' => 'member', + 'adherent_type' => 'member_type', + 'banque' => 'bank', + 'categorie' => 'category', + 'commande' => 'order', + 'contrat' => 'contract', + 'entrepot' => 'stock', + 'expedition' => 'shipping', + 'facture' => 'invoice', + 'ficheinter' => 'intervention', + 'product_fournisseur_price' => 'productsupplierprice', + 'product_price' => 'productprice', + 'projet' => 'project', + 'propale' => 'propal', + 'socpeople' => 'contact', + ]; + + /** + * register + * + * @return void + */ + public function register() + { + // We are listening function calls (T_STRING) + return [T_STRING]; + } + + /** + * process + * + * @param File $phpcsFile file to process + * @param mixed $stackPtr pointer + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + + if (strtolower($tokens[$stackPtr]['content']) !== strtolower($this->targetFunction)) { + return; + } + + // Check that it is a function call (followed by '(') + $openParen = $phpcsFile->findNext(T_WHITESPACE, $stackPtr + 1, null, true); + if ($tokens[$openParen]['code'] !== T_OPEN_PARENTHESIS) { + return; + } + + // We are looking for the first 'useful' token after the parenthesis + $firstArgTokenPtr = $phpcsFile->findNext(T_WHITESPACE, $openParen + 1, null, true); + + // If the function is called without arguments (isModEnabled()), we stop + if ($tokens[$firstArgTokenPtr]['code'] === T_CLOSE_PARENTHESIS) { + return; + } + + // check value of argument + $argContent = str_replace(["'", '"'], '', $tokens[$firstArgTokenPtr]['content']); + $argCode = $tokens[$firstArgTokenPtr]['code']; + + if (array_key_exists($argContent, $this->deprecatedModulesNames)) { + $phpcsFile->addError( + 'The function "%s" has deprecated argument ("%s") to replace with "%s".', + $firstArgTokenPtr, + 'DeprecatedArgument', + [$tokens[$stackPtr]['content'], $argContent, $this->deprecatedModulesNames[$argContent]] + ); + } + } +} diff --git a/dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php b/dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php new file mode 100644 index 00000000000..1a80a8d9ad6 --- /dev/null +++ b/dev/setup/codesniffer/Sniffs/Dolibarr/LanguageOfCommentsSniff.php @@ -0,0 +1,112 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +namespace codesniffer\Sniffs\Dolibarr; + +use PHP_CodeSniffer\Sniffs\Sniff; +use PHP_CodeSniffer\Files\File; + +/** + * LanguageOfCommentsSniff + */ +class LanguageOfCommentsSniff implements Sniff +{ + // List of words that betray a comment in French + public $frenchWords = [ + ' additionner ', + ' arrondir ', + ' avec ', + ' calculer ', + ' chaine ', + ' chaîne ', + ' chercher ', + ' chiffre ', + ' chiffres ', + // ' commande ', + ' commandes ', + ' compteur ', + ' compteurs ', + ' contrats ', + ' depuis ', + ' diviser ', + ' donnée ', + ' entier ', + // ' facture ', // avoid french name of dolibarr object + ' factures ', + ' ligne ', + ' lignes ', + ' modèle ', + ' niveau ', + ' niveaux ', + ' nombre ', + ' parametrage ', + ' paramétrage ', + ' pourcentage ', + ' produit ', + ' produits ', + ' quand ', + ' rechercher ', + ' sinon ', + ' stocker ', + ' soustraire ', + ' sujet ', + ' sujets ', + ' suppression ', + ' utilisateur ', + ' utilisateurs ', + ' valeur ', + ' valeurs ', + ]; + + /** + * Which tokens to listen ? + * T_COMMENT = comments // or # + * T_DOC_COMMENT_STRING = text in block comments + * @return int[] + */ + public function register() + { + return [ + T_COMMENT, + T_DOC_COMMENT_STRING, + ]; + } + + /** + * process + * + * @param File $phpcsFile file to process + * @param mixed $stackPtr pointer + * @return void + */ + public function process(File $phpcsFile, $stackPtr) + { + $tokens = $phpcsFile->getTokens(); + $content = $tokens[$stackPtr]['content']; + + // Basic cleanup (lowercase for comparison) + $contentLower = strtolower($content); + + foreach ($this->frenchWords as $word) { + if (strpos($contentLower, $word) !== false) { + $error = "The comment appears to be in French (word detected: '%s'). Please write in English."; + $data = [trim($word)]; + $phpcsFile->addWarning($error, $stackPtr, 'FrenchDetected', $data); + return; // We stop at the first occurrence. + } + } + } +} diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 908365eb98c..1996d0c423c 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -21,6 +21,11 @@ /\.git/ /\.cache/ + + + + + @@ -31,12 +36,12 @@ + --> @@ -76,16 +81,16 @@ 0 - - + + 4 - - + + 4 - - + + 4 - + diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index a3fc3777c8a..3419eb1a020 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -245,7 +245,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($ok && GETPOST('actionmodify', 'alpha')) { // Modify entry $sql = "UPDATE ".$db->sanitize($tabname[$id])." SET "; - // Modifie valeur des champs + // Change field's value $i = 0; foreach ($listfieldmodify as $field) { @@ -268,7 +268,6 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { $sql .= " WHERE rowid = ".((int) $rowid); dol_syslog("actionmodify", LOG_DEBUG); - //print $sql; $resql = $db->query($sql); if (!$resql) { setEventMessages($db->error(), null, 'errors'); @@ -327,13 +326,13 @@ $linkback = ''; print load_fiche_titre($titre, $linkback, 'title_accountancy'); -// Confirmation de la suppression de la ligne +// Confirmation of line deletion if ($action == 'delete') { print $form->formconfirm(dolBuildUrl($_SERVER["PHP_SELF"], ['page'=> $page, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'rowid' => $rowid, 'code' => $code, 'id' => $id]), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } -// Complete requete recherche valeurs avec critere de tri +// Complete the values search query with the sort order $sql = $tabsql[$id]; if ($search_country_id > 0) { @@ -351,7 +350,6 @@ if ($sortfield == 'country') { } $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($listlimit + 1, $offset); -//print $sql; $fieldlist = explode(',', $tabfield[$id]); @@ -368,8 +366,8 @@ $fieldlist = explode(',', $tabfield[$id]); // Line for title print ''; foreach ($fieldlist as $field => $value) { - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees + // Determine the field name based on the possible names + // in the data dictionaries $valuetoshow = ucfirst($fieldlist[$field]); // By default $valuetoshow = $langs->trans($valuetoshow); // try to translate $class = "left"; @@ -393,7 +391,6 @@ foreach ($fieldlist as $field => $value) { if ($fieldlist[$field] == 'pcg_version' || $fieldlist[$field] == 'fk_pcg_version') { $valuetoshow = $langs->trans("Pcg_version"); } - //var_dump($value); if ($valuetoshow != '') { print ''; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 6c5228dd14d..5ced2f9185b 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -552,10 +552,12 @@ if ($resql) { if ($massaction == 'set_default_account') { $formquestion = array(); - $formquestion[] = array('type' => 'other', + $formquestion[] = array( + 'type' => 'other', 'name' => 'set_default_account', 'label' => $langs->trans("AccountancyCode"), - 'value' => $form->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone')); + 'value' => $form->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone') + ); print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmPreselectAccount"), $langs->trans("ConfirmPreselectAccountQuestion", $nbselected), "confirm_set_default_account", $formquestion, 1, 0, 200, 500, 1); } @@ -662,7 +664,7 @@ if ($resql) { while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); - // Ref produit as link + // Product ref as link $product_static->ref = $obj->ref; $product_static->id = $obj->rowid; $product_static->type = $obj->product_type; @@ -907,49 +909,48 @@ if ($resql) { } print ''; print ''; + ?> + '; + jQuery("#search_current_account").keyup(function() { + if (jQuery("#search_current_account").val() != '') { + console.log("We set a value of account to search " + jQuery("#search_current_account").val() + ", so we disable the other search criteria on account"); + jQuery("#search_current_account_valid").val(-1); + } + }); + }); + + '; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0d161ce3834..ab238385feb 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2191,7 +2191,7 @@ class Adherent extends CommonObject $now = dol_now(); // Check parameters - if ($this->statut == self::STATUS_VALIDATED) { + if ($this->status == self::STATUS_VALIDATED) { dol_syslog(get_class($this)."::validate statut of member does not allow this", LOG_WARNING); return 0; } @@ -2208,6 +2208,7 @@ class Adherent extends CommonObject $result = $this->db->query($sql); if ($result) { $this->statut = self::STATUS_VALIDATED; + $this->status = self::STATUS_VALIDATED; // Call trigger $result = $this->call_trigger('MEMBER_VALIDATE', $user); @@ -2231,7 +2232,7 @@ class Adherent extends CommonObject /** - * Fonction qui resilie un adherent + * Function that terminates a member * * @param User $user User making change * @return int Return integer <0 if KO, >0 if OK @@ -2243,7 +2244,7 @@ class Adherent extends CommonObject $error = 0; // Check parameters - if ($this->statut == self::STATUS_RESILIATED) { + if ($this->status == self::STATUS_RESILIATED) { dol_syslog(get_class($this)."::resiliate statut of member does not allow this", LOG_WARNING); return 0; } @@ -2258,6 +2259,7 @@ class Adherent extends CommonObject $result = $this->db->query($sql); if ($result) { $this->statut = self::STATUS_RESILIATED; + $this->status = self::STATUS_RESILIATED; // Call trigger $result = $this->call_trigger('MEMBER_RESILIATE', $user); @@ -2291,7 +2293,7 @@ class Adherent extends CommonObject $error = 0; // Check parameters - if ($this->statut == self::STATUS_EXCLUDED) { + if ($this->status == self::STATUS_EXCLUDED) { dol_syslog(get_class($this)."::resiliate statut of member does not allow this", LOG_WARNING); return 0; } @@ -2306,6 +2308,7 @@ class Adherent extends CommonObject $result = $this->db->query($sql); if ($result) { $this->statut = self::STATUS_EXCLUDED; + $this->status = self::STATUS_EXCLUDED; // Call trigger $result = $this->call_trigger('MEMBER_EXCLUDE', $user); @@ -2515,7 +2518,7 @@ class Adherent extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $notooltip 1=Disable tooltip * @param int $addlinktonotes 1=Add link to notes - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0) { @@ -2746,7 +2749,7 @@ class Adherent extends CommonObject global $conf, $langs; if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } $now = dol_now(); @@ -2921,7 +2924,7 @@ class Adherent extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** - * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet + * Returns the complete DN (Distinguished Name) string in the LDAP directory for the object * * @param array $info Info array loaded by _load_ldap_info * @param int<0,2> $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb) @@ -3147,7 +3150,7 @@ class Adherent extends CommonObject $sql = "SELECT count(mc.email) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.email = '".$this->db->escape($this->email)."'"; - $sql .= " AND mc.statut NOT IN (-1,0)"; // -1 erreur, 0 non envoye, 1 envoye avec success + $sql .= " AND mc.statut NOT IN (-1,0)"; // -1 error, 0 not sent, 1 sent with success $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 4956e3e767d..051af23b95e 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -431,7 +431,7 @@ class Subscription extends CommonObject * @param string $option Page for link ('', 'nolink', ...) * @param string $morecss Add more css on link * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $notooltip = 0, $option = '', $morecss = '', $save_lastsearch_value = -1) { diff --git a/htdocs/asset/accountancy_codes.php b/htdocs/asset/accountancy_codes.php index f8cd918f988..82c6f58207b 100644 --- a/htdocs/asset/accountancy_codes.php +++ b/htdocs/asset/accountancy_codes.php @@ -1,7 +1,7 @@ * Copyright (C) 2018 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 5dfd1defc05..0cec40eebe7 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1795,7 +1795,7 @@ class ActionComm extends CommonObject * @param int<0,1> $overwritepicto 1 = Overwrite picto with this one * @param int<0,1> $notooltip 1 = Disable tooltip * @param int<-1,1> $save_lastsearch_value -1 = Auto, 0 = No save of lastsearch_values when clicking, 1 = Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlength = 0, $morecss = '', $option = '', $overwritepicto = 0, $notooltip = 0, $save_lastsearch_value = -1) { diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 89a439f8729..26a8e192211 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -565,11 +565,11 @@ class Propal extends CommonObject $line->fk_propal = $this->id; $line->fk_remise_except = $remise->id; - $line->desc = $remise->description; // Description ligne + $line->desc = $remise->description; // Line Description $line->vat_src_code = $remise->vat_src_code; $line->tva_tx = $remise->tva_tx; $line->subprice = -(float) $remise->amount_ht; - $line->fk_product = 0; // Id produit predefined + $line->fk_product = 0; // Product Id predefined $line->qty = 1; $line->remise_percent = 0; $line->rang = -1; @@ -614,9 +614,9 @@ class Propal extends CommonObject * @param float $txlocaltax1 Local tax 1 rate (deprecated, use instead txtva with code inside) * @param float $txlocaltax2 Local tax 2 rate (deprecated, use instead txtva with code inside) * @param int $fk_product Product/Service ID predefined - * @param float $remise_percent Pourcentage de remise de la ligne + * @param float $remise_percent Line discount percentage * @param 'HT'|'TTC'|'' $price_base_type HT or TTC or '' for subtotals - * @param float $pu_ttc Prix unitaire TTC + * @param float $pu_ttc Unit Price with tax (TTC) * @param int $info_bits Bits for type of lines * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line @@ -734,10 +734,9 @@ class Propal extends CommonObject } } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); @@ -962,10 +961,9 @@ class Propal extends CommonObject if ($this->status == self::STATUS_DRAFT) { $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); @@ -1328,7 +1326,6 @@ class Propal extends CommonObject } /* - * Insertion du detail des produits dans la base * Insert products detail in database */ if (!$error) { @@ -1732,7 +1729,7 @@ class Propal extends CommonObject $this->fk_project = $obj->fk_project; $this->project = null; // Clear if another value was already set by fetchProject - $this->model_pdf = $obj->model_pdf; + $this->model_pdf = $obj->model_pdf; $this->last_main_doc = $obj->last_main_doc; $this->note = $obj->note_private; // TODO deprecated $this->note_private = $obj->note_private; @@ -1783,9 +1780,9 @@ class Propal extends CommonObject $this->label_incoterms = $obj->label_incoterms; // Multicurrency - $this->fk_multicurrency = $obj->fk_multicurrency; + $this->fk_multicurrency = $obj->fk_multicurrency; $this->multicurrency_code = $obj->multicurrency_code; - $this->multicurrency_tx = $obj->multicurrency_tx; + $this->multicurrency_tx = $obj->multicurrency_tx; $this->multicurrency_total_ht = $obj->multicurrency_total_ht; $this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; @@ -1979,9 +1976,9 @@ class Propal extends CommonObject $line->id = $objp->rowid; $line->fk_propal = $objp->fk_propal; $line->fk_parent_line = $objp->fk_parent_line; - $line->label = $objp->custom_label; - $line->desc = $objp->description; // Description ligne - $line->description = $objp->description; // Description ligne + $line->label = $objp->custom_label; + $line->desc = $objp->description; // Line description + $line->description = $objp->description; // Line description $line->qty = $objp->qty; $line->vat_src_code = $objp->vat_src_code; $line->tva_tx = $objp->tva_tx; @@ -3062,13 +3059,13 @@ class Propal extends CommonObject $this->fetchObjectLinked($id, $this->element); foreach ($this->linkedObjectsIds as $objecttype => $objectid) { // Nouveau système du common object renvoi des rowid et non un id linéaire de 1 à n - // On parcourt donc une liste d'objets en tant qu'objet unique + //We are therefore traversing a list of objects as a single object foreach ($objectid as $key => $object) { - // Cas des factures liees directement + // Case of invoices directly linked if ($objecttype == 'facture') { $linkedInvoices[] = $object; } else { - // Cas des factures liees par un autre object (ex: commande) + // Case of invoices linked by another object (e.g., order) $this->fetchObjectLinked($object, $objecttype); foreach ($this->linkedObjectsIds as $subobjecttype => $subobjectid) { foreach ($subobjectid as $subkey => $subobject) { diff --git a/htdocs/comm/propal/class/propaleligne.class.php b/htdocs/comm/propal/class/propaleligne.class.php index 40112a5980a..cc823016d1a 100644 --- a/htdocs/comm/propal/class/propaleligne.class.php +++ b/htdocs/comm/propal/class/propaleligne.class.php @@ -178,25 +178,25 @@ class PropaleLigne extends CommonObjectLine /** * Some other info: * Bit 0: 0 si TVA normal - 1 if TVA NPR - * Bit 1: 0 ligne normal - 1 if line with fixed discount + * Bit 1: 0 if normal line - 1 if line with fixed discount * @var ?int */ public $info_bits = 0; /** - * Total amount excluding taxes (HT = "Hors Taxe" in French) including discounts + * Total amount excluding taxes HT including discounts * @var float */ public $total_ht; /** - * Total VAT amount (TVA = "Taxe sur la Valeur Ajoutée" in French) + * Total VAT amount * @var float */ public $total_tva; /** - * Total amount including taxes (TTC = "Toutes Taxes Comprises" in French) + * Total amount including taxes * @var float */ public $total_ttc; @@ -390,10 +390,10 @@ class PropaleLigne extends CommonObjectLine $this->rowid = $objp->rowid; // deprecated $this->fk_propal = $objp->fk_propal; $this->fk_parent_line = $objp->fk_parent_line; - $this->label = $objp->custom_label; - $this->desc = $objp->description; + $this->label = $objp->custom_label; + $this->desc = $objp->description; $this->qty = $objp->qty; - $this->price = $objp->price; // deprecated + $this->price = $objp->price; // deprecated $this->subprice = $objp->subprice; $this->vat_src_code = $objp->vat_src_code; $this->tva_tx = $objp->tva_tx; @@ -762,7 +762,7 @@ class PropaleLigne extends CommonObjectLine $this->db->begin(); - // Mise a jour ligne en base + // Update line in database $sql = "UPDATE ".MAIN_DB_PREFIX."propaldet SET"; $sql .= " description='".$this->db->escape($this->desc)."'"; $sql .= ", label=".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null"); @@ -853,7 +853,7 @@ class PropaleLigne extends CommonObjectLine // phpcs:enable $this->db->begin(); - // Mise a jour ligne en base + // Update line in database $sql = "UPDATE ".MAIN_DB_PREFIX."propaldet SET"; $sql .= " total_ht=".price2num($this->total_ht, 'MT'); $sql .= ",total_tva=".price2num($this->total_tva, 'MT'); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 0db2f4de14e..011447f9001 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -84,7 +84,7 @@ class Commande extends CommonOrder public $fk_element = 'fk_commande'; /** - * @var string String with name of icon for commande class. Here is object_order.png + * @var string String with name of icon for order class. Here is object_order.png */ public $picto = 'order'; @@ -1585,10 +1585,9 @@ class Commande extends CommonOrder * * @see add_product() * - * Les parameters sont deja cense etre juste et avec valeurs finales a l'appel - * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini - * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) - * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) + * The parameters are already supposed to be correct and with final values upon calling this method. + * Also, for the VAT rate, it must have already been defined by the caller using the method get_default_tva(societe_vendeuse, societe_acheteuse, produit) + * and the description (desc) must already have the correct value (it's up to the caller to manage multilanguage) */ public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = array(), $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $ref_ext = '', $noupdateafterinsertline = 0) { @@ -1707,10 +1706,9 @@ class Commande extends CommonOrder } } } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); @@ -2163,7 +2161,7 @@ class Commande extends CommonOrder $line->tva_tx = $remise->tva_tx; $line->subprice = -(float) $remise->amount_ht; $line->price = -(float) $remise->amount_ht; - $line->fk_product = 0; // Id produit predefini + $line->fk_product = 0; // Predefined Product ID $line->qty = 1; $line->remise_percent = 0; $line->rang = -1; @@ -2287,7 +2285,7 @@ class Commande extends CommonOrder $line->product_custom_country_id = $objp->country_id; $line->product_custom_country_code = $objp->country_code; - $line->fk_product_type = $objp->fk_product_type; // Produit ou service + $line->fk_product_type = $objp->fk_product_type; // Product or service $line->fk_unit = $objp->fk_unit; $line->extraparams = !empty($objp->extraparams) ? (array) json_decode($objp->extraparams, true) : array(); @@ -2688,7 +2686,7 @@ class Commande extends CommonOrder /** * Set the planned delivery date * - * @param User $user Object utilisateur qui modifie + * @param User $user Object User who makes the update * @param int $delivery_date Delivery date * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int Return integer <0 si ko, >0 si ok @@ -3185,10 +3183,9 @@ class Commande extends CommonOrder $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); diff --git a/htdocs/commande/class/orderline.class.php b/htdocs/commande/class/orderline.class.php index 7598ce573df..5f5d7fa7803 100644 --- a/htdocs/commande/class/orderline.class.php +++ b/htdocs/commande/class/orderline.class.php @@ -459,7 +459,7 @@ class OrderLine extends CommonOrderLine $this->db->begin(); - // Insertion dans base de la ligne + // Insert line into database $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commandedet'; $sql .= ' (fk_commande, fk_parent_line, label, description, qty, ref_ext,'; $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; @@ -630,7 +630,7 @@ class OrderLine extends CommonOrderLine $this->db->begin(); - // Mise a jour ligne en base + // Update line in database $sql = "UPDATE ".MAIN_DB_PREFIX."commandedet SET"; $sql .= " description='".$this->db->escape($this->desc)."'"; $sql .= " , label=".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null"); @@ -730,7 +730,7 @@ class OrderLine extends CommonOrderLine $this->total_localtax2 = 0; } - // Mise a jour ligne en base + // Update line in database $sql = "UPDATE ".MAIN_DB_PREFIX."commandedet SET"; $sql .= " total_ht='".price2num($this->total_ht)."'"; $sql .= ",total_tva='".price2num($this->total_tva)."'"; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 39b2f413653..134cad2c37a 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1389,7 +1389,7 @@ class Account extends CommonObject global $conf, $langs; if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } $sql = "SELECT b.rowid, b.datev as datefin"; @@ -1444,7 +1444,7 @@ class Account extends CommonObject global $user; if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } $sql = "SELECT count(b.rowid) as nb"; @@ -1562,7 +1562,7 @@ class Account extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $notooltip 1=Disable tooltip * @param string $morecss Add more css on link - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $mode = '', $option = '', $save_lastsearch_value = -1, $notooltip = 0, $morecss = '') { @@ -2772,7 +2772,7 @@ class AccountLine extends CommonObjectLine * @param int $maxlen Longueur max libelle * @param string $option Option ('', 'showall', 'showconciliated', 'showconciliatedandaccounted'). Options may be slow. * @param int $notooltip 1=Disable tooltip - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0) { diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 4a63e952989..d46aac2b6af 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Florian Henry - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -385,7 +385,7 @@ class Deplacement extends CommonObject * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0) { diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index ebd1313d82f..2b65a70fb32 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1031,10 +1031,9 @@ class FactureRec extends CommonInvoice $pu = $pu_ttc; } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); $total_ht = $tabprice[0]; @@ -1240,9 +1239,9 @@ class FactureRec extends CommonInvoice $pu = $pu_ttc; } - // Calculate total with, without tax and tax from qty, pu, remise_percent and txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 0ba12140984..925323bd90c 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -207,7 +207,7 @@ class Facture extends CommonInvoice public $extraparams = array(); /** - * @var int ID facture rec + * @var int ID invoice model */ public $fac_rec; @@ -2882,7 +2882,7 @@ class Facture extends CommonInvoice $facligne->vat_src_code = $remise->vat_src_code; $facligne->tva_tx = $remise->tva_tx; $facligne->subprice = -(float) $remise->amount_ht; - $facligne->fk_product = 0; // Id produit predefini + $facligne->fk_product = 0; // Predefined Product ID $facligne->qty = 1; $facligne->remise_percent = 0; $facligne->rang = -1; @@ -4122,10 +4122,9 @@ class Facture extends CommonInvoice /** * Add an invoice line into database (linked to product/service or not). * Note: ->thirdparty must be defined. - * Les parameters sont deja cense etre juste et avec valeurs finales a l'appel - * de cette method. Aussi, pour le taux tva, il doit deja avoir ete defini - * par l'appelant par la method get_default_tva(societe_vendeuse,societe_acheteuse,produit) - * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) + * The parameters are already supposed to be correct and with final values upon calling this method. + * Also, for the VAT rate, it must have already been defined by the caller using the method get_default_tva(societe_vendeuse, societe_acheteuse, produit) + * and the description (desc) must already have the correct value (it's up to the caller to manage multilanguage) * * @param string $desc Description of line * @param float $pu_ht Unit price without tax (> 0 even for credit note) @@ -4348,10 +4347,9 @@ class Facture extends CommonInvoice $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx, $pu_ht_devise); @@ -4590,9 +4588,9 @@ class Facture extends CommonInvoice return -1; } - // Calculate total with, without tax and tax from qty, pu, remise_percent and txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); @@ -4760,7 +4758,7 @@ class Facture extends CommonInvoice $this->line_order(true, 'DESC'); } - // Mise a jour info denormalisees au niveau facture + // Update denormalized information at the invoice level $this->update_price(1, 'auto'); $this->db->commit(); return $result; @@ -5383,7 +5381,7 @@ class Facture extends CommonInvoice // $sql.= " WHERE f.fk_statut >= 1"; // $sql.= " AND (f.paye = 1"; // Classee payee completement // $sql.= " OR f.close_code IS NOT NULL)"; // Classee payee partiellement - $sql .= " AND ff.type IS NULL"; // Renvoi vrai si pas facture de replacement + $sql .= " AND ff.type IS NULL"; // Return true if there isn't any replacement invoice $sql .= " AND f.type <> ".self::TYPE_CREDIT_NOTE; // Exclude credit note invoices from selection if (getDolGlobalString('INVOICE_USE_SITUATION_CREDIT_NOTE')) { @@ -5506,10 +5504,10 @@ class Facture extends CommonInvoice } - /* gestion des contacts d'une facture */ + /* Management of a bill's contacts */ /** - * Retourne id des contacts clients de facturation + * Returns the IDs of the customer billing contacts. * * @return int[] Liste des id contacts facturation */ @@ -5519,7 +5517,7 @@ class Facture extends CommonInvoice } /** - * Retourne id des contacts clients de livraison + * Returns the IDs of the customer shipping contacts. * * @return int[] Liste des id contacts livraison */ @@ -5829,7 +5827,7 @@ class Facture extends CommonInvoice // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Returns an array containing the previous situations as Facture objects + * Returns an array containing the previous situations as Invoice objects * * @return Facture[]|int<-1,-1> -1 if error, array of previous situations */ diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index b7725e4f736..8e385a16158 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -380,7 +380,7 @@ class Localtax extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Total de la localtax des factures emises par la societe. + * Total of invoices localtax emitted by the company * * @param int $year Year * @return int ??? @@ -614,7 +614,7 @@ class Localtax extends CommonObject * * @param int $withpicto 0=Link, 1=Picto into link, 2=Picto * @param string $option What the link points to - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '') { diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 30086b85917..927ab4082cc 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -519,7 +519,7 @@ class RemiseCheque extends CommonObject global $conf, $langs; if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } $sql = "SELECT b.rowid, b.datev as datefin"; @@ -571,7 +571,7 @@ class RemiseCheque extends CommonObject global $user; if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } $sql = "SELECT count(b.rowid) as nb"; @@ -936,7 +936,7 @@ class RemiseCheque extends CommonObject * @param int $notooltip 1=Disable tooltip * @param string $morecss Add more css on link * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 11f566ee519..9a94e973ec2 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1386,7 +1386,7 @@ class Paiement extends CommonObject * @param string $mode 'withlistofinvoices'=Include list of invoices into tooltip * @param int $notooltip 1=Disable tooltip * @param string $morecss Add more CSS - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0, $morecss = '') { diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 86482f21fc1..29f4ee3e98c 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -2921,7 +2921,7 @@ class BonPrelevement extends CommonObject { // phpcs:enable if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } /* diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 8a270f832f2..0b6182c94f4 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -762,7 +762,7 @@ class PaymentSocialContribution extends CommonObject * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen Longueur max libelle - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlen = 0) { diff --git a/htdocs/compta/tva/class/paymentvat.class.php b/htdocs/compta/tva/class/paymentvat.class.php index cdc638e1f1c..01fb002dd0e 100644 --- a/htdocs/compta/tva/class/paymentvat.class.php +++ b/htdocs/compta/tva/class/paymentvat.class.php @@ -749,7 +749,7 @@ class PaymentVAT extends CommonObject * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen Longueur max libelle - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlen = 0) { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 26bc371351f..f7ff76b70a5 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1452,7 +1452,7 @@ class Contrat extends CommonObject /** - * Ajoute une ligne de contrat en base + * Insert contract line into database * * @param string $desc Description of line * @param float $pu_ht Unit price net @@ -1552,10 +1552,9 @@ class Contrat extends CommonObject $localtaxes_type = getLocalTaxesFromRate($txtva.($vat_src_code ? ' ('.$vat_src_code.')' : ''), 0, $this->societe, $mysoc); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type); $total_ht = $tabprice[0]; @@ -1733,10 +1732,9 @@ class Contrat extends CommonObject $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et tvatx - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc); $tvatx = preg_replace('/\s*\(.*\)/', '', $tvatx); // Remove code into vatrate. @@ -2078,7 +2076,7 @@ class Contrat extends CommonObject * @param int $maxlength Max length of ref * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1) { @@ -2635,9 +2633,7 @@ class Contrat extends CommonObject $extrafields->fetch_name_optionals_label($this->table_element); foreach ($clonedObj->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); - //var_dump($shortkey); var_dump($extrafields->attributes[$this->element]['unique'][$shortkey]); if (!empty($extrafields->attributes[$this->element]['unique'][$shortkey])) { - //var_dump($key); var_dump($clonedObj->array_options[$key]); exit; unset($clonedObj->array_options[$key]); } } @@ -2786,7 +2782,6 @@ class Contrat extends CommonObject $expirationdate = $this->db->jdate($obj->date_fin_validite); $duration_value = preg_replace('/[^0-9]/', '', $obj->duration); $duration_unit = preg_replace('/\d/', '', $obj->duration); - //var_dump($expirationdate.' '.$enddatetoscan); // Load linked ->linkedObjects (objects linked) // @TODO Comment this line and then make the search if there is n open invoice(s) by doing a dedicated SQL COUNT request to fill $contractcanceled. diff --git a/htdocs/contrat/class/contratligne.class.php b/htdocs/contrat/class/contratligne.class.php index 84bcd9b4002..d8fd6751e32 100644 --- a/htdocs/contrat/class/contratligne.class.php +++ b/htdocs/contrat/class/contratligne.class.php @@ -407,7 +407,7 @@ class ContratLigne extends CommonObjectLine * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlength Max length - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlength = 0) { @@ -639,10 +639,9 @@ class ContratLigne extends CommonObjectLine $this->remise_percent = 0; } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($this->tva_tx, 0, $this->thirdparty, $mysoc); $tabprice = calcul_price_total($this->qty, $this->subprice, $this->remise_percent, (float) $this->tva_tx, $this->localtax1_tx, $this->localtax2_tx, 0, 'HT', 0, 1, $mysoc, $localtaxes_type); @@ -785,7 +784,7 @@ class ContratLigne extends CommonObjectLine // phpcs:enable $this->db->begin(); - // Mise a jour ligne en base + // Update line in database $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet SET"; $sql .= " total_ht=".price2num($this->total_ht, 'MT'); $sql .= ",total_tva=".price2num($this->total_tva, 'MT'); diff --git a/htdocs/core/modules/accountancy/mod_bookkeeping_helium.php b/htdocs/core/modules/accountancy/mod_bookkeeping_helium.php index 7e16cc821a0..3049d4899d9 100644 --- a/htdocs/core/modules/accountancy/mod_bookkeeping_helium.php +++ b/htdocs/core/modules/accountancy/mod_bookkeeping_helium.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024 MDW * Copyright (C) 2025 Jean-Rémi Taponier * @@ -91,7 +91,7 @@ class mod_bookkeeping_helium extends ModeleNumRefBookkeeping $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index 62ae12600c9..9c2b8e2c4e8 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -80,7 +80,7 @@ class mod_asset_advanced extends ModeleNumRefAsset $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $text .= ''.$langs->trans("Mask").':'; $text .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index 8ec37489210..45d05da8334 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -85,7 +85,7 @@ class mod_bom_advanced extends ModeleNumRefBoms $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index b8a55dafb56..d7babd07a37 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -1,6 +1,6 @@ - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -79,7 +79,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index 1ee9897e78a..ad252f090e4 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -85,7 +85,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/delivery/mod_delivery_jade.php b/htdocs/core/modules/delivery/mod_delivery_jade.php index 50cd56bda13..579fbc88908 100644 --- a/htdocs/core/modules/delivery/mod_delivery_jade.php +++ b/htdocs/core/modules/delivery/mod_delivery_jade.php @@ -48,7 +48,7 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index 7c9e892fdc6..0f46ac0afd6 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -45,7 +45,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ @@ -90,7 +90,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 1b81ad04ece..7d5be219f8a 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -1,6 +1,6 @@ - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -43,7 +43,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 6ddd5231a67..6293030c7c3 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -47,7 +47,7 @@ class mod_expedition_safor extends ModelNumRefExpedition public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 2244ae9fefe..761bf86a0d5 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -47,7 +47,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index 9fa93736432..c5a897d81bd 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -44,7 +44,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ @@ -88,7 +88,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $mask = getDolGlobalString('EXPENSEREPORT_SAND_MASK'); $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 34c382f7132..d48e1ef920b 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -46,7 +46,7 @@ class mod_arctic extends ModeleNumRefFicheinter public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated Use $name, getName() * @see $name */ diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index fe69438341b..e15d06e2e4f 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -49,7 +49,7 @@ class mod_pacific extends ModeleNumRefFicheinter public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated Use $name, getName() * @see $name */ diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index bd3685a335f..7ea9f71ffd4 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -85,7 +85,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/member/mod_member_custom.php b/htdocs/core/modules/member/mod_member_custom.php index 185367485a1..41d2163e0c2 100644 --- a/htdocs/core/modules/member/mod_member_custom.php +++ b/htdocs/core/modules/member/mod_member_custom.php @@ -1,5 +1,6 @@ + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -85,7 +86,7 @@ class mod_member_custom extends ModeleNumRefMembers $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $mask = getDolGlobalString('MEMBER_CUSTOM_MASK'); $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index a53ad6e577c..d0ea8ec70d2 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2020 Josep Lluís Amador * Copyright (C) 2024 MDW * @@ -84,7 +84,7 @@ class mod_mo_advanced extends ModeleNumRefMos $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $text .= ''.$langs->trans("Mask").':'; $text .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 2b5e78fc067..dcdb2072aac 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -93,7 +94,7 @@ class mod_payment_ant extends ModeleNumRefPayments $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index c91f5e63b51..1cc21f9b542 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -48,7 +48,7 @@ class mod_payment_cicada extends ModeleNumRefPayments public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index f8078b0817a..f67d2c1b06c 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -3,7 +3,7 @@ * Copyright (C) 2006-2009 Laurent Destailleur * Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -47,12 +47,12 @@ class mod_codeproduct_elephant extends ModeleProductCode // variables not inherited /** - * @var string String de recherche + * @var string Search String */ public $searchcode; /** - * @var int Nombre de chiffres du compteur + * @var int Number of digits in the counter */ public $numbitcounter; @@ -100,9 +100,9 @@ class mod_codeproduct_elephant extends ModeleProductCode $tooltip .= $langs->trans("GenericMaskCodes3"); $tooltip .= $langs->trans("GenericMaskCodes4c"); $tooltip .= $langs->trans("GenericMaskCodes5"); - //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); + // $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix customers + // Setting of prefix customers $texte .= ''.$langs->trans("ProductCodeModel").''; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; @@ -110,7 +110,7 @@ class mod_codeproduct_elephant extends ModeleProductCode $texte .= ''; - // Parametrage du prefix suppliers + // Setting of prefix suppliers $texte .= ''.$langs->trans("ServiceCodeModel").''; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; $texte .= ''; @@ -171,8 +171,8 @@ class mod_codeproduct_elephant extends ModeleProductCode /** * Return next value * - * @param Product $objproduct Object product - * @param int $type Produit ou service (0:product, 1:service) + * @param Product $objproduct Object product + * @param int $type Product or service (0:product, 1:service) * @return string|-1 Value if OK, '' if module not configured, -1 if KO */ public function getNextValue($objproduct = null, $type = -1) @@ -302,7 +302,7 @@ class mod_codeproduct_elephant extends ModeleProductCode * * @param DoliDB $db Handler access base * @param string $code Code a verifier - * @param Product $product Object product + * @param Product $product Object product * @return int 0 if available, <0 if KO */ public function verif_dispo($db, $code, $product) diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index 87e2a588d26..b556fd184ae 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2021 Christophe Battarel * Copyright (C) 2024 MDW * @@ -89,7 +89,7 @@ class mod_lot_advanced extends ModeleNumRefBatch $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index cdaaa9d4bef..cd26bf64dbe 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2021 Christophe Battarel * Copyright (C) 2024 MDW * @@ -89,7 +89,7 @@ class mod_sn_advanced extends ModeleNumRefBatch $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index d6ad1781294..15dd7c105e4 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -50,7 +50,7 @@ class mod_project_simple extends ModeleNumRefProjects public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index cc9c4a1bb69..a9d211e4355 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -49,7 +49,7 @@ class mod_project_universal extends ModeleNumRefProjects public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 5f3983d8c72..e81d17a09da 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -90,7 +90,7 @@ class mod_task_universal extends ModeleNumRefTask $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index 905578b5a10..b6bf2184fdd 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -50,7 +50,7 @@ class mod_propale_marbre extends ModeleNumRefPropales public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index df4a29ce260..93bbea3dd4c 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -47,7 +47,7 @@ class mod_propale_saphir extends ModeleNumRefPropales public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ @@ -92,7 +92,7 @@ class mod_propale_saphir extends ModeleNumRefPropales $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $mask = !getDolGlobalString('PROPALE_SAPHIR_MASK') ? '' : $conf->global->PROPALE_SAPHIR_MASK; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 3b0cccafb3c..1d95477f004 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -4,7 +4,7 @@ * Copyright (C) 2007-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013-2018 Philippe Grand - * Copyright (C) 2020-2024 Frédéric France + * Copyright (C) 2020-2025 Frédéric France * Copyright (C) 2024-2025 MDW * Copyright (C) 2024 Eric Seigne * Copyright (C) 2025 Charlene Benke @@ -110,7 +110,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix customers + // Setting of prefix customers $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipelephantcutomer').''; @@ -118,7 +118,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode $texte .= ''; - // Parametrage du prefix suppliers + // Setting of prefix suppliers $texte .= ''.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'):'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltipelephantsupplier').''; $texte .= ''; diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php index 9b769a236e2..760d5665120 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2024-2025 MDW * @@ -86,7 +86,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index aa760b7c50d..10c07ca743f 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2016 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -47,7 +47,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index e16303669b4..454c18cdc69 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -5,7 +5,7 @@ * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016-2021 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -50,7 +50,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index 21fe26a01f2..6b3ea3cb009 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -46,7 +46,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index b4a0529eb73..c722f7fbbaf 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -46,7 +46,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ @@ -92,7 +92,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', '', 0, 3, 'tooltiporchidee').''; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 2f3cfcddce4..773ad2608a2 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -44,7 +44,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ @@ -89,7 +89,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php index 8d9192cc6ff..1c2206b87e2 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -48,7 +48,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index ca34cc22b9f..c8d08da175f 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -50,7 +50,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index e6aad80c438..6d3a7491bcf 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,7 +47,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ @@ -93,7 +94,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal $mask = getDolGlobalString('SUPPLIER_PROPOSAL_SAPHIR_MASK'); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index 576da3eff83..719b60370b5 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -49,7 +49,7 @@ class mod_ticket_simple extends ModeleNumRefTicket public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index f900c7dc4e0..52d2dd29858 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -43,7 +43,7 @@ class mod_ticket_universal extends ModeleNumRefTicket public $error = ''; /** - * @var string Nom du modele + * @var string Name of model * @deprecated * @see $name */ diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index a68bf9821f2..d939049b027 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2020 Gauthier VERDOL * Copyright (C) 2024 MDW * @@ -86,7 +86,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).''; diff --git a/htdocs/delivery/class/delivery.class.php b/htdocs/delivery/class/delivery.class.php index 5f89e42fd17..7e07fd6b9cb 100644 --- a/htdocs/delivery/class/delivery.class.php +++ b/htdocs/delivery/class/delivery.class.php @@ -789,7 +789,7 @@ class Delivery extends CommonObject * * @param int<0,2> $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int<-1,1> $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $save_lastsearch_value = -1) { @@ -1100,7 +1100,7 @@ class Delivery extends CommonObject /** * Set the planned delivery date * - * @param User $user Object utilisateur qui modifie + * @param User $user Object User who makes the update * @param integer $delivery_date Delivery date * @return int Return integer <0 if KO, >0 if OK */ diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 4b76c222659..04a9d99637a 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -501,7 +501,7 @@ class Don extends CommonObject /** * Update a donation record * - * @param User $user Object utilisateur qui met a jour le don + * @param User $user Object User which updates the donation * @param int $notrigger Disable triggers * @return int >0 if OK, <0 if KO */ @@ -950,7 +950,7 @@ class Don extends CommonObject * @param int $notooltip 1=Disable tooltip * @param string $moretitle Add more text to title tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1) { diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index b55b0ec89cc..905b86c676f 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -476,7 +476,7 @@ class EcmDirectory extends CommonObject * @param int $max Max length * @param string $more Add more param on a link * @param int $notooltip 1=Disable tooltip - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '', $max = 0, $more = '', $notooltip = 0) { diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 228bf211b96..324bfeb456e 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2574,7 +2574,7 @@ class ExpenseReport extends CommonObject global $conf, $langs; if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } $now = dol_now(); diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index e77828ee57a..cb72d0f26dd 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -662,7 +662,7 @@ class PaymentExpenseReport extends CommonObject * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param int $maxlen Longueur max libelle - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlen = 0) { diff --git a/htdocs/fichinter/class/fichinterligne.class.php b/htdocs/fichinter/class/fichinterligne.class.php index a597aacf511..1cda0e9ec72 100644 --- a/htdocs/fichinter/class/fichinterligne.class.php +++ b/htdocs/fichinter/class/fichinterligne.class.php @@ -186,7 +186,7 @@ class FichinterLigne extends CommonObjectLine $rangToUse = $this->rang; if ($rangToUse == -1) { - // Recupere rang max de la ligne d'intervention dans $rangmax + // Retrieve max rank of intervention line into $rangmax $sql = 'SELECT max(rang) as max FROM '.MAIN_DB_PREFIX.'fichinterdet'; $sql .= ' WHERE fk_fichinter = '.((int) $this->fk_fichinter); $resql = $this->db->query($sql); @@ -200,7 +200,7 @@ class FichinterLigne extends CommonObjectLine } } - // Insertion dans base de la ligne + // Insert line into database $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'fichinterdet'; $sql .= ' (fk_fichinter, description, date, duree, rang, product_type, special_code)'; $sql .= " VALUES (".((int) $this->fk_fichinter).","; @@ -271,7 +271,7 @@ class FichinterLigne extends CommonObjectLine $this->db->begin(); - // Mise a jour ligne en base + // Update line in database $sql = "UPDATE ".MAIN_DB_PREFIX."fichinterdet SET"; $sql .= " description = '".$this->db->escape($this->desc)."',"; $sql .= " date = '".$this->db->idate($this->date)."',"; diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 480e16805df..36888f3eae6 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2016-2018 Charlie Benke * Copyright (C) 2024 William Mead - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -525,10 +525,9 @@ class FichinterRec extends Fichinter $pu = $pu_ttc; } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $tabprice = calcul_price_total($qty, (float) $pu, (float) $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type, $mysoc); $total_ht = $tabprice[0]; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 8e6b6ec3bfa..80d173f0941 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -339,17 +339,17 @@ class CommandeFournisseur extends CommonOrder public $multicurrency_tx; /** - * @var float Total value in the other currency, excluding taxes (HT = "Hors Taxes" in French) + * @var float Total value in the other currency, excluding taxes */ public $multicurrency_total_ht; /** - * @var float Total VAT in the other currency (TVA = "Taxe sur la Valeur Ajoutée" in French) + * @var float Total VAT in the other currency */ public $multicurrency_total_tva; /** - * @var float Total value in the other currency, including taxes (TTC = "Toutes Taxes Comprises in French) + * @var float Total value in the other currency, including taxes */ public $multicurrency_total_ttc; @@ -2177,10 +2177,9 @@ class CommandeFournisseur extends CommonOrder $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $tabprice = calcul_price_total((float) $qty, $pu, $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, (float) $pu_ht_devise); @@ -2913,7 +2912,7 @@ class CommandeFournisseur extends CommonOrder /** * Set the id projet * - * @param User $user Object utilisateur qui modifie + * @param User $user Object User who makes the update * @param int $id_projet Delivery date * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int Return integer <0 si ko, >0 si ok @@ -3083,7 +3082,7 @@ class CommandeFournisseur extends CommonOrder /** * Update line * - * @param int $rowid ID de la ligne de facture + * @param int $rowid Invoice Line ID * @param string $desc Line description * @param int|float $pu Unit price * @param int|float $qty Quantity @@ -3157,10 +3156,9 @@ class CommandeFournisseur extends CommonOrder $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); @@ -3272,7 +3270,7 @@ class CommandeFournisseur extends CommonOrder $result = $this->line->update($notrigger); - // Mise a jour info denormalisees au niveau facture + // Update denormalized information at the invoice level if ($result >= 0) { $this->update_price(1, 'auto'); $this->db->commit(); diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index 84474b32a2d..23b30d4976e 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -371,7 +371,7 @@ class FactureFournisseurRec extends CommonInvoice $this->db->begin(); - // On charge la facture fournisseur depuis laquelle on crée la facture fournisseur modèle + // We load the supplier invoice from which we create the model/template supplier invoice $facfourn_src = new FactureFournisseur($this->db); $result = $facfourn_src->fetch($facFournId); if ($result > 0) { @@ -1025,9 +1025,9 @@ class FactureFournisseurRec extends CommonInvoice $pu = ($price_base_type == 'HT' ? $pu_ht : $pu_ttc); - // Calcul du total TTC et de la TVA pour la ligne a partir de qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $tabprice = calcul_price_total((float) $qty, (float) $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); $total_ht = $tabprice[0]; @@ -1205,9 +1205,9 @@ class FactureFournisseurRec extends CommonInvoice $pu = ($price_base_type == 'HT' ? $pu_ht : $pu_ttc); - // Calculate total with, without tax and tax from qty, pu, remise_percent and txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 059355c79b5..5f6ca0f732b 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1390,7 +1390,7 @@ class FactureFournisseur extends CommonInvoice $facligne->vat_src_code = $remise->vat_src_code; $facligne->tva_tx = $remise->tva_tx; $facligne->subprice = -(float) $remise->amount_ht; - $facligne->fk_product = 0; // Id produit predefini + $facligne->fk_product = 0; // Predefined Product ID $facligne->product_type = 0; $facligne->qty = 1; $facligne->remise_percent = 0; @@ -1907,7 +1907,7 @@ class FactureFournisseur extends CommonInvoice dol_syslog(get_class($this)."::validate", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { - // Si on incrémente le produit principal et ses composants à la validation de facture fournisseur + // If we increment the main product and its components upon validation of the supplier invoice if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_SUPPLIER_BILL')) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2044,7 +2044,7 @@ class FactureFournisseur extends CommonInvoice if ($result) { $this->oldcopy = clone $this; - // Si on incremente le produit principal et ses composants a la validation de facture fournisseur, on decremente + // If we increment the main product and its components upon supplier invoice validation, we decrement upon customer invoice validation if ($result >= 0 && isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_SUPPLIER_BILL')) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; $langs->load("agenda"); @@ -2241,10 +2241,9 @@ class FactureFournisseur extends CommonInvoice $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $tabprice = calcul_price_total((float) $qty, $pu, $remise_percent, $txtva, (float) $txlocaltax1, (float) $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_devise); $total_ht = $tabprice[0]; @@ -2428,10 +2427,9 @@ class FactureFournisseur extends CommonInvoice $txlocaltax1 = (float) price2num($txlocaltax1); $txlocaltax2 = (float) price2num($txlocaltax2); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calculation of the gross total (TTC) and VAT for the line from qty, pu, remise_percent and txtva + // VERY IMPORTANT: It's at the time of line insertion that we must store the net, VAT, and gross amounts, + // and this is done at the line level, which has its own VAT rate $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $mysoc, $this->thirdparty); diff --git a/htdocs/fourn/class/fournisseur.facture.ligne.class.php b/htdocs/fourn/class/fournisseur.facture.ligne.class.php index ae4510d0226..c2a89f9b9ad 100644 --- a/htdocs/fourn/class/fournisseur.facture.ligne.class.php +++ b/htdocs/fourn/class/fournisseur.facture.ligne.class.php @@ -272,8 +272,8 @@ class SupplierInvoiceLine extends CommonObjectLine /** * List of cumulative options: - * Bit 0: 0 si TVA normal - 1 si TVA NPR - * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) + * Bit 0: 0 if TVA normal - 1 if TVA NPR + * Bit 1: 0 if normal line - 1 if bit discount (link to line into llx_remise_except) * @var int */ public $info_bits; @@ -691,7 +691,7 @@ class SupplierInvoiceLine extends CommonObjectLine $this->db->begin(); - // Insertion dans base de la ligne + // Insert line into database $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; $sql .= ' (fk_facture_fourn, fk_parent_line, label, description, ref, qty,'; $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; @@ -825,7 +825,7 @@ class SupplierInvoiceLine extends CommonObjectLine // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Mise a jour de l'objet ligne de commande en base + * Update invoice supplier line into database * * @return int Return integer <0 si ko, >0 si ok */ @@ -834,7 +834,7 @@ class SupplierInvoiceLine extends CommonObjectLine // phpcs:enable $this->db->begin(); - // Mise a jour ligne en base + // Update line in database $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; $sql .= " total_ht = ".price2num($this->total_ht); $sql .= ", tva= ".price2num($this->total_tva); diff --git a/htdocs/fourn/class/fournisseur.orderline.class.php b/htdocs/fourn/class/fournisseur.orderline.class.php index fd0e91b3556..0f23543efba 100644 --- a/htdocs/fourn/class/fournisseur.orderline.class.php +++ b/htdocs/fourn/class/fournisseur.orderline.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2018-2022 Ferran Marcet * Copyright (C) 2021 Josep Lluís Amador * Copyright (C) 2022 Gauthier VERDOL @@ -343,7 +343,7 @@ class CommandeFournisseurLigne extends CommonOrderLine $this->db->begin(); - // Insertion dans base de la ligne + // Insert line into database $sql = 'INSERT INTO '.$this->db->prefix().$this->table_element; $sql .= " (fk_commande, label, description, date_start, date_end,"; $sql .= " fk_product, product_type, special_code, rang,"; diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 61855f09789..ab58b4ffc14 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -1,14 +1,14 @@ - * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2011 Juanjo Menent - * Copyright (C) 2014 Marcos García - * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2023 Joachim Kueter - * Copyright (C) 2023 Sylvain Legrand +/* Copyright (C) 2002-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2014 Marcos García + * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018-2025 Frédéric France + * Copyright (C) 2023 Joachim Kueter + * Copyright (C) 2023 Sylvain Legrand * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -59,7 +59,7 @@ class PaiementFourn extends Paiement */ public $statut; // fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...) - // fk_paiement dans llx_paiement_facture est le rowid du paiement + // fk_paiement dans llx_paiement_facture is rowid of payment /** * Label of payment type @@ -285,9 +285,9 @@ class PaiementFourn extends Paiement if ($closepaidinvoices) { $paiement = $invoice->getSommePaiement(); $creditnotes = $invoice->getSumCreditNotesUsed(); - //$creditnotes = 0; + // $creditnotes = 0; $deposits = $invoice->getSumDepositsUsed(); - //$deposits = 0; + // $deposits = 0; $alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT'); $remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT'); if ($remaintopay == 0) { @@ -452,8 +452,8 @@ class PaiementFourn extends Paiement /** * Delete a payment and lines generated into accounts - * Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse - * Si le paiement porte sur au moins une facture a "payee", on refuse + * If the payment relates to a reconciled account entry, we refuse + * If the payment concerns at least one 'to be paid' invoice, we refuse * @TODO Add User $user as first param * @param User $user User making the deletion * @param int $notrigger No trigger @@ -495,7 +495,7 @@ class PaiementFourn extends Paiement } } - // Efface la ligne de paiement (dans paiement_facture et paiement) + // Delete payment line (from llx_paiement_facture and llx_paiement) $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn'; $sql .= ' WHERE fk_paiementfourn = '.((int) $this->id); $resql = $this->db->query($sql); @@ -509,7 +509,7 @@ class PaiementFourn extends Paiement return -3; } - // Supprimer l'ecriture bancaire si paiement lie a ecriture + // Delete the bank entry if a payment is linked to an entry if ($bank_line_id) { $accline = new AccountLine($this->db); $result = $accline->fetch($bank_line_id); @@ -545,7 +545,7 @@ class PaiementFourn extends Paiement /** * Information on object * - * @param int $id Id du paiement don't il faut afficher les infos + * @param int $id ID of the payment whose information needs to be displayed * @return void */ public function info($id) @@ -633,8 +633,7 @@ class PaiementFourn extends Paiement global $langs; $langs->load('compta'); - /*if ($mode == 0) - { + /*if ($mode == 0) { if ($status == 0) return $langs->trans('ToValidate'); if ($status == 1) return $langs->trans('Validated'); } @@ -680,7 +679,7 @@ class PaiementFourn extends Paiement * @param string $mode 'withlistofinvoices'=Include list of invoices into tooltip * @param int $notooltip 1=Disable tooltip * @param string $morecss Add more CSS - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0, $morecss = '') { diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 643b4bb151e..0f514140918 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1593,8 +1593,8 @@ class Holiday extends CommonObject /** * Met à jour une option du module Holiday Payés * - * @param string $name name du paramètre de configuration - * @param string $value vrai si mise à jour OK sinon faux + * @param string $name name settings parameter + * @param string $value true if update OK else false * @return boolean ok or ko */ public function updateConfCP($name, $value) @@ -2163,9 +2163,9 @@ class Holiday extends CommonObject /** - * Compte le nombre d'utilisateur actifs dans Dolibarr + * Count number of active users in Dolibarr * - * @return int retourne le nombre d'utilisateur + * @return int Return numbers of users */ public function countActiveUsers() { @@ -2179,9 +2179,9 @@ class Holiday extends CommonObject return $object->compteur; } /** - * Compte le nombre d'utilisateur actifs dans Dolibarr sans CP + * Count number of active users in Dolibarr without Paid leave * - * @return int retourne le nombre d'utilisateur + * @return int Return numbers of users */ public function countActiveUsersWithoutCP() { @@ -2196,7 +2196,7 @@ class Holiday extends CommonObject } /** - * Compare le nombre d'utilisateur actif de Dolibarr à celui des utilisateurs des congés payés + * Compare the number of active Dolibarr users to the number of paid leave users * * @param int $userDolibarrWithoutCP Number of active users in Dolibarr without holidays * @param int $userCP Number of active users into table of holidays @@ -2525,7 +2525,7 @@ class Holiday extends CommonObject global $conf, $langs; if ($user->socid) { - return -1; // protection pour eviter appel par utilisateur externe + return -1; // Protection to prevent calls by external users } $now = dol_now(); diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index 1035008c745..a766d59c73e 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2011 Laurent Destailleur * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2020 Ahmad Jamaly Rabib - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -284,7 +284,7 @@ class Import $this->array_import_preselected_updatekeys[$i] = (isset($module->import_preselected_updatekeys_array[$r]) ? $module->import_preselected_updatekeys_array[$r] : ''); // Array of examples $this->array_import_examplevalues[$i] = (isset($module->import_examplevalues_array[$r]) ? $module->import_examplevalues_array[$r] : ''); - // Tableau des regles de conversion d'une valeur depuis une autre source (cle=champ, valeur=tableau des regles) + // Table of conversion rules for a value from another source (key=field, value=array of rules) $this->array_import_convertvalue[$i] = (isset($module->import_convertvalue_array[$r]) ? $module->import_convertvalue_array[$r] : ''); // Sql request to run after import $this->array_import_run_sql_after[$i] = (isset($module->import_run_sql_after_array[$r]) ? $module->import_run_sql_after_array[$r] : ''); @@ -334,16 +334,16 @@ class Import $outputlangs = $langs; // Lang for output $s = ''; - // Genere en-tete + // Generate header $s .= $objmodel->write_header_example($outputlangs); - // Genere ligne de titre + // Generate title line $s .= $objmodel->write_title_example($outputlangs, $headerlinefields); - // Genere ligne de titre + // Generate record line $s .= $objmodel->write_record_example($outputlangs, $contentlinevalues); - // Genere pied de page + // Generate footer $s .= $objmodel->write_footer_example($outputlangs); return $s; diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php index 41772f09a28..b1682964394 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -83,7 +83,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, '1').''; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index af9e3b7d82f..4bd0ae4da73 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -83,7 +83,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) { // bo $nouveauchoix .= "1"; } elseif (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '2') { $nouveauchoix .= "2"; - } else { // sinon c'est 0 + } else { // else it's zéro $nouveauchoix .= "0"; } } @@ -122,7 +122,7 @@ for ($i = 0; $i < $nblines; $i++) { $testligneamodifier = true; } - //test pour voir si une ligne est a modifier + // test to check if a line needs to be updated if (GETPOSTISSET('validermodifier'.$i)) { $modifier = $i; $testmodifier = true; @@ -140,7 +140,7 @@ if ($testmodifier) { $nouveauchoix .= "1"; } elseif (GETPOSTISSET("choix$i") && GETPOST("choix$i") == '2') { $nouveauchoix .= "2"; - } else { // sinon c'est 0 + } else { // else it's zero $nouveauchoix .= "0"; } } @@ -165,11 +165,11 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format = $nouveauxsujets = $object->sujet; - //on rajoute la valeur a la fin de tous les sujets deja entrés + // We add the value to the end of all subjects already entered $nouveauxsujets .= ','; $nouveauxsujets .= str_replace(array(",", "@"), " ", GETPOST("nouvellecolonne")).(!GETPOST("typecolonne") ? '' : '@'.GETPOST("typecolonne")); - //mise a jour avec les nouveaux sujets dans la base + // update with new subjects in database $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; $sql .= " SET sujet = '".$db->escape($nouveauxsujets)."'"; $sql .= " WHERE id_sondage = '".$db->escape($numsondage)."'"; @@ -224,12 +224,12 @@ if (GETPOSTISSET("ajoutercolonne") && $object->format == "D") { $erreur_ajout_date = "yes"; } - //on rajoute la valeur dans les valeurs + // we add the value to the values $datesbase = explode(",", $object->sujet); $taillebase = count($datesbase); $cleinsertion = -1; - //recherche de l'endroit de l'insertion de la nouvelle date dans les dates deja entrées dans le tableau + // Searching for the insertion point of the new date within the dates already entered in the table if ($nouvelledate < $datesbase[0]) { $cleinsertion = 0; } elseif ($nouvelledate > $datesbase[$taillebase - 1]) { @@ -356,7 +356,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) { $j = 0; $nouveauxsujets = ''; - //parcours de tous les sujets actuels + // review of all current subjects while (isset($toutsujet[$j])) { // If the subject is not the deleted subject, then concatenate the current subject if ($i != $j) { @@ -369,7 +369,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) { $j++; } - // Mise a jour des sujets dans la base + // Update subjects in database $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; $sql .= " SET sujet = '".$db->escape($nouveauxsujets)."' WHERE id_sondage = '".$db->escape($numsondage)."'"; $resql = $db->query($sql); @@ -395,20 +395,19 @@ for ($i = 0; $i < $nbcolonnes; $i++) { $newcar = ''; $ensemblereponses = $obj->reponses; - // parcours de toutes les réponses actuelles + // Review of all current answers for ($j = 0; $j < $nbcolonnes; $j++) { $car = substr($ensemblereponses, $j, 1); - //si les reponses ne concerne pas la colonne effacée, on concatenate + // If the answers do not concern the erased column, we concatenate if ($i != $j) { $newcar .= $car; } } - // mise a jour des reponses utilisateurs dans la base + // Update user's answers in database $sql2 = 'UPDATE '.MAIN_DB_PREFIX.'opensurvey_user_studs'; $sql2 .= " SET reponses = '".$db->escape($newcar)."'"; $sql2 .= " WHERE id_users = '".$db->escape($obj->id_users)."'"; - //print $sql2; dol_syslog('sql='.$sql2); $resql2 = $db->query($sql2); @@ -616,12 +615,12 @@ if (GETPOST('ajoutsujet')) { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $formother = new FormOther($db); - //ajout d'une date avec creneau horaire + // Adding a date with a time slot print $langs->trans("AddADate").':

'."\n"; print ''."\n"; @@ -633,31 +632,31 @@ if (GETPOST('ajoutsujet')) { print '

'.$langs->trans("AddStartHour").':

'."\n"; print ''."\n"; print ''."\n"; print '

'.$langs->trans("AddEndHour").':

'."\n"; print ''."\n"; print ''."\n"; print '

'; @@ -691,7 +690,7 @@ print '
'."\n"; // Start to show survey result print ''."\n"; -//reformatage des données des sujets du sondage +// Reformatting the survey subject data $toutsujet = explode(",", $object->sujet); $toutsujet = str_replace("°", "'", $toutsujet); @@ -711,12 +710,12 @@ print ''."\n"; // Show choice titles if ($object->format == "D") { - //affichage des sujets du sondage + // Displaying the survey subjects print ''."\n"; print ''."\n"; print ''."\n"; - //affichage des années + // Displaying the years $colspan = 1; $nbofsujet = count($toutsujet); for ($i = 0; $i < $nbofsujet; $i++) { @@ -738,10 +737,10 @@ if ($object->format == "D") { print ''."\n"; print ''."\n"; - //affichage des mois + // Displaying the months $colspan = 1; for ($i = 0; $i < $nbofsujet; $i++) { - $cur = intval($toutsujet[$i]); // intval() est utiliser pour supprimer le suffixe @* qui déplaît logiquement à strftime() + $cur = intval($toutsujet[$i]); // intval() est utilisé pour supprimer le suffixe @* qui déplaît logiquement à strftime() if (!isset($toutsujet[$i + 1])) { $next = false; @@ -767,7 +766,7 @@ if ($object->format == "D") { print ''."\n"; print ''."\n"; - //affichage des jours + // Displaying the days $colspan = 1; for ($i = 0; $i < $nbofsujet; $i++) { $cur = intval($toutsujet[$i]); @@ -790,7 +789,7 @@ if ($object->format == "D") { } print ''."\n"; - //affichage des horaires + // Displaying time slots if (strpos($object->sujet, '@') !== false) { print ''."\n"; print ''."\n"; @@ -858,7 +857,7 @@ while ($compteur < $num) { print dolPrintHTML($obj->name); print ''."\n"; - // si la ligne n'est pas a changer, on affiche les données + // If the line is not to be changed, we display the data if (!$testligneamodifier) { for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); @@ -1060,7 +1059,7 @@ if (empty($testligneamodifier)) { print ''."\n"; } - // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base + // Display of the form button to register a new user in the database print ''."\n"; print ''."\n"; } diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php index 98f906158ad..190e38b4ad3 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -81,7 +81,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $text .= '
'; $text .= ''; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index c951fdb565a..05b7a3481df 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2008-2014 Laurent Destailleur * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2014 Marcos García - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2020 Juanjo Menent * Copyright (C) 2022-2025 Charlene Benke * Copyright (C) 2023 Gauthier VERDOL @@ -1015,7 +1015,7 @@ class Task extends CommonObjectLine * @param string $sep Separator between ref and label if option addlabel is set * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '', $mode = 'task', $addlabel = 0, $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1) { diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 0c837a50af0..70994e59c2d 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1849,7 +1849,7 @@ class Reception extends CommonObject /** * Set the planned delivery date * - * @param User $user Object utilisateur qui modifie + * @param User $user Object User who makes the update * @param integer $delivery_date Delivery date * @return int Return integer <0 if KO, >0 if OK */ diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php index 79916ac6790..e27130827b5 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -81,7 +81,7 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= '
'; $texte .= ''; diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index 6afdbceef40..8c8790eca64 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -81,7 +81,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi $tooltip .= $langs->trans("GenericMaskCodes5"); //$tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // Setting of prefix $texte .= '
'; $texte .= ''; diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 52a601551a9..2d00146f76a 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2019-2024 Frédéric France +/* Copyright (C) 2013-2015 Jean-François FERRY + * Copyright (C) 2019-2025 Frédéric France * Copyright (C) 2022 Ferran Marcet * Copyright (C) 2023 William Mead * Copyright (C) 2024-2025 MDW @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT."/resource/class/dolresource.class.php"; * Class to manage forms for the module resource * * \remarks Utilisation: $formresource = new FormResource($db) - * \remarks $formplace->proprietes=1 ou chaine ou tableau de valeurs + * \remarks $formplace->proprietes=1 or string or array of values */ class FormResource { @@ -179,7 +179,7 @@ class FormResource * @param string $htmlname Nom de la zone select * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz)) * @param int<0,3> $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code - * @param int<0,1> $empty 1=peut etre vide, 0 sinon + * @param int<0,1> $empty 1=may be empty, 0 otherwise * @param int<0,1> $noadmininfo 0=Add admin info, 1=Disable admin info * @param int $maxlength Max length of label * @param int<0,1> $usejscombo 1=Use jscombo, 0=No js combo @@ -222,7 +222,7 @@ class FormResource } elseif ($format == 3) { print '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 'help').'
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'