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
This commit is contained in:
Frédéric FRANCE 2026-01-15 16:05:06 +01:00 committed by GitHub
parent 2c5be593c4
commit d770d37e29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
92 changed files with 639 additions and 443 deletions

View file

@ -0,0 +1,103 @@
<?php
/* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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 <https://www.gnu.org/licenses/>.
*/
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]]
);
}
}
}

View file

@ -0,0 +1,112 @@
<?php
/* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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 <https://www.gnu.org/licenses/>.
*/
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.
}
}
}
}

View file

@ -21,6 +21,11 @@
<exclude-pattern>/\.git/</exclude-pattern>
<exclude-pattern>/\.cache/</exclude-pattern>
<!-- Custom rules -->
<config name="installed_paths" value="/dev/setup/codesniffer" />
<rule ref="codesniffer.Dolibarr.LanguageOfComments"/>
<rule ref="codesniffer.Dolibarr.CheckIsModEnabledArgument"/>
<!-- List of all tests -->
@ -31,12 +36,12 @@
<!-- Rules from Generic Standard -->
<!--
<rule ref="PSR12.Files.OpenTag">
<properties>
<property name="ignoreIndent" value="true"/>
</properties>
</rule>
<properties>
<property name="ignoreIndent" value="true"/>
</properties>
</rule>
<exclude name="PSR12.WhiteSpace.ScopeIndent"/>
-->
-->
<!-- We want to allow empty statement: It allows to put some code comments into the else for examples -->
<rule ref="Generic.CodeAnalysis.EmptyStatement">
@ -76,16 +81,16 @@
<severity>0</severity>
</rule>
<!-- Lower severity on warnings we do not want to show in the pre-commit reports -->
<rule ref="Generic.Files.LineLength.TooLong">
<!-- Lower severity on warnings we do not want to show in the pre-commit reports -->
<rule ref="Generic.Files.LineLength.TooLong">
<severity>4</severity>
</rule>
<rule ref="Generic.Metrics.CyclomaticComplexity.TooHigh">
</rule>
<rule ref="Generic.Metrics.CyclomaticComplexity.TooHigh">
<severity>4</severity>
</rule>
<rule ref="Generic.Metrics.NestingLevel.TooHigh">
</rule>
<rule ref="Generic.Metrics.NestingLevel.TooHigh">
<severity>4</severity>
</rule>
</rule>
<!-- Warnings on TODO -->

View file

@ -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 '<tr class="liste_titre">';
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 '<td class="'.$class.'">';

View file

@ -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 '</table>';
print '</div>';
?>
<script type="text/javascript">
jQuery(document).ready(function() {
function init_savebutton() {
console.log("We check if at least one line is checked")
print '<script type="text/javascript">
jQuery(document).ready(function() {
function init_savebutton()
{
console.log("We check if at least one line is checked")
atleastoneselected = 0;
jQuery(".checkforselect").each(function(index) {
/* console.log( index + ": " + $( this ).text() ); */
if ($(this).is(':checked')) atleastoneselected++;
});
atleastoneselected=0;
jQuery(".checkforselect").each(function( index ) {
/* console.log( index + ": " + $( this ).text() ); */
if ($(this).is(\':checked\')) atleastoneselected++;
});
if (atleastoneselected) jQuery("#changeaccount").removeAttr('disabled');
else jQuery("#changeaccount").attr('disabled', 'disabled');
if (atleastoneselected) jQuery("#changeaccount").attr('class', 'button');
else jQuery("#changeaccount").attr('class', 'button');
}
if (atleastoneselected) jQuery("#changeaccount").removeAttr(\'disabled\');
else jQuery("#changeaccount").attr(\'disabled\',\'disabled\');
if (atleastoneselected) jQuery("#changeaccount").attr(\'class\',\'button\');
else jQuery("#changeaccount").attr(\'class\',\'button\');
}
jQuery(".checkforselect").change(function() {
init_savebutton();
});
jQuery(".productforselect").change(function() {
console.log($(this).attr("id")+" "+$(this).val());
jQuery(".checkforselect").change(function() {
init_savebutton();
});
jQuery(".productforselect").change(function() {
console.log($(this).attr("id") + " " + $(this).val());
if ($(this).val() && $(this).val() != -1) {
$(".productforselect"+$(this).attr("id")).prop(\'checked\', true);
$(".productforselect"+$(this).attr("id")).prop('checked', true);
} else {
$(".productforselect"+$(this).attr("id")).prop(\'checked\', false);
$(".productforselect"+$(this).attr("id")).prop('checked', false);
}
init_savebutton();
});
init_savebutton();
});
init_savebutton();
init_savebutton();
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);
}
});
});
</script>';
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);
}
});
});
</script>
<?php
print '</form>';

View file

@ -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<string,mixed> $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) {

View file

@ -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)
{

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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

View file

@ -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)
{

View file

@ -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) {

View file

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

View file

@ -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);

View file

@ -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)."'";

View file

@ -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)
{

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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)
{

View file

@ -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);

View file

@ -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
*/

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 = '')
{

View file

@ -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)
{

View file

@ -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 = '')
{

View file

@ -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
}
/*

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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.

View file

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

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Jean-Rémi Taponier <jean-remi@netlogic.fr>
*
@ -91,7 +91,7 @@ class mod_bookkeeping_helium extends ModeleNumRefBookkeeping
$tooltip .= $langs->trans("GenericMaskCodes5");
//$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskbookkeeping" value="'.getDolGlobalString("BOOKKEEPING_HELIUM_MASK").'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$text .= '<tr><td>'.$langs->trans("Mask").':</td>';
$text .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="mask" value="'.getDolGlobalString('ASSET_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskBom" value="'.getDolGlobalString('BOM_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskchequereceipts" value="' . getDolGlobalString('CHEQUERECEIPTS_THYME_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskorder" value="'.getDolGlobalString("COMMANDE_SAPHIR_MASK").'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -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
*/

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskdelivery" value="'.getDolGlobalString('DELIVERY_SAPHIR_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
*/

View file

@ -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
*/

View file

@ -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
*/

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2017 Maxime Kohlhaas <support@atm-consulting.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$mask = getDolGlobalString('EXPENSEREPORT_SAND_MASK');
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskvalue" value="'.$mask.'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -4,7 +4,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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
*/

View file

@ -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
*/

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskEvaluation" value="'.getDolGlobalString('HRM_EVALUATION_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2025 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$mask = getDolGlobalString('MEMBER_CUSTOM_MASK');
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskvalue" value="'.$mask.'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
@ -84,7 +84,7 @@ class mod_mo_advanced extends ModeleNumRefMos
$tooltip .= $langs->trans("GenericMaskCodes5");
//$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$text .= '<tr><td>'.$langs->trans("Mask").':</td>';
$text .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskMo" value="'.getDolGlobalString('MRP_MO_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskpayment" value="'.getDolGlobalString('PAYMENT_ANT_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -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
*/

View file

@ -3,7 +3,7 @@
* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// $tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix customers
// Setting of prefix customers
$texte .= '<tr><td>'.$langs->trans("ProductCodeModel").'</td>';
$texte .= '<td class="right nowraponall">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value1" placeholder="'.$langs->trans("Mask").'" value="'.getDolGlobalString('PRODUCT_ELEPHANT_MASK_PRODUCT').'"'.$disabled.'>', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';
@ -110,7 +110,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
$texte .= '</tr>';
// Parametrage du prefix suppliers
// Setting of prefix suppliers
$texte .= '<tr><td>'.$langs->trans("ServiceCodeModel").'</td>';
$texte .= '<td class="right nowraponall">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value2" placeholder="'.$langs->trans("Mask").'" value="'.getDolGlobalString('PRODUCT_ELEPHANT_MASK_SERVICE').'"'.$disabled.'>', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';
$texte .= '</tr>';
@ -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)

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
@ -89,7 +89,7 @@ class mod_lot_advanced extends ModeleNumRefBatch
$tooltip .= $langs->trans("GenericMaskCodes5");
//$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskLot" value="'.$mask.'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
@ -89,7 +89,7 @@ class mod_sn_advanced extends ModeleNumRefBatch
$tooltip .= $langs->trans("GenericMaskCodes5");
//$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskSN" value="'.$mask.'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -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
*/

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
*/

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="masktask" value="'.getDolGlobalString('PROJECT_TASK_UNIVERSAL_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -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
*/

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$mask = !getDolGlobalString('PROPALE_SAPHIR_MASK') ? '' : $conf->global->PROPALE_SAPHIR_MASK;
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskpropal" value="'.$mask.'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -4,7 +4,7 @@
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Eric Seigne <eric.seigne@cap-rel.fr>
* Copyright (C) 2025 Charlene Benke <charlene@patas-monkey.com>
@ -110,7 +110,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
$tooltip .= $langs->trans("GenericMaskCodes5");
//$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix customers
// Setting of prefix customers
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):</td>';
$texte .= '<td class="right nowraponall">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value1" value="'.getDolGlobalString('COMPANY_ELEPHANT_MASK_CUSTOMER').'"'.$disabled.'>', $tooltip, 1, 'help', '', 0, 3, 'tooltipelephantcutomer').'</td>';
@ -118,7 +118,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
$texte .= '</tr>';
// Parametrage du prefix suppliers
// Setting of prefix suppliers
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'):</td>';
$texte .= '<td class="right nowraponall">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="value2" value="'.getDolGlobalString('COMPANY_ELEPHANT_MASK_SUPPLIER').'"'.$disabled.'>', $tooltip, 1, 'help', '', 0, 3, 'tooltipelephantsupplier').'</td>';
$texte .= '</tr>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
@ -86,7 +86,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer
$tooltip .= $langs->trans("GenericMaskCodes5");
//$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskStockTransfer" value="'.getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
*/

View file

@ -5,7 +5,7 @@
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
*/

View file

@ -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
*/

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskorder" value="'.getDolGlobalString("COMMANDE_FOURNISSEUR_ORCHIDEE_MASK").'">', $tooltip, 1, 'help', '', 0, 3, 'tooltiporchidee').'</td>';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="masksupplierpayment" value="'.getDolGlobalString("SUPPLIER_PAYMENT_BRODATOR_MASK").'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -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
*/

View file

@ -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
*/

View file

@ -4,6 +4,7 @@
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
*
* 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 .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="masksupplier_proposal" value="'.$mask.'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -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
*/

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
*/

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
@ -86,7 +86,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation
$tooltip .= $langs->trans("GenericMaskCodes5");
//$tooltip .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskWorkstation" value="'.getDolGlobalString('WORKSTATION_WORKSTATION_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -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
*/

View file

@ -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)
{

View file

@ -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)
{

View file

@ -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();

View file

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2015-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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)
{

View file

@ -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)."',";

View file

@ -8,7 +8,7 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016-2018 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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];

View file

@ -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();

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -9,7 +9,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
@ -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,";

View file

@ -1,14 +1,14 @@
<?php
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.com>
* Copyright (C) 2023 Sylvain Legrand <technique@infras.fr>
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Joachim Kueter <git-jk@bloxera.com>
* Copyright (C) 2023 Sylvain Legrand <technique@infras.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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 = '')
{

View file

@ -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();

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2020 Ahmad Jamaly Rabib <rabib@metroworks.co.jp>
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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;

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskKnowledgeRecord" value="'.getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK').'">', $tooltip, 1, '1').'</td>';

View file

@ -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").':<br><br>'."\n";
print '<select name="nouveaujour"> '."\n";
print '<OPTION VALUE="vide">&nbsp;</OPTION>'."\n";
print '<option value="vide">&nbsp;</option>'."\n";
for ($i = 1; $i < 32; $i++) {
print '<OPTION VALUE="'.$i.'">'.$i.'</OPTION>'."\n";
print '<option value="'.$i.'">'.$i.'</option>'."\n";
}
print '</select>'."\n";
@ -633,31 +632,31 @@ if (GETPOST('ajoutsujet')) {
print '<br><br>'.$langs->trans("AddStartHour").': <br><br>'."\n";
print '<select name="nouvelleheuredebut"> '."\n";
print '<OPTION VALUE="vide">&nbsp;</OPTION>'."\n";
print '<option value="vide">&nbsp;</option>'."\n";
for ($i = 0; $i < 24; $i++) {
print '<OPTION VALUE="'.$i.'">'.$i.' H</OPTION>'."\n";
print '<option value="'.$i.'">'.$i.' H</option>'."\n";
}
print '</select>'."\n";
print '<select name="nouvelleminutedebut"> '."\n";
print '<OPTION VALUE="vide">&nbsp;</OPTION>'."\n";
print '<OPTION VALUE="00">00</OPTION>'."\n";
print '<OPTION VALUE="15">15</OPTION>'."\n";
print '<OPTION VALUE="30">30</OPTION>'."\n";
print '<OPTION VALUE="45">45</OPTION>'."\n";
print '<option value="vide">&nbsp;</option>'."\n";
print '<option value="00">00</option>'."\n";
print '<option value="15">15</option>'."\n";
print '<option value="30">30</option>'."\n";
print '<option value="45">45</option>'."\n";
print '</select>'."\n";
print '<br><br>'.$langs->trans("AddEndHour").': <br><br>'."\n";
print '<select name="nouvelleheurefin"> '."\n";
print '<OPTION VALUE="vide">&nbsp;</OPTION>'."\n";
print '<option value="vide">&nbsp;</option>'."\n";
for ($i = 0; $i < 24; $i++) {
print '<OPTION VALUE="'.$i.'">'.$i.' H</OPTION>'."\n";
print '<option value="'.$i.'">'.$i.' H</option>'."\n";
}
print '</SELECT>'."\n";
print '<select name="nouvelleminutefin"> '."\n";
print '<OPTION VALUE="vide">&nbsp;</OPTION>'."\n";
print '<OPTION VALUE="00">00</OPTION>'."\n";
print '<OPTION VALUE="15">15</OPTION>'."\n";
print '<OPTION VALUE="30">30</OPTION>'."\n";
print '<OPTION VALUE="45">45</OPTION>'."\n";
print '<option value="vide">&nbsp;</option>'."\n";
print '<option value="00">00</option>'."\n";
print '<option value="15">15</option>'."\n";
print '<option value="30">30</option>'."\n";
print '<option value="45">45</option>'."\n";
print '</select>'."\n";
print '<br><br>';
@ -691,7 +690,7 @@ print '<div class="cadre div-table-responsive-no-min"> '."\n";
// Start to show survey result
print '<table class="resultats margintoponly">'."\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 '</tr>'."\n";
// Show choice titles
if ($object->format == "D") {
//affichage des sujets du sondage
// Displaying the survey subjects
print '<tr>'."\n";
print '<td></td>'."\n";
print '<td></td>'."\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 '<td></td>'."\n";
print '<td></td>'."\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 '<td></td>'."\n";
print '<td></td>'."\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 '</tr>'."\n";
//affichage des horaires
// Displaying time slots
if (strpos($object->sujet, '@') !== false) {
print '<tr>'."\n";
print '<td></td>'."\n";
@ -858,7 +857,7 @@ while ($compteur < $num) {
print dolPrintHTML($obj->name);
print '</td>'."\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 '</td>'."\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 '<td><input type="image" name="boutonp" class="borderimp classfortooltip" title="'.dolPrintHTML($langs->trans("AddTheVote")).'" value="'.$langs->trans("Vote").'" src="'.img_picto('', 'edit_add', '', 0, 1).'"></td>'."\n";
print '</tr>'."\n";
}

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$text .= '<tr><td>'.$langs->trans("Mask").':</td>';
$text .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskPartnership" value="'.getDolGlobalString('PARTNERSHIP_ADVANCED_MASK').'">', $tooltip, 1, 'help').'</td>';

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2008-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2022-2025 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
@ -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)
{

View file

@ -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
*/

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcand" value="'.getDolGlobalString('RECRUITMENT_RECRUITMENTCANDIDATURE_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 .= '<br>'.$langs->trans("GenericMaskCodes5b");
// Parametrage du prefix
// Setting of prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskjob" value="'.getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADVANCED_MASK').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name).'</td>';

View file

@ -1,6 +1,6 @@
<?php
/* Copyright (C) - 2013-2015 Jean-François FERRY <jfefe@aternatik.fr>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
/* Copyright (C) 2013-2015 Jean-François FERRY <jfefe@aternatik.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
@ -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 '<option value="'.$id.'"';
}
// Si selected est text, on compare avec code, sinon avec id
// If selected is text, we compare with code, otherwise with id
if (!empty($selected) && preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) {
print ' selected';
} elseif ($selected == $id) {

View file

@ -849,7 +849,7 @@ class PaymentSalary extends CommonObject
* @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
* @param string $option ''=Show ref, 'nolink'=No link
* @return string Chaine avec URL
* @return string String with URL
*/
public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1, $option = '')
{

View file

@ -105,13 +105,13 @@ class SupplierProposal extends CommonObject
public $author;
/**
* @var string
* @var string Reference entered when adding a line to the request
*/
public $ref_fourn; //Reference saisie lors de l'ajout d'une ligne à la demande
public $ref_fourn;
/**
* @var string
* @var string Reference entered when adding a line to the request
*/
public $ref_supplier; //Reference saisie lors de l'ajout d'une ligne à la demande
public $ref_supplier;
/**
* @var int
@ -389,7 +389,7 @@ class SupplierProposal extends CommonObject
$supplier_proposalligne->desc = $remise->description; // Description ligne
$supplier_proposalligne->tva_tx = $remise->tva_tx;
$supplier_proposalligne->subprice = -(float) $remise->amount_ht;
$supplier_proposalligne->fk_product = 0; // Id produit predefini
$supplier_proposalligne->fk_product = 0; // Predefined Product ID
$supplier_proposalligne->qty = 1;
$supplier_proposalligne->remise_percent = 0;
$supplier_proposalligne->rang = -1;
@ -422,10 +422,9 @@ class SupplierProposal extends CommonObject
/**
* Add a proposal line into database (linked to product/service or not)
* 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)
*
* @param string $desc Description of line
* @param float $pu_ht Unit price
@ -562,10 +561,9 @@ class SupplierProposal extends CommonObject
$product_type = $type;
}
// 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);
@ -695,7 +693,7 @@ class SupplierProposal extends CommonObject
}
}
// Mise a jour information denormalisees au niveau de la propale meme
// Update denormalized information at the present proposal level
$result = $this->update_price(1, 'auto', 0, $this->thirdparty); // This method is designed to add line from user input so total calculation must be done using 'auto' mode.
if ($result > 0) {
$this->db->commit();
@ -769,10 +767,9 @@ class SupplierProposal extends CommonObject
if ($this->status == 0) {
$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);
@ -1080,7 +1077,7 @@ class SupplierProposal extends CommonObject
}
/*
* Insertion du detail des produits dans la base
* Insert products details into database
*/
if (!$error) {
$fk_parent_line = 0;
@ -1273,7 +1270,7 @@ class SupplierProposal extends CommonObject
}
/**
* Load a proposal from database and its ligne array
* Load a proposal from database and its lines array
*
* @param int $rowid id of object to load
* @param string $ref Ref of proposal
@ -3000,7 +2997,7 @@ class SupplierProposalLine extends CommonObjectLine
/**
* @var int ID
*/
public $fk_product; // Id produit predefini
public $fk_product; // Predefined Product ID
/**
* @deprecated Use $product_type
@ -3073,21 +3070,21 @@ class SupplierProposalLine extends CommonObjectLine
* @var int
*/
public $info_bits = 0; // Liste d'options cumulables:
// Bit 0: 0 si TVA normal - 1 if TVA NPR
// Bit 1: 0 ligne normal - 1 if fixed reduction
// Bit 0: 0 if TVA normal - 1 if TVA NPR
// Bit 1: 0 normal line - 1 if fixed reduction
/**
* @var float
*/
public $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne
public $total_ht; // Line Net Total (HT), including all quantity and the line discount
/**
* @var float
*/
public $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne
public $total_tva; // Line Net Total (VAT), including all quantity and the line discount
/**
* @var float
*/
public $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne
public $total_ttc; // Line Net Total (TTC), including all quantity and the line discount
/**
* @var int|string
@ -3584,7 +3581,7 @@ class SupplierProposalLine extends CommonObjectLine
$this->db->begin();
// Mise a jour ligne en base
// Update line in database
$sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposaldet SET";
$sql .= " description = '".$this->db->escape($this->desc)."'";
$sql .= " , label = ".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null");
@ -3668,7 +3665,7 @@ class SupplierProposalLine extends CommonObjectLine
// phpcs:enable
$this->db->begin();
// Mise a jour ligne en base
// Update line in database
$sql = "UPDATE ".MAIN_DB_PREFIX."supplier_proposaldet SET";
$sql .= " total_ht = ".(float) price2num($this->total_ht, 'MT');
$sql .= ",total_tva = ".(float) price2num($this->total_tva, 'MT');

View file

@ -1229,7 +1229,7 @@ class User extends CommonObject
// Where clause for the list of permissions to delete
$wherefordel = "id=".((int) $rid);
// Suppression des droits induits
// Removal of induced rights
if ($subperms == 'lire' || $subperms == 'read') {
$wherefordel .= " OR (module='".$this->db->escape($module)."' AND perms='".$this->db->escape($perms)."' AND subperms IS NOT NULL)";
}
@ -1968,7 +1968,7 @@ class User extends CommonObject
return -1;
}
} else {
// $this->error deja positionne
// $this->error already set
dol_syslog(get_class($this)."::create_from_contact - 0");
$this->db->rollback();
@ -2781,9 +2781,9 @@ class User extends CommonObject
}
/**
* Renvoie la derniere erreur fonctionnelle de manipulation de l'objet
* Returns the last functional error when manipulating the object
*
* @return string chaine erreur
* @return string error string
*/
public function error()
{
@ -3430,7 +3430,7 @@ class User extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* 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<string,mixed> $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)
@ -3774,7 +3774,7 @@ class User extends CommonObject
public function update_ldap2dolibarr(&$ldapuser)
{
// phpcs:enable
// TODO: Voir pourquoi le update met à jour avec toutes les valeurs vide (global $user écrase ?)
// TODO: See why the update sets all values to empty (does global $user overwrite?)
global $user;
$socialnetworks = getArrayOfSocialNetworks();
@ -3979,8 +3979,6 @@ class User extends CommonObject
dol_syslog(get_class($this)."::get_full_tree dol_sort_array", LOG_DEBUG);
$this->users = dol_sort_array($this->users, 'fullname', 'asc', 1, 0, 1);
//var_dump($this->users);
return $this->users;
}
@ -4006,7 +4004,6 @@ class User extends CommonObject
dol_syslog("Build childid for id = ".$idtoscan);
foreach ($this->users as $id => $val) {
//var_dump($val['fullpath']);
if (preg_match('/_'.$idtoscan.'_/', $val['fullpath'])) {
$childids[$val['id']] = $val['id'];
}

View file

@ -59,7 +59,7 @@ class CommandeTest extends CommonClassTest
global $conf,$user,$langs,$db;
$db->begin(); // This is to have all actions inside a transaction even if test launched without suite.
if (!isModEnabled('commande')) {
if (!isModEnabled('order')) {
print __METHOD__." module customer order must be enabled.\n";
die(1);
}

View file

@ -57,7 +57,7 @@ class FactureTest extends CommonClassTest
*/
public static function setUpBeforeClass(): void
{
self::assertTrue(isModEnabled('facture'), " module customer invoice must be enabled");
self::assertTrue(isModEnabled('invoice'), " module customer invoice must be enabled");
self::assertFalse(isModEnabled('ecotaxdeee'), " module ecotaxdeee must not be enabled");
parent::setUpBeforeClass();
}