From: Joe Hunt Date: Wed, 19 Dec 2018 10:52:47 +0000 (+0100) Subject: 4796: Entering customer payment with a bank charge equal to the total amount results... X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=0991472483431059993dea24db4d83edb264bc1c;p=fa-stable.git 4796: Entering customer payment with a bank charge equal to the total amount results in database error. Fixed. @Braathwaate. --- diff --git a/sales/customer_payments.php b/sales/customer_payments.php index 366386ad..592d0e7f 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -174,7 +174,7 @@ function can_process() return false; } - if (isset($_POST['charge']) && !check_num('charge', 0)) { + if (isset($_POST['charge']) && (!check_num('charge', 0) || $_POST['charge'] == $_POST['amount'])) { display_error(_("The entered amount is invalid or negative and cannot be processed.")); set_focus('charge'); return false;