Changeset 12164


Ignore:
Timestamp:
2007/04/18 15:42:31 (14 years ago)
Author:
kakinaka
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/html/admin/total/index.php

    r12163 r12164  
    1212require_once("./class/SC_GraphLine.php"); 
    1313require_once("./class/SC_GraphBar.php"); 
     14 
     15// GD¥é¥¤¥Ö¥é¥ê¤Î¥¤¥ó¥¹¥È¡¼¥ëȽÄê 
     16$install_GD = (function_exists("gd_info"))?true:false; 
    1417 
    1518class LC_Page { 
     
    116119            } 
    117120            // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    118             $objPage = lfGetOrderProducts($type, $sdate, $edate, $objPage, true, $mode); 
     121            $objPage = lfGetOrderProducts($type, $sdate, $edate, $objPage, $install_GD, $mode); 
    119122            break; 
    120123        // ¿¦¶ÈÊ̽¸·× 
     
    129132            } 
    130133            // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    131             $objPage = lfGetOrderJob($type, $sdate, $edate, $objPage); 
     134            $objPage = lfGetOrderJob($type, $sdate, $edate, $objPage, $install_GD); 
    132135            break; 
    133136        // ²ñ°÷Ê̽¸·× 
     
    142145            } 
    143146            // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    144             $objPage = lfGetOrderMember($type, $sdate, $edate, $objPage); 
     147            $objPage = lfGetOrderMember($type, $sdate, $edate, $objPage, $install_GD); 
    145148            break; 
    146149        // ǯÂåÊ̽¸·× 
     
    156159            } 
    157160            // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    158             $objPage = lfGetOrderAge($type, $sdate, $edate, $objPage); 
     161            $objPage = lfGetOrderAge($type, $sdate, $edate, $objPage, $install_GD); 
    159162            break; 
    160163        // ´ü´ÖÊ̽¸·× 
     
    169172            } 
    170173            // ¸¡º÷·ë²Ì¤Î¼èÆÀ 
    171             $objPage = lfGetOrderTerm($type, $sdate, $edate, $objPage); 
     174            $objPage = lfGetOrderTerm($type, $sdate, $edate, $objPage, $install_GD); 
    172175             
    173176            break; 
     
    200203        // ¥Ð¥Ã¥Á¥â¡¼¥É¤Î¾ì¹ç¤Î¤ß¼Â¹Ô¤¹¤ë 
    201204        if(DAILY_BATCH_MODE) { 
    202             // 1¥ö·îʬ¤Î½¸·× 
    203             lfStartDailyTotal(31,0); 
     205            // 3ÆüÁ°¤Þ¤Ç¤Î½¸·× 
     206            lfStartDailyTotal(3,0); 
    204207        } 
    205208    } 
     
    617620    list($where, $arrval) = lfGetWhereMember('create_date', $sdate, $edate, $type); 
    618621     
    619     $sql = "SELECT T1.product_id, T1.product_code, T2.name, T1.products_count, T1.order_count, T1.price, T1.total "; 
     622    $sql = "SELECT T1.product_id, T1.product_code, T1.product_name as name, T1.products_count, T1.order_count, T1.price, T1.total "; 
    620623    $sql.= "FROM ( "; 
    621     $sql.= "SELECT product_id, product_code, price, "; 
     624    $sql.= "SELECT product_id, product_name, product_code, price, "; 
    622625    $sql.= "COUNT(*) AS order_count, "; 
    623626    $sql.= "SUM(quantity) AS products_count, "; 
    624627    $sql.= "(price * sum(quantity)) AS total "; 
    625628    $sql.= "FROM dtb_order_detail WHERE order_id IN (SELECT order_id FROM dtb_order WHERE $where ) "; 
    626     $sql.= "GROUP BY product_id, product_code, price "; 
    627     $sql.= ") "; 
    628     $sql.= "AS T1 LEFT JOIN dtb_products AS T2 USING (product_id) WHERE T2.name IS NOT NULL AND status = 1 ORDER BY T1.total DESC "; 
     629    $sql.= "GROUP BY product_id, product_name, product_code, price "; 
     630    $sql.= ") AS T1 "; 
     631    $sql.= "ORDER BY T1.total DESC "; 
    629632     
    630633    if($mode != "csv") { 
Note: See TracChangeset for help on using the changeset viewer.