On affiche le statut court des factures sur les listes de factures.
This commit is contained in:
parent
9084fc9163
commit
1a028f4691
@ -1191,24 +1191,29 @@ class Facture
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi le libellé long d'un statut donn
|
* \brief Renvoi le libellé d'un statut donn
|
||||||
* \param paye etat paye
|
* \param paye Etat paye
|
||||||
* \param statut id statut
|
* \param statut Id statut
|
||||||
* \return string Libellé long du statut
|
* \param mode 0=libellé long, 1=libellé court
|
||||||
*/
|
* \return string Libellé du statut
|
||||||
function LibStatut($paye,$statut)
|
*/
|
||||||
|
function LibStatut($paye,$statut,$mode=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
|
$prefix="";
|
||||||
|
if ($mode == 1) $prefix="Short";
|
||||||
|
|
||||||
if (! $paye)
|
if (! $paye)
|
||||||
{
|
{
|
||||||
if ($statut == 0) return $langs->trans("BillStatusDraft");
|
if ($statut == 0) return $langs->trans("Bill${prefix}StatusDraft");
|
||||||
if ($statut == 3) return $langs->trans("BillStatusCanceled");
|
if ($statut == 3) return $langs->trans("Bill${prefix}StatusCanceled");
|
||||||
return $langs->trans("BillStatusValidated");
|
return $langs->trans("Bill${prefix}StatusValidated");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $langs->trans("BillStatusPayed");
|
return $langs->trans("Bill${prefix}StatusPayed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user