From 0b28587e658e12ec1ab8b018c8e5c74771d28441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 3 Jun 2021 15:28:47 +0200 Subject: [PATCH] fix warnings --- htdocs/compta/paiement.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 12a6eb97d13..b6a63b32466 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -598,7 +598,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ' '; print "\n"; - $total = 0; + $total_ttc = 0; $totalrecu = 0; $totalrecucreditnote = 0; $totalrecudeposits = 0; @@ -754,15 +754,14 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Warning print ''; //print "xx".$amounts[$invoice->id]."-".$amountsresttopay[$invoice->id]."
"; - if ($amounts[$invoice->id] && (abs($amounts[$invoice->id]) > abs($amountsresttopay[$invoice->id])) - || $multicurrency_amounts[$invoice->id] && (abs($multicurrency_amounts[$invoice->id]) > abs($multicurrency_amountsresttopay[$invoice->id]))) { + if (!empty($amounts[$invoice->id]) && (abs($amounts[$invoice->id]) > abs($amountsresttopay[$invoice->id])) + || !empty($multicurrency_amounts[$invoice->id]) && (abs($multicurrency_amounts[$invoice->id]) > abs($multicurrency_amountsresttopay[$invoice->id]))) { print ' '.img_warning($langs->trans("PaymentHigherThanReminderToPay")); } print ''; print "\n"; - $total += $objp->total; $total_ttc += $objp->total_ttc; $totalrecu += $paiement; $totalrecucreditnote += $creditnotes;