All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed
into 'labelStatus'. All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
This commit is contained in:
parent
1821fa6317
commit
e3b5be7475
@ -25,7 +25,8 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE.
|
||||
* The constant INVOICE_SHOW_POS_IN_EXPORT has been renamed into INVOICE_SHOW_POS.
|
||||
* If your logo was visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible agin in menu.
|
||||
|
||||
* All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed into 'labelStatus'.
|
||||
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
|
||||
|
||||
***** ChangeLog for 10.0.3 compared to 10.0.2 *****
|
||||
IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card.
|
||||
|
||||
@ -2181,48 +2181,48 @@ class Adherent extends CommonObject
|
||||
$langs->load("members");
|
||||
|
||||
$statusType = '';
|
||||
$labelstatut = '';
|
||||
$labelstatutShort = '';
|
||||
$labelStatus = '';
|
||||
$labelStatusShort = '';
|
||||
|
||||
if ($statut == -1)
|
||||
{
|
||||
$statusType = 'status0';
|
||||
$labelstatut = $langs->trans("MemberStatusDraft");
|
||||
$labelstatutShort = $langs->trans("MemberStatusDraftShort");
|
||||
$labelStatus = $langs->trans("MemberStatusDraft");
|
||||
$labelStatusShort = $langs->trans("MemberStatusDraftShort");
|
||||
}
|
||||
elseif ($statut >= 1) {
|
||||
if ($need_subscription == 0)
|
||||
{
|
||||
$statusType = 'status4';
|
||||
$labelstatut = $langs->trans("MemberStatusNoSubscription");
|
||||
$labelstatutShort = $langs->trans("MemberStatusNoSubscriptionShort");
|
||||
$labelStatus = $langs->trans("MemberStatusNoSubscription");
|
||||
$labelStatusShort = $langs->trans("MemberStatusNoSubscriptionShort");
|
||||
}
|
||||
elseif (! $date_end_subscription)
|
||||
{
|
||||
$statusType = 'status1';
|
||||
$labelstatut = $langs->trans("MemberStatusActive");
|
||||
$labelstatutShort = $langs->trans("MemberStatusActiveShort");
|
||||
$labelStatus = $langs->trans("MemberStatusActive");
|
||||
$labelStatusShort = $langs->trans("MemberStatusActiveShort");
|
||||
}
|
||||
elseif ($date_end_subscription < time())
|
||||
{
|
||||
$statusType = 'status3';
|
||||
$labelstatut = $langs->trans("MemberStatusActiveLate");
|
||||
$labelstatutShort = $langs->trans("MemberStatusActiveLateShort");
|
||||
$labelStatus = $langs->trans("MemberStatusActiveLate");
|
||||
$labelStatusShort = $langs->trans("MemberStatusActiveLateShort");
|
||||
}
|
||||
else {
|
||||
$statusType = 'status4';
|
||||
$labelstatut = $langs->trans("MemberStatusPaid");
|
||||
$labelstatutShort = $langs->trans("MemberStatusPaidShort");
|
||||
$labelStatus = $langs->trans("MemberStatusPaid");
|
||||
$labelStatusShort = $langs->trans("MemberStatusPaidShort");
|
||||
}
|
||||
}
|
||||
elseif ($statut == 0)
|
||||
{
|
||||
$statusType = 'status6';
|
||||
$labelstatut = $langs->trans("MemberStatusResiliated");
|
||||
$labelstatutShort = $langs->trans("MemberStatusResiliatedShort");
|
||||
$labelStatus = $langs->trans("MemberStatusResiliated");
|
||||
$labelStatusShort = $langs->trans("MemberStatusResiliatedShort");
|
||||
}
|
||||
|
||||
return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode);
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ $AdherentsResilies=array();
|
||||
|
||||
$AdherentType=array();
|
||||
|
||||
// Members list
|
||||
// Type of membership
|
||||
$sql = "SELECT t.rowid, t.libelle as label, t.subscription,";
|
||||
$sql.= " d.statut, count(d.rowid) as somme";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type as t";
|
||||
@ -71,7 +71,7 @@ $sql.= " AND d.entity IN (".getEntity('adherent').")";
|
||||
$sql.= " WHERE t.entity IN (".getEntity('member_type').")";
|
||||
$sql.= " GROUP BY t.rowid, t.libelle, t.subscription, d.statut";
|
||||
|
||||
dol_syslog("index.php::select nb of members by type", LOG_DEBUG);
|
||||
dol_syslog("index.php::select nb of members per type", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -294,7 +294,7 @@ print "<br>\n";
|
||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
/*
|
||||
* Last modified members
|
||||
* Latest modified members
|
||||
*/
|
||||
$max=5;
|
||||
|
||||
@ -342,7 +342,7 @@ if ($resql)
|
||||
print '<td>'.$staticmember->getNomUrl(1, 32).'</td>';
|
||||
print '<td>'.$statictype->getNomUrl(1, 32).'</td>';
|
||||
print '<td>'.dol_print_date($db->jdate($obj->datem), 'dayhour').'</td>';
|
||||
print '<td class="right">'.$staticmember->LibStatut($obj->statut, ($obj->subscription=='yes'?1:0), $db->jdate($obj->date_end_subscription), 5).'</td>';
|
||||
print '<td class="right">'.$staticmember->LibStatut($obj->statut, ($obj->subscription=='yes'?1:0), $db->jdate($obj->date_end_subscription), 3).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -132,8 +132,8 @@ class DolibarrApi
|
||||
unset($object->statuts_short);
|
||||
unset($object->statuts_logo);
|
||||
unset($object->statuts_long);
|
||||
unset($object->labelstatut);
|
||||
unset($object->labelstatut_short);
|
||||
unset($object->labelStatus);
|
||||
unset($object->labelStatusShort);
|
||||
|
||||
unset($object->element);
|
||||
unset($object->fk_element);
|
||||
|
||||
@ -809,19 +809,19 @@ class BOM extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus))
|
||||
if (empty($this->labelStatus))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mrp");
|
||||
$this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelstatus[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatus[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatus[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -192,8 +192,8 @@ class Propal extends CommonObject
|
||||
public $lines = array();
|
||||
public $line;
|
||||
|
||||
public $labelstatut=array();
|
||||
public $labelstatut_short=array();
|
||||
public $labelStatus=array();
|
||||
public $labelStatusShort=array();
|
||||
|
||||
public $specimen;
|
||||
|
||||
@ -3210,20 +3210,20 @@ class Propal extends CommonObject
|
||||
global $conf;
|
||||
|
||||
// Init/load array of translation of status
|
||||
if (empty($this->labelstatut) || empty($this->labelstatut_short))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("propal");
|
||||
$this->labelstatut[0]=$langs->trans("PropalStatusDraft");
|
||||
$this->labelstatut[1]=$langs->trans("PropalStatusValidated");
|
||||
$this->labelstatut[2]=$langs->trans("PropalStatusSigned");
|
||||
$this->labelstatut[3]=$langs->trans("PropalStatusNotSigned");
|
||||
$this->labelstatut[4]=$langs->trans("PropalStatusBilled");
|
||||
$this->labelstatut_short[0]=$langs->trans("PropalStatusDraftShort");
|
||||
$this->labelstatut_short[1]=$langs->trans("PropalStatusValidatedShort");
|
||||
$this->labelstatut_short[2]=$langs->trans("PropalStatusSignedShort");
|
||||
$this->labelstatut_short[3]=$langs->trans("PropalStatusNotSignedShort");
|
||||
$this->labelstatut_short[4]=$langs->trans("PropalStatusBilledShort");
|
||||
$this->labelStatus[0]=$langs->trans("PropalStatusDraft");
|
||||
$this->labelStatus[1]=$langs->trans("PropalStatusValidated");
|
||||
$this->labelStatus[2]=$langs->trans("PropalStatusSigned");
|
||||
$this->labelStatus[3]=$langs->trans("PropalStatusNotSigned");
|
||||
$this->labelStatus[4]=$langs->trans("PropalStatusBilled");
|
||||
$this->labelStatusShort[0]=$langs->trans("PropalStatusDraftShort");
|
||||
$this->labelStatusShort[1]=$langs->trans("PropalStatusValidatedShort");
|
||||
$this->labelStatusShort[2]=$langs->trans("PropalStatusSignedShort");
|
||||
$this->labelStatusShort[3]=$langs->trans("PropalStatusNotSignedShort");
|
||||
$this->labelStatusShort[4]=$langs->trans("PropalStatusBilledShort");
|
||||
}
|
||||
|
||||
$statusType='';
|
||||
@ -3233,7 +3233,7 @@ class Propal extends CommonObject
|
||||
elseif ($statut==self::STATUS_NOTSIGNED) $statusType='status5';
|
||||
elseif ($statut==self::STATUS_BILLED) $statusType='status6';
|
||||
|
||||
return dolGetStatus($this->labelstatut[$statut], $this->labelstatut_short[$statut], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$statut], $this->labelStatusShort[$statut], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3484,48 +3484,48 @@ class Commande extends CommonOrder
|
||||
if (empty($donotshowbilled)) $billedtext .= ($billed?' - '.$langs->trans("Billed"):'');
|
||||
|
||||
if ($statut==self::STATUS_CANCELED){
|
||||
$labelstatut = $langs->trans('StatusOrderCanceled');
|
||||
$labelstatutShort = $langs->trans('StatusOrderCanceledShort');
|
||||
$labelStatus = $langs->trans('StatusOrderCanceled');
|
||||
$labelStatusShort = $langs->trans('StatusOrderCanceledShort');
|
||||
$statusType='status5';
|
||||
}
|
||||
elseif ($statut==self::STATUS_DRAFT){
|
||||
$labelstatut = $langs->trans('StatusOrderDraft');
|
||||
$labelstatutShort = $langs->trans('StatusOrderDraftShort');
|
||||
$labelStatus = $langs->trans('StatusOrderDraft');
|
||||
$labelStatusShort = $langs->trans('StatusOrderDraftShort');
|
||||
$statusType='status0';
|
||||
}
|
||||
elseif ($statut==self::STATUS_VALIDATED){
|
||||
$labelstatut = $langs->trans('StatusOrderValidated').$billedtext;
|
||||
$labelstatutShort = $langs->trans('StatusOrderValidatedShort').$billedtext;
|
||||
$labelStatus = $langs->trans('StatusOrderValidated').$billedtext;
|
||||
$labelStatusShort = $langs->trans('StatusOrderValidatedShort').$billedtext;
|
||||
$statusType='status1';
|
||||
}
|
||||
elseif ($statut==self::STATUS_SHIPMENTONPROCESS){
|
||||
$labelstatut = $langs->trans('StatusOrderSentShort').$billedtext;
|
||||
$labelstatutShort = $langs->trans('StatusOrderSentShort').$billedtext;
|
||||
$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))){
|
||||
$labelstatut = $langs->trans('StatusOrderToBill');
|
||||
$labelstatutShort = $langs->trans('StatusOrderToBillShort');
|
||||
$labelStatus = $langs->trans('StatusOrderToBill');
|
||||
$labelStatusShort = $langs->trans('StatusOrderToBillShort');
|
||||
$statusType='status4';
|
||||
}
|
||||
elseif ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){
|
||||
$labelstatut = $langs->trans('StatusOrderProcessed').$billedtext;
|
||||
$labelstatutShort = $langs->trans('StatusOrderProcessed').$billedtext;
|
||||
$labelStatus = $langs->trans('StatusOrderProcessed').$billedtext;
|
||||
$labelStatusShort = $langs->trans('StatusOrderProcessed').$billedtext;
|
||||
$statusType='status6';
|
||||
}
|
||||
elseif ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))){
|
||||
$labelstatut = $langs->trans('StatusOrderDelivered');
|
||||
$labelstatutShort = $langs->trans('StatusOrderDelivered');
|
||||
$labelStatus = $langs->trans('StatusOrderDelivered');
|
||||
$labelStatusShort = $langs->trans('StatusOrderDelivered');
|
||||
$statusType='status6';
|
||||
}
|
||||
else{
|
||||
$labelstatut = $langs->trans('Unknown');
|
||||
$labelstatutShort = '';
|
||||
$labelStatus = $langs->trans('Unknown');
|
||||
$labelStatusShort = '';
|
||||
$statusType='';
|
||||
$mode = 0;
|
||||
}
|
||||
|
||||
return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode);
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -311,20 +311,20 @@ class CashControl extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus) || empty($this->labelstatusshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelstatus[0] = $langs->trans('Draft');
|
||||
$this->labelstatus[1] = $langs->trans('Closed');
|
||||
$this->labelstatusshort[0] = $langs->trans('Draft');
|
||||
$this->labelstatusshort[1] = $langs->trans('Closed');
|
||||
$this->labelStatus[0] = $langs->trans('Draft');
|
||||
$this->labelStatus[1] = $langs->trans('Closed');
|
||||
$this->labelStatusShort[0] = $langs->trans('Draft');
|
||||
$this->labelStatusShort[1] = $langs->trans('Closed');
|
||||
}
|
||||
|
||||
$statusType = 'status0';
|
||||
if ($status == self::STATUS_VALIDATED) $statusType = 'status6';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -69,7 +69,7 @@ class BonPrelevement extends CommonObject
|
||||
public $total;
|
||||
public $fetched;
|
||||
public $statut; // 0-Wait, 1-Trans, 2-Done
|
||||
public $labelstatut=array();
|
||||
public $labelStatus=array();
|
||||
|
||||
public $invoice_in_error=array();
|
||||
public $thirdparty_in_error=array();
|
||||
@ -2002,48 +2002,48 @@ class BonPrelevement extends CommonObject
|
||||
public function LibStatut($statut, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatut))
|
||||
if (empty($this->labelStatus))
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("withdrawals");
|
||||
$this->labelstatut[0]=$langs->trans("StatusWaiting");
|
||||
$this->labelstatut[1]=$langs->trans("StatusTrans");
|
||||
$this->labelstatut[2]=$langs->trans("StatusCredited");
|
||||
$this->labelStatus[0]=$langs->trans("StatusWaiting");
|
||||
$this->labelStatus[1]=$langs->trans("StatusTrans");
|
||||
$this->labelStatus[2]=$langs->trans("StatusCredited");
|
||||
}
|
||||
|
||||
if ($mode == 0 || $mode == 1)
|
||||
{
|
||||
return $this->labelstatut[$statut];
|
||||
return $this->labelStatus[$statut];
|
||||
}
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($statut==0) return img_picto($this->labelstatut[$statut], 'statut1').' '.$this->labelstatut[$statut];
|
||||
elseif ($statut==1) return img_picto($this->labelstatut[$statut], 'statut3').' '.$this->labelstatut[$statut];
|
||||
elseif ($statut==2) return img_picto($this->labelstatut[$statut], 'statut6').' '.$this->labelstatut[$statut];
|
||||
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];
|
||||
}
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($statut==0) return img_picto($this->labelstatut[$statut], 'statut1');
|
||||
elseif ($statut==1) return img_picto($this->labelstatut[$statut], 'statut3');
|
||||
elseif ($statut==2) return img_picto($this->labelstatut[$statut], 'statut6');
|
||||
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');
|
||||
}
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($statut==0) return img_picto($this->labelstatut[$statut], 'statut1').' '.$this->labelstatut[$statut];
|
||||
elseif ($statut==1) return img_picto($this->labelstatut[$statut], 'statut3').' '.$this->labelstatut[$statut];
|
||||
elseif ($statut==2) return img_picto($this->labelstatut[$statut], 'statut6').' '.$this->labelstatut[$statut];
|
||||
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];
|
||||
}
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($statut==0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut1');
|
||||
elseif ($statut==1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut3');
|
||||
elseif ($statut==2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut6');
|
||||
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');
|
||||
}
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($statut==0) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut1');
|
||||
elseif ($statut==1) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut3');
|
||||
elseif ($statut==2) return $this->labelstatut[$statut].' '.img_picto($this->labelstatut[$statut], 'statut6');
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1264,13 +1264,13 @@ class Contact extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$labelstatus = array(
|
||||
$labelStatus = array(
|
||||
0 => 'ActivityCeased',
|
||||
1 => 'InActivity',
|
||||
4 => 'InActivity',
|
||||
5 => 'ActivityCeased',
|
||||
);
|
||||
$labelstatusshort = array(
|
||||
$labelStatusShort = array(
|
||||
0 => 'ActivityCeased',
|
||||
1 => 'InActivity',
|
||||
4 => 'InActivity',
|
||||
@ -1280,8 +1280,8 @@ class Contact extends CommonObject
|
||||
$statusType = 'status4';
|
||||
if ($status==0 || $status==5) $statusType = 'status5';
|
||||
|
||||
$label = $langs->trans($labelstatus[$status]);
|
||||
$labelshort = $langs->trans($labelstatusshort[$status]);
|
||||
$label = $langs->trans($labelStatus[$status]);
|
||||
$labelshort = $langs->trans($labelStatusShort[$status]);
|
||||
|
||||
return dolGetStatus($label, $labelshort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
@ -496,27 +496,27 @@ abstract class CommonInvoice extends CommonObject
|
||||
$prefix='Short';
|
||||
if (! $paye){
|
||||
if ($status == 0) {
|
||||
$labelstatut = $langs->trans('BillStatusDraft');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusDraft');
|
||||
$labelStatus = $langs->trans('BillStatusDraft');
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusDraft');
|
||||
}
|
||||
elseif (($status == 3 || $status == 2) && $alreadypaid <= 0) {
|
||||
$labelstatut = $langs->trans('BillStatusClosedUnpaid');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid');
|
||||
$labelStatus = $langs->trans('BillStatusClosedUnpaid');
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid');
|
||||
$statusType='status5';
|
||||
}
|
||||
elseif (($status == 3 || $status == 2) && $alreadypaid > 0) {
|
||||
$labelstatut = $langs->trans('BillStatusClosedPaidPartially');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially');
|
||||
$labelStatus = $langs->trans('BillStatusClosedPaidPartially');
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially');
|
||||
$statusType='status9';
|
||||
}
|
||||
elseif ($alreadypaid <= 0) {
|
||||
$labelstatut = $langs->trans('BillStatusNotPaid');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusNotPaid');
|
||||
$labelStatus = $langs->trans('BillStatusNotPaid');
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusNotPaid');
|
||||
$statusType='status1';
|
||||
}
|
||||
else {
|
||||
$labelstatut = $langs->trans('BillStatusStarted');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusStarted');
|
||||
$labelStatus = $langs->trans('BillStatusStarted');
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusStarted');
|
||||
$statusType='status3';
|
||||
}
|
||||
}
|
||||
@ -525,20 +525,20 @@ abstract class CommonInvoice extends CommonObject
|
||||
$statusType='status6';
|
||||
|
||||
if ($type == self::TYPE_CREDIT_NOTE){
|
||||
$labelstatut = $langs->trans('BillStatusPaidBackOrConverted'); // credit note
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); // credit note
|
||||
$labelStatus = $langs->trans('BillStatusPaidBackOrConverted'); // credit note
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); // credit note
|
||||
}
|
||||
elseif ($type == self::TYPE_DEPOSIT){
|
||||
$labelstatut = $langs->trans('BillStatusConverted'); // deposit invoice
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusConverted'); // deposit invoice
|
||||
$labelStatus = $langs->trans('BillStatusConverted'); // deposit invoice
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusConverted'); // deposit invoice
|
||||
}
|
||||
else{
|
||||
$labelstatut = $langs->trans('BillStatusPaid');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusPaid');
|
||||
$labelStatus = $langs->trans('BillStatusPaid');
|
||||
$labelStatusShort = $langs->trans('Bill'.$prefix.'StatusPaid');
|
||||
}
|
||||
}
|
||||
|
||||
return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode);
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
@ -8182,7 +8182,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
elseif ($displayMode == 6) $displayMode = 5;
|
||||
}
|
||||
|
||||
// image's filename are still in French, so we use this array to convert
|
||||
// For backward compatibility. Image's filename are still in French, so we use this array to convert
|
||||
$statusImg=array(
|
||||
'status0' => 'statut0'
|
||||
,'status1' => 'statut1'
|
||||
@ -8212,6 +8212,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
$return = $htmlImg .' '. $htmlLabel;
|
||||
}
|
||||
elseif ($displayMode === 5) {
|
||||
// Add here a span class="hideonsmartphone ?
|
||||
$return = $htmlLabelShort .' '. $htmlImg;
|
||||
}
|
||||
else { // $displayMode >= 6
|
||||
|
||||
@ -116,12 +116,12 @@ class Don extends CommonObject
|
||||
/**
|
||||
* @var array Array of status label
|
||||
*/
|
||||
public $labelstatut;
|
||||
public $labelStatus;
|
||||
|
||||
/**
|
||||
* @var array Array of status label short
|
||||
*/
|
||||
public $labelstatutshort;
|
||||
public $labelStatusShort;
|
||||
|
||||
|
||||
const STATUS_DRAFT = 0;
|
||||
@ -163,25 +163,25 @@ class Don extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatut) || empty($this->labelstatutshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("donations");
|
||||
$this->labelstatut[-1]=$langs->trans("Canceled");
|
||||
$this->labelstatut[0]=$langs->trans("DonationStatusPromiseNotValidated");
|
||||
$this->labelstatut[1]=$langs->trans("DonationStatusPromiseValidated");
|
||||
$this->labelstatut[2]=$langs->trans("DonationStatusPaid");
|
||||
$this->labelstatutshort[-1]=$langs->trans("Canceled");
|
||||
$this->labelstatutshort[0]=$langs->trans("DonationStatusPromiseNotValidatedShort");
|
||||
$this->labelstatutshort[1]=$langs->trans("DonationStatusPromiseValidatedShort");
|
||||
$this->labelstatutshort[2]=$langs->trans("DonationStatusPaidShort");
|
||||
$this->labelStatus[-1]=$langs->trans("Canceled");
|
||||
$this->labelStatus[0]=$langs->trans("DonationStatusPromiseNotValidated");
|
||||
$this->labelStatus[1]=$langs->trans("DonationStatusPromiseValidated");
|
||||
$this->labelStatus[2]=$langs->trans("DonationStatusPaid");
|
||||
$this->labelStatusShort[-1]=$langs->trans("Canceled");
|
||||
$this->labelStatusShort[0]=$langs->trans("DonationStatusPromiseNotValidatedShort");
|
||||
$this->labelStatusShort[1]=$langs->trans("DonationStatusPromiseValidatedShort");
|
||||
$this->labelStatusShort[2]=$langs->trans("DonationStatusPaidShort");
|
||||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
if ($status == self::STATUS_CANCELED) $statusType = 'status5';
|
||||
if ($status == self::STATUS_PAID) $statusType = 'status6';
|
||||
|
||||
return dolGetStatus($this->labelstatut[$status], $this->labelstatutshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -506,46 +506,46 @@ class EmailCollector extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus))
|
||||
if (empty($this->labelStatus))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelstatus[1] = $langs->trans('Enabled');
|
||||
$this->labelstatus[0] = $langs->trans('Disabled');
|
||||
$this->labelStatus[1] = $langs->trans('Enabled');
|
||||
$this->labelStatus[0] = $langs->trans('Disabled');
|
||||
}
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -408,46 +408,46 @@ class EmailCollectorAction extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus))
|
||||
if (empty($this->labelStatus))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("emailcollector");
|
||||
$this->labelstatus[1] = $langs->trans('Enabled');
|
||||
$this->labelstatus[0] = $langs->trans('Disabled');
|
||||
$this->labelStatus[1] = $langs->trans('Enabled');
|
||||
$this->labelStatus[0] = $langs->trans('Disabled');
|
||||
}
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -383,46 +383,46 @@ class EmailCollectorFilter extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus))
|
||||
if (empty($this->labelStatus))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("emailcollector");
|
||||
$this->labelstatus[1] = $langs->trans('Enabled');
|
||||
$this->labelstatus[0] = $langs->trans('Disabled');
|
||||
$this->labelStatus[1] = $langs->trans('Enabled');
|
||||
$this->labelStatus[0] = $langs->trans('Disabled');
|
||||
}
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
}
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -683,12 +683,12 @@ class ExpenseReport extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$labelstatus = $langs->trans($this->statuts[$status]);
|
||||
$labelstatusshort = $langs->trans($this->statuts_short[$status]);
|
||||
$labelStatus = $langs->trans($this->statuts[$status]);
|
||||
$labelStatusShort = $langs->trans($this->statuts_short[$status]);
|
||||
|
||||
$statusType = $this->statuts_logo[$status];
|
||||
|
||||
return dolGetStatus($labelstatus, $labelstatusshort, '', $statusType, $mode);
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1227,20 +1227,20 @@ class Holiday extends CommonObject
|
||||
public function LibStatut($status, $mode = 0, $startdate = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus) || empty($this->labelstatusshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelstatus[self::STATUS_DRAFT] = $langs->trans('DraftCP');
|
||||
$this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP');
|
||||
$this->labelstatus[self::STATUS_APPROVED] = $langs->trans('ApprovedCP');
|
||||
$this->labelstatus[self::STATUS_CANCELED] = $langs->trans('CancelCP');
|
||||
$this->labelstatus[self::STATUS_REFUSED] = $langs->trans('RefuseCP');
|
||||
$this->labelstatusshort[self::STATUS_DRAFT] = $langs->trans('DraftCP');
|
||||
$this->labelstatusshort[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP');
|
||||
$this->labelstatusshort[self::STATUS_APPROVED] = $langs->trans('ApprovedCP');
|
||||
$this->labelstatusshort[self::STATUS_CANCELED] = $langs->trans('CancelCP');
|
||||
$this->labelstatusshort[self::STATUS_REFUSED] = $langs->trans('RefuseCP');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('DraftCP');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP');
|
||||
$this->labelStatus[self::STATUS_APPROVED] = $langs->trans('ApprovedCP');
|
||||
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('CancelCP');
|
||||
$this->labelStatus[self::STATUS_REFUSED] = $langs->trans('RefuseCP');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('DraftCP');
|
||||
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('ToReviewCP');
|
||||
$this->labelStatusShort[self::STATUS_APPROVED] = $langs->trans('ApprovedCP');
|
||||
$this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('CancelCP');
|
||||
$this->labelStatusShort[self::STATUS_REFUSED] = $langs->trans('RefuseCP');
|
||||
}
|
||||
|
||||
$statusType = 'status6';
|
||||
@ -1250,7 +1250,7 @@ class Holiday extends CommonObject
|
||||
if ($status == self::STATUS_CANCELED) $statusType = 'status5';
|
||||
if ($status == self::STATUS_REFUSED) $statusType = 'status5';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -656,22 +656,22 @@ class MyObject extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus) || empty($this->labelstatusshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelstatus[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||
$this->labelstatusshort[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelstatusshort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelstatusshort[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatusShort[self::STATUS_CANCELED] = $langs->trans('Disabled');
|
||||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -546,21 +546,21 @@ class Mo extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus))
|
||||
if (empty($this->labelStatus))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mrp");
|
||||
$this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||
$this->labelstatus[self::STATUS_INPROGRESS] = $langs->trans('InProgress');
|
||||
$this->labelstatus[self::STATUS_PRODUCED] = $langs->trans('StatusMOProduced');
|
||||
$this->labelstatus[self::STATUS_CANCELED] = $langs->trans('Canceled');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||
$this->labelStatus[self::STATUS_INPROGRESS] = $langs->trans('InProgress');
|
||||
$this->labelStatus[self::STATUS_PRODUCED] = $langs->trans('StatusMOProduced');
|
||||
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled');
|
||||
}
|
||||
|
||||
$statusType = 'status'.$status;
|
||||
//if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatus[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatus[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -4390,7 +4390,7 @@ class Product extends CommonObject
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
$labelstatut = $labelstatutShort = '';
|
||||
$labelStatus = $labelStatusShort = '';
|
||||
|
||||
$langs->load('products');
|
||||
if (! empty($conf->productbatch->enabled)) { $langs->load("productbatch");
|
||||
@ -4423,31 +4423,31 @@ class Product extends CommonObject
|
||||
if ($status == 0) {
|
||||
// $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch"
|
||||
if($type==0) {
|
||||
$labelstatut = $langs->trans('ProductStatusNotOnSellShort');
|
||||
$labelstatutShort = $langs->trans('ProductStatusNotOnSell');
|
||||
$labelStatus = $langs->trans('ProductStatusNotOnSellShort');
|
||||
$labelStatusShort = $langs->trans('ProductStatusNotOnSell');
|
||||
}
|
||||
elseif($type == 1) {
|
||||
$labelstatut = $langs->trans('ProductStatusNotOnBuyShort');
|
||||
$labelstatutShort = $langs->trans('ProductStatusNotOnBuy');
|
||||
$labelStatus = $langs->trans('ProductStatusNotOnBuyShort');
|
||||
$labelStatusShort = $langs->trans('ProductStatusNotOnBuy');
|
||||
}
|
||||
elseif($type == 2) {
|
||||
$labelstatut = $langs->trans('ProductStatusNotOnBatch');
|
||||
$labelstatutShort = $langs->trans('ProductStatusNotOnBatchShort');
|
||||
$labelStatus = $langs->trans('ProductStatusNotOnBatch');
|
||||
$labelStatusShort = $langs->trans('ProductStatusNotOnBatchShort');
|
||||
}
|
||||
}
|
||||
elseif ($status == 1) {
|
||||
// $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch"
|
||||
if ($type==0) {
|
||||
$labelstatut = $langs->trans('ProductStatusOnSellShort');
|
||||
$labelstatutShort = $langs->trans('ProductStatusOnSell');
|
||||
$labelStatus = $langs->trans('ProductStatusOnSellShort');
|
||||
$labelStatusShort = $langs->trans('ProductStatusOnSell');
|
||||
}
|
||||
elseif ($type == 1) {
|
||||
$labelstatut = $langs->trans('ProductStatusOnBuyShort');
|
||||
$labelstatutShort = $langs->trans('ProductStatusOnBuy');
|
||||
$labelStatus = $langs->trans('ProductStatusOnBuyShort');
|
||||
$labelStatusShort = $langs->trans('ProductStatusOnBuy');
|
||||
}
|
||||
elseif ($type == 2) {
|
||||
$labelstatut = $langs->trans('ProductStatusOnBatch');
|
||||
$labelstatutShort = $langs->trans('ProductStatusOnBatchShort');
|
||||
$labelStatus = $langs->trans('ProductStatusOnBatch');
|
||||
$labelStatusShort = $langs->trans('ProductStatusOnBatchShort');
|
||||
}
|
||||
}
|
||||
|
||||
@ -4455,7 +4455,7 @@ class Product extends CommonObject
|
||||
if ($mode > 6) {
|
||||
return dolGetStatus($langs->trans('Unknown'), '', '', 'status0', 0);
|
||||
} else {
|
||||
return dolGetStatus($labelstatut, $labelstatutShort, '', $statuttrans, $mode);
|
||||
return dolGetStatus($labelStatus, $labelStatusShort, '', $statuttrans, $mode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
/*
|
||||
* Last modified products
|
||||
* Latest modified products
|
||||
*/
|
||||
$max=15;
|
||||
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,";
|
||||
@ -299,11 +299,11 @@ if ($result)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$colnb=4;
|
||||
$colnb=2;
|
||||
if (empty($conf->global->PRODUIT_MULTIPRICES)) $colnb++;
|
||||
|
||||
print '<tr class="liste_titre"><th colspan="'.$colnb.'">'.$transRecordedType.'</th>';
|
||||
print '<th class="right"><a href="'.DOL_URL_ROOT.'/product/list.php?sortfield=p.tms&sortorder=DESC">'.$langs->trans("FullList").'</td>';
|
||||
print '<th class="right" colspan="3"><a href="'.DOL_URL_ROOT.'/product/list.php?sortfield=p.tms&sortorder=DESC">'.$langs->trans("FullList").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
while ($i < $num)
|
||||
@ -359,11 +359,11 @@ if ($result)
|
||||
else print price($objp->price).' '.$langs->trans("HT");
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="right nowrap"><span class="statusrefsell">';
|
||||
print $product_static->LibStatut($objp->tosell, 5, 0);
|
||||
print '<td class="right nowrap width25"><span class="statusrefsell">';
|
||||
print $product_static->LibStatut($objp->tosell, 3, 0);
|
||||
print "</span></td>";
|
||||
print '<td class="right nowrap"><span class="statusrefbuy">';
|
||||
print $product_static->LibStatut($objp->tobuy, 5, 1);
|
||||
print '<td class="right nowrap width25"><span class="statusrefbuy">';
|
||||
print $product_static->LibStatut($objp->tobuy, 3, 1);
|
||||
print "</span></td>";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -396,16 +396,16 @@ class Inventory extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if (empty($this->labelstatus))
|
||||
if (empty($this->labelStatus))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mrp");
|
||||
$this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelstatus[self::STATUS_CANCELED] = $langs->trans('Canceled');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled');
|
||||
}
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatus[$status], '', 'status'.$status, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatus[$status], '', 'status'.$status, $mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -55,20 +55,20 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
$listofstatus=array_keys($listofoppstatus);
|
||||
foreach ($listofstatus as $status)
|
||||
{
|
||||
$labelstatus = '';
|
||||
$labelStatus = '';
|
||||
|
||||
$code = dol_getIdFromCode($db, $status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) $labelstatus = $langs->trans("OppStatus".$code);
|
||||
if (empty($labelstatus)) $labelstatus=$listofopplabel[$status];
|
||||
if ($code) $labelStatus = $langs->trans("OppStatus".$code);
|
||||
if (empty($labelStatus)) $labelStatus=$listofopplabel[$status];
|
||||
|
||||
//$labelstatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')';
|
||||
//$labelstatus .= ' - '.price2num($listofoppstatus[$status]).'%';
|
||||
//$labelStatus .= ' ('.$langs->trans("Coeff").': '.price2num($listofoppstatus[$status]).')';
|
||||
//$labelStatus .= ' - '.price2num($listofoppstatus[$status]).'%';
|
||||
|
||||
$dataseries[]=array($labelstatus, (isset($valsamount[$status])?(float) $valsamount[$status]:0));
|
||||
$dataseries[]=array($labelStatus, (isset($valsamount[$status])?(float) $valsamount[$status]:0));
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$labelstatus.'</td>';
|
||||
print '<td>'.$labelStatus.'</td>';
|
||||
print '<td class="right"><a href="list.php?statut='.$status.'">'.price((isset($valsamount[$status])?(float) $valsamount[$status]:0), 0, '', 1, -1, -1, $conf->currency).'</a></td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -2283,15 +2283,15 @@ class Societe extends CommonObject
|
||||
$statusType = 'status4';
|
||||
if ($status == 0) $statusType = 'status5';
|
||||
|
||||
if (empty($this->labelstatus) || empty($this->labelstatusshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
$this->labelstatus[0] = $langs->trans("ActivityCeased");
|
||||
$this->labelstatus[1] = $langs->trans("InActivity");
|
||||
$this->labelstatusshort[0] = $langs->trans("ActivityCeased");
|
||||
$this->labelstatusshort[1] = $langs->trans("InActivity");
|
||||
$this->labelStatus[0] = $langs->trans("ActivityCeased");
|
||||
$this->labelStatus[1] = $langs->trans("InActivity");
|
||||
$this->labelStatusShort[0] = $langs->trans("ActivityCeased");
|
||||
$this->labelStatusShort[1] = $langs->trans("InActivity");
|
||||
}
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
@ -232,7 +232,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
/*
|
||||
* Last third parties modified
|
||||
* Latest modified third parties
|
||||
*/
|
||||
$max=15;
|
||||
$sql = "SELECT s.rowid, s.nom as name, s.email, s.client, s.fournisseur";
|
||||
@ -316,7 +316,7 @@ if ($result)
|
||||
print dol_print_date($thirdparty_static->datem, 'day');
|
||||
print "</td>";
|
||||
print '<td class="right nowrap">';
|
||||
print $thirdparty_static->getLibStatut(5);
|
||||
print $thirdparty_static->getLibStatut(3);
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
@ -158,8 +158,8 @@ class SupplierProposal extends CommonObject
|
||||
public $lines = array();
|
||||
public $line;
|
||||
|
||||
public $labelstatut=array();
|
||||
public $labelstatut_short=array();
|
||||
public $labelStatus=array();
|
||||
public $labelStatusShort=array();
|
||||
|
||||
public $nbtodo;
|
||||
public $nbtodolate;
|
||||
@ -2196,20 +2196,20 @@ class SupplierProposal extends CommonObject
|
||||
// phpcs:enable
|
||||
|
||||
// Init/load array of translation of status
|
||||
if (empty($this->labelstatut) || empty($this->labelstatut_short))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("supplier_proposal");
|
||||
$this->labelstatut[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraft");
|
||||
$this->labelstatut[self::STATUS_VALIDATED]=$langs->trans("SupplierProposalStatusValidated");
|
||||
$this->labelstatut[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSigned");
|
||||
$this->labelstatut[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSigned");
|
||||
$this->labelstatut[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosed");
|
||||
$this->labelstatut_short[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraftShort");
|
||||
$this->labelstatut_short[self::STATUS_VALIDATED]=$langs->trans("Opened");
|
||||
$this->labelstatut_short[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSignedShort");
|
||||
$this->labelstatut_short[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSignedShort");
|
||||
$this->labelstatut_short[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosedShort");
|
||||
$this->labelStatus[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraft");
|
||||
$this->labelStatus[self::STATUS_VALIDATED]=$langs->trans("SupplierProposalStatusValidated");
|
||||
$this->labelStatus[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSigned");
|
||||
$this->labelStatus[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSigned");
|
||||
$this->labelStatus[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosed");
|
||||
$this->labelStatusShort[self::STATUS_DRAFT]=$langs->trans("SupplierProposalStatusDraftShort");
|
||||
$this->labelStatusShort[self::STATUS_VALIDATED]=$langs->trans("Opened");
|
||||
$this->labelStatusShort[self::STATUS_SIGNED]=$langs->trans("SupplierProposalStatusSignedShort");
|
||||
$this->labelStatusShort[self::STATUS_NOTSIGNED]=$langs->trans("SupplierProposalStatusNotSignedShort");
|
||||
$this->labelStatusShort[self::STATUS_CLOSE]=$langs->trans("SupplierProposalStatusClosedShort");
|
||||
}
|
||||
|
||||
$statusnew='';
|
||||
@ -2219,7 +2219,7 @@ class SupplierProposal extends CommonObject
|
||||
elseif ($status==self::STATUS_NOTSIGNED) $statusnew='status5';
|
||||
elseif ($status==self::STATUS_CLOSE) $statusnew='status6';
|
||||
|
||||
return dolGetStatus($this->labelstatut[$status], $this->labelstatut_short[$status], '', $statusnew, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusnew, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2495,20 +2495,20 @@ class User extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if (empty($this->labelstatus) || empty($this->labelstatusshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelstatus[self::STATUS_ENABLED] = $langs->trans('Enabled');
|
||||
$this->labelstatus[self::STATUS_DISABLED] = $langs->trans('Disabled');
|
||||
$this->labelstatusshort[self::STATUS_ENABLED] = $langs->trans('Enabled');
|
||||
$this->labelstatusshort[self::STATUS_DISABLED] = $langs->trans('Disabled');
|
||||
$this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled');
|
||||
$this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled');
|
||||
$this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled');
|
||||
$this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Disabled');
|
||||
}
|
||||
|
||||
$statusType = 'status5';
|
||||
if ($status == self::STATUS_ENABLED) $statusType = 'status4';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -745,20 +745,20 @@ class Website extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if (empty($this->labelstatus) || empty($this->labelstatusshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelstatusshort[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelstatusshort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
}
|
||||
|
||||
$statusType = 'status5';
|
||||
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -545,20 +545,20 @@ class WebsitePage extends CommonObject
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if (empty($this->labelstatus) || empty($this->labelstatusshort))
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||
{
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
$this->labelstatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelstatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelstatusshort[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelstatusshort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Disabled');
|
||||
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled');
|
||||
}
|
||||
|
||||
$statusType = 'status5';
|
||||
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
|
||||
|
||||
return dolGetStatus($this->labelstatus[$status], $this->labelstatusshort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -633,37 +633,37 @@ class Hook extends CommonObject
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (empty($this->labelstatus)) {
|
||||
if (empty($this->labelStatus)) {
|
||||
global $langs;
|
||||
//$langs->load("zapier@zapier");
|
||||
$this->labelstatus[1] = $langs->trans('Enabled');
|
||||
$this->labelstatus[0] = $langs->trans('Disabled');
|
||||
$this->labelStatus[1] = $langs->trans('Enabled');
|
||||
$this->labelStatus[0] = $langs->trans('Disabled');
|
||||
}
|
||||
|
||||
if ($mode == 0) {
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
} elseif ($mode == 1) {
|
||||
return $this->labelstatus[$status];
|
||||
return $this->labelStatus[$status];
|
||||
} elseif ($mode == 2) {
|
||||
if ($status == 1) {
|
||||
return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
} elseif ($status == 0) {
|
||||
return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
}
|
||||
} elseif ($mode == 3) {
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
} elseif ($mode == 4) {
|
||||
if ($status == 1) return img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelstatus[$status];
|
||||
if ($status == 1) return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
elseif ($status == 0) return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status];
|
||||
} elseif ($mode == 5) {
|
||||
if ($status == 1) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
if ($status == 1) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
elseif ($status == 0) return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
} elseif ($mode == 6) {
|
||||
if ($status == 1) {
|
||||
return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle');
|
||||
} elseif ($status == 0) {
|
||||
return $this->labelstatus[$status].' '.img_picto($this->labelstatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user