Ignore:
Timestamp:
2013/03/10 10:40:54 (11 years ago)
Author:
AMUAMU
Message:

税金設定、カートセッションへの修正その1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_CartSession.php

    r22567 r22706  
    2828 * @version $Id$ 
    2929 */ 
    30 class SC_CartSession  
     30class SC_CartSession 
    3131{ 
    3232    /** ユニークIDを指定する. */ 
     
    127127                $price = $this->cartSession[$productTypeId][$i]['price']; 
    128128                $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
    129                 $incTax = SC_Helper_DB_Ex::sfCalcIncTax($price); 
     129                $incTax = SC_Helper_TaxRule_Ex::sfCalcIncTax($price, 0, $id[0]); 
    130130                $total = $incTax * $quantity; 
    131131                return $total; 
     
    194194            $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
    195195 
    196             $incTax = SC_Helper_DB_Ex::sfCalcIncTax($price); 
     196            $incTax = SC_Helper_TaxRule_Ex::sfCalcIncTax($price, 
     197                $this->cartSession[$productTypeId][$i]['productsClass']['product_id'], 
     198                $this->cartSession[$productTypeId][$i]['id'][0]); 
    197199            $total+= ($incTax * $quantity); 
    198200        } 
     
    209211            $price = $this->cartSession[$productTypeId][$i]['price']; 
    210212            $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
    211             $tax = SC_Helper_DB_Ex::sfTax($price); 
     213            $tax = SC_Helper_TaxRule_Ex::sfTax($price, 
     214                $this->cartSession[$productTypeId][$i]['productsClass']['product_id'], 
     215                $this->cartSession[$productTypeId][$i]['id'][0]); 
    212216            $total+= ($tax * $quantity); 
    213217        } 
     
    374378 
    375379                $quantity = $this->cartSession[$productTypeId][$i]['quantity']; 
    376                 $incTax = SC_Helper_DB_Ex::sfCalcIncTax($price); 
     380                $incTax = SC_Helper_TaxRule_Ex::sfCalcIncTax($price, 
     381                    $this->cartSession[$productTypeId][$i]['productsClass']['product_id'], 
     382                    $this->cartSession[$productTypeId][$i]['id'][0]); 
     383 
    377384                $total = $incTax * $quantity; 
    378385 
     
    571578                    if ($limit > 0) { 
    572579                        $this->setProductValue($arrItem['id'], 'quantity', $limit, $productTypeId); 
    573                         $total_inctax = SC_Helper_DB_Ex::sfCalcIncTax($arrItem['price']) * $limit; 
     580                        $total_inctax = $limit * SC_Helper_TaxRule_Ex::sfCalcIncTax($arrItem['price'], 
     581                            $product['product_id'], 
     582                            $arrItem['id'][0]); 
    574583                        $this->setProductValue($arrItem['id'], 'total_inctax', $total_inctax, $productTypeId); 
    575584                        $tpl_message .= '※「' . $product['name'] . '」は販売制限(または在庫が不足)しております。'; 
     
    652661        $results['deliv_fee'] = 0; 
    653662 
    654         $arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 
    655         $results['order_tax_rate'] = $arrInfo['tax']; 
    656         $results['order_tax_rule'] = $arrInfo['tax_rule']; 
     663        $arrTaxInfo = SC_Helper_TaxRule_Ex::getTaxRule(); 
     664        $results['order_tax_rate'] = $arrTaxInfo['tax_rate']; 
     665        $results['order_tax_rule'] = $arrTaxInfo['calc_rule']; 
    657666 
    658667        // 商品ごとの送料を加算 
Note: See TracChangeset for help on using the changeset viewer.