Stable merged into unstable again (due to failure on binary file during previous...
[fa-stable.git] / sales / includes / db / branches_db.inc
index a9683a27bf8281a51f60576ca81928f879a85ea0..09b1fbe4f28af171c013cd574c5bbc028b5bdf9c 100644 (file)
@@ -166,7 +166,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;
 }