$permissiontoadd = $user->hasRight('stock', 'mouvement', 'creer');
$permissiontodelete = $user->hasRight('stock', 'mouvement', 'creer'); // There is no deletion permission for stock movement as we should never delete
$permissiontoread = $user->hasRight('stock', 'mouvement', 'lire');
$sql .= " GROUP BY cs.rowid, cs.fk_type, cs.fk_user, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, cs.fk_account, c.libelle, c.accountancy_code, ba.label, ba.ref, ba.number, ba.account_number, ba.iban_prefix, ba.bic, ba.currency_code, ba.clos, pay.code";
$sql .= " cs.amount, cs.date_ech, cs.libelle as label, cs.paye, cs.periode, cs.fk_account,";
$sql .= " cs.rowid, cs.libelle as label_sc, cs.fk_type as type, cs.periode, cs.date_ech, cs.amount as total, cs.paye,";
-$sql .= " p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_modification, p.budget_amount,";
-$sql .= " t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_modification,";
-$sql .= dolSqlDateFilter('p.datee', $search_eday, $search_emonth, $search_eyear);
-$sql = "SELECT ".$distinct." p.rowid as projectid, p.ref as projectref, p.title as projecttitle, p.fk_statut as projectstatus, p.datee as projectdatee, p.fk_opp_status, p.public, p.fk_user_creat as projectusercreate, p.usage_bill_time,";
$sql = "SELECT id_users, nom as name, id_sondage, reponses";
-$sql = "SELECT p.rowid, p.ref, p.title, p.dateo as date_start, p.datee as date_end, p.fk_statut as status, p.tms as datem";
-$sql = "SELECT s.rowid, s.nom as name, s.client, s.town, s.datec, s.datea";
$sql = 'SELECT nom as name, reponses';
$title = $langs->trans("Referers", $object->name);
$usercancreate = $user->hasRight('stock', 'mouvement', 'creer');
@@ -311,33 +174,19 @@ $usercandelete = $user->hasRight('stock', 'mouvement', 'creer');
$usercandelete = (($user->hasRight('stock', 'mouvement', 'supprimer')));
$usercanread = $user->hasRight('stock', 'mouvement', 'lire');
$usercanread = (($user->hasRight('stock', 'mouvement', 'lire')));
-* The hook contaxt commcard has been renamed thirdpartycomm
-* The hook contaxt thirdpartycard has been renamed thirdpartycontact
* The private array ->status_short, ->statuts and ->status_long are now array ->labelStatusShort and ->labelStatus everywhere.
- Fix: [ bug #485 ] Configurated amount for public auto-subscription form is not taken into account
- New: Add proposals into referer page of thirdparty.
AmountIn
NEW: ModuleBuilder: Checkin comments begin and end before each actions
+Vous pouvez voir la progression du ticket en cliquant sur le lien
for /F "tokens=2 delims=," %%i in ('tasklist /FI "IMAGENAME eq php.exe" /FO CSV /NH') do (
-foreach ($TWeek as $week_number) {
function checkES($IentOfi, $InumCta)
-function getFirstDayOfEachWeek($TWeek, $year)
-function getLastDayOfEachWeek($TWeek, $year)
-function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $TWeek = array())
if (!$user->hasRight('stock', 'mouvement', 'lire')) {
if (!empty($arrayfields['cs.periode']['checked'])) {
-if (!empty($arrayfields['p.datee']['checked'])) {
-if (!empty($arrayfields['t.datee']['checked'])) {
if ($action == "transfert") {
-if (empty($datee) && !empty($dateerfc)) { // deprecated
print $langs->trans("Developpers").':';
-print ' '."\n";
print ''.$langs->trans("NbOfMembers").' ('.$langs->trans("AllTime").') ';
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.periode", "", $param, '', $sortfield, $sortorder, 'center ');
select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth
select#date_startday, select#date_startmonth, select#date_endday, select#date_endmonth, select#reday, select#remonth,
- print '';
- print ' '.$langs->trans("TransferStock").' ';
- print ''.$langs->trans("TransferStock").' ';
- print 'id.'&id_entrepot='.$entrepotstatic->id.'&action=transfert&pdluoid='.$pdluo->id.'&token='.newToken().'">';
- print ' id.'&action=transfert&token='.newToken().'">'.$langs->trans("TransferStock").' ';
diff --git a/dev/tools/dolibarr-mysql2pgsql.pl b/dev/tools/dolibarr-mysql2pgsql.pl
index 17dda3cb48b..5e7d87d1234 100755
--- a/dev/tools/dolibarr-mysql2pgsql.pl
+++ b/dev/tools/dolibarr-mysql2pgsql.pl
@@ -157,7 +157,7 @@ foreach my $file (keys %filelist) {
print OUT "\\c ". $1;
next;
}
- if ($create_sql ne "") { # we are inside create table statement so lets process datatypes
+ if ($create_sql ne "") { # we are inside create table statement so let's process datatypes
if (/\);/i) { # end of create table sequence
$create_sql =~ s/,$//g; # strip last , inside create table
diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php
index 9b7bed014f7..85beb64f0ed 100644
--- a/dev/tools/dolibarr-postgres2mysql.php
+++ b/dev/tools/dolibarr-postgres2mysql.php
@@ -3,6 +3,7 @@
/*
* Copyright (C) 2005-2011 James Grant Lightbox Technologies Inc.
* Copyright (C) 2020 Laurent Destailleur
+ * Copyright (C) 2024 MDW
*
* 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
@@ -419,7 +420,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string'), but could also be (number, E'string'); so we can't search for the previous '
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
- // at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data
+ // at a time, and that's just stupid, so let's just hope this doesn't appear anywhere in the actual data
$after = str_replace(" (E'", " ('", $after);
$after = str_replace(", E'", ", '", $after);
@@ -439,7 +440,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string')
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
- // at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data
+ // at a time, and that's just stupid, so let's just hope this doesn't appear anywhere in the actual data
$after = str_replace(" (E'", " ('", $after);
$after = str_replace(", E'", ", '", $after);
@@ -457,7 +458,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
// in after, we need to watch out for escape format strings, ie (E'escaped \r in a string'), and ('bla',E'escaped \r in a string')
// ugh i guess its possible these strings could exist IN the data as well, but the only way to solve that is to process these lines one character
- // at a time, and that's just stupid, so lets just hope this doesn't appear anywhere in the actual data
+ // at a time, and that's just stupid, so let's just hope this doesn't appear anywhere in the actual data
// after the first line, we only need to check for it in the middle, not at the beginning of an insert (because the beginning will be on the first line)
// $after=str_replace(" (E'","' ('",$after);
@@ -497,7 +498,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$reg2 = array();
if (preg_match('/ALTER TABLE ([^\s]+)/', $pkey, $reg2)) {
if (empty($arrayofprimaryalreadyintabledef[$reg2[1]])) {
- // looks like we have a single line PRIMARY KEY definition, lets go ahead and add it
+ // looks like we have a single line PRIMARY KEY definition, let's go ahead and add it
$output .= str_replace("\n", "", $pkey);
// the postgres and mysql syntax for this is (at least, in the example im looking at)
// identical, so we can just add it as is.
diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php
index 7f9d5a12b52..1fff4a6a802 100644
--- a/htdocs/accountancy/bookkeeping/listbyaccount.php
+++ b/htdocs/accountancy/bookkeeping/listbyaccount.php
@@ -1032,7 +1032,7 @@ $sous_total_credit = 0;
$totalarray['val'] = array();
$totalarray['val']['totaldebit'] = 0;
$totalarray['val']['totalcredit'] = 0;
-$totalarray['val']['totalbalance']=0;
+$totalarray['val']['totalbalance'] = 0;
while ($i < min($num, $limit)) {
$line = $object->lines[$i];
@@ -1283,7 +1283,7 @@ while ($i < min($num, $limit)) {
// Label operation
if (!empty($arrayfields['t.label_operation']['checked'])) {
- // Affiche un lien vers la facture client/fournisseur
+ // Show a link to the customer/supplier invoice
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
if (strlen(length_accounta($line->subledger_account)) == 0) {
print ''.dol_escape_htmltag($line->label_operation).' ';
diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php
index 25e9b0ca80d..329b2986fe6 100644
--- a/htdocs/accountancy/class/accountingaccount.class.php
+++ b/htdocs/accountancy/class/accountingaccount.class.php
@@ -466,7 +466,7 @@ class AccountingAccount extends CommonObject
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $withlabel 0=No label, 1=Include label of account
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 7eb943244d4..05ffa3c1311 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -2291,7 +2291,7 @@ class Adherent extends CommonObject
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpictoimg 0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small, -4=???)
* @param int $maxlen length max label
@@ -3251,7 +3251,7 @@ class Adherent extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 605c9b248e6..3909b4a5e03 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -6,6 +6,7 @@
* Copyright (C) 2018-2019 Thibault Foucart
* Copyright (C) 2021 Waël Almoman
* Copyright (C) 2024 Frédéric France
+ * Copyright (C) 2024 MDW
*
* 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
@@ -699,9 +700,9 @@ class AdherentType extends CommonObject
if (isset($this->duration)) {
$datas['duration'] = ' '.$langs->trans("Duration").': '.$this->duration_value;
if ($this->duration_value > 1) {
- $dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years"));
+ $dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years"));
} elseif ($this->duration_value > 0) {
- $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year"));
+ $dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year"));
}
$datas['duration'] .= " " . (!empty($this->duration_unit) && isset($dur[$this->duration_unit]) ? $langs->trans($dur[$this->duration_unit]) : '');
}
@@ -710,7 +711,7 @@ class AdherentType extends CommonObject
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen length max label
@@ -970,7 +971,7 @@ class AdherentType extends CommonObject
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php
index 2012f7c839d..676c82818ef 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -420,7 +420,7 @@ class Subscription extends CommonObject
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $notooltip 1=Disable tooltip
@@ -536,7 +536,7 @@ class Subscription extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index b7eaba74209..fd65e1300f3 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -1622,7 +1622,7 @@ class BOM extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php
index 68283a0f3a3..53ae0710667 100644
--- a/htdocs/comm/action/class/api_agendaevents.class.php
+++ b/htdocs/comm/action/class/api_agendaevents.class.php
@@ -1,6 +1,7 @@
* Copyright (C) 2016 Laurent Destailleur
+ * Copyright (C) 2024 MDW
*
* 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
@@ -350,7 +351,7 @@ class AgendaEvents extends DolibarrApi
// phpcs:enable
$object = parent::_cleanObjectDatas($object);
- unset($object->note); // alreaydy into note_private
+ unset($object->note); // already in note_private or note_public
unset($object->usermod);
unset($object->libelle);
unset($object->context);
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 7d3d2fce514..15f6b6204ce 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -11,6 +11,7 @@
* Copyright (C) 2015 Marcos García
* Copyright (C) 2020 Open-Dsi
* Copyright (C) 2022 Anthony Berton
+ * Copyright (C) 2024 MDW
*
* 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
@@ -618,7 +619,7 @@ if ($object->id > 0) {
}
// Other attributes
- $parameters = array('socid'=>$object->id);
+ $parameters = array('socid' => $object->id);
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
// Sales representative
@@ -697,7 +698,7 @@ if ($object->id > 0) {
// Nbre max d'elements des petites listes
$MAXLIST = getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT');
- // Lien recap
+ // Link summary/status board
$boxstat .= '';
$boxstat .= '
';
$boxstat .= '';
@@ -926,7 +927,7 @@ if ($object->id > 0) {
* Latest orders
*/
if (isModEnabled('order') && $user->hasRight('commande', 'lire')) {
- $param ="";
+ $param = "";
$sql = "SELECT s.nom, s.rowid";
$sql .= ", c.rowid as cid, c.entity, c.fk_projet, c.total_ht";
@@ -1237,7 +1238,7 @@ if ($object->id > 0) {
print $late;
print " \n";
print '';
- print dol_trunc(strtolower(get_class($object)) == strtolower(Client::class) ? $objp->refcus : $objp->refsup, 12);
+ print dol_trunc(strtolower(get_class($object)) == strtolower(Client::class) ? $objp->refcus : $objp->refsup, 12);
print " \n";
//print ''.dol_print_date($db->jdate($objp->dc), 'day')." \n";
print ''.dol_print_date($db->jdate($objp->dcon), 'day')." \n";
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index b424f61832e..eda779bcd5b 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -3723,7 +3723,7 @@ class Propal extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param string $option Where point the link ('expedition', 'document', ...)
@@ -3938,7 +3938,7 @@ class Propal extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 937ecbb5582..011827440fb 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -390,17 +390,17 @@ class Commande extends CommonOrder
/*
* Signed by sender
*/
- CONST STATUS_SIGNED_SENDER = 1;
+ const STATUS_SIGNED_SENDER = 1;
/*
* Signed by receiver
*/
- CONST STATUS_SIGNED_RECEIVER = 2;
+ const STATUS_SIGNED_RECEIVER = 2;
/*
* Signed by all
*/
- CONST STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract)
+ const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract)
/**
@@ -3815,7 +3815,7 @@ class Commande extends CommonOrder
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index b25dcf6001b..16139ea4ea1 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -557,12 +557,12 @@ class Account extends CommonObject
$num = $this->db->num_rows($result);
while ($i < $num) {
$obj = $this->db->fetch_object($result);
- // Anciens liens (pour compatibilite)
+ // Old links (for compatibility)
$lines[$i][0] = $obj->url;
$lines[$i][1] = $obj->url_id;
$lines[$i][2] = $obj->label;
$lines[$i][3] = $obj->type;
- // Nouveaux liens
+ // New links
$lines[$i]['url'] = $obj->url;
$lines[$i]['url_id'] = $obj->url_id;
$lines[$i]['label'] = $obj->label;
@@ -1515,7 +1515,7 @@ class Account extends CommonObject
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto Include picto into link
* @param string $mode ''=Link to card, 'transactions'=Link to transactions card
@@ -1950,7 +1950,7 @@ class Account extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php
index 177b64dcccd..e7606bee7bf 100644
--- a/htdocs/compta/bank/class/paymentvarious.class.php
+++ b/htdocs/compta/bank/class/paymentvarious.class.php
@@ -680,7 +680,7 @@ class PaymentVarious extends CommonObject
/**
- * Send name clicable (with possibly the picto)
+ * Send name clickable (with possibly the picto)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param string $option link option
@@ -819,7 +819,7 @@ class PaymentVarious extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
index 9621224c0c4..13697229c7f 100644
--- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php
+++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
@@ -370,7 +370,7 @@ class CashControl extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param string $option On what the link point to ('nolink', ...)
@@ -448,7 +448,7 @@ class CashControl extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php
index 2195f0b5a3e..8501dcc1322 100644
--- a/htdocs/compta/deplacement/class/deplacement.class.php
+++ b/htdocs/compta/deplacement/class/deplacement.class.php
@@ -4,6 +4,7 @@
* Copyright (C) 2009-2012 Regis Houssin
* Copyright (C) 2013 Florian Henry
* Copyright (C) 2019-2024 Frédéric France
+ * Copyright (C) 2024 MDW
*
* 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
@@ -362,14 +363,14 @@ class Deplacement extends CommonObject
$this->labelStatusShort[self::STATUS_REFUNDED] = $langs->transnoentitiesnoconv('Refunded');
}
- $status_logo = array(0 => 'status0', 1=>'status4', 2 => 'status1', 4 => 'status6', 5 => 'status4', 6 => 'status6', 99 => 'status5');
+ $status_logo = array(0 => 'status0', 1 => 'status4', 2 => 'status1', 4 => 'status6', 5 => 'status4', 6 => 'status6', 99 => 'status5');
$statusType = $status_logo[$status];
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
}
/**
- * Return clicable name (with picto eventually)
+ * 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
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 5f7273fd6ef..e624bb2d52c 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -1432,7 +1432,7 @@ class FactureRec extends CommonInvoice
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto Add picto into link
* @param string $option Where point the link
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 2985c0f75bb..176e74c49d1 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1968,7 +1968,7 @@ class Facture extends CommonInvoice
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param string $option Where point the link
@@ -2861,7 +2861,7 @@ class Facture extends CommonInvoice
// Delete invoice line
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facturedet WHERE fk_facture = '.((int) $rowid);
- if ($this->db->query($sqlef) && $this->db->query($sql) && $this->delete_linked_contact() >= 0 ) {
+ if ($this->db->query($sqlef) && $this->db->query($sql) && $this->delete_linked_contact() >= 0) {
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture WHERE rowid = '.((int) $rowid);
$resql = $this->db->query($sql);
@@ -5985,7 +5985,7 @@ class Facture extends CommonInvoice
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php
index e49c317a53e..41a9ff30011 100644
--- a/htdocs/compta/localtax/class/localtax.class.php
+++ b/htdocs/compta/localtax/class/localtax.class.php
@@ -545,7 +545,7 @@ class Localtax extends CommonObject
$ok = 0;
}
- // Mise a jour liens
+ // Update the links
$result = $acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/localtax/card.php?id=', "(VATPayment)", "payment_vat");
if ($result < 0) {
$this->error = $acc->error;
@@ -598,7 +598,7 @@ class Localtax extends CommonObject
* Returns clickable name
*
* @param int $withpicto 0=Link, 1=Picto into link, 2=Picto
- * @param string $option Sur quoi pointe le lien
+ * @param string $option What the link points to
* @return string Chaine avec URL
*/
public function getNomUrl($withpicto = 0, $option = '')
@@ -653,7 +653,7 @@ class Localtax extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php
index 6644378a926..7e65f5a61c6 100644
--- a/htdocs/compta/localtax/quadri_detail.php
+++ b/htdocs/compta/localtax/quadri_detail.php
@@ -505,7 +505,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) {
print ' ';
}
- if (count($x_coll) == 0) { // Show a total ine if nothing shown
+ if (count($x_coll) == 0) { // Show a total line if nothing shown
print '';
print ' ';
print ''.$langs->trans("Total").': ';
diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
index 70274fd13c3..837358ee7e1 100644
--- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php
+++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
@@ -896,10 +896,10 @@ class RemiseCheque extends CommonObject
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
- * @param string $option Sur quoi pointe le lien
+ * @param string $option Indicate where the link points to
* @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
@@ -996,7 +996,7 @@ class RemiseCheque extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index 5b60317e5db..3ecb65e120a 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -891,7 +891,7 @@ class Paiement extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Mise a jour du lien entre le paiement et la ligne generee dans llx_bank
+ * Update the link between the Payment and the line generated in llx_bank
*
* @param int $id_bank Id compte bancaire
* @return int Return integer <0 if KO, >0 if OK
@@ -1282,10 +1282,10 @@ class Paiement extends CommonObject
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
- * @param string $option Sur quoi pointe le lien
+ * @param string $option What the link points to
* @param string $mode 'withlistofinvoices'=Include list of invoices into tooltip
* @param int $notooltip 1=Disable tooltip
* @param string $morecss Add more CSS
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index e8770f12f0e..f44546192ec 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -2213,7 +2213,7 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR .= ' ' . $CrLf;
$XML_DEBITOR .= ' ' . $CrLf;
$XML_DEBITOR .= ' ' . $CrLf;
- if (getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC')==0) {
+ if (getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC') == 0) {
$XML_DEBITOR .= ' ' . $row_bic . ' ' . $CrLf;
}
$XML_DEBITOR .= ' ' . $CrLf;
@@ -2771,7 +2771,7 @@ class BonPrelevement extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php
index 1a5cbbd740d..410e19fd950 100644
--- a/htdocs/compta/sociales/class/chargesociales.class.php
+++ b/htdocs/compta/sociales/class/chargesociales.class.php
@@ -755,7 +755,7 @@ class ChargeSociales extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
index 9d0f05c69ea..8e5e8fc3da8 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -674,7 +674,7 @@ class PaymentSocialContribution extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank generee
+ * Update the link between the Payment and the line generated in llx_bank
*
* @param int $id_bank Id if bank
* @return int >0 if OK, <=0 if KO
@@ -759,7 +759,7 @@ class PaymentSocialContribution extends CommonObject
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen Longueur max libelle
diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php
index ff93f20f336..86ef3612af1 100644
--- a/htdocs/compta/stats/index.php
+++ b/htdocs/compta/stats/index.php
@@ -5,6 +5,7 @@
* Copyright (C) 2017 Olivier Geffroy
* Copyright (C) 2018-2020 Frédéric France
* Copyright (C) 2024 Benjamin B.
+ * Copyright (C) 2024 MDW
*
* 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
@@ -677,8 +678,8 @@ print '';
print '';
- // Factures non reglees
- // Y a bug ici. Il faut prendre le reste a payer et non le total des factures non reglees !
+ // Unpaid invoices
+ // There is a bug here. We need to use the remaining to pay and not the total of unpaid invoices!
$sql = "SELECT f.ref, f.rowid, s.nom, s.rowid as socid, f.total_ttc, sum(pf.amount) as am";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f left join ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture";
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index 113f3970e76..dc5fa89221f 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -723,7 +723,7 @@ class Tva extends CommonObject
}
/**
- * Send name clicable (with possibly the picto)
+ * Send name clickable (with possibly the picto)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param string $option link option
@@ -915,7 +915,7 @@ class Tva extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index f779a866aae..0704774bae0 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -2060,7 +2060,7 @@ class Contrat extends CommonObject
}
/**
- * Return clicable name (with picto eventually)
+ * Return clickable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlength Max length of ref
@@ -2889,7 +2889,7 @@ class Contrat extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
@@ -3233,7 +3233,7 @@ class ContratLigne extends CommonObjectLine
}
/**
- * Return clicable name (with picto eventually) for ContratLigne
+ * Return clickable name (with picto eventually) for ContratLigne
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlength Max length
diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php
index b1a4d7c824a..f4b328cfa72 100644
--- a/htdocs/core/ajax/objectonoff.php
+++ b/htdocs/core/ajax/objectonoff.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2024 MDW
*
* 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
@@ -77,7 +78,7 @@ if (!empty($user->socid)) {
// We check permission.
// Check is done on $user->rights->element->create or $user->rights->element->subelement->create (because $action = 'set')
-if (preg_match('/statu[st]$/', $field) || ($field == 'evenunsubscribe' && $object->table_element == 'mailing')) {
+if (preg_match('/stat[u][st]$/', $field) || ($field == 'evenunsubscribe' && $object->table_element == 'mailing')) {
restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission);
} elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products
restrictedArea($user, 'produit|service', $object, 'product&product', '', '', 'rowid');
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index 430c477e89a..9db27df35a1 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -177,7 +177,7 @@ abstract class CommonInvoice extends CommonObject
/**
* Proforma invoice.
- * @deprectad Remove this. A "proforma invoice" is an order with a look of invoice, not an invoice !
+ * @deprecated Remove this. A "proforma invoice" is an order with a look of invoice, not an invoice !
*/
const TYPE_PROFORMA = 4;
@@ -676,7 +676,7 @@ abstract class CommonInvoice extends CommonObject
} elseif ($this->type == CommonInvoice::TYPE_DEPOSIT) {
$labellong = "InvoiceDeposit";
$labelshort = "Deposit";
- } elseif ($this->type == CommonInvoice::TYPE_PROFORMA) {
+ } elseif ($this->type == CommonInvoice::TYPE_PROFORMA) { // @phan-suppress-current-line PhanDeprecatedClassConstant
$labellong = "InvoiceProForma"; // Not used.
$labelshort = "ProForma";
} elseif ($this->type == CommonInvoice::TYPE_SITUATION) {
diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php
index 110a67c5e1c..c8dbda9c9bf 100644
--- a/htdocs/core/class/commonorder.class.php
+++ b/htdocs/core/class/commonorder.class.php
@@ -1,6 +1,7 @@
* Copyright (C) 2024 Frédéric France
+ * Copyright (C) 2024 MDW
*
* 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
@@ -35,7 +36,7 @@ abstract class CommonOrder extends CommonObject
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
* @param array $arraydata Array of data
@@ -72,7 +73,7 @@ abstract class CommonOrder extends CommonObject
return $return;
}
- /** return nb of fines of order where products or services that can be buyed
+ /** return nb of fines of order where products or services that can be bought
*
* @param boolean $ignoreFree Ignore free lines
* @return int number of products or services on buy in a command
@@ -84,10 +85,12 @@ abstract class CommonOrder extends CommonObject
$return = 0;
foreach ($this->lines as $line) {
if (empty($line->fk_product) && !$ignoreFree) {
- $return ++;
+ $return++;
} elseif ((int) $line->fk_product > 0) {
if ($product->fetch($line->fk_product) > 0) {
- if ($product->status_buy) $return ++;
+ if ($product->status_buy) {
+ $return++;
+ }
}
}
}
@@ -143,13 +146,13 @@ abstract class CommonOrderLine extends CommonObjectLine
* Boolean that indicates whether the product is available for sale '1' or not '0'
* @var int
*/
- public $product_tosell=0;
+ public $product_tosell = 0;
/**
* Boolean that indicates whether the product is available for purchase '1' or not '0'
* @var int
*/
- public $product_tobuy=0;
+ public $product_tobuy = 0;
/**
* Product description
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 2ae7c0bf351..bc19b00d074 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -1914,7 +1914,7 @@ class ExtraFields
$resql = $this->db->query($sql);
if ($resql) {
if ($filter_categorie === false) {
- $value = ''; // value was used, so now we reste it to use it to build final output
+ $value = ''; // value was used, so now we reset it to use it to build final output
$obj = $this->db->fetch_object($resql);
@@ -2024,7 +2024,7 @@ class ExtraFields
$resql = $this->db->query($sql);
if ($resql) {
if ($filter_categorie === false) {
- $value = ''; // value was used, so now we reste it to use it to build final output
+ $value = ''; // value was used, so now we reset it to use it to build final output
$toprint = array();
while ($obj = $this->db->fetch_object($resql)) {
// Several field into label (eq table:code|label:rowid)
diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php
index 947ea1874a9..267abf6a798 100644
--- a/htdocs/core/class/fiscalyear.class.php
+++ b/htdocs/core/class/fiscalyear.class.php
@@ -301,7 +301,7 @@ class Fiscalyear extends CommonObject
}
/**
- * Return clicable link of object (with eventually picto)
+ * Return clickable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param int $notooltip 1=Disable tooltip
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index b6a506e4e80..e1da5b7a5a4 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -5,6 +5,7 @@
* Copyright (C) 2017 Rui Strecht
* Copyright (C) 2020 Open-Dsi
* Copyright (C) 2024 Frédéric France
+ * Copyright (C) 2024 MDW
*
* 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
@@ -388,7 +389,7 @@ class FormCompany extends Form
public function select_state_ajax($parent_field_id = 'country_id', $selected = 0, $country_codeid = 0, $htmlname = 'state_id', $morecss = 'maxwidth200onsmartphone minwidth300')
{
$html = '