From 840408c1d21f6895c821b78c62a7bd7090c461aa Mon Sep 17 00:00:00 2001 From: tarrsalah Date: Sun, 5 Mar 2017 12:34:22 +0100 Subject: [PATCH 1/2] Fix the remainder to pay amount (#6486) The commit fix the remainder to pay amount (`$restapayer` value) in a supplier invoice card. --- htdocs/fourn/facture/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index ffdaa8924aa..afd36862fde 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2411,6 +2411,8 @@ else print $langs->trans('AlreadyPaid'); print ' : 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . ' '; + $totalpaye = $object->getSommePaiement(); + $resteapayer = $object->total_ttc - $totalpaye; $resteapayeraffiche = $resteapayer; $cssforamountpaymentcomplete = 'amountpaymentcomplete'; From bc7f4f30314ea9e6a803c878b06dc04d88dbbfe2 Mon Sep 17 00:00:00 2001 From: tarrsalah Date: Mon, 6 Mar 2017 09:02:01 +0100 Subject: [PATCH 2/2] No need to recalculate $totalpaye. --- htdocs/fourn/facture/card.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index afd36862fde..4d9e2521dd7 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2411,7 +2411,6 @@ else print $langs->trans('AlreadyPaid'); print ' : 0)?' class="amountalreadypaid"':'').'>' . price($totalpaye) . ' '; - $totalpaye = $object->getSommePaiement(); $resteapayer = $object->total_ttc - $totalpaye; $resteapayeraffiche = $resteapayer; $cssforamountpaymentcomplete = 'amountpaymentcomplete';