Fixed so total amount cannot be 0 in Bank Payments/Deposits
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 25 Nov 2009 16:20:07 +0000 (16:20 +0000)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Wed, 25 Nov 2009 16:20:07 +0000 (16:20 +0000)
CHANGELOG.txt
gl/gl_bank.php

index 1241223ca65c75640240dc30f3a0f7d22cbb6961..70a993f492f41eef67fa5eef70dd106d439f5658 100644 (file)
@@ -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
index baf7f8857f28c2245873b9f3d5e8c19a8e8c9614..3510dbd44c864e8a28d43a02170c8752063f71b3 100644 (file)
@@ -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."));