From 6f78530f71bb7a4f816d6666b4a277b2a9992c0f Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Wed, 25 Nov 2009 16:20:07 +0000 Subject: [PATCH] Fixed so total amount cannot be 0 in Bank Payments/Deposits --- CHANGELOG.txt | 4 ++++ gl/gl_bank.php | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1241223..70a993f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,10 @@ Legend: ! -> Note $ -> Affected files +25-Nov-2009 Joe Hunt/Tom Hallman +# Fixed so total amount cannot be 0 in Bank Payments/Deposits +$ /gl/gl_bank.php + 21-Nov-2009 Janusz Dobrowolski # Fixed bug [0000178] data error in supplier allocations $ /includes/ui/allocation_cart.inc diff --git a/gl/gl_bank.php b/gl/gl_bank.php index baf7f88..3510dbd 100644 --- a/gl/gl_bank.php +++ b/gl/gl_bank.php @@ -125,6 +125,12 @@ if (isset($_POST['Process'])) $input_error = 1; } + if ($_SESSION['pay_items']->gl_items_total() == 0.0) { + display_error(_("The total bank amount cannot be 0.")); + set_focus('code_id'); + $input_error = 1; + } + if (!$Refs->is_valid($_POST['ref'])) { display_error( _("You must enter a reference.")); -- 2.30.2