From 1454d942ef466171bfaed624b4ad35fea7e955e6 Mon Sep 17 00:00:00 2001 From: philippe Date: Sun, 27 Sep 2015 11:06:45 +0200 Subject: [PATCH 01/12] missing translation --- htdocs/core/modules/modContrat.class.php | 2 +- htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modContrat.class.php b/htdocs/core/modules/modContrat.class.php index 636dda7d99f..b998ac04b47 100644 --- a/htdocs/core/modules/modContrat.class.php +++ b/htdocs/core/modules/modContrat.class.php @@ -136,7 +136,7 @@ class modContrat extends DolibarrModules $r=1; $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='ContractAndServices'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_label[$r]='ContractsAndServices'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='contract'; $this->export_permission[$r]=array(array("contrat","export")); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode', diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 6505aef89d8..5966578021a 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1170,6 +1170,7 @@ ContractsNumberingModules=Contracts numbering modules TemplatePDFContracts=Contracts documents models FreeLegalTextOnContracts=Free text on contracts WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty) +ContractsAndServices=List of contracts and services ##### Members ##### MembersSetup=Members module setup MemberMainOptions=Main options From 6f128907fee670348dccfdfafd5624623d7d7ce1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 27 Sep 2015 11:30:23 +0200 Subject: [PATCH 02/12] fix : Missing argument 1 for CommonDocGenerator::__construct() --- htdocs/exports/export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 4eac9e03342..be7787f4f54 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -112,7 +112,7 @@ $field=GETPOST("field"); $objexport=new Export($db); $objexport->load_arrays($user,$datatoexport); -$objmodelexport=new ModeleExports(); +$objmodelexport=new ModeleExports($db); $form = new Form($db); $htmlother = new FormOther($db); $formfile = new FormFile($db); From 0f27edad5d8fcf762bd8848d5779fdb234ae7e8b Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 28 Sep 2015 10:14:19 +0200 Subject: [PATCH 03/12] FIX : When delete actioncomm also delete actioncomm_resources --- htdocs/comm/action/class/actioncomm.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 341924ffa13..8bdee37759b 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -536,6 +536,16 @@ class ActionComm extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $res=$this->db->query($sql); + if ($res < 0) { + $this->error=$this->db->lasterror(); + $error++; + } + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources"; + $sql.= " WHERE fk_actioncomm=".$this->id; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); $res=$this->db->query($sql); if ($res < 0) { From 453ed8a05e757cfc38d308abe8d8c9da526738a1 Mon Sep 17 00:00:00 2001 From: Alexis ALGOUD Date: Mon, 28 Sep 2015 15:36:27 +0200 Subject: [PATCH 04/12] FIX error in SQL due to a previous fix --- htdocs/core/lib/security.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index dd8c88162a5..c4989b3c087 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -448,7 +448,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature if (empty($dbt_keyfield)) dol_print_error('','Param dbt_keyfield is required but not defined'); - $sql = "SELECT dbt.id"; + $sql = "SELECT dbt.".$dbt_keyfield; $sql.= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (dbt.".$dbt_keyfield." = s.rowid)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON (sc.fk_soc = dbt.".$dbt_keyfield.")"; From 0b7305d21a6053f3c5d57593ed16fa01f05c69e1 Mon Sep 17 00:00:00 2001 From: arnaud Date: Mon, 28 Sep 2015 16:52:46 +0200 Subject: [PATCH 05/12] FIX facturestat bad sql when customer view is limited --- htdocs/compta/facture/class/facturestats.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 5d8d22cfa9d..5a9493b83b0 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -168,7 +168,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")"; $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; @@ -188,7 +188,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg"; $sql.= " FROM ".$this->from; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; $sql.= " GROUP BY year"; $sql.= $this->db->order('year','DESC'); From 4f5e207f08e68958184febd18882160f22bed143 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 29 Sep 2015 09:45:04 +0200 Subject: [PATCH 06/12] review --- htdocs/comm/action/class/actioncomm.class.php | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 8bdee37759b..489262eb1a8 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -532,6 +532,7 @@ class ActionComm extends CommonObject $error=0; $this->db->begin(); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; @@ -543,16 +544,18 @@ class ActionComm extends CommonObject $error++; } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources"; - $sql.= " WHERE fk_actioncomm=".$this->id; - - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $res=$this->db->query($sql); - if ($res < 0) { - $this->error=$this->db->lasterror(); - $error++; + if (! $error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources"; + $sql.= " WHERE fk_actioncomm=".$this->id; + + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $res=$this->db->query($sql); + if ($res < 0) { + $this->error=$this->db->lasterror(); + $error++; + } } - + // Removed extrafields if (! $error) { $result=$this->deleteExtraFields(); From 766b8535ae87a434d5438c4422fb75863ee777cc Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 29 Sep 2015 09:47:23 +0200 Subject: [PATCH 07/12] spacing --- htdocs/comm/action/class/actioncomm.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 489262eb1a8..28c54db1f9e 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -532,7 +532,6 @@ class ActionComm extends CommonObject $error=0; $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; $sql.= " WHERE id=".$this->id; From bb0de1dcadc84b7ad492a5c1b9925a7e277c843f Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 29 Sep 2015 15:00:11 +0200 Subject: [PATCH 08/12] FIX : update2.php test res befre assign it --- htdocs/install/upgrade2.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 0c96c3c6d5c..1fb081b5c3f 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -3818,8 +3818,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array()) if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Service"); + $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php'; if ($res) { - $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php'; $mod=new modService($db); //$mod->remove('noboxes'); $mod->init('newboxdefonly'); @@ -3828,8 +3828,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array()) if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Commande"); + $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php'; if ($res) { - $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php'; $mod=new modCommande($db); //$mod->remove('noboxes'); $mod->init('newboxdefonly'); @@ -3838,8 +3838,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array()) if ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module Facture"); + $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php'; if ($res) { - $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php'; $mod=new modFacture($db); //$mod->remove('noboxes'); $mod->init('newboxdefonly'); @@ -3878,8 +3878,8 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array()) if ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ECM"); + $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php'; if ($res) { - $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php'; $mod=new modECM($db); $mod->remove('noboxes'); // We need to remove because a permission id has been removed $mod->init('newboxdefonly'); From fecd213bb838e48390eb37e9f3cd9bcfcc6b4b55 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 29 Sep 2015 16:57:05 +0200 Subject: [PATCH 09/12] FIX: display error on extrafields on ficheinter --- htdocs/fichinter/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 69ec8984cf6..56287721180 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -867,6 +867,7 @@ else if ($action == 'update_extras') if ($result < 0) { $error++; + setEventMessage($object->error,'errors'); } } else if ($reshook < 0) $error++; From e209fb23a28d908b0d3d3ebdd7ab40f2c2d3ebdf Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 29 Sep 2015 18:27:39 +0200 Subject: [PATCH 10/12] FIX : Admin fiche inter page do not take good action --- htdocs/admin/fichinter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index dad5f484a4d..392779e7d41 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -203,7 +203,6 @@ else if ($action == 'set_FICHINTER_FREE_TEXT') else if ($action == 'set_FICHINTER_DRAFT_WATERMARK') { $draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha'); - $res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -538,7 +537,7 @@ print ''; print ''; print "\n"; - +print ''; // print products on fichinter $var=! $var; print '
'; From a96b92a618e96d605bf72ecb5972155e0773200d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Wed, 30 Sep 2015 14:06:45 +0200 Subject: [PATCH 11/12] FIX : Email selector contact must not include inactive contact --- htdocs/core/modules/mailings/contacts1.modules.php | 3 +++ htdocs/core/modules/mailings/contacts2.modules.php | 3 +++ htdocs/core/modules/mailings/contacts3.modules.php | 3 +++ htdocs/core/modules/mailings/contacts4.modules.php | 3 +++ 4 files changed, 12 insertions(+) diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 3f8df87cd7a..f898442fae7 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -75,6 +75,7 @@ class mailing_contacts1 extends MailingTargets $statssql[0].= " WHERE c.entity IN (".getEntity('societe', 1).")"; $statssql[0].= " AND c.email != ''"; // Note that null != '' is false $statssql[0].= " AND c.no_email = 0"; + $statssql[0].= " AND c.statut = 1"; return $statssql; } @@ -98,6 +99,7 @@ class mailing_contacts1 extends MailingTargets $sql.= " WHERE c.entity IN (".getEntity('societe', 1).")"; $sql.= " AND c.email != ''"; // Note that null != '' is false $sql.= " AND c.no_email = 0"; + $sql.= " AND c.statut = 1"; // La requete doit retourner un champ "nb" pour etre comprise // par parent::getNbOfRecipients @@ -204,6 +206,7 @@ class mailing_contacts1 extends MailingTargets $sql.= " WHERE c.entity IN (".getEntity('societe', 1).")"; $sql.= " AND c.email <> ''"; $sql.= " AND c.no_email = 0"; + $sql.= " AND c.statut = 1"; $sql.= " AND c.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; foreach($filtersarray as $key) { diff --git a/htdocs/core/modules/mailings/contacts2.modules.php b/htdocs/core/modules/mailings/contacts2.modules.php index fe49ce56b35..b0a82e5136e 100644 --- a/htdocs/core/modules/mailings/contacts2.modules.php +++ b/htdocs/core/modules/mailings/contacts2.modules.php @@ -86,6 +86,7 @@ class mailing_contacts2 extends MailingTargets $sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")"; $sql.= " AND sp.email <> ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; + $sql.= " AND sp.statut = 1"; //$sql.= " AND sp.poste != ''"; $sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$this->db->escape($filtersarray[0])."'"; @@ -168,6 +169,7 @@ class mailing_contacts2 extends MailingTargets $sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")"; $sql.= " AND sp.email != ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; + $sql.= " AND sp.statut = 1"; //$sql.= " AND sp.poste != ''"; // La requete doit retourner un champ "nb" pour etre comprise // par parent::getNbOfRecipients @@ -191,6 +193,7 @@ class mailing_contacts2 extends MailingTargets $sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")"; $sql.= " AND sp.email != ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; + $sql.= " AND sp.statut = 1"; $sql.= " AND (sp.poste IS NOT NULL AND sp.poste != '')"; $sql.= " GROUP BY sp.poste"; $sql.= " ORDER BY sp.poste"; diff --git a/htdocs/core/modules/mailings/contacts3.modules.php b/htdocs/core/modules/mailings/contacts3.modules.php index 92640291088..3333549e6da 100644 --- a/htdocs/core/modules/mailings/contacts3.modules.php +++ b/htdocs/core/modules/mailings/contacts3.modules.php @@ -85,6 +85,7 @@ class mailing_contacts3 extends MailingTargets if ($filtersarray[0] <> 'all') $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs"; $sql.= " WHERE sp.email <> ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; + $sql.= " AND sp.statut = 1"; $sql.= " AND sp.entity IN (".getEntity('societe', 1).")"; $sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_categorie = c.rowid"; @@ -173,6 +174,7 @@ class mailing_contacts3 extends MailingTargets $sql.= " WHERE c.entity IN (".getEntity('societe', 1).")"; $sql.= " AND c.email != ''"; // Note that null != '' is false $sql.= " AND c.no_email = 0"; + $sql.= " AND c.statut = 1"; /* $sql = "SELECT count(distinct(sp.email)) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,"; @@ -208,6 +210,7 @@ class mailing_contacts3 extends MailingTargets $sql.= " ".MAIN_DB_PREFIX."categorie_societe as cs"; $sql.= " WHERE sp.email != ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; + $sql.= " AND sp.statut = 1"; $sql.= " AND sp.entity IN (".getEntity('societe', 1).")"; $sql.= " AND cs.fk_categorie = c.rowid"; $sql.= " AND cs.fk_societe = sp.fk_soc"; diff --git a/htdocs/core/modules/mailings/contacts4.modules.php b/htdocs/core/modules/mailings/contacts4.modules.php index 59355b372fe..747370bac07 100644 --- a/htdocs/core/modules/mailings/contacts4.modules.php +++ b/htdocs/core/modules/mailings/contacts4.modules.php @@ -85,6 +85,7 @@ class mailing_contacts4 extends MailingTargets $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc"; $sql.= " WHERE sp.email != ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; + $sql.= " AND sp.statut = 1"; $sql.= " AND sp.entity IN (".getEntity('societe', 1).")"; if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'"; $sql.= " ORDER BY sp.lastname, sp.firstname"; @@ -173,6 +174,7 @@ class mailing_contacts4 extends MailingTargets $sql.= " WHERE c.entity IN (".getEntity('societe', 1).")"; $sql.= " AND c.email != ''"; // Note that null != '' is false $sql.= " AND c.no_email = 0"; + $sql.= " AND c.statut = 1"; /* $sql = "SELECT count(distinct(sp.email)) as nb"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,"; @@ -208,6 +210,7 @@ class mailing_contacts4 extends MailingTargets $sql.= " INNER JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; $sql.= " WHERE sp.email != ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; + $sql.= " AND sp.statut = 1"; $sql.= " AND sp.entity IN (".getEntity('societe', 1).")"; $sql.= " GROUP BY c.label"; $sql.= " ORDER BY c.label"; From 4da8fb901b0d28385fb5f94dd52f412b8c1e15fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 1 Oct 2015 10:48:09 +0200 Subject: [PATCH 12/12] Add comment --- htdocs/comm/propal/class/propalestats.class.php | 2 +- htdocs/commande/class/commandestats.class.php | 2 +- htdocs/compta/facture/class/facturestats.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index dc8501c37ba..c56bb753ade 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -48,7 +48,7 @@ class PropaleStats extends Stats * Constructor * * @param DoliDB $db Database handler - * @param int $socid Id third party for filter + * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. * @param int $userid Id user for filter (creation user) */ function __construct($db, $socid=0, $userid=0) diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 312e958a38e..1ab418a9daa 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -48,7 +48,7 @@ class CommandeStats extends Stats * Constructor * * @param DoliDB $db Database handler - * @param int $socid Id third party for filter + * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index 5d8d22cfa9d..17589145726 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -45,7 +45,7 @@ class FactureStats extends Stats * Constructor * * @param DoliDB $db Database handler - * @param int $socid Id third party for filter + * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */