Changeset 22702
- Timestamp:
- 2013/03/10 10:26:06 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_13-tax/data/class/helper/SC_Helper_TaxRule.php
r22700 r22702 123 123 function getTaxRule ($product_id = 0, $product_class_id = 0, $pref_id = 0, $country_id = 0) 124 124 { 125 // 初期化 126 $product_id = $product_id > 0 ? $product_id : 0; 127 $product_class_id = $product_class_id > 0 ? $product_class_id : 0; 128 $pref_id = $pref_id > 0 ? $pref_id : 0; 129 $country_id = $country_id > 0 ? $country_id : 0; 130 131 $objCustomer = new SC_Customer_Ex(); 132 if ($objCustomer->isLoginSuccess(true)) { 133 if ($country_id == 0) { 134 $objCustomer->getValue('country_id'); 135 } 136 if ($pref_id == 0) { 137 $objCustomer->getValue('pref'); 138 } 139 } 140 125 141 // リクエストの配列化 126 142 $arrRequest = array('product_id' => $product_id, … … 144 160 $table = 'dtb_tax_rule'; 145 161 $cols = '*, CASE WHEN apply_date IS NULL THEN 1 ELSE 0 END as nullorder'; 146 $where = '( product_id = 0 OR product_id = ?)'147 . ' AND (product_class_id = 0 OR product_class_id = ?)'162 $where = '((product_id = 0 OR product_id = ?)' 163 . ' OR (product_class_id = 0 OR product_class_id = ?))' 148 164 . ' AND (pref_id = 0 OR pref_id = ?)' 149 165 . ' AND (country_id = 0 OR country_id = ?)' … … 183 199 } 184 200 185 GC_Utils_Ex::gf DebugLog('tax_key=' . $cache_key . ' result_tax=' . print_r($data_c[$cache_key],true));201 GC_Utils_Ex::gfPrintLog('tax_key=' . $cache_key . ' result_tax=' . print_r($data_c[$cache_key],true)); 186 202 return $data_c[$cache_key]; 187 203 } … … 208 224 // 税情報を設定 209 225 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 226 211 227 } 212 228 }
Note: See TracChangeset
for help on using the changeset viewer.