Improved Customer and Supplier Balances Report. Option to choose last column as balance.
[fa-stable.git] / sales / includes / db / branches_db.inc
index 2688d1b3e2d341e521db4deebfbfaeb753ec1121..c02b74c2d8ad81747cbbd572c69a099555774e3b 100644 (file)
@@ -164,7 +164,7 @@ 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";
+       $sql .= " GROUP BY b.branch_code ORDER BY branch_ref";
 
        return $sql;
 }