- Timestamp:
- 2013/03/09 16:24:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_13-tax/data/class/helper/SC_Helper_TaxRule.php
r22623 r22626 23 23 24 24 /** 25 * 会員規約を管理するヘルパークラス.25 * 税規約を管理するヘルパークラス. 26 26 * 27 27 * @package Helper … … 31 31 class SC_Helper_TaxRule 32 32 { 33 34 33 /** 35 34 * 設定情報に基づいて税金付与した金額を返す … … 40 39 function sfCalcIncTax($price, $product_id = 0, $product_class_id = 0, $pref_id =0, $country_id = 0) 41 40 { 42 $arrTaxRule = SC_Helper_TaxRule_Ex::getTaxRule($product_id, $product_class_id, $pref_id, $country_id); 43 44 return $price + SC_Helper_TaxRule_Ex::sfTax($price, $arrTaxRule['tax_rate'], $arrTaxRule['tax_rule'], $arrTaxRule['tax_adjust']); 41 return $price + SC_Helper_TaxRule_Ex::sfTax($price, $product_id, $product_class_id, $pref_id, $country_id); 45 42 } 46 43 47 44 /** 48 * 税金額を返す45 * 設定情報に基づいて税金の金額を返す 49 46 * 50 * ・店舗基本情報に基づいた計算は SC_Helper_DB::sfTax() を使用する 47 * @param integer $price 計算対象の金額 48 * @return integer 税金した金額 49 */ 50 function sfTax($price, $product_id = 0, $product_class_id = 0, $pref_id =0, $country_id = 0) 51 { 52 $arrTaxRule = SC_Helper_TaxRule_Ex::getTaxRule($product_id, $product_class_id, $pref_id, $country_id); 53 return SC_Helper_TaxRule_Ex::calcTax($price, $arrTaxRule['tax_rate'], $arrTaxRule['tax_rule'], $arrTaxRule['tax_adjust']); 54 } 55 56 /** 57 * 税金額を計算する 51 58 * 52 59 * @param integer $price 計算対象の金額 … … 56 63 * @return integer 税金額 57 64 */ 58 function sfTax($price, $tax, $calc_rule, $tax_adjust = 0)65 function calcTax ($price, $tax, $calc_rule, $tax_adjust = 0) 59 66 { 60 67 $real_tax = $tax / 100; … … 82 89 83 90 /** 84 * 税金設定情報に基づいて税金額を返す91 * 現在有効な税金設定情報を返す 85 92 * 86 93 * @param integer $price 計算対象の金額
Note: See TracChangeset
for help on using the changeset viewer.