diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 74593cb8675..8a87d4903a1 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -602,7 +602,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '
'.price($objp->total_ttc).' | ';
- print ''.price($objp->am).' | ';
+ print ''.price($objp->am);
+ if ($creditnotes) print '+'.price($creditnotes);
+ if ($deposits) print '+'.price($deposits);
+ print ' | ';
print ''.price($remaintopay).' | ';
@@ -657,6 +660,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$total+=$objp->total_ht;
$total_ttc+=$objp->total_ttc;
$totalrecu+=$objp->am;
+ $totalrecucreditnote+=$creditnotes;
+ $totalrecudeposits+=$deposits;
$i++;
}
if ($i > 1)
@@ -669,8 +674,11 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
if (!empty($conf->multicurrency->enabled)) print ' | ';
if (!empty($conf->multicurrency->enabled)) print ' | ';
print ''.price($total_ttc).' | ';
- print ''.price($totalrecu).' | ';
- print ''.price($total_ttc - $totalrecu).' | ';
+ print ''.price($totalrecu);
+ if ($totalrecucreditnote) print '+'.price($totalrecucreditnote);
+ if ($totalrecudeposits) print '+'.price($totalrecudeposits);
+ print ' | ';
+ print ''.price(price2num($total_ttc - $totalrecu - $totalrecucreditnote - $totalrecudeposits,'MT')).' | ';
print ' | '; // Autofilled
if (!empty($conf->multicurrency->enabled)) print ' | ';
print "\n";