forked from Wavyzz/dolibarr
Ajout picto sur statut commandes
This commit is contained in:
@@ -1298,25 +1298,69 @@ class Commande
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Retourne le libell<6C> du statut de la commande
|
||||
* \return string Libell<6C>
|
||||
*/
|
||||
function getLibStatut()
|
||||
/**
|
||||
* \brief Retourne le libell<6C> du statut de la commande
|
||||
* \param mode 0=libell<6C> long, 1=libell<6C> court, 2=Picto + Libell<6C> court, 3=Picto, 4=Picto + Libell<6C> long, 5=Libell<6C> court + Picto
|
||||
* \return string Libell<6C>
|
||||
*/
|
||||
function getLibStatut($mode)
|
||||
{
|
||||
return $this->LibStatut($this->statut);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libell<6C> d'un statut donn<6E>
|
||||
* \param statut id statut
|
||||
* \return string Libell<6C>
|
||||
*/
|
||||
function LibStatut($statut)
|
||||
/**
|
||||
* \brief Renvoi le libell<6C> d'un statut donn<6E>
|
||||
* \param statut Id statut
|
||||
* \param mode 0=libell<6C> long, 1=libell<6C> court, 2=Picto + Libell<6C> court, 3=Picto, 4=Picto + Libell<6C> long, 5=Libell<6C> court + Picto
|
||||
* \return string Libell<6C>
|
||||
*/
|
||||
function LibStatut($statut,$mode)
|
||||
{
|
||||
return $this->status_label_short[$statut];
|
||||
global $langs;
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $this->statuts[$statut];
|
||||
}
|
||||
if ($mode == 1)
|
||||
{
|
||||
return $this->status_label_short[$statut];
|
||||
}
|
||||
if ($mode == 2)
|
||||
{
|
||||
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut6').' '.$this->status_label_short[$statut];
|
||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$this->status_label_short[$statut];
|
||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$this->status_label_short[$statut];
|
||||
if ($statut==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3').' '.$this->status_label_short[$statut];
|
||||
if ($statut==3) return img_picto($langs->trans('StatusOrderProcessed'),'statut5').' '.$this->status_label_short[$statut];
|
||||
}
|
||||
if ($mode == 3)
|
||||
{
|
||||
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut6');
|
||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
||||
if ($statut==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3');
|
||||
if ($statut==3) return img_picto($langs->trans('StatusOrderProcessed'),'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
{
|
||||
if ($statut==-1) return img_picto($langs->trans('StatusOrderCanceled'),'statut6').' '.$this->statuts[$statut];
|
||||
if ($statut==0) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$this->statuts[$statut];
|
||||
if ($statut==1) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$this->statuts[$statut];
|
||||
if ($statut==2) return img_picto($langs->trans('StatusOrderOnProcess'),'statut3').' '.$this->statuts[$statut];
|
||||
if ($statut==3) return img_picto($langs->trans('StatusOrderProcessed'),'statut5').' '.$this->statuts[$statut];
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
if ($statut==-1) return $this->status_label_short[$statut].' '.img_picto($langs->trans('StatusOrderCanceled'),'statut6');
|
||||
if ($statut==0) return $this->status_label_short[$statut].' '.img_picto($langs->trans('StatusOrderDraft'),'statut0');
|
||||
if ($statut==1) return $this->status_label_short[$statut].' '.img_picto($langs->trans('StatusOrderValidated'),'statut1');
|
||||
if ($statut==2) return $this->status_label_short[$statut].' '.img_picto($langs->trans('StatusOrderOnProcess'),'statut3');
|
||||
if ($statut==3) return $this->status_label_short[$statut].' '.img_picto($langs->trans('StatusOrderProcessed'),'statut5');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Charge les informations d'ordre info dans l'objet commande
|
||||
* \param id Id de la commande a charger
|
||||
|
||||
Reference in New Issue
Block a user