Index: /branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql
===================================================================
--- /branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql	(revision 22215)
+++ /branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql	(revision 22218)
@@ -553,4 +553,6 @@
     birth_point numeric NOT NULL DEFAULT 0,
     tax numeric,
+    order_tax_rate numeric,
+    order_tax_rule smallint,
     total numeric,
     payment_total numeric,
@@ -610,4 +612,6 @@
     birth_point numeric NOT NULL DEFAULT 0,
     tax numeric,
+    order_tax_rate numeric,
+    order_tax_rule smallint,
     total numeric,
     payment_total numeric,
@@ -714,4 +718,6 @@
     quantity numeric,
     point_rate numeric NOT NULL DEFAULT 0,
+    tax_rate numeric,
+    tax_rule smallint,
     PRIMARY KEY (order_detail_id)
 );
Index: /branches/version-2_12-dev/html/install/sql/create_table_mysql.sql
===================================================================
--- /branches/version-2_12-dev/html/install/sql/create_table_mysql.sql	(revision 22215)
+++ /branches/version-2_12-dev/html/install/sql/create_table_mysql.sql	(revision 22218)
@@ -553,4 +553,6 @@
     birth_point numeric NOT NULL DEFAULT 0,
     tax numeric,
+    order_tax_rate numeric,
+    order_tax_rule smallint,
     total numeric,
     payment_total numeric,
@@ -610,4 +612,6 @@
     birth_point numeric NOT NULL DEFAULT 0,
     tax numeric,
+    order_tax_rate numeric,
+    order_tax_rule smallint,
     total numeric,
     payment_total numeric,
@@ -714,4 +718,6 @@
     quantity numeric,
     point_rate numeric NOT NULL DEFAULT 0,
+    tax_rate numeric,
+    tax_rule smallint,
     PRIMARY KEY (order_detail_id)
 );
Index: /branches/version-2_12-dev/data/class/SC_Fpdf.php
===================================================================
--- /branches/version-2_12-dev/data/class/SC_Fpdf.php	(revision 22215)
+++ /branches/version-2_12-dev/data/class/SC_Fpdf.php	(revision 22218)
@@ -178,5 +178,5 @@
 
             // 税込金額（単価）
-            $data[1] = SC_Helper_DB_Ex::sfCalcIncTax($this->arrDisp['price'][$i]);
+            $data[1] = SC_Helper_DB_Ex::sfCalcIncTax($this->arrDisp['price'][$i], $this->arrDisp['tax_rate'][$i], $this->arrDisp['tax_rule'][$i]);
 
             // 小計（商品毎）
@@ -331,5 +331,5 @@
     function lfGetOrderDetail($order_id) {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $col = 'product_id, product_class_id, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate';
+        $col = 'product_id, product_class_id, product_code, product_name, classcategory_name1, classcategory_name2, price, quantity, point_rate, tax_rate, tax_rule';
         $where = 'order_id = ?';
         $objQuery->setOrder('order_detail_id');
Index: /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php	(revision 22215)
+++ /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php	(revision 22218)
@@ -194,4 +194,6 @@
         $objFormParam->addParam('メモ', 'note', MTEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK'));
         $objFormParam->addParam('削除用項番', 'delete_no', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
+        $objFormParam->addParam('消費税率', 'tax_rate');
+        $objFormParam->addParam('課税規則', 'tax_rule');
 
         // DB読込用
Index: /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	(revision 22215)
+++ /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	(revision 22218)
@@ -98,4 +98,6 @@
         $this->arrDeliv = SC_Helper_DB_Ex::sfGetIDValueList('dtb_deliv', 'deliv_id', 'name');
 
+        $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+
         $this->httpCacheControl('nocache');
     }
@@ -261,5 +263,4 @@
         $this->arrDelivTime = $objPurchase->getDelivTime($objFormParam->getValue('deliv_id'));
         $this->tpl_onload .= $this->getAnchorKey($objFormParam);
-        $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
         if ($arrValuesBefore['payment_id'])
             $this->arrPayment[$arrValuesBefore['payment_id']] = $arrValuesBefore['payment_method'];
@@ -330,4 +331,6 @@
         $objFormParam->addParam('規格名1', 'classcategory_name1');
         $objFormParam->addParam('規格名2', 'classcategory_name2');
+        $objFormParam->addParam('税率', 'tax_rate');
+        $objFormParam->addParam('課税規則', 'tax_rule');
         $objFormParam->addParam('メモ', 'note', MTEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK'));
         $objFormParam->addParam('削除用項番', 'delete_no', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
@@ -351,4 +354,6 @@
         $objFormParam->addParam('入金日', 'payment_date');
         $objFormParam->addParam('端末種別', 'device_type_id');
+        $objFormParam->addParam('税率', 'order_tax_rate');
+        $objFormParam->addParam('課税規則', 'order_tax_rule');
 
         // 複数情報
@@ -577,7 +582,7 @@
         for ($i = 0; $i < $max; $i++) {
             // 小計の計算
-            $subtotal += SC_Helper_DB_Ex::sfCalcIncTax($arrValues['price'][$i]) * $arrValues['quantity'][$i];
+            $subtotal += SC_Helper_DB_Ex::sfCalcIncTax($arrValues['price'][$i], $arrValues['tax_rate'][$i], $arrValues['tax_rule'][$i]) * $arrValues['quantity'][$i];
             // 小計の計算
-            $totaltax += SC_Helper_DB_Ex::sfTax($arrValues['price'][$i]) * $arrValues['quantity'][$i];
+            $totaltax += SC_Utils_Ex::sfTax($arrValues['price'][$i], $arrValues['tax_rate'][$i], $arrValues['tax_rule'][$i]) * $arrValues['quantity'][$i];
             // 加算ポイントの計算
             $totalpoint += SC_Utils_Ex::sfPrePoint($arrValues['price'][$i], $arrValues['point_rate'][$i]) * $arrValues['quantity'][$i];
@@ -672,4 +677,6 @@
                 'classcategory_name1',
                 'classcategory_name2',
+                'tax_rate',
+                'tax_rule'
         ));
 
@@ -808,4 +815,6 @@
             $arrProduct['quantity'] = 1;
             $arrProduct['price'] = $arrProduct['price02'];
+            $arrProduct['tax_rate'] = $objFormParam->getValue('order_tax_rate') == '' ? $this->arrInfo['tax']      : $objFormParam->getValue('order_tax_rate');
+            $arrProduct['tax_rule'] = $objFormParam->getValue('order_tax_rule') == '' ? $this->arrInfo['tax_rule'] : $objFormParam->getValue('order_tax_rule');
             $arrProduct['product_name'] = $arrProduct['name'];
 
@@ -813,5 +822,5 @@
                 'product_id', 'product_class_id', 'product_type_id', 'point_rate',
                 'product_code', 'product_name', 'classcategory_name1', 'classcategory_name2',
-                'quantity', 'price',
+                'quantity', 'price', 'tax_rate', 'tax_rule'
             );
             foreach ($arrUpdateKeys as $key) {
@@ -850,5 +859,5 @@
             'product_id', 'product_class_id', 'product_type_id', 'point_rate',
             'product_code', 'product_name', 'classcategory_name1', 'classcategory_name2',
-            'quantity', 'price',
+            'quantity', 'price', 'tax_rate', 'tax_rule'
         );
         foreach ($arrDeleteKeys as $key) {
Index: /branches/version-2_12-dev/data/class/SC_CartSession.php
===================================================================
--- /branches/version-2_12-dev/data/class/SC_CartSession.php	(revision 22215)
+++ /branches/version-2_12-dev/data/class/SC_CartSession.php	(revision 22218)
@@ -626,4 +626,8 @@
         $results['deliv_fee'] = 0;
 
+        $arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+        $results['order_tax_rate'] = $arrInfo['tax'];
+        $results['order_tax_rule'] = $arrInfo['tax_rule'];
+
         // 商品ごとの送料を加算
         if (OPTION_PRODUCT_DELIV_FEE == 1) {
Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 22215)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 22218)
@@ -1410,6 +1410,8 @@
         // 店舗基本情報を取得
         $CONF = SC_Helper_DB_Ex::sfGetBasisData();
-
-        return SC_Utils_Ex::sfCalcIncTax($price, $CONF['tax'], $CONF['tax_rule']);
+        $tax      = $tax      === null ? $CONF['tax']      : $tax;
+        $tax_rule = $tax_rule === null ? $CONF['tax_rule'] : $tax_rule;
+
+        return SC_Utils_Ex::sfCalcIncTax($price, $tax, $tax_rule);
     }
 
Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 22215)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 22218)
@@ -857,4 +857,6 @@
             $arrDetail[$i]['price'] = $item['price'];
             $arrDetail[$i]['quantity'] = $item['quantity'];
+            $arrDetail[$i]['tax_rate'] = $orderParams['order_tax_rate'];
+            $arrDetail[$i]['tax_rule'] = $orderParams['order_tax_rule'];
 
             // 在庫の減少処理
@@ -993,4 +995,6 @@
             T2.quantity,
             T2.point_rate,
+            T2.tax_rate,
+            T2.tax_rule,
 __EOS__;
         if ($has_order_status) {
Index: /branches/version-2_12-dev/data/Smarty/templates/default/mypage/history.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/default/mypage/history.tpl	(revision 22215)
+++ /branches/version-2_12-dev/data/Smarty/templates/default/mypage/history.tpl	(revision 22218)
@@ -86,7 +86,9 @@
                     <!--{assign var=price value=`$orderDetail.price`}-->
                     <!--{assign var=quantity value=`$orderDetail.quantity`}-->
-                    <td class="alignR"><!--{$price|sfCalcIncTax|number_format|h}-->円</td>
+                    <!--{assign var=tax_rate value=`$orderDetail.tax_rate`}-->
+                    <!--{assign var=tax_rule value=`$orderDetail.tax_rule`}-->
+                    <td class="alignR"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|number_format|h}-->円</td>
                     <td class="alignR"><!--{$quantity|h}--></td>
-                    <td class="alignR"><!--{$price|sfCalcIncTax|sfMultiply:$quantity|number_format}-->円</td>
+                    <td class="alignR"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|number_format}-->円</td>
                 </tr>
             <!--{/foreach}-->
@@ -170,5 +172,5 @@
                             </td>
                             <td class="alignR">
-                                <!--{$item.price|sfCalcIncTax|number_format}-->円
+                                <!--{$item.price|sfCalcIncTax:$tpl_arrOrderData.order_tax_rate:$tpl_arrOrderData.order_tax_rule|number_format}-->円
                             </td>
                             <td class="alignC"><!--{$item.quantity}--></td>
Index: /branches/version-2_12-dev/data/Smarty/templates/default/mail_templates/order_mail.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/default/mail_templates/order_mail.tpl	(revision 22215)
+++ /branches/version-2_12-dev/data/Smarty/templates/default/mail_templates/order_mail.tpl	(revision 22218)
@@ -52,10 +52,11 @@
 商品コード: <!--{$arrOrderDetail[cnt].product_code}-->
 商品名: <!--{$arrOrderDetail[cnt].product_name}--> <!--{$arrOrderDetail[cnt].classcategory_name1}--> <!--{$arrOrderDetail[cnt].classcategory_name2}-->
-単価：￥ <!--{$arrOrderDetail[cnt].price|sfCalcIncTax|number_format}-->
+単価：￥ <!--{$arrOrderDetail[cnt].price|sfCalcIncTax:$arrOrderDetail[cnt].tax_rate:$arrOrderDetail[cnt].tax_rule|number_format}-->
 数量：<!--{$arrOrderDetail[cnt].quantity}-->
 
 <!--{/section}-->
 -------------------------------------------------
-小　計 ￥ <!--{$arrOrder.subtotal|number_format|default:0}--> (うち消費税 ￥<!--{$arrOrder.tax|number_format|default:0}-->）
+小　計 ￥ <!--{$arrOrder.subtotal|number_format|default:0}--> <!--{if 0 < $arrOrder.tax}-->(うち消費税 ￥<!--{$arrOrder.tax|number_format|default:0}-->）<!--{/if}-->
+
 値引き ￥ <!--{$arrOrder.use_point*$smarty.const.POINT_VALUE+$arrOrder.discount|number_format|default:0}-->
 送　料 ￥ <!--{$arrOrder.deliv_fee|number_format|default:0}-->
@@ -84,5 +85,5 @@
 商品コード: <!--{$item.product_code}-->
 商品名: <!--{$item.product_name}--> <!--{$item.classcategory_name1}--> <!--{$item.classcategory_name2}-->
-単価：￥ <!--{$item.price|sfCalcIncTax|number_format}-->
+単価：￥ <!--{$item.price|sfCalcIncTax:$arrOrder.order_tax_rate:$arrOrder.order_tax_rule|number_format}-->
 数量：<!--{$item.quantity}-->
 
Index: /branches/version-2_12-dev/data/Smarty/templates/mobile/mail_templates/order_mail.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/mobile/mail_templates/order_mail.tpl	(revision 22215)
+++ /branches/version-2_12-dev/data/Smarty/templates/mobile/mail_templates/order_mail.tpl	(revision 22218)
@@ -45,10 +45,11 @@
 商品コード: <!--{$arrOrderDetail[cnt].product_code}-->
 商品名: <!--{$arrOrderDetail[cnt].product_name}--> <!--{$arrOrderDetail[cnt].classcategory_name1}--> <!--{$arrOrderDetail[cnt].classcategory_name2}-->
-単価：￥ <!--{$arrOrderDetail[cnt].price|sfCalcIncTax|number_format}-->
+単価：￥ <!--{$arrOrderDetail[cnt].price|sfCalcIncTax:$arrOrderDetail[cnt].tax_rate:$arrOrderDetail[cnt].tax_rule|number_format}-->
 数量：<!--{$arrOrderDetail[cnt].quantity}-->
 
 <!--{/section}-->
 
-小　計 ￥ <!--{$arrOrder.subtotal|number_format|default:0}--> (うち消費税 ￥<!--{$arrOrder.tax|number_format|default:0}-->）
+小　計 ￥ <!--{$arrOrder.subtotal|number_format|default:0}--> <!--{if 0 < $arrOrder.tax}-->(うち消費税 ￥<!--{$arrOrder.tax|number_format|default:0}-->）<!--{/if}-->
+
 値引き ￥ <!--{$arrOrder.use_point+$arrOrder.discount|number_format|default:0}-->
 送　料 ￥ <!--{$arrOrder.deliv_fee|number_format|default:0}-->
@@ -73,5 +74,5 @@
 商品コード: <!--{$item.product_code}-->
 商品名: <!--{$item.product_name}--> <!--{$item.classcategory_name1}--> <!--{$item.classcategory_name2}-->
-単価：￥ <!--{$item.price|sfCalcIncTax|number_format}-->
+単価：￥ <!--{$item.price|sfCalcIncTax:$arrOrder.order_tax_rate:$arrOrder.order_tax_rule|number_format}-->
 数量：<!--{$item.quantity}-->
 
Index: /branches/version-2_12-dev/data/Smarty/templates/mobile/mypage/history.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/mobile/mypage/history.tpl	(revision 22215)
+++ /branches/version-2_12-dev/data/Smarty/templates/mobile/mypage/history.tpl	(revision 22218)
@@ -68,7 +68,9 @@
         <!--{assign var=price value=`$orderDetail.price`}-->
         <!--{assign var=quantity value=`$orderDetail.quantity`}-->
-        <!--{$price|sfCalcIncTax|number_format|h}-->円<br>
+        <!--{assign var=tax_rate value=`$orderDetail.tax_rate`}-->
+        <!--{assign var=tax_rule value=`$orderDetail.tax_rule`}-->
+        <!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|number_format|h}-->円<br>
         数量：<!--{$quantity|h}--><br>
-        小計：<!--{$price|sfCalcIncTax|sfMultiply:$quantity|number_format}-->円<br>
+        小計：<!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|number_format}-->円<br>
     <!--{/foreach}-->
     <hr>
@@ -109,5 +111,5 @@
                     <!--{$item.productsClass.class_name2}-->：<!--{$item.productsClass.classcategory_name2}--><br>
                 <!--{/if}-->
-                単価：<!--{$item.price|sfCalcIncTax|number_format}-->円<br>
+                単価：<!--{$item.price|sfCalcIncTax:$tpl_arrOrderData.order_tax_rate:$tpl_arrOrderData.order_tax_rule|number_format}-->円<br>
                 数量：<!--{$item.quantity}--><br>
                 <br>
Index: /branches/version-2_12-dev/data/Smarty/templates/admin/order/disp.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/admin/order/disp.tpl	(revision 22215)
+++ /branches/version-2_12-dev/data/Smarty/templates/admin/order/disp.tpl	(revision 22218)
@@ -141,6 +141,8 @@
                 <!--{assign var=price value=`$arrForm.price.value[$product_index]`}-->
                 <!--{assign var=quantity value=`$arrForm.quantity.value[$product_index]`}-->
-                <td class="right"><!--{$price|sfCalcIncTax|number_format}--> 円</td>
-                <td class="right"><!--{$price|sfCalcIncTax|sfMultiply:$quantity|number_format}-->円</td>
+                <!--{assign var=tax_rate value=`$arrForm.tax_rate.value[$product_index]`}-->
+                <!--{assign var=tax_rule value=`$arrForm.tax_rule.value[$product_index]`}-->
+                <td class="right"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|number_format}--> 円(税率<!--{$tax_rate|number_format}-->%)</td>
+                <td class="right"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|number_format}-->円</td>
         </tr>
         <!--{/section}-->
@@ -219,5 +221,5 @@
                             <td class="right">
                                 <!--{assign var=key value="shipment_price"}-->
-                                <!--{$arrShipping[$key][$item_index]|sfCalcIncTax|number_format}-->円
+                                <!--{$arrShipping[$key][$item_index]|sfCalcIncTax:$arrForm.order_tax_rate.value:$arrForm.order_tax_rule.value|number_format}-->円
                             </td>
                             <td class="right">
Index: /branches/version-2_12-dev/data/Smarty/templates/admin/order/edit.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/admin/order/edit.tpl	(revision 22216)
+++ /branches/version-2_12-dev/data/Smarty/templates/admin/order/edit.tpl	(revision 22218)
@@ -311,4 +311,6 @@
             <input type="hidden" name="product_class_id[<!--{$product_index}-->]" value="<!--{$arrForm.product_class_id.value[$product_index]|h}-->" id="product_class_id_<!--{$product_index}-->" />
             <input type="hidden" name="point_rate[<!--{$product_index}-->]" value="<!--{$arrForm.point_rate.value[$product_index]|h}-->" id="point_rate_<!--{$product_index}-->" />
+            <input type="hidden" name="tax_rate[<!--{$product_index}-->]" value="<!--{$arrForm.tax_rate.value[$product_index]|h}-->" id="tax_rate_<!--{$product_index}-->" />
+            <input type="hidden" name="tax_rule[<!--{$product_index}-->]" value="<!--{$arrForm.tax_rule.value[$product_index]|h}-->" id="tax_rule_<!--{$product_index}-->" />
             </td>
             <td align="center">
@@ -324,6 +326,8 @@
             <!--{assign var=price value=`$arrForm.price.value[$product_index]`}-->
             <!--{assign var=quantity value=`$arrForm.quantity.value[$product_index]`}-->
-            <td class="right"><!--{$price|sfCalcIncTax|number_format}--> 円</td>
-            <td class="right"><!--{$price|sfCalcIncTax|sfMultiply:$quantity|number_format}-->円</td>
+            <!--{assign var=tax_rate value=`$arrForm.tax_rate.value[$product_index]`}-->
+            <!--{assign var=tax_rule value=`$arrForm.tax_rule.value[$product_index]`}-->
+            <td class="right"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|number_format}--> 円(税率<!--{$tax_rate|number_format}-->%)</td>
+            <td class="right"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|number_format}-->円</td>
         </tr>
         <!--{/section}-->
@@ -456,5 +460,5 @@
                             <td class="right">
                                 <!--{assign var=key value="shipment_price"}-->
-                                <!--{$arrShipping[$key][$item_index]|sfCalcIncTax|number_format}-->円
+                                <!--{$arrShipping[$key][$item_index]|sfCalcIncTax:$arrForm.order_tax_rate.value:$arrForm.order_tax_rule.value|number_format}-->円
                                 <input type="hidden" name="<!--{$key}-->[<!--{$shipping_index}-->][<!--{$item_index}-->]" value="<!--{$arrShipping[$key][$item_index]|h}-->" />
                             </td>
Index: /branches/version-2_12-dev/data/Smarty/templates/sphone/mypage/history.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/sphone/mypage/history.tpl	(revision 22215)
+++ /branches/version-2_12-dev/data/Smarty/templates/sphone/mypage/history.tpl	(revision 22218)
@@ -86,8 +86,9 @@
                                 <!--←商品種別-->
                             </div>
-
+                            <!--{assign var=tax_rate value=`$orderDetail.tax_rate`}-->
+                            <!--{assign var=tax_rule value=`$orderDetail.tax_rule`}-->
                             <ul>
                                 <li><span class="mini">数量：</span><!--{$quantity|h}--></li>
-                                <li class="result"><span class="mini">小計：</span><!--{$price|sfCalcIncTax|sfMultiply:$quantity|number_format}-->円</li>
+                                <li class="result"><span class="mini">小計：</span><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|number_format}-->円</li>
                             </ul>
                         </div>
