Cleanup: removed all closing tags in php files.
[fa-stable.git] / sales / includes / db / branches_db.inc
index 09b1fbe4f28af171c013cd574c5bbc028b5bdf9c..dcde3c669da3302138463dc83dc3699d491892e5 100644 (file)
@@ -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";
@@ -253,4 +253,3 @@ function _get_branch_contacts($branch_code, $action=null, $customer_id=null, $de
        return $results;
 }
 
-?>
\ No newline at end of file