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/SC_CartSession.php

    r19677 r19680  
    112112                $price = $this->cartSession[$productTypeId][$i]['price']; 
    113113                $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
    114                 $pre_tax = SC_Helper_DB_Ex::sfPreTax($price); 
    115                 $total = $pre_tax * $quantity; 
     114                $incTax = SC_Helper_DB_Ex::sfCalcIncTax($price); 
     115                $total = $incTax * $quantity; 
    116116                return $total; 
    117117            } 
     
    175175            $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
    176176 
    177             $pre_tax = SC_Helper_DB_Ex::sfPreTax($price); 
    178             $total+= ($pre_tax * $quantity); 
     177            $incTax = SC_Helper_DB_Ex::sfCalcIncTax($price); 
     178            $total+= ($incTax * $quantity); 
    179179        } 
    180180        return $total; 
     
    307307 
    308308                $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
    309                 $pre_tax = SC_Helper_DB_Ex::sfPreTax($price); 
    310                 $total = $pre_tax * $quantity; 
    311  
    312                 $this->cartSession[$productTypeId][$i]['total_pretax'] = $total; 
     309                $incTax = SC_Helper_DB_Ex::sfCalcIncTax($price); 
     310                $total = $incTax * $quantity; 
     311 
     312                $this->cartSession[$productTypeId][$i]['total_inctax'] = $total; 
    313313 
    314314                $arrRet[] =& $this->cartSession[$productTypeId][$i]; 
Note: See TracChangeset for help on using the changeset viewer.