[0000290] Can't upload files
[fa-stable.git] / admin / db / transactions_db.inc
index c4f48306ce34a3d575f86e9d40ac2a33d5362b2e..594c34d23622216c87c738a0357cc1c72af1d371 100644 (file)
@@ -25,7 +25,7 @@ function get_sql_for_view_transactions($filtertype, $from, $to, &$trans_ref)
        $trans_ref = $db_info[3];
        $trans_date = $db_info[4];
 
-       $sql = "SELECT DISTINCT t.$trans_no_name as trans_no";
+       $sql = "SELECT t.$trans_no_name as trans_no";
 
        if ($trans_ref)
                $sql .= " ,t.$trans_ref as ref ";
@@ -49,7 +49,8 @@ function get_sql_for_view_transactions($filtertype, $from, $to, &$trans_ref)
        }
        elseif ($type_name != null)
                $sql .= " AND t.`$type_name` = ".db_escape($filtertype);
-       
+
+       $sql .= " GROUP BY t.$type_name, t.$trans_no_name";
        $sql .= " ORDER BY t.$trans_no_name";
 
        return $sql;