Fix label of long status

This commit is contained in:
Laurent Destailleur 2017-04-13 15:15:44 +02:00
parent 3e9ccc186a
commit 6c069e9a1a
2 changed files with 5 additions and 16 deletions

View File

@ -307,7 +307,7 @@ abstract class CommonInvoice extends CommonObject
*
* @param int $paye Status field paye
* @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
* @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 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)
* @param int $type Type invoice
* @return string Libelle du statut
@ -408,9 +408,10 @@ abstract class CommonInvoice extends CommonObject
else return img_picto($langs->trans('BillStatusPaid'),'statut6').' '.$langs->trans('BillStatusPaid');
}
}
if ($mode == 5)
if ($mode == 5 || $mode == 6)
{
$prefix='Short';
$prefix='';
if ($mode == 5) $prefix='Short';
if (! $paye)
{
if ($status == 0) return '<span class="xhideonsmartphone">'.$langs->trans('Bill'.$prefix.'StatusDraft').' </span>'.img_picto($langs->trans('BillStatusDraft'),'statut0');

View File

@ -1157,24 +1157,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlstatus.=$object->getLibStatut(5,1);
}
}
elseif ($object->element == 'facture' || $object->element == 'invoice' || $object->element == 'invoice_supplier')
elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan')))
{
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
$morehtmlstatus.=$tmptxt;
}
elseif ($object->element == 'chargesociales')
{
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
$morehtmlstatus.=$tmptxt;
}
elseif ($object->element == 'loan')
{
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
$morehtmlstatus.=$tmptxt;
}
elseif ($object->element == 'contrat' || $object->element == 'contract')
{
if ($object->statut==0) $morehtmlstatus.=$object->getLibStatut(2);