Ignore:
Timestamp:
2010/11/24 05:30:01 (16 years ago)
Author:
Seasoft
Message:

#627(ソース整形・ソースコメントの改善)

  • 「pretax」は収入に関する税込みを意味する英単語だと思いますので、より適切と考えられる「including tax」を基にした単語「inctax」に書き換えます。またメソッド名としては「calculate」を基にした「calc」を前置するように改めます。英文法・命名規則的に正しいか確信はないのですが少なくとも現状よりは理想に近づくと考えます。
Location:
branches/version-2_5-dev/data/class/pages
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r19674 r19680  
    487487        for($i = 0; $i < $max; $i++) { 
    488488            // 小計の計算 
    489             $subtotal += SC_Helper_DB_Ex::sfPreTax($arrVal['price'][$i]) * $arrVal['quantity'][$i]; 
     489            $subtotal += SC_Helper_DB_Ex::sfCalcIncTax($arrVal['price'][$i]) * $arrVal['quantity'][$i]; 
    490490            // 小計の計算 
    491491            $totaltax += SC_Helper_DB_Ex::sfTax($arrVal['price'][$i]) * $arrVal['quantity'][$i]; 
  • branches/version-2_5-dev/data/class/pages/cart/LC_Page_Cart.php

    r19670 r19680  
    148148            // カート集計処理 
    149149            $this->tpl_message = $objCartSess->checkProducts($key); 
    150             $this->tpl_total_pretax[$key] = $objCartSess->getAllProductsTotal($key); 
     150            $this->tpl_total_inctax[$key] = $objCartSess->getAllProductsTotal($key); 
    151151            $this->tpl_total_tax[$key] = $objCartSess->getAllProductsTax($key); 
    152152            // ポイント合計 
    … …  
    155155 
    156156            // 送料無料までの金額を計算 
    157             $this->tpl_deliv_free[$key] = $this->arrInfo['free_rule'] - $this->tpl_total_pretax[$key]; 
     157            $this->tpl_deliv_free[$key] = $this->arrInfo['free_rule'] - $this->tpl_total_inctax[$key]; 
    158158        } 
    159159 
    … …  
    291291 
    292292        // 送料無料までの金額を計算 
    293         $tpl_deliv_free = $this->arrInfo['free_rule'] - $this->tpl_total_pretax; 
     293        $tpl_deliv_free = $this->arrInfo['free_rule'] - $this->tpl_total_inctax; 
    294294        $this->tpl_deliv_free = $tpl_deliv_free; 
    295295 
  • branches/version-2_5-dev/data/class/pages/rss/LC_Page_Rss_Products.php

    r18815 r19680  
    7373            foreach($arrProduct as $key => $val){ 
    7474                //販売価格を税込みに編集 
    75                 $arrProduct[$key]["price02"] = SC_Helper_DB_Ex::sfPreTax($arrProduct[$key]["price02"]); 
     75                $arrProduct[$key]["price02"] = SC_Helper_DB_Ex::sfCalcIncTax($arrProduct[$key]["price02"]); 
    7676 
    7777                // 画像ファイルのURLセット 
    … …  
    9898            foreach($arrProduct as $key => $val){ 
    9999                //販売価格を税込みに編集 
    100                 $arrProduct[$key]["price02_max"] = SC_Helper_DB_Ex::sfPreTax($arrProduct[$key]["price02_max"]); 
    101                 $arrProduct[$key]["price02_min"] = SC_Helper_DB_Ex::sfPreTax($arrProduct[$key]["price02_min"]); 
     100                $arrProduct[$key]["price02_max"] = SC_Helper_DB_Ex::sfCalcIncTax($arrProduct[$key]["price02_max"]); 
     101                $arrProduct[$key]["price02_min"] = SC_Helper_DB_Ex::sfCalcIncTax($arrProduct[$key]["price02_min"]); 
    102102 
    103103                // 画像ファイルのURLセット 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Confirm.php

    r19670 r19680  
    103103        $this->cartItems = $objCartSess->getCartList($this->cartKey); 
    104104        // 合計金額 
    105         $this->tpl_total_pretax[$this->cartKey] = $objCartSess->getAllProductsTotal($this->cartKey); 
     105        $this->tpl_total_inctax[$this->cartKey] = $objCartSess->getAllProductsTotal($this->cartKey); 
    106106        // 税額 
    107107        $this->tpl_total_tax[$this->cartKey] = $objCartSess->getAllProductsTax($this->cartKey); 
  • branches/version-2_5-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php

    r19670 r19680  
    173173 
    174174        // 購入金額の取得 
    175         $total_pretax = $objCartSess->getAllProductsTotal($this->cartKey); 
     175        $total_inctax = $objCartSess->getAllProductsTotal($this->cartKey); 
    176176        // 支払い方法の取得 
    177         $this->arrPayment = $this->lfGetPayment($total_pretax); 
     177        $this->arrPayment = $this->lfGetPayment($total_inctax); 
    178178        // 支払い方法の画像があるなしを取得($img_show true:ある false:なし) 
    179179        $this->img_show = $this->lfGetImgShow($this->arrPayment); 
    … …  
    340340 
    341341        // 購入金額の取得得 
    342         $total_pretax = $objCartSess->getAllProductsTotal(); 
     342        $total_inctax = $objCartSess->getAllProductsTotal(); 
    343343        // 支払い方法の取得 
    344         $this->arrPayment = $this->lfGetPayment($total_pretax); 
     344        $this->arrPayment = $this->lfGetPayment($total_inctax); 
    345345        // お届け時間の取得 
    346346        $arrRet = $objDb->sfGetDelivTime($this->objFormParam->getValue('payment_id')); 
    … …  
    372372    } 
    373373 
    374     function lfGetPayment($total_pretax) { 
     374    function lfGetPayment($total_inctax) { 
    375375        $objQuery = new SC_Query(); 
    376376        $objQuery->setOrder("rank DESC"); 
    … …  
    409409            // 下限と上限が設定されている 
    410410            if (strlen($data['rule']) != 0 && strlen($data['upper_rule']) != 0) { 
    411                 if ($data['rule'] <= $total_pretax && $data['upper_rule'] >= $total_pretax) { 
     411                if ($data['rule'] <= $total_inctax && $data['upper_rule'] >= $total_inctax) { 
    412412                    $arrPayment[] = $data; 
    413413                } 
    … …  
    415415            // 下限のみ設定されている 
    416416            elseif (strlen($data['rule']) != 0) { 
    417                 if($data['rule'] <= $total_pretax) { 
     417                if($data['rule'] <= $total_inctax) { 
    418418                    $arrPayment[] = $data; 
    419419                } 
    … …  
    421421            // 上限のみ設定されている 
    422422            elseif (strlen($data['upper_rule']) != 0) { 
    423                 if($data['upper_rule'] >= $total_pretax) { 
     423                if($data['upper_rule'] >= $total_inctax) { 
    424424                    $arrPayment[] = $data; 
    425425                } 
    … …  
    465465        $objCartSess = new SC_CartSession(); 
    466466        // 購入金額の取得得 
    467         $total_pretax = $objCartSess->getAllProductsTotal(); 
     467        $total_inctax = $objCartSess->getAllProductsTotal(); 
    468468        // 支払い方法の取得 
    469         $arrPayment = $this->lfGetPayment($total_pretax); 
     469        $arrPayment = $this->lfGetPayment($total_inctax); 
    470470        $pay_flag = true; 
    471471        foreach ($arrPayment as $key => $payment) { 
Note: See TracChangeset for help on using the changeset viewer.