diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index d63a83389d5..f659d8ea1ca 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3135,7 +3135,7 @@ else // Affiche statut de la facture print ''; - print $facturestatic->LibStatut($objp->paye,$objp->fk_statut,5,$objp->am); + print $facturestatic->LibStatut($objp->paye,$objp->fk_statut,5,$objp->am,$objp->type); print "\n"; $total+=$objp->total; $total_ttc+=$objp->total_ttc; diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 9744fcbd432..719ef7a89f7 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -1824,7 +1824,7 @@ class Facture extends CommonObject */ function getLibStatut($mode=0,$alreadypayed=-1) { - return $this->LibStatut($this->paye,$this->statut,$mode,$alreadypayed); + return $this->LibStatut($this->paye,$this->statut,$mode,$alreadypayed,$this->type); } /** @@ -1833,9 +1833,10 @@ class Facture extends CommonObject * \param statut Id statut * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto * \param alreadypayed Montant deja payé + * \param type Type facture * \return string Libellé du statut */ - function LibStatut($paye,$statut,$mode=0,$alreadypayed=-1) + function LibStatut($paye,$statut,$mode=0,$alreadypayed=-1,$type=0) { global $langs; $langs->load('bills'); @@ -1853,7 +1854,8 @@ class Facture extends CommonObject } else { - return $langs->trans('Bill'.$prefix.'StatusPayed'); + if ($type == 2) return $langs->trans('Bill'.$prefix.'StatusPayedBackOrConverted'); + else return $langs->trans('Bill'.$prefix.'StatusPayed'); } } if ($mode == 1) @@ -1869,7 +1871,8 @@ class Facture extends CommonObject } else { - return $langs->trans('Bill'.$prefix.'StatusPayed'); + if ($type == 2) return $langs->trans('Bill'.$prefix.'StatusPayedBackOrConverted'); + else return $langs->trans('Bill'.$prefix.'StatusPayed'); } } if ($mode == 2) @@ -1885,7 +1888,8 @@ class Facture extends CommonObject } else { - return img_picto($langs->trans('BillStatusPayed'),'statut6').' '.$langs->trans('Bill'.$prefix.'StatusPayed'); + if ($type == 2) return img_picto($langs->trans('BillStatusPayedBackOrConverted'),'statut6').' '.$langs->trans('Bill'.$prefix.'StatusPayedBackOrConverted'); + else return img_picto($langs->trans('BillStatusPayed'),'statut6').' '.$langs->trans('Bill'.$prefix.'StatusPayed'); } } if ($mode == 3) @@ -1901,7 +1905,8 @@ class Facture extends CommonObject } else { - return img_picto($langs->trans('BillStatusPayed'),'statut6'); + if ($type == 2) return img_picto($langs->trans('BillStatusPayedBackOrConverted'),'statut6'); + else return img_picto($langs->trans('BillStatusPayed'),'statut6'); } } if ($mode == 4) @@ -1916,7 +1921,8 @@ class Facture extends CommonObject } else { - return img_picto($langs->trans('BillStatusPayed'),'statut6').' '.$langs->trans('BillStatusPayed'); + if ($type == 2) return img_picto($langs->trans('BillStatusPayedBackOrConverted'),'statut6').' '.$langs->trans('BillStatusPayedBackOrConverted'); + else return img_picto($langs->trans('BillStatusPayed'),'statut6').' '.$langs->trans('BillStatusPayed'); } } if ($mode == 5) @@ -1932,7 +1938,8 @@ class Facture extends CommonObject } else { - return $langs->trans('Bill'.$prefix.'StatusPayed').' '.img_picto($langs->trans('BillStatusPayed'),'statut6'); + if ($type == 2) return $langs->trans('Bill'.$prefix.'StatusPayedBackOrConverted').' '.img_picto($langs->trans('BillStatusPayedBackOrConverted'),'statut6'); + else return $langs->trans('Bill'.$prefix.'StatusPayed').' '.img_picto($langs->trans('BillStatusPayed'),'statut6'); } } } diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index ce41b8692ec..716bc3f9b1c 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -81,6 +81,7 @@ TotalTTCToYourCredit=Total TTC to your credit BillStatus=Invoice status BillStatusDraft=Draft (needs to be validated) BillStatusPayed=Payed +BillStatusPayedBackOrConverted=Payed or converted into discount BillStatusCanceled=Abandonned BillStatusValidated=Validated (needs to be payed) BillStatusStarted=Started @@ -89,6 +90,7 @@ BillStatusClosedUnpayed=Closed (unpayed) BillStatusClosedPayedPartially=Payed (partially) BillShortStatusDraft=Draft BillShortStatusPayed=Payed +BillShortStatusPayedBackOrConverted=Processed BillShortStatusCanceled=Abandonned BillShortStatusValidated=Validated BillShortStatusStarted=Started diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 852bf03992a..d10784d6612 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -81,6 +81,7 @@ TotalTTCToYourCredit=Total TTC BillStatus=État de la facture BillStatusDraft=Brouillon (à valider) BillStatusPayed=Payée +BillStatusPayedBackOrConverted=Remboursé ou converti en réduction BillStatusCanceled=Abandonnée BillStatusValidated=Validée (à payer) BillStatusStarted=Réglement commencé @@ -89,6 +90,7 @@ BillStatusClosedUnpayed=Ferm BillStatusClosedPayedPartially=Payée (partiellement) BillShortStatusDraft=Brouillon BillShortStatusPayed=Payée +BillShortStatusPayedBackOrConverted=Traité BillShortStatusCanceled=Abandonnée BillShortStatusValidated=Validée BillShortStatusStarted=Commencée