From 74b1f2c4b1a0b135aa1dd6a9b3cb0e838473865d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 Aug 2008 18:13:41 +0000 Subject: [PATCH] Fix: Remainder to pay wrong on payment page --- htdocs/compta/paiement.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index f88c67e079b..239724b3d85 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -20,10 +20,10 @@ */ /** - \file htdocs/compta/paiement.php - \ingroup compta - \brief Page to create a payment - \version $Id$ + * \file htdocs/compta/paiement.php + * \ingroup compta + * \brief Page to create a payment + * \version $Id$ */ include_once('./pre.inc.php'); @@ -216,7 +216,7 @@ if ($_POST['action'] == 'confirm_paiement' && $_POST['confirm'] == 'yes') } } -// S�curit� acc�s client +// Security check if ($user->societe_id > 0) { $action = ''; @@ -418,6 +418,7 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P $total+=$objp->total; $total_ttc+=$objp->total_ttc; $totalrecu+=$objp->am; + $totalrecucreditnote+=$creditnote; $i++; } if ($i > 1) @@ -426,8 +427,11 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P print ''; print ''.$langs->trans('TotalTTC').':'; print ''.price($total_ttc).''; - print ''.price($totalrecu).''; - print ''.price($total_ttc - $totalrecu).''; + print ''.price($totalrecu); + if ($totalrecucreditnote) print '+'.price($totalrecucreditnote); + print ''; + print ''.price($total_ttc - $totalrecu - $totalrecucreditnote).''; + print ' '; print ' '; print "\n"; }