Ignore:
Timestamp:
2013/05/21 11:32:18 (11 years ago)
Author:
kimoto
Message:

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.13.0)
ページクラス内からの不要なSC_Queryを排除

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/SC_Fpdf.php

    r22779 r22831  
    3030define('PDF_TEMPLATE_REALDIR', TEMPLATE_ADMIN_REALDIR . 'pdf/'); 
    3131 
    32 class SC_Fpdf extends SC_Helper_FPDI  
     32class SC_Fpdf extends SC_Helper_FPDI 
    3333{ 
    34     function __construct($download, $title, $tpl_pdf = 'nouhinsyo1.pdf') 
     34    public function __construct($download, $title, $tpl_pdf = 'nouhinsyo1.pdf') 
    3535    { 
    3636        $this->FPDF(); 
     
    6969    } 
    7070 
    71     function setData($arrData) 
     71    public function setData($arrData) 
    7272    { 
    7373        $this->arrData = $arrData; 
     
    9696    } 
    9797 
    98     function setShopData() 
     98    private function setShopData() 
    9999    { 
    100100        // ショップ情報 
     
    134134    } 
    135135 
    136     function setMessageData() 
     136    private function setMessageData() 
    137137    { 
    138138        // メッセージ 
     
    144144    } 
    145145 
    146     function setOrderData() 
     146    private function setOrderData() 
    147147    { 
    148148        $arrOrder = array(); 
     
    267267     * 備考の出力を行う 
    268268     * 
    269      * @param string $str 入力文字列 
     269     * @param  string $str 入力文字列 
    270270     * @return string 変更後の文字列 
    271271     */ 
    272     function setEtcData() 
     272    private function setEtcData() 
    273273    { 
    274274        $this->Cell(0, 10, '', 0, 1, 'C', 0, ''); 
     
    280280    } 
    281281 
    282     function createPdf() 
     282    public function createPdf() 
    283283    { 
    284284        // PDFをブラウザに送信 
     
    300300 
    301301    // PDF_Japanese::Text へのパーサー 
    302     function lfText($x, $y, $text, $size = 0, $style = '') 
     302    private function lfText($x, $y, $text, $size = 0, $style = '') 
    303303    { 
    304304        // 退避 
     
    314314 
    315315    // 受注データの取得 
    316     function lfGetOrderData($order_id) 
     316    private function lfGetOrderData($order_id) 
    317317    { 
    318318        if (SC_Utils_Ex::sfIsInt($order_id)) { 
    319319            // DBから受注情報を読み込む 
    320             $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    321             $where = 'order_id = ?'; 
    322             $arrRet = $objQuery->select('*', 'dtb_order', $where, array($order_id)); 
    323             $this->arrDisp = $arrRet[0]; 
    324             list($point) = SC_Helper_Customer_Ex::sfGetCustomerPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']); 
     320            $objPurchase = new SC_Helper_Purchase_Ex(); 
     321            $this->arrDisp = $objPurchase->getOrder($order_id); 
     322            list($point) = SC_Helper_Customer_Ex::sfGetCustomerPoint($order_id, $this->arrDisp['use_point'], $this->arrDisp['add_point']); 
    325323            $this->arrDisp['point'] = $point; 
    326324 
    327325            // 受注詳細データの取得 
    328             $arrRet = $this->lfGetOrderDetail($order_id); 
     326            $arrRet = $objPurchase->getOrderDetail($order_id); 
    329327            $arrRet = SC_Utils_Ex::sfSwapArray($arrRet); 
    330328            $this->arrDisp = array_merge($this->arrDisp, $arrRet); 
     
    337335        } 
    338336    } 
    339  
    340     // 受注詳細データの取得 
    341     function lfGetOrderDetail($order_id) 
    342     { 
    343         $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    344         $col = 'product_id, product_class_id, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate, tax_rate, tax_rule'; 
    345         $where = 'order_id = ?'; 
    346         $objQuery->setOrder('order_detail_id'); 
    347         $arrRet = $objQuery->select($col, 'dtb_order_detail', $where, array($order_id)); 
    348         return $arrRet; 
    349     } 
    350337} 
Note: See TracChangeset for help on using the changeset viewer.