Changeset 23170 for branches/version-2_13-dev/data/class
- Timestamp:
- 2013/08/30 18:47:51 (11 years ago)
- Location:
- branches/version-2_13-dev/data/class
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/SC_CartSession.php
r23124 r23170 171 171 $incTax = SC_Helper_TaxRule_Ex::sfCalcIncTax($price, 172 172 $this->cartSession[$productTypeId][$i]['productsClass']['product_id'], 173 $this->cartSession[$productTypeId][$i][' id'][0],173 $this->cartSession[$productTypeId][$i]['productsClass']['product_class_id'], 174 174 $pref_id, $country_id); 175 175 … … 191 191 $tax = SC_Helper_TaxRule_Ex::sfTax($price, 192 192 $this->cartSession[$productTypeId][$i]['productsClass']['product_id'], 193 $this->cartSession[$productTypeId][$i][' id'][0],193 $this->cartSession[$productTypeId][$i]['productsClass']['product_class_id'], 194 194 $pref_id, $country_id); 195 195 … … 416 416 $arrTaxRule = SC_Helper_TaxRule_Ex::getTaxRule( 417 417 $this->cartSession[$productTypeId][$i]['productsClass']['product_id'], 418 $this->cartSession[$productTypeId][$i][' id'][0],418 $this->cartSession[$productTypeId][$i]['productsClass']['product_class_id'], 419 419 $pref_id, 420 420 $country_id); -
branches/version-2_13-dev/data/class/helper/SC_Helper_TaxRule.php
r23124 r23170 168 168 $table = 'dtb_tax_rule'; 169 169 $cols = '*'; 170 $where = '((product_id = 0 OR product_id = ?)' 171 . ' OR (product_class_id = 0 OR product_class_id = ?))' 172 . ' AND (pref_id = 0 OR pref_id = ?)' 173 . ' AND (country_id = 0 OR country_id = ?)' 174 . ' AND apply_date < CURRENT_TIMESTAMP' 175 . ' AND del_flg = 0'; 176 177 $arrVal = array($product_id, $product_class_id, $pref_id, $country_id); 170 171 // 商品税率有無設定により分岐 172 if(OPTION_PRODUCT_TAX_RULE == 1) { 173 $where = '((product_id = 0 OR product_id = ?)' 174 . ' OR (product_class_id = 0 OR product_class_id = ?))' 175 . ' AND (pref_id = 0 OR pref_id = ?)' 176 . ' AND (country_id = 0 OR country_id = ?)' 177 . ' AND apply_date < CURRENT_TIMESTAMP' 178 . ' AND del_flg = 0'; 179 $arrVal = array($product_id, $product_class_id, $pref_id, $country_id); 180 } else { 181 $where = ' product_id = 0 ' 182 . ' AND product_class_id = 0 ' 183 . ' AND (pref_id = 0 OR pref_id = ?)' 184 . ' AND (country_id = 0 OR country_id = ?)' 185 . ' AND apply_date < CURRENT_TIMESTAMP' 186 . ' AND del_flg = 0'; 187 $arrVal = array($pref_id, $country_id); 188 } 189 178 190 $order = 'apply_date DESC'; 179 191 $objQuery->setOrder($order); -
branches/version-2_13-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_Tax.php
r23124 r23170 116 116 $this->tpl_onload = "alert('登録が完了しました。');"; 117 117 } 118 } else { 119 // エラーが存在する場合、メッセージを表示する為に代入 120 $this->arrErr['product_tax_flg'] = $arrErr['product_tax_flg']; 118 121 } 122 119 123 break; 120 124 … … 132 136 // 完了メッセージ 133 137 $this->tpl_onload = "alert('登録が完了しました。');"; 138 134 139 // リロード 135 140 SC_Response_Ex::reload(); 136 141 } 142 } else if(SC_Utils_Ex::isBlank($this->arrErr['tax_rule_id'])) { 143 // 税率ID以外のエラーの場合、ID情報を引き継ぐ 144 $this->tpl_tax_rule_id = $tax_rule_id; 137 145 } 138 146 … … 188 196 $objFormParam->addParam('消費税率', 'tax_rate', PERCENTAGE_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); 189 197 $objFormParam->addParam('課税規則', 'calc_rule', PERCENTAGE_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); 198 190 199 // 適用日時 191 200 $objFormParam->addParam('適用年', 'apply_date_year', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); … … 194 203 $objFormParam->addParam('適用時', 'apply_date_hour', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); 195 204 $objFormParam->addParam('適用分', 'apply_date_minutes', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); 196 $objFormParam->addParam('適用日時', 'apply_date_year', 'apply_date_month', 'apply_date_day', INT_LEN, 'n', array("CHECK_DATE"));197 205 } 198 206 … … 256 264 $arrErr = $objFormParam->checkError(); 257 265 $arrForm = $objFormParam->getHashArray(); 266 $objErr = new SC_CheckError_Ex($arrForm); 258 267 259 268 // tax_rule_id の正当性チェック … … 267 276 } 268 277 269 if ($arrForm['tax_rule_id'] != '0') { 270 $apply_date = SC_Utils_Ex::sfGetTimestampistime( 271 $arrForm['apply_date_year'], 272 sprintf("%02d", $arrForm['apply_date_month']), 273 sprintf("%02d", $arrForm['apply_date_day']), 274 sprintf("%02d", $arrForm['apply_date_hour']), 275 sprintf("%02d", $arrForm['apply_date_minutes']) 276 ); 277 278 // 税規約情報読み込み 279 $arrTaxRuleByTime = $objTaxRule->getTaxRuleByTime($apply_date); 280 // 編集中のレコード以外に同じ消費税率、課税規則が存在する場合 278 // 適用日時チェック 279 $objErr->doFunc(array('適用日時', 'apply_date_year', 'apply_date_month', 'apply_date_day'), array('CHECK_DATE')); 280 if (SC_Utils_Ex::isBlank($objErr->arrErr['apply_date_year']) && $arrForm['tax_rule_id'] != '0') { 281 $apply_date = SC_Utils_Ex::sfGetTimestampistime( 282 $arrForm['apply_date_year'], 283 sprintf("%02d", $arrForm['apply_date_month']), 284 sprintf("%02d", $arrForm['apply_date_day']), 285 sprintf("%02d", $arrForm['apply_date_hour']), 286 sprintf("%02d", $arrForm['apply_date_minutes']) 287 ); 288 289 // 税規約情報読み込み 290 $arrTaxRuleByTime = $objTaxRule->getTaxRuleByTime($apply_date); 291 292 // 編集中のレコード以外に同じ消費税率、課税規則が存在する場合 281 293 if ( 282 294 !SC_Utils_Ex::isBlank($arrTaxRuleByTime) … … 287 299 } 288 300 } 301 if (!SC_Utils_Ex::isBlank($objErr->arrErr)) { 302 $arrErr = array_merge($arrErr, $objErr->arrErr); 303 } 289 304 290 305 return $arrErr; -
branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
r23124 r23170 367 367 $objFormParam->addParam('規格名1', 'classcategory_name1'); 368 368 $objFormParam->addParam('規格名2', 'classcategory_name2'); 369 $objFormParam->addParam('税率', 'tax_rate' );370 $objFormParam->addParam('課税規則', 'tax_rule' );369 $objFormParam->addParam('税率', 'tax_rate', INT_LEN, 'n', array('NUM_CHECK')); 370 $objFormParam->addParam('課税規則', 'tax_rule', INT_LEN, 'n', array('NUM_CHECK')); 371 371 $objFormParam->addParam('メモ', 'note', MTEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK')); 372 372 $objFormParam->addParam('削除用項番', 'delete_no', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); -
branches/version-2_13-dev/data/class/pages/products/LC_Page_Products_Detail.php
r23124 r23170 541 541 $this->arrErr = $this->lfCheckError($this->mode,$this->objFormParam); 542 542 if (count($this->arrErr) == 0) { 543 if ($this->lfRegistFavoriteProduct($this->objFormParam->getValue('favorite_product_id'),$objCustomer->getValue('customer_id'))) { 544 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 545 $objPlugin->doAction('LC_Page_Products_Detail_action_add_favorite', array($this)); 543 if (!$this->lfRegistFavoriteProduct($this->objFormParam->getValue('favorite_product_id'),$objCustomer->getValue('customer_id'))) { 544 SC_Response_Ex::actionExit(); 546 545 } 546 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg); 547 $objPlugin->doAction('LC_Page_Products_Detail_action_add_favorite', array($this)); 547 548 } 548 549 }
Note: See TracChangeset
for help on using the changeset viewer.