Changeset 22700
- Timestamp:
- 2013/03/10 10:18:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_13-tax/data/class/helper/SC_Helper_TaxRule.php
r22697 r22700 190 190 * 税金設定情報を登録する(商品管理用) 191 191 * 192 * @param 193 * @return 192 * @param decimal $tax_rate 消費税率 193 * @param integer $product_id 商品ID 194 * @param integer $product_class_id 商品規格ID 195 * @param decimal $tax_adjust 消費税加算額 196 * @param integer $pref_id 県ID 197 * @param integer $country_id 国ID 198 * @return void 194 199 */ 195 200 function setTaxRuleForProduct($tax_rate, $product_id = 0, $product_class_id = 0, $tax_adjust=0, $pref_id = 0, $country_id = 0) 196 201 { 197 // 税情報を設定 198 SC_Helper_TaxRule_Ex::setTaxRule($calc_rule, $tax_rate, $apply_date, $tax_rule_id=NULL, $tax_adjust=0, $product_id, $product_class_id, $pref_id, $country_id); 202 // 基本設定を取得 203 $arrRet = SC_Helper_taxRule_Ex::getTaxRule(); 204 // 基本設定の消費税率と一緒であれば設定しない 205 if( $arrRet['tax_rate'] != $tax_rate ) { 206 // 課税規則は基本設定のものを使用 207 $calc_rule = $arrRet['calc_rule']; 208 // 税情報を設定 209 SC_Helper_TaxRule_Ex::setTaxRule($calc_rule, $tax_rate, $apply_date, $tax_rule_id=NULL, $tax_adjust=0, $product_id, $product_class_id, $pref_id, $country_id); 210 211 } 199 212 } 200 213 … … 219 232 $objQuery =& SC_Query_Ex::getSingletonInstance(); 220 233 if($tax_rule_id == NULL && $product_id != 0 && $product_class_id != 0){ 221 $where = 'product_id = ? AND product_class_id= ? AND pref_id = ? AND country_id = ?';222 $arrVal = array($product_id, $product_class_id, $pref_id, $country_id);223 $arrCheck = $objQuery->getRow('*', 'dtb_tax_rule', $where, $arrVal);224 $tax_rule_id = $arrCheck['tax_rule_id'];234 $where = 'product_id = ? AND product_class_id= ? AND pref_id = ? AND country_id = ?'; 235 $arrVal = array($product_id, $product_class_id, $pref_id, $country_id); 236 $arrCheck = $objQuery->getRow('*', 'dtb_tax_rule', $where, $arrVal); 237 $tax_rule_id = $arrCheck['tax_rule_id']; 225 238 } 226 239
Note: See TracChangeset
for help on using the changeset viewer.