Ignore:
Timestamp:
2009/05/15 16:30:40 (15 years ago)
Author:
kajiwara
Message:

2.4.0 正式版のコミット。コミット内容の詳細はこちら(http://svn.ec-cube.net/open_trac/query?status=closed&milestone=EC-CUBE2.4.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2/data/class/pages/admin/total/LC_Page_Admin_Total.php

    r17213 r18007  
    639639 
    640640        // 会員集計の取得 
    641         $col = "COUNT(*) AS order_count, SUM(total) AS total, trunc(AVG(total)) AS total_average, order_sex"; 
     641        $col = "COUNT(*) AS order_count, SUM(total) AS total, trunc(AVG(total),0) AS total_average, order_sex"; 
    642642        $from = "dtb_order"; 
    643643        $objQuery = new SC_Query(); 
     
    684684        $sql.= "SUM(quantity) AS products_count, "; 
    685685        $sql.= "(price * sum(quantity)) AS total "; 
    686         $sql.= "FROM dtb_order_detail WHERE order_id IN (SELECT order_id FROM dtb_order WHERE $where ) "; 
     686        $sql.= "FROM dtb_order_detail AS T2 WHERE EXISTS (SELECT 1 FROM dtb_order AS T3 WHERE T2.order_id = T3.order_id AND $where ) "; 
    687687        $sql.= "GROUP BY product_id, product_name, product_code, price "; 
    688688        $sql.= ") AS T1 "; 
     
    707707        list($where, $arrval) = $this->lfGetWhereMember('T2.create_date', $sdate, $edate, $type); 
    708708 
    709         $sql = "SELECT job, count(*) AS order_count, SUM(total) AS total, trunc(AVG(total)) AS total_average "; 
     709        $sql = "SELECT job, count(*) AS order_count, SUM(total) AS total, trunc(AVG(total),0) AS total_average "; 
    710710        $sql.= "FROM dtb_customer AS T1 LEFT JOIN dtb_order AS T2 USING ( customer_id ) WHERE $where AND T2.del_flg = 0 and T2.status <> " . ORDER_CANCEL; 
    711711        $sql.= " GROUP BY job ORDER BY total DESC"; 
Note: See TracChangeset for help on using the changeset viewer.