diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php
index cf04e77fcb5..a4b8e3ccef2 100644
--- a/htdocs/facture.class.php
+++ b/htdocs/facture.class.php
@@ -1465,7 +1465,7 @@ class Facture
{
if ($statut == 0) return $langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('Bill'.$prefix.'StatusDraft'),'statut0');
if ($statut == 3) return $langs->trans('Bill'.$prefix.'StatusCanceled').' '.img_picto($langs->trans('Bill'.$prefix.'StatusCanceled'),'statut5');
- if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusValidated'),'statut1');
+ if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusNotPayed'),'statut1');
return $langs->trans('Bill'.$prefix.'StatusStarted').' '.img_picto($langs->trans('Bill'.$prefix.'StatusStarted'),'statut3');
}
else
diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php
index 27445b8c8ba..511af7fc027 100644
--- a/htdocs/fourn/facture/fiche.php
+++ b/htdocs/fourn/facture/fiche.php
@@ -497,7 +497,7 @@ else
$authorfullname=$author->fullname;
}
print '
| '.$langs->trans('Author').' | '.$authorfullname.' | ';
- print '
| '.$langs->trans('Status').' | '.$fac->LibStatut($fac->paye,$fac->statut).' |
';
+ print '| '.$langs->trans('Status').' | '.$fac->LibStatut($fac->paye,$fac->statut,4).' |
';
print '| '.$langs->trans('AmountHT').' | '.price($fac->total_ht).' | '.$langs->trans('Currency'.$conf->monnaie).' |
';
print '| '.$langs->trans('AmountVAT').' | '.price($fac->total_tva).' | '.$langs->trans('Currency'.$conf->monnaie).' |
';
diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php
index 45bfcd9a5c5..cd4ac7e8712 100644
--- a/htdocs/fourn/facture/index.php
+++ b/htdocs/fourn/facture/index.php
@@ -190,7 +190,7 @@ if ($resql)
print "\n";
print '';
- $fac = new FactureFournisseur($db);
+ $facturestatic = new FactureFournisseur($db);
$var=true;
$total=0;
@@ -201,9 +201,9 @@ if ($resql)
$var=!$var;
print "";
- print '| '.img_object($langs->trans("ShowBill"),"bill").' '.dolibarr_trunc($obj->facnumber,20)." | \n";
+ print ''.img_object($langs->trans("ShowBill"),"bill").' '.dolibarr_trunc($obj->facnumber,12)." | \n";
print ''.dolibarr_print_date($obj->date_echeance).' | ';
- print ''.dolibarr_trunc(stripslashes("$obj->libelle"),44).' | ';
+ print ''.dolibarr_trunc(stripslashes("$obj->libelle"),36).' | ';
print '';
print ''.img_object($langs->trans("ShowSupplier"),"company").' '.$obj->nom.'';
print ' | '.price($obj->total_ht).' | ';
@@ -212,56 +212,23 @@ if ($resql)
$total_ttc+=$obj->total_ttc;
// Affiche statut de la facture
- if ($obj->paye)
- {
- $class = "normal";
- }
- else
- {
- if ($obj->fk_statut == 0)
- {
- $class = "normal";
- }
- else
- {
- $class = "impayee";
- }
- }
-
- print '';
- if (! $obj->paye)
- {
- if ($obj->fk_statut == 0)
- {
- print $fac->PayedLibStatut($obj->paye,$obj->fk_statut);
- }
- elseif ($obj->fk_statut == 3)
- {
- print $fac->PayedLibStatut($obj->paye,$obj->fk_statut);
- }
- else
- {
+ print ' | ';
// \todo le montant deja payé obj->am n'est pas définie
- print ''.($fac->PayedLibStatut($obj->paye,$obj->fk_statut,$obj->am)).'';
- }
- }
- else
- {
- print $fac->PayedLibStatut($obj->paye,$obj->fk_statut);
- }
+ print $facturestatic->LibStatut($obj->paye,$obj->fk_statut,5,$objp->am);
print ' | ';
print "
\n";
$i++;
- if ($i == min($num,$limit)) {
- // Print total
- print '';
- print '| '.$langs->trans("Total").' | ';
- print ''.price($total).' | ';
- print ''.price($total_ttc).' | ';
- print ' | ';
- print "
\n";
+ if ($i == min($num,$limit))
+ {
+ // Print total
+ print '';
+ print '| '.$langs->trans("Total").' | ';
+ print ''.price($total).' | ';
+ print ''.price($total_ttc).' | ';
+ print ' | ';
+ print "
\n";
}
}
diff --git a/htdocs/fourn/fournisseur.facture.class.php b/htdocs/fourn/fournisseur.facture.class.php
index 5c605096408..203ce76a97e 100644
--- a/htdocs/fourn/fournisseur.facture.class.php
+++ b/htdocs/fourn/fournisseur.facture.class.php
@@ -608,7 +608,7 @@ class FactureFournisseur
{
if ($statut == 0) return $langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('Bill'.$prefix.'StatusDraft'),'statut0');
if ($statut == 3) return $langs->trans('Bill'.$prefix.'StatusCanceled').' '.img_picto($langs->trans('Bill'.$prefix.'StatusCanceled'),'statut5');
- if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusValidated'),'statut1');
+ if ($alreadypayed <= 0) return $langs->trans('Bill'.$prefix.'StatusNotPayed').' '.img_picto($langs->trans('Bill'.$prefix.'StatusNotPayed'),'statut1');
return $langs->trans('Bill'.$prefix.'StatusStarted').' '.img_picto($langs->trans('Bill'.$prefix.'StatusStarted'),'statut3');
}
else