From cea2c3a9f43843f149285234a3303a21e95ac6e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Nov 2019 23:58:14 +0100 Subject: [PATCH] Look and feel v11 --- .../class/accountingaccount.class.php | 29 ++-- htdocs/adherents/class/adherent.class.php | 12 +- htdocs/comm/mailing/cibles.php | 6 +- htdocs/comm/mailing/class/mailing.class.php | 115 +++++--------- htdocs/comm/propal/class/propal.class.php | 26 ++-- htdocs/commande/class/commande.class.php | 18 +-- .../bank/class/paymentvarious.class.php | 32 ++-- .../deplacement/class/deplacement.class.php | 32 ++-- .../class/bonprelevement.class.php | 36 ++--- .../class/ligneprelevement.class.php | 24 +-- .../sociales/class/chargesociales.class.php | 38 ++--- htdocs/core/class/fiscalyear.class.php | 24 +-- htdocs/core/lib/functions.lib.php | 2 +- htdocs/don/class/paymentdonation.class.php | 4 +- htdocs/expedition/class/expedition.class.php | 34 ++--- .../class/paymentexpensereport.class.php | 4 +- .../fournisseur.commande.dispatch.class.php | 28 ++-- htdocs/fourn/commande/index.php | 8 +- htdocs/livraison/class/livraison.class.php | 34 ++--- htdocs/loan/class/loan.class.php | 38 ++--- .../product/stock/class/productlot.class.php | 4 +- htdocs/projet/class/task.class.php | 68 ++++----- htdocs/reception/class/reception.class.php | 34 ++--- htdocs/ticket/class/ticket.class.php | 144 +++++++++--------- htdocs/user/class/usergroup.class.php | 4 +- 25 files changed, 377 insertions(+), 421 deletions(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 21cbdeb9662..0cfc0d24826 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -638,11 +638,11 @@ class AccountingAccount extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -650,34 +650,33 @@ class AccountingAccount extends CommonObject if ($mode == 0) { - $prefix=''; - if ($statut == 1) return $langs->trans('Enabled'); - elseif ($statut == 0) return $langs->trans('Disabled'); + if ($status == 1) return $langs->trans('Enabled'); + elseif ($status == 0) return $langs->trans('Disabled'); } elseif ($mode == 1) { - if ($statut == 1) return $langs->trans('Enabled'); - elseif ($statut == 0) return $langs->trans('Disabled'); + if ($status == 1) return $langs->trans('Enabled'); + elseif ($status == 0) return $langs->trans('Disabled'); } elseif ($mode == 2) { - if ($statut == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($statut == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); + if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); } elseif ($mode == 3) { - if ($statut == 1) return img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($statut == 0) return img_picto($langs->trans('Disabled'), 'statut5'); + if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); } elseif ($mode == 4) { - if ($statut == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($statut == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); + if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); + elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); } elseif ($mode == 5) { - if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); + if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); + elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); } } } diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 9d0e0fa47dc..f7278f9007a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -174,7 +174,7 @@ class Adherent extends CommonObject // -1:brouillon, 0:resilie, >=1:valide,paye // def in common object - //public $statut; + //public $status; public $photo; @@ -2168,13 +2168,13 @@ class Adherent extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $need_subscription 1 if member type need subscription, 0 otherwise * @param int $date_end_subscription Date fin adhesion * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $need_subscription, $date_end_subscription, $mode = 0) + public function LibStatut($status, $need_subscription, $date_end_subscription, $mode = 0) { // phpcs:enable global $langs; @@ -2184,13 +2184,13 @@ class Adherent extends CommonObject $labelStatus = ''; $labelStatusShort = ''; - if ($statut == -1) + if ($status == -1) { $statusType = 'status0'; $labelStatus = $langs->trans("MemberStatusDraft"); $labelStatusShort = $langs->trans("MemberStatusDraftShort"); } - elseif ($statut >= 1) { + elseif ($status >= 1) { if ($need_subscription == 0) { $statusType = 'status4'; @@ -2215,7 +2215,7 @@ class Adherent extends CommonObject $labelStatusShort = $langs->trans("MemberStatusPaidShort"); } } - elseif ($statut == 0) + elseif ($status == 0) { $statusType = 'status6'; $labelStatus = $langs->trans("MemberStatusResiliated"); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 998f4a6c202..fc83b20d58f 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -479,14 +479,13 @@ if ($object->fetch($id) >= 0) { $num = $db->num_rows($resql); - $param = "&id=".$object->id; + $param = "&id=".$object->id; //if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($search_lastname) $param.= "&search_lastname=".urlencode($search_lastname); if ($search_firstname) $param.= "&search_firstname=".urlencode($search_firstname); if ($search_email) $param.= "&search_email=".urlencode($search_email); if ($search_other) $param.= "&search_other=".urlencode($search_other); - if ($page) $param.= "&page=".urlencode($page); print '
'; print ''; @@ -500,6 +499,7 @@ if ($object->fetch($id) >= 0) $morehtmlcenter=''.$langs->trans("ToClearAllRecipientsClickHere").' id.'" class="button reposition">'.$langs->trans("TargetsReset").''; } $morehtmlcenter.=' id.'">'.$langs->trans("Download").''; + print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $morehtmlcenter, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); print '
'; @@ -560,6 +560,8 @@ if ($object->fetch($id) >= 0) print ''; print ''; + if ($page) $param.= "&page=".urlencode($page); + print ''; print_liste_field_titre("EMail", $_SERVER["PHP_SELF"], "mc.email", $param, "", "", $sortfield, $sortorder); print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "mc.lastname", $param, "", "", $sortfield, $sortorder); diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 41f74846125..5867e80dbb2 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -618,48 +618,24 @@ class Mailing extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; - $langs->load('mails'); + $langs->load("mailing"); - if ($mode == 0 || $mode == 1) - { - return $langs->trans($this->statuts[$statut]); - } - elseif ($mode == 2) - { - if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]), 'statut1').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut == 2) return img_picto($langs->trans($this->statuts[$statut]), 'statut3').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut == 3) return img_picto($langs->trans($this->statuts[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); - } - elseif ($mode == 3) - { - if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut == 2) return img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut == 3) return img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - } - elseif ($mode == 4) - { - if ($statut == 0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut == 1) return img_picto($langs->trans($this->statuts[$statut]), 'statut1').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut == 2) return img_picto($langs->trans($this->statuts[$statut]), 'statut3').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut == 3) return img_picto($langs->trans($this->statuts[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); - } - elseif ($mode == 5) - { - if ($statut == 0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut == 1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut == 2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut == 3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - } + $labelStatus = $langs->trans($this->statuts[$status]); + $labelStatusShort = $langs->trans($this->statuts[$status]); + + $statusType = 'status'.$status; + if ($status == 2) $statusType = 'status3'; + if ($status == 3) $statusType = 'status6'; + + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); } @@ -667,58 +643,37 @@ class Mailing extends CommonObject * Renvoi le libelle d'un statut donne * TODO Add class mailin_target.class.php * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param string $desc Desc error * @return string Label */ - public static function libStatutDest($statut, $mode = 0, $desc = '') + public static function libStatutDest($status, $mode = 0, $desc = '') { global $langs; - $langs->load('mails'); + $langs->load("mails"); - if ($mode == 0) - { - return $langs->trans('MailingStatusError'); - } - elseif ($mode == 1) - { - return $langs->trans('MailingStatusSent'); - } - elseif ($mode == 2) - { - if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - elseif ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"), 'statut6'); - elseif ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"), 'statut4'); - elseif ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"), 'statut3'); - } - elseif ($mode == 3) - { - if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - elseif ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"), 'statut6'); - elseif ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"), 'statut4'); - elseif ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"), 'statut3'); - } - elseif ($mode == 4) - { - if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - elseif ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"), 'statut6'); - elseif ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"), 'statut4'); - elseif ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"), 'statut3'); - } - elseif ($mode == 5) - { - if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - elseif ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"), 'statut6'); - elseif ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"), 'statut4'); - elseif ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"), 'statut3'); - } - elseif ($mode == 6) - { - if ($statut==-1) return $langs->trans("MailingStatusError").' '.img_error($desc); - elseif ($statut==1) return $langs->trans("MailingStatusSent").' '.img_picto($langs->trans("MailingStatusSent"), 'statut6'); - elseif ($statut==2) return $langs->trans("MailingStatusRead").' '.img_picto($langs->trans("MailingStatusRead"), 'statut4'); - elseif ($statut==3) return $langs->trans("MailingStatusNotContact").' '.img_picto($langs->trans("MailingStatusNotContact"), 'statut3'); + $labelStatus = array(); + $labelStatusShort = array(); + + $labelStatus[-1] = $langs->trans('MailingStatusError'); + $labelStatus[1] = $langs->trans('MailingStatusSent'); + $labelStatus[2] = $langs->trans('MailingStatusRead'); + $labelStatus[3] = $langs->trans('MailingStatusNotContact'); + $labelStatusShort[-1] = $langs->trans('MailingStatusError'); + $labelStatusShort[1] = $langs->trans('MailingStatusSent'); + $labelStatusShort[2] = $langs->trans('MailingStatusRead'); + $labelStatusShort[3] = $langs->trans('MailingStatusNotContact'); + + $statusType = 'status'.$status; + if ($status == -1) $statusType = 'status8'; + if ($status == 1) $statusType = 'status6'; + if ($status == 2) $statusType = 'status4'; + + $param = array(); + if ($status == - 1) { + $param = array('badgeParams'=>array('attr'=>array('title'=>$desc))); } + return dolGetStatus($labelStatus[$status], $labelStatusShort[$status], '', $statusType, $mode, '', $param); } } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 8d84d1f4820..a76cbe3c519 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3200,11 +3200,11 @@ class Propal extends CommonObject /** * Return label of a status (draft, validated, ...) * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 1) + public function LibStatut($status, $mode = 1) { // phpcs:enable global $conf; @@ -3227,13 +3227,13 @@ class Propal extends CommonObject } $statusType=''; - if ($statut==self::STATUS_DRAFT) $statusType='status0'; - elseif ($statut==self::STATUS_VALIDATED) $statusType='status1'; - elseif ($statut==self::STATUS_SIGNED) $statusType='status3'; - elseif ($statut==self::STATUS_NOTSIGNED) $statusType='status5'; - elseif ($statut==self::STATUS_BILLED) $statusType='status6'; + if ($status==self::STATUS_DRAFT) $statusType='status0'; + elseif ($status==self::STATUS_VALIDATED) $statusType='status1'; + elseif ($status==self::STATUS_SIGNED) $statusType='status3'; + elseif ($status==self::STATUS_NOTSIGNED) $statusType='status5'; + elseif ($status==self::STATUS_BILLED) $statusType='status6'; - return dolGetStatus($this->labelStatus[$statut], $this->labelStatusShort[$statut], '', $statusType, $mode); + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } @@ -3272,17 +3272,17 @@ class Propal extends CommonObject $now=dol_now(); $delay_warning = 0; - $statut = 0; + $status = 0; $label = $labelShort = ''; if ($mode == 'opened') { $delay_warning=$conf->propal->cloture->warning_delay; - $statut = self::STATUS_VALIDATED; + $status = self::STATUS_VALIDATED; $label = $langs->trans("PropalsToClose"); $labelShort = $langs->trans("ToAcceptRefuse"); } if ($mode == 'signed') { $delay_warning=$conf->propal->facturation->warning_delay; - $statut = self::STATUS_SIGNED; + $status = self::STATUS_SIGNED; $label = $langs->trans("PropalsToBill"); // We set here bill but may be billed or ordered $labelShort = $langs->trans("ToBill"); } @@ -3291,8 +3291,8 @@ class Propal extends CommonObject $response->warning_delay = $delay_warning/60/60/24; $response->label = $label; $response->labelShort = $labelShort; - $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals'; - $response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$statut.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc'; + $response->url = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals'; + $response->url_late = DOL_URL_ROOT.'/comm/propal/list.php?viewstatut='.$status.'&mainmenu=commercial&leftmenu=propals&sortfield=p.datep&sortorder=asc'; $response->img = img_object('', "propal"); // This assignment in condition is not a bug. It allows walking the results. diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 261190a747e..4348b3b05a5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3469,13 +3469,13 @@ class Commande extends CommonOrder /** * Return label of status * - * @param int $statut Id statut + * @param int $status Id status * @param int $billed If invoiced * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @param int $donotshowbilled Do not show billed status after order status * @return string Label of status */ - public function LibStatut($statut, $billed, $mode, $donotshowbilled = 0) + public function LibStatut($status, $billed, $mode, $donotshowbilled = 0) { // phpcs:enable global $langs, $conf; @@ -3483,37 +3483,37 @@ class Commande extends CommonOrder $billedtext = ''; if (empty($donotshowbilled)) $billedtext .= ($billed?' - '.$langs->trans("Billed"):''); - if ($statut==self::STATUS_CANCELED){ + if ($status==self::STATUS_CANCELED){ $labelStatus = $langs->trans('StatusOrderCanceled'); $labelStatusShort = $langs->trans('StatusOrderCanceledShort'); $statusType='status5'; } - elseif ($statut==self::STATUS_DRAFT){ + elseif ($status==self::STATUS_DRAFT){ $labelStatus = $langs->trans('StatusOrderDraft'); $labelStatusShort = $langs->trans('StatusOrderDraftShort'); $statusType='status0'; } - elseif ($statut==self::STATUS_VALIDATED){ + elseif ($status==self::STATUS_VALIDATED){ $labelStatus = $langs->trans('StatusOrderValidated').$billedtext; $labelStatusShort = $langs->trans('StatusOrderValidatedShort').$billedtext; $statusType='status1'; } - elseif ($statut==self::STATUS_SHIPMENTONPROCESS){ + elseif ($status==self::STATUS_SHIPMENTONPROCESS){ $labelStatus = $langs->trans('StatusOrderSentShort').$billedtext; $labelStatusShort = $langs->trans('StatusOrderSentShort').$billedtext; $statusType='status3'; } - elseif ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ + elseif ($status==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ $labelStatus = $langs->trans('StatusOrderToBill'); $labelStatusShort = $langs->trans('StatusOrderToBillShort'); $statusType='status4'; } - elseif ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ + elseif ($status==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ $labelStatus = $langs->trans('StatusOrderProcessed').$billedtext; $labelStatusShort = $langs->trans('StatusOrderProcessed').$billedtext; $statusType='status6'; } - elseif ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ + elseif ($status==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){ $labelStatus = $langs->trans('StatusOrderDelivered'); $labelStatusShort = $langs->trans('StatusOrderDelivered'); $statusType='status6'; diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index ed94c8e4700..ca3acd59e42 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -523,46 +523,46 @@ class PaymentVarious extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } elseif ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } } diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 1b70641a6bc..0601c62fd80 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -336,46 +336,46 @@ class Deplacement extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } elseif ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==2 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==2 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } } diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 3058d418237..f1c3f70c53a 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1995,11 +1995,11 @@ class BonPrelevement extends CommonObject /** * Return status label for a status * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable if (empty($this->labelStatus)) @@ -2013,37 +2013,37 @@ class BonPrelevement extends CommonObject if ($mode == 0 || $mode == 1) { - return $this->labelStatus[$statut]; + return $this->labelStatus[$status]; } elseif ($mode == 2) { - if ($statut==0) return img_picto($this->labelStatus[$statut], 'statut1').' '.$this->labelStatus[$statut]; - elseif ($statut==1) return img_picto($this->labelStatus[$statut], 'statut3').' '.$this->labelStatus[$statut]; - elseif ($statut==2) return img_picto($this->labelStatus[$statut], 'statut6').' '.$this->labelStatus[$statut]; + if ($status==0) return img_picto($this->labelStatus[$status], 'statut1').' '.$this->labelStatus[$status]; + elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3').' '.$this->labelStatus[$status]; + elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6').' '.$this->labelStatus[$status]; } elseif ($mode == 3) { - if ($statut==0) return img_picto($this->labelStatus[$statut], 'statut1'); - elseif ($statut==1) return img_picto($this->labelStatus[$statut], 'statut3'); - elseif ($statut==2) return img_picto($this->labelStatus[$statut], 'statut6'); + if ($status==0) return img_picto($this->labelStatus[$status], 'statut1'); + elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3'); + elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($this->labelStatus[$statut], 'statut1').' '.$this->labelStatus[$statut]; - elseif ($statut==1) return img_picto($this->labelStatus[$statut], 'statut3').' '.$this->labelStatus[$statut]; - elseif ($statut==2) return img_picto($this->labelStatus[$statut], 'statut6').' '.$this->labelStatus[$statut]; + if ($status==0) return img_picto($this->labelStatus[$status], 'statut1').' '.$this->labelStatus[$status]; + elseif ($status==1) return img_picto($this->labelStatus[$status], 'statut3').' '.$this->labelStatus[$status]; + elseif ($status==2) return img_picto($this->labelStatus[$status], 'statut6').' '.$this->labelStatus[$status]; } elseif ($mode == 5) { - if ($statut==0) return $this->labelStatus[$statut].' '.img_picto($this->labelStatus[$statut], 'statut1'); - elseif ($statut==1) return $this->labelStatus[$statut].' '.img_picto($this->labelStatus[$statut], 'statut3'); - elseif ($statut==2) return $this->labelStatus[$statut].' '.img_picto($this->labelStatus[$statut], 'statut6'); + if ($status==0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut1'); + elseif ($status==1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut3'); + elseif ($status==2) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut6'); } elseif ($mode == 6) { - if ($statut==0) return $this->labelStatus[$statut].' '.img_picto($this->labelStatus[$statut], 'statut1'); - elseif ($statut==1) return $this->labelStatus[$statut].' '.img_picto($this->labelStatus[$statut], 'statut3'); - elseif ($statut==2) return $this->labelStatus[$statut].' '.img_picto($this->labelStatus[$statut], 'statut6'); + if ($status==0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut1'); + elseif ($status==1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut3'); + elseif ($status==2) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut6'); } } } diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 3b0f61b17a0..467351e3110 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -132,36 +132,36 @@ class LignePrelevement /** * Return status label for a status * - * @param int $statut id statut + * @param int $status Id status * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut1').' '.$langs->trans($this->statuts[$statut]); // Waiting - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); // Credited - elseif ($statut==3) return img_picto($langs->trans($this->statuts[$statut]), 'statut8').' '.$langs->trans($this->statuts[$statut]); // Refused + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); // Waiting + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); // Credited + elseif ($status==3) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); // Refused } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - elseif ($statut==3) return img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut1'); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6'); + elseif ($status==3) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); } elseif ($mode == 3) { - if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - elseif ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut1'); + elseif ($status==2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6'); + elseif ($status==3) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); } } diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index bbffbebe0c9..50474f3d52c 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -465,12 +465,12 @@ class ChargeSociales extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - public function LibStatut($statut, $mode = 0, $alreadypaid = -1) + public function LibStatut($status, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -480,38 +480,38 @@ class ChargeSociales extends CommonObject if ($mode == 0 || $mode == 1) { - if ($statut == 0) return $langs->trans("Unpaid"); - elseif ($statut == 1) return $langs->trans("Paid"); + if ($status == 0) return $langs->trans("Unpaid"); + elseif ($status == 1) return $langs->trans("Paid"); } elseif ($mode == 2) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 3) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 4) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 5) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 6) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } else return "Error, mode/status not found"; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index f944ccdc0c0..0eed1a56580 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -290,42 +290,42 @@ class Fiscalyear extends CommonObject /** * Give a label from a status * - * @param int $statut Id status + * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8'); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8'); } elseif ($mode == 4) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8').' '.$langs->trans($this->statuts[$statut]); + if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut4'); - elseif ($statut==1 && ! empty($this->statuts_short[$statut])) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); + if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); + elseif ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 90583e1d4e4..afecdeeb234 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8094,7 +8094,7 @@ function roundUpToNextMultiple($n, $x = 5) * @param string $type type of badge : Primary Secondary Success Danger Warning Info Light Dark status0 status1 status2 status3 status4 status5 status6 status7 status8 status9 * @param string $mode default '' , pill, dot * @param string $url the url for link - * @param array $params various params for future : recommended rather than adding more fuction arguments + * @param array $params various params for future : recommended rather than adding more fuction arguments. array('attr'=>array('title'=>'abc')) * @return string Html badge */ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = '', $params = array()) diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index f28ecddc0eb..3c5404366de 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -474,11 +474,11 @@ class PaymentDonation extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 0c340bc8695..e4f6f06b5a0 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1668,44 +1668,44 @@ class Expedition extends CommonObject /** * Return label of a status * - * @param int $statut Id statut + * @param int $status Id statut * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { // phpcs:enable global $langs; if ($mode==0) { - if ($statut==0) return $langs->trans($this->statuts[$statut]); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]); + if ($status==0) return $langs->trans($this->statuts[$status]); + elseif ($status==1) return $langs->trans($this->statuts[$status]); + elseif ($status==2) return $langs->trans($this->statuts[$status]); } elseif ($mode==1) { - if ($statut==0) return $langs->trans($this->statutshorts[$statut]); - elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]); - elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]); + if ($status==0) return $langs->trans($this->statutshorts[$status]); + elseif ($status==1) return $langs->trans($this->statutshorts[$status]); + elseif ($status==2) return $langs->trans($this->statutshorts[$status]); } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6'); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut6'); + if ($status==0) return $langs->trans($this->statutshorts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return $langs->trans($this->statutshorts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return $langs->trans($this->statutshorts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6'); } } diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index 5c72dd18528..074250d2347 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -476,11 +476,11 @@ class PaymentExpenseReport extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index aed9db75a64..b453653c681 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -539,11 +539,11 @@ class CommandeFournisseurDispatch extends CommonObject /** * Return label of a status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; @@ -551,33 +551,33 @@ class CommandeFournisseurDispatch extends CommonObject if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statutshort[$statut]); + return $langs->trans($this->statutshort[$status]); } elseif ($mode == 2) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut8').' '.$langs->trans($this->statuts[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - if ($statut==0) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut8'); + if ($status==0) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); } } diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index ec71820ebbb..6804f96545d 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -117,14 +117,14 @@ if ($resql) print ''; print ''; print "\n"; - foreach (array(0,1,2,3,4,5,6) as $statut) + foreach (array(0,1,2,3,4,5,6) as $status) { - $dataseries[]=array($commandestatic->LibStatut($statut, 1), (isset($vals[$statut])?(int) $vals[$statut]:0)); + $dataseries[]=array($commandestatic->LibStatut($status, 1), (isset($vals[$status])?(int) $vals[$status]:0)); if (! $conf->use_javascript_ajax) { print ''; - print ''; - print ''; + print ''; + print ''; print "\n"; } } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 428015a96f4..1e7fdebaa64 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -823,44 +823,44 @@ class Livraison extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { // phpcs:enable global $langs; if ($mode==0) { - if ($statut==-1) return $langs->trans('StatusDeliveryCanceled'); - elseif ($statut==0) return $langs->trans('StatusDeliveryDraft'); - elseif ($statut==1) return $langs->trans('StatusDeliveryValidated'); + if ($status==-1) return $langs->trans('StatusDeliveryCanceled'); + elseif ($status==0) return $langs->trans('StatusDeliveryDraft'); + elseif ($status==1) return $langs->trans('StatusDeliveryValidated'); } elseif ($mode==1) { - if ($statut==-1) return $langs->trans($this->statuts[$statut]); - elseif ($statut==0) return $langs->trans($this->statuts[$statut]); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]); + if ($status==-1) return $langs->trans($this->statuts[$status]); + elseif ($status==0) return $langs->trans($this->statuts[$status]); + elseif ($status==1) return $langs->trans($this->statuts[$status]); } elseif ($mode == 3) { - if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); - if ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); - if ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); + if ($status==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); + if ($status==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); + if ($status==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); } elseif ($mode == 4) { - if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5').' '.$langs->trans('StatusDeliveryCanceled'); - elseif ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0').' '.$langs->trans('StatusDeliveryDraft'); - elseif ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4').' '.$langs->trans('StatusDeliveryValidated'); + if ($status==-1) return img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5').' '.$langs->trans('StatusDeliveryCanceled'); + elseif ($status==0) return img_picto($langs->trans('StatusDeliveryDraft'), 'statut0').' '.$langs->trans('StatusDeliveryDraft'); + elseif ($status==1) return img_picto($langs->trans('StatusDeliveryValidated'), 'statut4').' '.$langs->trans('StatusDeliveryValidated'); } elseif ($mode == 6) { - if ($statut==-1) return $langs->trans('StatusDeliveryCanceled').' '.img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); - elseif ($statut==0) return $langs->trans('StatusDeliveryDraft').' '.img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); - elseif ($statut==1) return $langs->trans('StatusDeliveryValidated').' '.img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); + if ($status==-1) return $langs->trans('StatusDeliveryCanceled').' '.img_picto($langs->trans('StatusDeliveryCanceled'), 'statut5'); + elseif ($status==0) return $langs->trans('StatusDeliveryDraft').' '.img_picto($langs->trans('StatusDeliveryDraft'), 'statut0'); + elseif ($status==1) return $langs->trans('StatusDeliveryValidated').' '.img_picto($langs->trans('StatusDeliveryValidated'), 'statut4'); } } diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index c8e241186d2..9b0c3c69ca6 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -402,12 +402,12 @@ class Loan extends CommonObject /** * Return label for given status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=Label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Label, 5=Short label + Picto * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ - public function LibStatut($statut, $mode = 0, $alreadypaid = -1) + public function LibStatut($status, $mode = 0, $alreadypaid = -1) { // phpcs:enable global $langs; @@ -415,38 +415,38 @@ class Loan extends CommonObject if ($mode == 0 || $mode == 1) { - if ($statut == 0) return $langs->trans("Unpaid"); - elseif ($statut == 1) return $langs->trans("Paid"); + if ($status == 0) return $langs->trans("Unpaid"); + elseif ($status == 1) return $langs->trans("Paid"); } elseif ($mode == 2) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 3) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 4) { - if ($statut == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); - elseif ($statut == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); - elseif ($statut == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); + if ($status == 0 && $alreadypaid <= 0) return img_picto($langs->trans("Unpaid"), 'statut1').' '.$langs->trans("Unpaid"); + elseif ($status == 0 && $alreadypaid > 0) return img_picto($langs->trans("BillStatusStarted"), 'statut3').' '.$langs->trans("BillStatusStarted"); + elseif ($status == 1) return img_picto($langs->trans("Paid"), 'statut6').' '.$langs->trans("Paid"); } elseif ($mode == 5) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } elseif ($mode == 6) { - if ($statut == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); - elseif ($statut == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); - elseif ($statut == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); + if ($status == 0 && $alreadypaid <= 0) return $langs->trans("Unpaid").' '.img_picto($langs->trans("Unpaid"), 'statut1'); + elseif ($status == 0 && $alreadypaid > 0) return $langs->trans("BillStatusStarted").' '.img_picto($langs->trans("BillStatusStarted"), 'statut3'); + elseif ($status == 1) return $langs->trans("Paid").' '.img_picto($langs->trans("Paid"), 'statut6'); } else return "Error, mode/status not found"; diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 3848a592f21..1e217deef48 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -501,11 +501,11 @@ class Productlot extends CommonObject /** * Return label of a given status * - * @param int $statut Status + * @param int $status Status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 1bd044bc985..ed42a51491b 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1839,11 +1839,11 @@ class Task extends CommonObject /** * Return status label for an object * - * @param int $statut Id statut + * @param int $status Id status * @param integer $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable // list of Statut of the task @@ -1862,59 +1862,59 @@ class Task extends CommonObject if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts_short[$statut]); - elseif ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5').' '.$langs->trans($this->statuts_short[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); + elseif ($status==5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts_short[$status]); } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3'); - elseif ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); - elseif ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6'); - elseif ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5'); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1'); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3'); + elseif ($status==3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + elseif ($status==4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); + elseif ($status==5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==3) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==4) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==5) return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5').' '.$langs->trans($this->statuts[$statut]); + if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut3').' '.$langs->trans($this->statuts[$status]); + elseif ($status==3) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); + elseif ($status==4) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); + elseif ($status==5) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts[$status]); } elseif ($mode == 5) { - /*if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); - elseif ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); - elseif ($statut==2) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); - elseif ($statut==3) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==4) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==5) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + /*if ($status==0) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0'); + elseif ($status==1) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1'); + elseif ($status==2) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3'); + elseif ($status==3) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==4) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==5) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5'); */ //else return $this->progress.' %'; return ' '; } elseif ($mode == 6) { - /*if ($statut==0) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0'); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut1'); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut3'); - elseif ($statut==3) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==4) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6'); - elseif ($statut==5) return $langs->trans($this->statuts[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut5'); + /*if ($status==0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut0'); + elseif ($status==1) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut1'); + elseif ($status==2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut3'); + elseif ($status==3) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==4) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut6'); + elseif ($status==5) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5'); */ //else return $this->progress.' %'; return ' '; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index dd819adff0a..eae8ab9de34 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1136,44 +1136,44 @@ class Reception extends CommonObject /** * Return label of a status * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @return string Label of status */ - public function LibStatut($statut, $mode) + public function LibStatut($status, $mode) { // phpcs:enable global $langs; if ($mode==0) { - if ($statut==0) return $langs->trans($this->statuts[$statut]); - elseif ($statut==1) return $langs->trans($this->statuts[$statut]); - elseif ($statut==2) return $langs->trans($this->statuts[$statut]); + if ($status==0) return $langs->trans($this->statuts[$status]); + elseif ($status==1) return $langs->trans($this->statuts[$status]); + elseif ($status==2) return $langs->trans($this->statuts[$status]); } elseif ($mode==1) { - if ($statut==0) return $langs->trans('StatusReceptionDraftShort'); - elseif ($statut==1) return $langs->trans('StatusReceptionValidatedShort'); - elseif ($statut==2) return $langs->trans('StatusReceptionProcessedShort'); + if ($status==0) return $langs->trans('StatusReceptionDraftShort'); + elseif ($status==1) return $langs->trans('StatusReceptionValidatedShort'); + elseif ($status==2) return $langs->trans('StatusReceptionProcessedShort'); } elseif ($mode == 3) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return img_picto($langs->trans('StatusReceptionProcessed'), 'statut6'); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return img_picto($langs->trans('StatusReceptionProcessed'), 'statut6'); } elseif ($mode == 4) { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut4').' '.$langs->trans($this->statuts[$statut]); - elseif ($statut==2) return img_picto($langs->trans('StatusReceptionProcessed'), 'statut6').' '.$langs->trans('StatusReceptionProcessed'); + if ($status==0) return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status==1) return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status==2) return img_picto($langs->trans('StatusReceptionProcessed'), 'statut6').' '.$langs->trans('StatusReceptionProcessed'); } elseif ($mode == 5) { - if ($statut==0) return $langs->trans('StatusReceptionDraftShort').' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return $langs->trans('StatusReceptionValidatedShort').' '.img_picto($langs->trans($this->statuts[$statut]), 'statut4'); - elseif ($statut==2) return $langs->trans('StatusReceptionProcessedShort').' '.img_picto($langs->trans('StatusReceptionProcessedShort'), 'statut6'); + if ($status==0) return $langs->trans('StatusReceptionDraftShort').' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status==1) return $langs->trans('StatusReceptionValidatedShort').' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status==2) return $langs->trans('StatusReceptionProcessedShort').' '.img_picto($langs->trans('StatusReceptionProcessedShort'), 'statut6'); } } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 0daba74be77..9a3bce8c458 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1169,123 +1169,123 @@ class Ticket extends CommonObject /** * Return status label of object * - * @param string $statut id statut + * @param string $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs; if ($mode == 0) { - return $langs->trans($this->statuts[$statut]); + return $langs->trans($this->statuts[$status]); } elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$statut]); + return $langs->trans($this->statuts_short[$status]); } elseif ($mode == 2) { - if ($statut == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + if ($status == self::STATUS_NOT_READ) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_READ) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_ASSIGNED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_IN_PROGRESS) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_NEED_MORE_INFO) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_WAITING) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_CLOSED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_CANCELED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } } elseif ($mode == 3) { - if ($statut == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket'); + if ($status == self::STATUS_NOT_READ) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket'); } - elseif ($statut == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket'); + elseif ($status == self::STATUS_READ) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket'); } - elseif ($statut == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket'); + elseif ($status == self::STATUS_ASSIGNED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket'); } - elseif ($statut == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket'); + elseif ($status == self::STATUS_IN_PROGRESS) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket'); } - elseif ($statut == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket'); + elseif ($status == self::STATUS_NEED_MORE_INFO) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket'); } - elseif ($statut == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket'); + elseif ($status == self::STATUS_WAITING) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket'); } - elseif ($statut == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket'); + elseif ($status == self::STATUS_CLOSED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket'); } - elseif ($statut == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket'); + elseif ($status == self::STATUS_CANCELED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket'); } } elseif ($mode == 4) { - if ($statut == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + if ($status == self::STATUS_NOT_READ) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_READ) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_ASSIGNED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_IN_PROGRESS) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_NEED_MORE_INFO) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_WAITING) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_CLOSED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } - elseif ($statut == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); + elseif ($status == self::STATUS_CANCELED) { + return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$status]); } } elseif ($mode == 5 || $mode == 6) { - if ($statut == self::STATUS_NOT_READ) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket'); + if ($status == self::STATUS_NOT_READ) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket'); } - elseif ($statut == self::STATUS_READ) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket'); + elseif ($status == self::STATUS_READ) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket'); } - elseif ($statut == self::STATUS_ASSIGNED) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut2.png@ticket'); + elseif ($status == self::STATUS_ASSIGNED) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket'); } - elseif ($statut == self::STATUS_IN_PROGRESS) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket'); + elseif ($status == self::STATUS_IN_PROGRESS) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket'); } - elseif ($statut == self::STATUS_NEED_MORE_INFO) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket'); + elseif ($status == self::STATUS_NEED_MORE_INFO) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket'); } - elseif ($statut == self::STATUS_WAITING) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket'); + elseif ($status == self::STATUS_WAITING) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket'); } - elseif ($statut == self::STATUS_CLOSED) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket'); + elseif ($status == self::STATUS_CLOSED) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket'); } - elseif ($statut == self::STATUS_CANCELED) { - return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket'); + elseif ($status == self::STATUS_CANCELED) { + return $langs->trans($this->statuts_short[$status]) . ' ' . img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket'); } } } @@ -2228,13 +2228,13 @@ class Ticket extends CommonObject * Get array of all contacts for a ticket * Override method of file commonobject.class.php to add phone number * - * @param int $statut Status of lines to get (-1=all) + * @param int $status Status of lines to get (-1=all) * @param string $source Source of contact: external or thirdparty (llx_socpeople) or internal (llx_user) * @param int $list 0:Return array contains all properties, 1:Return array contains just id * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @return array Array of contacts */ - public function listeContact($statut = -1, $source = 'external', $list = 0, $code = '') + public function listeContact($status = -1, $source = 'external', $list = 0, $code = '') { global $langs; @@ -2281,8 +2281,8 @@ class Ticket extends CommonObject } $sql .= " AND tc.active=1"; - if ($statut >= 0) { - $sql .= " AND ec.statut = '" . $statut . "'"; + if ($status >= 0) { + $sql .= " AND ec.statut = '" . $status . "'"; } $sql .= " ORDER BY t.lastname ASC"; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index b624bdb34d9..8a6fcd60ce9 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -836,11 +836,11 @@ class UserGroup extends CommonObject /** * Renvoi le libelle d'un statut donne * - * @param int $statut Id statut + * @param int $status Id status * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ - public function LibStatut($statut, $mode = 0) + public function LibStatut($status, $mode = 0) { // phpcs:enable global $langs;
'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'
'.$commandestatic->LibStatut($statut, 0).''.(isset($vals[$statut])?$vals[$statut]:0).''.$commandestatic->LibStatut($status, 0).''.(isset($vals[$status])?$vals[$status]:0).'