[Svn-src-all:4301] [version-2_13_0 23215] #2381 消費税表示切替処理追加

m_uehara admin @ mail.ec-cube.net
2013年 9月 11日 (水) 14:39:25 JST


Subversion committed to /home/svn/open 23215
http://svn.ec-cube.net/open_trac/changeset/23215
┌────────────────────────────┐
│更新者 :  m_uehara                                     │
│更新日時:  2013-09-11 14:39:25 +0900 (水, 11  9月 2013)│
└────────────────────────────┘

Log:
--------------------------------------------------------
#2381 消費税表示切替処理追加

Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_13_0/data/Smarty/templates/admin/products/product_class.tpl
U   branches/version-2_13_0/data/Smarty/templates/admin/products/product_class_confirm.tpl
U   branches/version-2_13_0/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php

変更: branches/version-2_13_0/data/Smarty/templates/admin/products/product_class.tpl
===================================================================
--- branches/version-2_13_0/data/Smarty/templates/admin/products/product_class.tpl	2013-09-11 03:35:12 UTC (rev 23214)
+++ branches/version-2_13_0/data/Smarty/templates/admin/products/product_class.tpl	2013-09-11 05:39:25 UTC (rev 23215)
@@ -203,7 +203,9 @@
                 <th>在庫数<span class="attention">*</span></th>
                 <th><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(円)</th>
                 <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)<span class="attention">*</span></th>
+                <!--{if $smarty.const.OPTION_PRODUCT_TAX_RULE}-->
                 <th>消費税率(%)<span class="attention">*</span></th>
+                <!--{/if}-->
                 <th>商品種別<span class="attention">*</span></th>
                 <th>ダウンロード<br />ファイル名<span class="red"><br />上限<!--{$smarty.const.STEXT_LEN}-->文字</span></th>
                 <th>ダウンロード商品用<br />ファイル</th>
@@ -274,6 +276,7 @@
                         <!--{/if}-->
                         <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" />
                     </td>
+                    <!--{if $smarty.const.OPTION_PRODUCT_TAX_RULE}-->
                     <td class="center">
                         <!--{assign var=key value="tax_rate"}-->
                         <!--{if $arrErr[$key][$index]}-->
@@ -281,6 +284,7 @@
                         <!--{/if}-->
                         <input type="text" name="<!--{$key}-->[<!--{$index}-->]" value="<!--{$arrForm[$key].value[$index]|h}-->" size="6" class="box6" maxlength="<!--{$arrForm[$key].length}-->" <!--{if $arrErr[$key][$index] != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> id="<!--{$key}-->_<!--{$index}-->" />
                     </td>
+                    <!--{/if}-->
                     <td class="class-product-type">
                         <!--{assign var=key value="product_type_id"}-->
                         <!--{if $arrErr[$key][$index]}-->

変更: branches/version-2_13_0/data/Smarty/templates/admin/products/product_class_confirm.tpl
===================================================================
--- branches/version-2_13_0/data/Smarty/templates/admin/products/product_class_confirm.tpl	2013-09-11 03:35:12 UTC (rev 23214)
+++ branches/version-2_13_0/data/Smarty/templates/admin/products/product_class_confirm.tpl	2013-09-11 05:39:25 UTC (rev 23215)
@@ -63,7 +63,9 @@
                     <th>在庫数</th>
                     <th><!--{$smarty.const.NORMAL_PRICE_TITLE}-->(円)</th>
                     <th><!--{$smarty.const.SALE_PRICE_TITLE}-->(円)</th>
+                    <!--{if $smarty.const.OPTION_PRODUCT_TAX_RULE}-->
                     <th>消費税率(%)</th>
+                    <!--{/if}-->
                     <th>商品種別</th>
                     <th>ダウンロードファイル名</th>
                     <th>ダウンロード商品用ファイルアップロード</th>
@@ -92,8 +94,10 @@
                             <td class="right"><!--{$arrForm[$key].value[$index]|h}--></td>
                             <!--{assign var=key value="price02"}-->
                             <td class="right"><!--{$arrForm[$key].value[$index]|h}--></td>
+                            <!--{if $smarty.const.OPTION_PRODUCT_TAX_RULE}-->
                             <!--{assign var=key value="tax_rate"}-->
                             <td class="right"><!--{$arrForm[$key].value[$index]|h}--></td>
+                            <!--{/if}-->
                             <!--{assign var=key value="product_type_id"}-->
                             <td class="right">
                                 <!--{foreach from=$arrForm[$key].value[$index] item=product_type_id}-->

変更: branches/version-2_13_0/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php
===================================================================
--- branches/version-2_13_0/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php	2013-09-11 03:35:12 UTC (rev 23214)
+++ branches/version-2_13_0/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php	2013-09-11 05:39:25 UTC (rev 23215)
@@ -198,7 +198,9 @@
         $objFormParam->addParam('在庫数', 'stock_unlimited', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
         $objFormParam->addParam(NORMAL_PRICE_TITLE, 'price01', PRICE_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
         $objFormParam->addParam(SALE_PRICE_TITLE, 'price02', PRICE_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
-        $objFormParam->addParam('消費税率', 'tax_rate', PERCENTAGE_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        if(OPTION_PRODUCT_TAX_RULE) {
+            $objFormParam->addParam('消費税率', 'tax_rate', PERCENTAGE_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
+        }
         $objFormParam->addParam('商品種別', 'product_type_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
         $objFormParam->addParam('削除フラグ', 'del_flg', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
         $objFormParam->addParam('ダウンロード販売用ファイル名', 'down_filename', STEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK'));
@@ -278,7 +280,9 @@
             $objQuery->insert('dtb_products_class', $arrPC);
 
             // 税情報登録/更新
-            SC_Helper_TaxRule_Ex::setTaxRuleForProduct($arrList['tax_rate'][$i], $arrPC['product_id'], $arrPC['product_class_id']);
+            if (OPTION_PRODUCT_TAX_RULE) {
+                SC_Helper_TaxRule_Ex::setTaxRuleForProduct($arrList['tax_rate'][$i], $arrPC['product_id'], $arrPC['product_class_id']);
+            }
         }
 
         // 規格無し用の商品規格を非表示に
@@ -349,7 +353,7 @@
                 /*
                  * 消費税率の必須チェック
                  */
-                if (SC_Utils_Ex::isBlank($arrValues['tax_rate'][$i])) {
+                if (OPTION_PRODUCT_TAX_RULE && SC_Utils_Ex::isBlank($arrValues['tax_rate'][$i])) {
                     $arrErr['tax_rate'][$i] = '※ 消費税率が入力されていません。<br />';
                 }
                 /*
@@ -497,9 +501,12 @@
                 } else {
                     $arrValues['del_flg'] = '0';
                 }
+
                 // 消費税率を設定
-                $arrRet = SC_Helper_TaxRule_Ex::getTaxRule($arrValues['product_id'], $arrValues['product_class_id']);
-                $arrValues['tax_rate'] = $arrRet['tax_rate'];
+                if (OPTION_PRODUCT_TAX_RULE) {
+                    $arrRet = SC_Helper_TaxRule_Ex::getTaxRule($arrValues['product_id'], $arrValues['product_class_id']);
+                    $arrValues['tax_rate'] = $arrRet['tax_rate'];
+                }
 
                 $arrMergeProductsClass[] = $arrValues;
             }




Svn-src-all メーリングリストの案内