Changeset 22623


Ignore:
Timestamp:
2013/03/09 15:44:57 (11 years ago)
Author:
AMUAMU
Message:

取りあえず仮で税規約ヘルパーからの利用サンプル

Location:
branches/camp/camp-2_13-tax/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/camp/camp-2_13-tax/data/class/SC_Product.php

    r22593 r22623  
    2929 * @version $Id$ 
    3030 */ 
    31 class SC_Product  
     31class SC_Product 
    3232{ 
    3333 
     
    304304                $arrClassCats2['price01'] 
    305305                    = strlen($arrProductsClass['price01']) 
    306                     ? number_format(SC_Helper_DB_Ex::sfCalcIncTax($arrProductsClass['price01'])) 
     306                    ? number_format(SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProductsClass['price01'], $productId, $arrProductsClass['product_class_id'])) 
    307307                    : ''; 
    308308 
    309309                $arrClassCats2['price02'] 
    310310                    = strlen($arrProductsClass['price02']) 
    311                     ? number_format(SC_Helper_DB_Ex::sfCalcIncTax($arrProductsClass['price02'])) 
     311                    ? number_format(SC_Helper_TaxRule_Ex::sfCalcIncTax($arrProductsClass['price02'], $productId, $arrProductsClass['product_class_id'])) 
    312312                    : ''; 
    313313 
  • branches/camp/camp-2_13-tax/data/class/helper/SC_Helper_TaxRule.php

    r22621 r22623  
    4040    function sfCalcIncTax($price, $product_id = 0, $product_class_id = 0, $pref_id =0, $country_id = 0) 
    4141    { 
    42         $arrTaxRule = SC_Helper_TaxRule_Ex:;getTaxRule($product_id, $product_class_id, $pref_id, $country_id); 
     42        $arrTaxRule = SC_Helper_TaxRule_Ex::getTaxRule($product_id, $product_class_id, $pref_id, $country_id); 
    4343 
    44         return SC_Helper_TaxRule_Ex::sfTax($price, $arrTaxRule['tax_rate'], $arrTaxRule['tax_rule'], $arrTaxRule['tax_adjust']); 
     44        return $price + SC_Helper_TaxRule_Ex::sfTax($price, $arrTaxRule['tax_rate'], $arrTaxRule['tax_rule'], $arrTaxRule['tax_adjust']); 
    4545    } 
    4646 
Note: See TracChangeset for help on using the changeset viewer.