diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 13066e7d6cf..7f8afbecf48 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -132,17 +132,17 @@ class ActionComm extends CommonObject private $libelle; /** - * @var integer Date creation record (datec) + * @var int Date creation record (datec) */ public $datec; /** - * @var integer Duration (duree) + * @var int Duration (duree) */ public $duree; /** - * @var integer Date modification record (tms) + * @var int Date modification record (tms) */ public $datem; @@ -171,27 +171,27 @@ class ActionComm extends CommonObject public $usermodid; /** - * @var integer Date action start (datep) + * @var int Date action start (datep) */ public $datep; /** - * @var integer Date action end (datef) + * @var int Date action end (datef) */ public $datef; /** - * @var integer This is date start action (datep) but modified to not be outside calendar view. + * @var int This is date start action (datep) but modified to not be outside calendar view. */ public $date_start_in_calendar; /** - * @var integer This is date end action (datef) but modified to not be outside calendar view. + * @var int This is date end action (datef) but modified to not be outside calendar view. */ public $date_end_in_calendar; /** - * @var integer Date action end (datep2) + * @var int Date action end (datep2) */ public $datep2; @@ -212,7 +212,7 @@ class ActionComm extends CommonObject public $ponctuel; /** - * @var int<0,100> Percentage + * @var int<-1,100> Percentage */ public $percentage; @@ -308,7 +308,7 @@ class ActionComm extends CommonObject public $icalname; /** - * @var int<0,3> Ical color + * @var string Ical color (Hex value for color on 6 nibles) */ public $icalcolor; @@ -1041,7 +1041,7 @@ class ActionComm extends CommonObject * * @param User $user User making the delete * @param int<0,1> $notrigger 1 = disable triggers, 0 = enable triggers - * @return int<-1,1> Return integer <0 if KO, >0 if OK + * @return int<-2,1> Return integer <0 if KO, >0 if OK */ public function delete($user, $notrigger = 0) { @@ -1137,7 +1137,7 @@ class ActionComm extends CommonObject * * @param User $user Object user making change * @param int<0,1> $notrigger 1 = disable triggers, 0 = enable triggers - * @return int<-1,1> Return integer <0 if KO, >0 if OK + * @return int<-2,1> Return integer <0 if KO, >0 if OK */ public function update(User $user, $notrigger = 0) { diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 9ccbbc4e671..1cf74e70817 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -1544,6 +1544,48 @@ if (!$error && ($massaction == 'affectcommercial' || ($action == 'affectcommerci } } +if (!$error && ($massaction == 'unassigncommercial' || ($action == 'unassigncommercial' && $confirm == 'yes')) && $permissiontoadd) { + $db->begin(); + + $objecttmp = new $objectclass($db); + $nbok = 0; + + foreach ($toselect as $toselectid) { + $result = $objecttmp->fetch($toselectid); + if ($result > 0) { + if (in_array($objecttmp->element, array('societe'))) { + $TCommercial = GETPOST("commercial", "alpha"); + if (is_array($TCommercial)) { + foreach ($TCommercial as $commercial) { + $result = $objecttmp->del_commercial($user, $commercial); + } + } + } + if ($result <= 0) { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } else { + $nbok++; + } + } else { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (!$error) { + if ($nbok > 1) { + setEventMessages($langs->trans("CommercialsDisaffected", $nbok), null, 'mesgs'); + } else { + setEventMessages($langs->trans("CommercialDisaffected"), null, 'mesgs'); + } + $db->commit(); + } else { + $db->rollback(); + } +} // Approve for leave only if (!$error && ($massaction == 'approveleave' || ($action == 'approveleave' && $confirm == 'yes')) && $permissiontoapprove) { $db->begin(); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e31f1c87c73..337f2366b1f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8450,7 +8450,8 @@ class Form if ($value_as_key) { $array = array_combine($array, $array); } - '@phan-var-force array{label:string,data-html:string,disable?:int<0,1>,css?:string} $array'; // Array combine breaks information + + '@phan-var-force array{label:string,data-html:string,disable?:int<0,1>,css?:string} $array'; // Array combine breaks information $out = ''; diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index 9a796160292..216865b39a3 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -467,7 +467,7 @@ interface Database * * @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS) * @param bool $gm 1=Input information are GMT values, otherwise local to server TZ - * @return int|string Date TMS or '' + * @return int|'' Date TMS or '' */ public function jdate($string, $gm = false); diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 01237c5c676..3265485cc4d 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -356,7 +356,7 @@ abstract class DoliDB implements Database * * @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS) * @param mixed $gm 'gmt'=Input information are GMT values, 'tzserver'=Local to server TZ - * @return int|string Date TMS or '' + * @return int|'' Date TMS or '' */ public function jdate($string, $gm = 'tzserver') { diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index cf57e63b9c5..d479a223a12 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -394,6 +394,16 @@ if ($massaction == 'presetcommercial') { 'value' => $form->multiselectarray('commercial', $userlist, null, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1)); print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmAllocateCommercial"), $langs->trans("ConfirmAllocateCommercialQuestion", count($toselect)), "affectcommercial", $formquestion, 1, 0, 200, 500, 1); } +if ($massaction == 'unsetcommercial') { + $formquestion = array(); + $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, 'AND u.statut = 1', 0, '', '', 0, 1); + $formquestion[] = array('type' => 'other', + 'name' => 'unassigncommercial', + 'label' => $form->editfieldkey('UnallocateCommercial', 'commercial_id', '', $object, 0), + 'value' => $form->multiselectarray('commercial', $userlist, null, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1)); + print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmUnallocateCommercial"), $langs->trans("ConfirmUnallocateCommercialQuestion", count($toselect)), "unassigncommercial", $formquestion, 1, 0, 200, 500, 1); +} + if ($massaction == 'preapproveleave') { print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmMassLeaveApproval"), $langs->trans("ConfirmMassLeaveApprovalQuestion", count($toselect)), "approveleave", null, 'yes', 0, 200, 500, 1); } diff --git a/htdocs/debugbar/class/TraceableDB.php b/htdocs/debugbar/class/TraceableDB.php index 4ddcf1eb22e..6e3312e547b 100644 --- a/htdocs/debugbar/class/TraceableDB.php +++ b/htdocs/debugbar/class/TraceableDB.php @@ -632,7 +632,7 @@ class TraceableDB extends DoliDB * * @param string $string Date in a string (YYYYMMDDHHMMSS, YYYYMMDD, YYYY-MM-DD HH:MM:SS) * @param bool $gm 1=Input information are GMT values, otherwise local to server TZ - * @return int|string Date TMS or '' + * @return int|'' Date TMS or '' */ public function jdate($string, $gm = false) { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 0d1e7f03642..2f8dd59bdfd 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1184,20 +1184,12 @@ class FactureFournisseur extends CommonInvoice if (isset($this->close_note)) { $this->close_note = trim($this->close_note); } - if (isset($this->localtax1)) { - $this->localtax1 = trim($this->localtax1); - } - if (isset($this->localtax2)) { - $this->localtax2 = trim($this->localtax2); - } if (empty($this->total_ht)) { $this->total_ht = 0; } if (empty($this->total_tva)) { $this->total_tva = 0; } - // if (isset($this->total_localtax1)) $this->total_localtax1=trim($this->total_localtax1); - // if (isset($this->total_localtax2)) $this->total_localtax2=trim($this->total_localtax2); if (isset($this->total_ttc)) { $this->total_ttc = (float) $this->total_ttc; } @@ -1263,8 +1255,8 @@ class FactureFournisseur extends CommonInvoice $sql .= " paye=".(isset($this->paid) ? ((int) $this->paid) : "0").","; $sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").","; $sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").","; - $sql .= " localtax1=".(isset($this->localtax1) ? ((float) $this->localtax1) : "null").","; - $sql .= " localtax2=".(isset($this->localtax2) ? ((float) $this->localtax2) : "null").","; + $sql .= " localtax1=".(isset($this->total_localtax1) ? ((float) $this->total_localtax1) : "null").","; + $sql .= " localtax2=".(isset($this->total_localtax2) ? ((float) $this->total_localtax2) : "null").","; $sql .= " total_ht=".(isset($this->total_ht) ? ((float) $this->total_ht) : "null").","; $sql .= " total_tva=".(isset($this->total_tva) ? ((float) $this->total_tva) : "null").","; $sql .= " total_ttc=".(isset($this->total_ttc) ? ((float) $this->total_ttc) : "null").","; diff --git a/htdocs/install/mysql/data/llx_accounting_account_fr.sql b/htdocs/install/mysql/data/llx_accounting_account_fr.sql index 7b9f90d99c9..a4b2a6e5386 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_fr.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_fr.sql @@ -517,6 +517,8 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5971,'PCG14-DEV','FINAN', '5', 0, 'Comptes financiers','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5972,'PCG14-DEV','EXPENSE', '6', 0, 'Comptes de charges','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5973,'PCG14-DEV','INCOME', '7', 0, 'Comptes de produits','1'); +-- Rowid 5974 ajouté en erratum, ajout de "697 - Imposition forfaitaire annuelle des sociétés" (absent de la liste dans PCG officiel, mais présent dans articles +-- Rowid 5975 à 5977, ajouts pour les codes 4421 (pour le prélèvement à la source de l'impot sur le revenu), 4422 et 4423 INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5000,'PCG14-DEV','CAPIT', '10',5967,'Capital et réserves','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5001,'PCG14-DEV','CAPIT', '101',5000,'Capital','1'); @@ -635,7 +637,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5114,'PCG14-DEV','CAPIT', '1688',5110,'Intérêts courus','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5115,'PCG14-DEV','CAPIT','16881',5114,'sur emprunts obligataires convertibles','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5116,'PCG14-DEV','CAPIT','16883',5114,'sur autres emprunts obligataires','1'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5117,'PCG14-DEV','CAPIT','16684',5114,'sur emprunts auprès des établissements de crédit','1'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5117,'PCG14-DEV','CAPIT','16884',5114,'sur emprunts auprès des établissements de crédit','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5118,'PCG14-DEV','CAPIT','16885',5114,'sur dépôts et cautionnements reçus','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5119,'PCG14-DEV','CAPIT','16886',5114,'sur participation des salariés aux résultats','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5120,'PCG14-DEV','CAPIT','16887',5114,'sur emprunts et dettes assortis de conditions particulières','1'); @@ -947,6 +949,9 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5426,'PCG14-DEV','THIRDPARTY','4418',5423,'Subventions d''équilibre','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5427,'PCG14-DEV','THIRDPARTY','4419',5423,'Avances sur subventions','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5428,'PCG14-DEV','THIRDPARTY','442',5422,'Etat - Impôts et taxes recouvrables sur des tiers','1'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5975,'PCG14-DEV','THIRDPARTY','4421',5428,'Prélèvements à la source (Impôt sur le revenu)','1'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5976,'PCG14-DEV','THIRDPARTY','4422',5428,'Prélèvements forfaitaires non libératoires','1'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5977,'PCG14-DEV','THIRDPARTY','4423',5428,'Retenues et prélèvements sur les distributions','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5429,'PCG14-DEV','THIRDPARTY','4424',5428,'Obligataires','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5430,'PCG14-DEV','THIRDPARTY','4425',5428,'Associés','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5431,'PCG14-DEV','THIRDPARTY','443',5422,'Opérations particulières avec l''Etat les collectivités publiques, les organismes internationaux','1'); @@ -1042,7 +1047,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5521,'PCG14-DEV','THIRDPARTY','4962',5520,'Créances sur cessions d''immobilisations','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5522,'PCG14-DEV','THIRDPARTY','4965',5520,'Créances sur cessions de valeurs mobilières de placement','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5523,'PCG14-DEV','THIRDPARTY','4967',5520,'Autres comptes débiteurs','1'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5524,'PCG14-DEV','FINAN','50',5971,'Parts dans des entreprises liées','1'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5524,'PCG14-DEV','FINAN','501',5971,'Parts dans des entreprises liées','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5526,'PCG14-DEV','FINAN','502',5524,'Actions propres','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5527,'PCG14-DEV','FINAN','5021',5526,'Actons destinées à être attribuées aux employés et affectées à des plans déterminés','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5528,'PCG14-DEV','FINAN','5022',5526,'Actons disponibles pour être attribuées aux employés ou pour la régularisation des cours de bourse','1'); @@ -1350,6 +1355,7 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, acc INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5830,'PCG14-DEV','EXPENSE','6952',5828,'Contribution additionnelle à l''impôt sur les bénéfices','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5831,'PCG14-DEV','EXPENSE','6954',5828,'Impôts dus à l''étranger','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5832,'PCG14-DEV','EXPENSE','696',5826,'Suppléments d''impôt sur les sociétés liés aux distributions','1'); +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5974,'PCG14-DEV','EXPENSE','697',5826,'Imposition forfaitaire annuelle des sociétés','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5833,'PCG14-DEV','EXPENSE','698',5826,'Intégration fiscale','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5834,'PCG14-DEV','EXPENSE','6981',5833,'Intégration fiscale - Charges','1'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, account_number, account_parent, label, active) VALUES (__ENTITY__, 5835,'PCG14-DEV','EXPENSE','6989',5833,'Intégration fiscale - Produits','1'); diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 2b26b7fdda9..3d641dfb8fa 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -388,7 +388,8 @@ SupplierCategory=Vendor category JuridicalStatus200=Independent DeleteFile=Delete file ConfirmDeleteFile=Are you sure you want to delete this file %s? -AllocateCommercial=Assigned to sales representative +AllocateCommercial=Assign to sales representatives +UnallocateCommercial=Unassigned sales representatives Organization=Organization FiscalYearInformation=Fiscal Year FiscalMonthStart=Starting month of the fiscal year diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index d6dfb8bc74b..24e96d2a6a1 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1221,9 +1221,13 @@ Terminated=Terminated Position=Position AddLineOnPosition=Add line on position (at the end if empty) ConfirmAllocateCommercial=Assign sales representative confirmation +ConfirmUnallocateCommercial=Are you sure you want to unassign the sales representative(s) from all selected thirdparties? ConfirmAllocateCommercialQuestion=Are you sure you want to assign the %s selected record(s)? +ConfirmUnallocateCommercialQuestion=Are you sure you want to unassign the selected %s record(s)? CommercialsAffected=Sales representatives assigned CommercialAffected=Sales representative assigned +CommercialsDisaffected=Sales representatives disassigned +CommercialDisaffected=Sales representative disassigned YourMessage=Your message YourMessageHasBeenReceived=Your message has been received. We will answer or contact you as soon as possible. UrlToCheck=Url to check diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 73fdb35e5af..fbdc79e3244 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -203,7 +203,6 @@ if ($type == 'f') { $search_type = '4'; } } - // Initialize technical objects to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Societe($db); $extrafields = new ExtraFields($db); @@ -1106,7 +1105,9 @@ if ($user->hasRight("societe", "creer")) { } if ($user->hasRight("societe", "creer")) { $arrayofmassactions['presetcommercial'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("AllocateCommercial"); + $arrayofmassactions['unsetcommercial'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("UnallocateCommercial"); } + if ($user->hasRight('societe', 'supprimer')) { $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); }