From cb757b5cc05a792c90bded4db3df0543799b8746 Mon Sep 17 00:00:00 2001 From: Janusz Dobrowolski Date: Sun, 27 Oct 2013 00:05:04 +0200 Subject: [PATCH] Supplier Allocations: Bank Payments transactions were improperly available for supplier payments allocations. --- purchasing/includes/db/suppalloc_db.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/purchasing/includes/db/suppalloc_db.inc b/purchasing/includes/db/suppalloc_db.inc index f54bd3ca..92d4e750 100644 --- a/purchasing/includes/db/suppalloc_db.inc +++ b/purchasing/includes/db/suppalloc_db.inc @@ -159,6 +159,7 @@ function get_allocatable_from_supp_sql($supplier_id, $settled) return $sql; } + //------------------------------------------------------------------------------------------------------------- function get_allocatable_to_supp_transactions($supplier_id, $trans_no=null, $type=null) @@ -175,7 +176,7 @@ function get_allocatable_to_supp_transactions($supplier_id, $trans_no=null, $typ else { $sql = get_alloc_supp_sql(null, "round(ABS(ov_amount+ov_gst+ov_discount)-alloc,6) > 0 - AND trans.type != ".ST_SUPPAYMENT." + AND trans.type NOT IN (".implode(',',array(ST_SUPPAYMENT, ST_BANKPAYMENT)).") AND trans.supplier_id=".db_escape($supplier_id)); } -- 2.30.2