Fix label of status of invoice record when using smartphone
This commit is contained in:
parent
7cdfff7263
commit
7a5a561170
@ -472,26 +472,26 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
$statusType='status0';
|
$statusType='status0';
|
||||||
$prefix='Short';
|
$prefix='Short';
|
||||||
if (! $paye){
|
if (! $paye){
|
||||||
if ($status == 0){
|
if ($status == 0) {
|
||||||
$labelstatut = $langs->trans('BillStatusDraft');
|
$labelstatut = $langs->trans('BillStatusDraft');
|
||||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusDraft');
|
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusDraft');
|
||||||
}
|
}
|
||||||
elseif (($status == 3 || $status == 2) && $alreadypaid <= 0){
|
elseif (($status == 3 || $status == 2) && $alreadypaid <= 0) {
|
||||||
$labelstatut = $langs->trans('BillStatusClosedUnpaid');
|
$labelstatut = $langs->trans('BillStatusClosedUnpaid');
|
||||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid');
|
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid');
|
||||||
$statusType='status5';
|
$statusType='status5';
|
||||||
}
|
}
|
||||||
elseif (($status == 3 || $status == 2) && $alreadypaid > 0){
|
elseif (($status == 3 || $status == 2) && $alreadypaid > 0) {
|
||||||
$labelstatut = $langs->trans('BillStatusClosedPaidPartially');
|
$labelstatut = $langs->trans('BillStatusClosedPaidPartially');
|
||||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially');
|
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially');
|
||||||
$statusType='status9';
|
$statusType='status9';
|
||||||
}
|
}
|
||||||
elseif ($alreadypaid <= 0){
|
elseif ($alreadypaid <= 0) {
|
||||||
$labelstatut = $langs->trans('BillStatusNotPaid');
|
$labelstatut = $langs->trans('BillStatusNotPaid');
|
||||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusNotPaid');
|
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusNotPaid');
|
||||||
$statusType='status1';
|
$statusType='status1';
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$labelstatut = $langs->trans('BillStatusStarted');
|
$labelstatut = $langs->trans('BillStatusStarted');
|
||||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusStarted');
|
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusStarted');
|
||||||
$statusType='status3';
|
$statusType='status3';
|
||||||
@ -525,7 +525,7 @@ abstract class CommonInvoice extends CommonObject
|
|||||||
* conditions de reglements de la facture et date de facturation.
|
* conditions de reglements de la facture et date de facturation.
|
||||||
*
|
*
|
||||||
* @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition.
|
* @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition.
|
||||||
* @return date Date limite de reglement si ok, <0 si ko
|
* @return integer Date limite de reglement si ok, <0 si ko
|
||||||
*/
|
*/
|
||||||
public function calculate_date_lim_reglement($cond_reglement = 0)
|
public function calculate_date_lim_reglement($cond_reglement = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1493,7 +1493,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
|||||||
elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan')))
|
elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan')))
|
||||||
{
|
{
|
||||||
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
|
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
|
||||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||||
$morehtmlstatus.=$tmptxt;
|
$morehtmlstatus.=$tmptxt;
|
||||||
}
|
}
|
||||||
elseif ($object->element == 'contrat' || $object->element == 'contract')
|
elseif ($object->element == 'contrat' || $object->element == 'contract')
|
||||||
@ -8037,7 +8037,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
|||||||
$return = $htmlImg .' '. $htmlLabel;
|
$return = $htmlImg .' '. $htmlLabel;
|
||||||
}
|
}
|
||||||
elseif ($displayMode === 5) {
|
elseif ($displayMode === 5) {
|
||||||
$return = $htmlLabelShort .' '. $htmlImg;
|
$return = $displayMode.$htmlLabelShort .' '. $htmlImg;
|
||||||
}
|
}
|
||||||
else { // $displayMode >= 6
|
else { // $displayMode >= 6
|
||||||
$return = $htmlLabel .' '. $htmlImg;
|
$return = $htmlLabel .' '. $htmlImg;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user