Fixed false error on entry of payment without allocation.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 30 Sep 2009 16:38:48 +0000 (16:38 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 30 Sep 2009 16:38:48 +0000 (16:38 +0000)
CHANGELOG.txt
purchasing/supplier_payment.php
sales/customer_payments.php

index 71167cd0e484edebf84d251c60631589eb0f5922..d07968bba833db9e61ff003e98e9a80b8532b9a9 100644 (file)
@@ -46,6 +46,9 @@ $ /includes/access_levels.inc
 $ /includes/types.inc
 # Message typo
 $ /sql/alter2.2.php
+# Fixed false error on payment without allocation.
+$ /purchasing/supplier_payment.php
+  /sales/customer_payments.php
 
 29-Sep-2009 Tom Hallman
 ! Changes in tags table structure, tags related security areas
index d78ee47edb95a09d99fa0d1325bc8a29adb6cb62..ce217913e0aefc4522fac4060232d13a12fc7617 100644 (file)
@@ -164,7 +164,11 @@ function check_inputs()
        }
 
        $_SESSION['alloc']->amount = -input_num('amount');
-       return check_allocations();
+
+       if (isset($_POST["TotalNumberOfAllocs"]))
+               return check_allocations();
+       else
+               return true;
 }
 
 //----------------------------------------------------------------------------------------
index afc30fa0a1cd66bc4511d490b16b62a6778e3c2b..6148985705658fa0f456b5c54b9d4279ff1d89ad 100644 (file)
@@ -143,7 +143,11 @@ function can_process()
        }
 
        $_SESSION['alloc']->amount = input_num('amount');
-       return check_allocations();
+
+       if (isset($_POST["TotalNumberOfAllocs"]))
+               return check_allocations();
+       else
+               return true;
 }
 
 //----------------------------------------------------------------------------------------------