X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fincludes%2Fdb%2Fbranches_db.inc;h=c0da80db44ed68949447e34e9e3328e521afc3ee;hb=1b9351ae81a67726e757eba55895a4f059c7f128;hp=09b1fbe4f28af171c013cd574c5bbc028b5bdf9c;hpb=0b63d898491b6577a5a5bf90e771dca0dcbbcf1f;p=fa-stable.git diff --git a/sales/includes/db/branches_db.inc b/sales/includes/db/branches_db.inc index 09b1fbe4..c0da80db 100644 --- a/sales/includes/db/branches_db.inc +++ b/sales/includes/db/branches_db.inc @@ -139,7 +139,7 @@ function get_default_info_for_branch($customer_id) return db_fetch($result); } -function get_sql_for_customer_branches() +function get_sql_for_customer_branches($customer_id) { $sql = "SELECT " ."b.branch_code, " @@ -163,7 +163,7 @@ function get_sql_for_customer_branches() WHERE b.tax_group_id=t.id AND b.area=a.area_code AND b.salesman=s.salesman_code - AND b.debtor_no = ".db_escape($_POST['customer_id']); + AND b.debtor_no = ".db_escape($customer_id); if (!get_post('show_inactive')) $sql .= " AND !b.inactive"; $sql .= " GROUP BY b.branch_code ORDER BY branch_ref";