From 1ac154437d918ee3a904e16eacbfc3dc476b1fdf Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Wed, 30 Sep 2009 16:38:48 +0000 Subject: [PATCH] Fixed false error on entry of payment without allocation. --- CHANGELOG.txt | 3 +++ purchasing/supplier_payment.php | 6 +++++- sales/customer_payments.php | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 71167cd0..d07968bb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/purchasing/supplier_payment.php b/purchasing/supplier_payment.php index d78ee47e..ce217913 100644 --- a/purchasing/supplier_payment.php +++ b/purchasing/supplier_payment.php @@ -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; } //---------------------------------------------------------------------------------------- diff --git a/sales/customer_payments.php b/sales/customer_payments.php index afc30fa0..61489857 100644 --- a/sales/customer_payments.php +++ b/sales/customer_payments.php @@ -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; } //---------------------------------------------------------------------------------------------- -- 2.30.2