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

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

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

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php

    r19677 r19680  
    252252    function sfTotalCart(&$objPage, $objCartSess, $dummy1 = null, $key = "") { 
    253253 
    254         $objPage->tpl_total_pretax[$key] = 0;     // 費用合計(税込み) 
     254        $objPage->tpl_total_inctax[$key] = 0;     // 費用合計(税込み) 
    255255        $objPage->tpl_total_tax[$key] = 0;        // 消費税合計 
    256256        $objPage->tpl_total_point[$key] = 0;      // ポイント合計 
     
    320320                } 
    321321                // 商品ごとの合計金額 
    322                 $objPage->arrProductsClass[$cnt]['total_pretax'][$key] = $objCartSess->getProductTotal($arrCart['id']); 
     322                $objPage->arrProductsClass[$cnt]['total_inctax'][$key] = $objCartSess->getProductTotal($arrCart['id']); 
    323323                // 送料の合計を計算する 
    324324                $objPage->tpl_total_deliv_fee[$key] += ($arrData['deliv_fee'] * $arrCart['quantity']); 
     
    345345 
    346346        // 全商品合計金額(税込み) 
    347         $objPage->tpl_total_pretax[$key] = $objCartSess->getAllProductsTotal(); 
     347        $objPage->tpl_total_inctax[$key] = $objCartSess->getAllProductsTotal(); 
    348348        // 全商品合計消費税 
    349349        $objPage->tpl_total_tax[$key] = $objCartSess->getAllProductsTax(); 
     
    15781578        $arrData['tax'] = $objPage->tpl_total_tax[$key]; 
    15791579        // 小計の取得 
    1580         $arrData['subtotal'] = $objPage->tpl_total_pretax[$key]; 
     1580        $arrData['subtotal'] = $objPage->tpl_total_inctax[$key]; 
    15811581 
    15821582        // 合計送料の取得 
     
    16201620 
    16211621        // 合計の計算 
    1622         $arrData['total'] = $objPage->tpl_total_pretax[$key]; // 商品合計 
     1622        $arrData['total'] = $objPage->tpl_total_inctax[$key]; // 商品合計 
    16231623        $arrData['total']+= $arrData['deliv_fee'];      // 送料 
    16241624        $arrData['total']+= $arrData['charge'];         // 手数料 
     
    18581858     * @return integer 税金付与した金額 
    18591859     */ 
    1860     function sfPreTax($price, $tax = null, $tax_rule = null) { 
     1860    function sfCalcIncTax($price, $tax = null, $tax_rule = null) { 
    18611861        // 店舗基本情報を取得 
    18621862        $CONF = SC_Helper_DB_Ex::sfGetBasisData(); 
    18631863 
    1864         return SC_Utils_Ex::sfPreTax($price, $CONF['tax'], $CONF['tax_rule']); 
     1864        return SC_Utils_Ex::sfCalcIncTax($price, $CONF['tax'], $CONF['tax_rule']); 
    18651865    } 
    18661866 
Note: See TracChangeset for help on using the changeset viewer.