Added sorting branches by branch_ref.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 12 Jan 2010 15:12:07 +0000 (15:12 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Tue, 12 Jan 2010 15:12:07 +0000 (15:12 +0000)
sales/includes/db/branches_db.inc
sales/includes/db/cust_trans_db.inc

index dc0cdbd2e405ba2a83a2b643a4070eab9013d63d..3728dbbc35eb6a415755109567aa08c7360d1141 100644 (file)
@@ -139,6 +139,7 @@ function get_default_info_for_branch($customer_id)
        $result = db_query($sql,"check failed");
        return db_fetch($result);
 }
+
 function get_sql_for_customer_branches()
 {
        $sql = "SELECT "
@@ -165,6 +166,8 @@ function get_sql_for_customer_branches()
                AND b.debtor_no = ".db_escape($_POST['customer_id']);
 
        if (!get_post('show_inactive')) $sql .= " AND !b.inactive";
+       $sql .= " ORDER BY branch_ref";
+
        return $sql;
 }
 ?>
\ No newline at end of file
index 363a8f4c4962d6bc450f3070b7587f93455f57d7..f9b77aa5c3885c84357965ff66e82c7c698c6101 100644 (file)
@@ -380,7 +380,7 @@ function get_sql_for_customer_inquiry()
        return $sql;
 }
 
-function get_sql_for_sales_deliveries_view($selected_customer, $selected_stock_id)
+function get_sql_for_sales_deliveries_view($selected_customer, $selected_stock_item)
 {
        $sql = "SELECT trans.trans_no,
                        debtor.name,