diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index f82dd93904b..35d1f9311e4 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -321,6 +321,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
* Autres factures impayees
*/
$sql = 'SELECT f.rowid as facid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef as df, date_lim_reglement as duedate';
+ $sql.= ', DATEDIFF(f.date_lim_reglement, NOW()) as duedays';
$sql.= ', SUM(pf.amount) as am';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
@@ -355,6 +356,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '
'.$langs->trans('RefSupplier').' | ';
print ''.$langs->trans('Date').' | ';
print ''.$langs->trans('DateMaxPayment').' | ';
+ print ''.$langs->trans('DueDays').' | ';
print ''.$langs->trans('AmountTTC').' | ';
print ''.$langs->trans('AlreadyPaid').' | ';
print ''.$langs->trans('RemainderToPay').' | ';
@@ -394,6 +396,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
{
print '!!! | ';
}
+ print ''.$objp->duedays.' | ';
print ''.price($objp->total_ttc).' | ';
print ''.price($objp->am).' | ';
print ''.price($objp->total_ttc - $objp->am).' | ';
@@ -412,7 +415,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
{
// Print total
print '';
- print '| '.$langs->trans('TotalTTC').': | ';
+ print ''.$langs->trans('TotalTTC').': | ';
print ''.price($total_ttc).' | ';
print ''.price($totalrecu).' | ';
print ''.price($total_ttc - $totalrecu).' | ';