From: Janusz Dobrowolski Date: Mon, 15 Mar 2010 18:02:26 +0000 (+0000) Subject: Fixed db error when no supplier selected in get_allocatable_to_supp_transactions X-Git-Tag: 2.3-final~934 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=071e87dd99ae9fa9328361f5acd08d8409f15535;p=fa-stable.git Fixed db error when no supplier selected in get_allocatable_to_supp_transactions --- diff --git a/purchasing/includes/db/suppalloc_db.inc b/purchasing/includes/db/suppalloc_db.inc index 987a640d..9fbe6fa1 100644 --- a/purchasing/includes/db/suppalloc_db.inc +++ b/purchasing/includes/db/suppalloc_db.inc @@ -170,7 +170,7 @@ function get_allocatable_to_supp_transactions($supplier_id, $trans_no=null, $typ { $sql = get_alloc_supp_sql(null, "round(ABS(ov_amount+ov_gst+ov_discount)-alloc,6) > 0 AND trans.type != ".ST_SUPPAYMENT." - AND trans.supplier_id=$supplier_id"); + AND trans.supplier_id=".db_escape($supplier_id)); } return db_query($sql." ORDER BY trans_no", "Cannot retreive alloc to transactions");