Changeset 18052
- Timestamp:
- 2009/06/06 03:19:45 (17 years ago)
- Location:
- branches/comu-ver2/data/class
- Files:
-
- 10 edited
-
SC_CartSession.php (modified) (6 diffs)
-
SC_Fpdf.php (modified) (2 diffs)
-
helper/SC_Helper_DB.php (modified) (7 diffs)
-
pages/admin/order/LC_Page_Admin_Order_Edit.php (modified) (12 diffs)
-
pages/cart/LC_Page_Cart.php (modified) (4 diffs)
-
pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php (modified) (1 diff)
-
pages/rss/LC_Page_Rss_Products.php (modified) (4 diffs)
-
pages/shopping/LC_Page_Shopping_Confirm.php (modified) (6 diffs)
-
pages/shopping/LC_Page_Shopping_Payment.php (modified) (7 diffs)
-
util/SC_Utils.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/data/class/SC_CartSession.php
r17970 r18052 90 90 } 91 91 92 // 商品ごとの合計価格 93 function getProductTotal($arrInfo, $id) { 92 /** 93 * 商品ごとの合計価格 94 * XXX 実際には、「商品」ではなく、「カートの明細行(≒商品規格)」のような気がします。 95 * 96 * @param integer $id 97 * @return string 商品ごとの合計価格(税込み) 98 */ 99 function getProductTotal($id) { 94 100 $max = $this->getMax(); 95 101 for($i = 0; $i <= $max; $i++) { … … 100 106 $price = $_SESSION[$this->key][$i]['price']; 101 107 $quantity = $_SESSION[$this->key][$i]['quantity']; 102 $pre_tax = SC_ Utils_Ex::sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']);108 $pre_tax = SC_Helper_DB_Ex::sfPreTax($price); 103 109 $total = $pre_tax * $quantity; 104 110 return $total; … … 148 154 149 155 // 全商品の合計価格 150 function getAllProductsTotal( $arrInfo) {156 function getAllProductsTotal() { 151 157 // 税込み合計 152 158 $total = 0; … … 164 170 $quantity = $_SESSION[$this->key][$i]['quantity']; 165 171 166 $pre_tax = SC_ Utils::sfPreTax($price, $arrInfo['tax'], $arrInfo['tax_rule']);172 $pre_tax = SC_Helper_DB_Ex::sfPreTax($price); 167 173 $total+= ($pre_tax * $quantity); 168 174 } … … 171 177 172 178 // 全商品の合計税金 173 function getAllProductsTax( $arrInfo) {179 function getAllProductsTax() { 174 180 // 税合計 175 181 $total = 0; … … 178 184 $price = $_SESSION[$this->key][$i]['price']; 179 185 $quantity = $_SESSION[$this->key][$i]['quantity']; 180 $tax = SC_ Utils_Ex::sfTax($price, $arrInfo['tax'], $arrInfo['tax_rule']);186 $tax = SC_Helper_DB_Ex::sfTax($price); 181 187 $total+= ($tax * $quantity); 182 188 } -
branches/comu-ver2/data/class/SC_Fpdf.php
r18043 r18052 136 136 137 137 function setOrderData() { 138 // ショップ情報139 $objInfo = new SC_SiteInfo();140 $arrInfo = $objInfo->data;141 138 // DBから受注情報を読み込む 142 139 $this->lfGetOrderData($this->arrData['order_id']); … … 183 180 184 181 // 税込金額(単価) 185 $data[1] = SC_ Utils_Ex::sfPreTax($this->arrDisp['price'][$i], $arrInfo['tax'], $arrInfo['tax_rule']);182 $data[1] = SC_Helper_DB_Ex::sfPreTax($this->arrDisp['price'][$i]); 186 183 187 184 // 小計(商品毎) -
branches/comu-ver2/data/class/helper/SC_Helper_DB.php
r18044 r18052 201 201 * 店舗基本情報を取得する. 202 202 * 203 * @param boolean $force 強制的にDB取得するか 203 204 * @return array 店舗基本情報の配列 204 205 */ 205 function sf_getBasisData() { 206 $objQuery = new SC_Query(); 207 $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 208 209 if (isset($arrRet[0])) return $arrRet[0]; 210 211 return array(); 206 function sf_getBasisData($force = false) { 207 static $data; 208 209 if ($force || !isset($data)) { 210 $objQuery = new SC_Query(); 211 $arrRet = $objQuery->select('*', 'dtb_baseinfo'); 212 213 if (isset($arrRet[0])) { 214 $data = $arrRet[0]; 215 } else { 216 $data = array(); 217 } 218 } 219 220 return $data; 212 221 } 213 222 … … 282 291 * @param LC_Page $objPage ページクラスのインスタンス 283 292 * @param SC_CartSession $objCartSess カートセッションのインスタンス 284 * @param array $arrInfo 商品情報の配列285 293 * @return LC_Page 集計処理後のページクラスインスタンス 286 294 */ 287 function sfTotalCart(&$objPage, $objCartSess , $arrInfo) {295 function sfTotalCart(&$objPage, $objCartSess) { 288 296 289 297 // 規格名一覧 … … 372 380 } 373 381 // 商品ごとの合計金額 374 $objPage->arrProductsClass[$cnt]['total_pretax'] = $objCartSess->getProductTotal($arr Info, $arrCart['id']);382 $objPage->arrProductsClass[$cnt]['total_pretax'] = $objCartSess->getProductTotal($arrCart['id']); 375 383 // 送料の合計を計算する 376 384 $objPage->tpl_total_deliv_fee+= ($arrData['deliv_fee'] * $arrCart['quantity']); … … 394 402 395 403 // 全商品合計金額(税込み) 396 $objPage->tpl_total_pretax = $objCartSess->getAllProductsTotal( $arrInfo);404 $objPage->tpl_total_pretax = $objCartSess->getAllProductsTotal(); 397 405 // 全商品合計消費税 398 $objPage->tpl_total_tax = $objCartSess->getAllProductsTax( $arrInfo);406 $objPage->tpl_total_tax = $objCartSess->getAllProductsTax(); 399 407 // 全商品合計ポイント 400 408 if (USE_POINT !== false) { … … 1480 1488 * @param LC_Page $objPage LC_Page インスタンス 1481 1489 * @param SC_CartSession $objCartSess SC_CartSession インスタンス 1482 * @param array $arrInfo 店舗情報の配列1483 1490 * @param SC_Customer $objCustomer SC_Customer インスタンス 1484 1491 * @return array 最終計算後の配列 1485 1492 */ 1486 function sfTotalConfirm($arrData, &$objPage, &$objCartSess, $arrInfo, $objCustomer = "") { 1493 function sfTotalConfirm($arrData, &$objPage, &$objCartSess, $objCustomer = "") { 1494 // 店舗基本情報を取得する 1495 $arrInfo = SC_Helper_DB_Ex::sf_getBasisData(); 1496 1487 1497 // 未定義変数を定義 1488 1498 if (!isset($arrData['deliv_pref'])) $arrData['deliv_pref'] = ""; … … 1538 1548 // 加算ポイントの計算 1539 1549 if (USE_POINT !== false) { 1540 $arrData['add_point'] = SC_ Utils::sfGetAddPoint($objPage->tpl_total_point, $arrData['use_point'], $arrInfo);1550 $arrData['add_point'] = SC_Helper_DB_Ex::sfGetAddPoint($objPage->tpl_total_point, $arrData['use_point']); 1541 1551 1542 1552 if($objCustomer != "") { … … 1748 1758 $objQuery->query($sql, array($order_id)); 1749 1759 } 1760 1761 /** 1762 * 店舗基本情報に基づいて税金額を返す 1763 * 1764 * @param integer $price 計算対象の金額 1765 * @return integer 税金額 1766 */ 1767 function sfTax($price) { 1768 // 店舗基本情報を取得 1769 $CONF = SC_Helper_DB_Ex::sf_getBasisData(); 1770 1771 return SC_Utils_Ex::sfTax($price, $CONF['tax'], $CONF['tax_rule']); 1772 } 1773 1774 /** 1775 * 店舗基本情報に基づいて税金付与した金額を返す 1776 * 1777 * @param integer $price 計算対象の金額 1778 * @return integer 税金付与した金額 1779 */ 1780 function sfPreTax($price, $tax = null, $tax_rule = null) { 1781 // 店舗基本情報を取得 1782 $CONF = SC_Helper_DB_Ex::sf_getBasisData(); 1783 1784 return SC_Utils_Ex::sfPreTax($price, $CONF['tax'], $CONF['tax_rule']); 1785 } 1786 1787 /** 1788 * 店舗基本情報に基づいて加算ポイントを返す 1789 * 1790 * @param integer $totalpoint 1791 * @param integer $use_point 1792 * @return integer 加算ポイント 1793 */ 1794 function sfGetAddPoint($totalpoint, $use_point) { 1795 // 店舗基本情報を取得 1796 $CONF = SC_Helper_DB_Ex::sf_getBasisData(); 1797 1798 return SC_Utils_Ex::sfGetAddPoint($totalpoint, $use_point, $CONF['point_rate']); 1799 } 1750 1800 } 1751 1801 ?> -
branches/comu-ver2/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
r18037 r18052 32 32 /* ペイジェント決済モジュール連携用 */ 33 33 if (file_exists(MODULE_PATH . 'mdl_paygent/include.php') === TRUE) { 34 require_once(MODULE_PATH . 'mdl_paygent/include.php');34 require_once(MODULE_PATH . 'mdl_paygent/include.php'); 35 35 } 36 36 … … 109 109 $objView = new SC_AdminView(); 110 110 $objSess = new SC_Session(); 111 $objSiteInfo = new SC_SiteInfo();112 111 $objDb = new SC_Helper_DB_Ex(); 113 $arrInfo = $objSiteInfo->data;114 112 115 113 // パラメータ管理クラス … … 152 150 // 入力値の変換 153 151 $this->objFormParam->convParam(); 154 $this->arrErr = $this->lfCheek( $arrInfo);152 $this->arrErr = $this->lfCheek(); 155 153 $this->arrErr = $this->lfCheckError(); 156 154 if(count($this->arrErr) == 0) { … … 177 175 $this->arrErr = $this->lfCheckError(); 178 176 #if(count($this->arrErr) == 0) { 179 $this->arrErr = $this->lfCheek( $arrInfo);177 $this->arrErr = $this->lfCheek(); 180 178 #} 181 179 break; … … 198 196 } 199 197 } 200 $this->lfReCheek($arrData , $arrInfo);198 $this->lfReCheek($arrData); 201 199 break; 202 200 /* 商品追加ポップアップより商品選択後、商品情報取得*/ … … 217 215 } 218 216 } 219 $this->lfReCheek($arrData , $arrInfo);217 $this->lfReCheek($arrData); 220 218 break; 221 219 /* F-REGI決済モジュール連携用 */ … … 275 273 $this->tpl_onload .= $anchor_hash; 276 274 277 $this->arrInfo = $arrInfo; 275 $objSiteInfo = new SC_SiteInfo(); 276 $this->arrInfo = $objSiteInfo->data; 278 277 279 278 /** … … 430 429 431 430 /* 計算処理 */ 432 function lfCheek( $arrInfo) {431 function lfCheek() { 433 432 $objDb = new SC_Helper_DB_Ex(); 434 433 $arrVal = $this->objFormParam->getHashArray(); … … 442 441 for($i = 0; $i < $max; $i++) { 443 442 // 小計の計算 444 $subtotal += SC_ Utils_Ex::sfPreTax($arrVal['price'][$i], $arrInfo['tax'], $arrInfo['tax_rule']) * $arrVal['quantity'][$i];443 $subtotal += SC_Helper_DB_Ex::sfPreTax($arrVal['price'][$i]) * $arrVal['quantity'][$i]; 445 444 // 小計の計算 446 $totaltax += SC_ Utils_Ex::sfTax($arrVal['price'][$i], $arrInfo['tax'], $arrInfo['tax_rule']) * $arrVal['quantity'][$i];445 $totaltax += SC_Helper_DB_Ex::sfTax($arrVal['price'][$i]) * $arrVal['quantity'][$i]; 447 446 // 加算ポイントの計算 448 447 $totalpoint += SC_Utils_Ex::sfPrePoint($arrVal['price'][$i], $arrVal['point_rate'][$i]) * $arrVal['quantity'][$i]; … … 459 458 460 459 // 加算ポイント 461 $arrVal['add_point'] = SC_ Utils_Ex::sfGetAddPoint($totalpoint, $arrVal['use_point'], $arrInfo);460 $arrVal['add_point'] = SC_Helper_DB_Ex::sfGetAddPoint($totalpoint, $arrVal['use_point']); 462 461 463 462 list($arrVal['point'], $arrVal['total_point']) = $objDb->sfGetCustomerPoint($_POST['order_id'], $arrVal['use_point'], $arrVal['add_point']); … … 479 478 } 480 479 481 function lfReCheek($arrData , $arrInfo) {480 function lfReCheek($arrData) { 482 481 // 情報上書き 483 482 $this->objFormParam->setParam($arrData); … … 485 484 $this->objFormParam->convParam(); 486 485 #if(count($this->arrErr) == 0) { 487 $this->arrErr = $this->lfCheek( $arrInfo);486 $this->arrErr = $this->lfCheek(); 488 487 #} 489 488 $this->arrErr = $this->lfCheckError(); -
branches/comu-ver2/data/class/pages/cart/LC_Page_Cart.php
r17969 r18052 78 78 $objCustomer = new SC_Customer(); 79 79 $db = new SC_Helper_DB_Ex(); 80 // 基本情報の取得81 $arrInfo = $objSiteInfo->data;82 80 83 81 // 商品購入中にカート内容が変更された。 … … 141 139 142 140 // カート集計処理 143 $db->sfTotalCart($this, $objCartSess, $arrInfo); 144 $this->arrData = $db->sfTotalConfirm($this->arrData, $this, $objCartSess, $arrInfo, $objCustomer); 145 146 $this->arrInfo = $arrInfo; 141 $db->sfTotalCart($this, $objCartSess); 142 $this->arrData = $db->sfTotalConfirm($this->arrData, $this, $objCartSess, $objCustomer); 143 144 // 基本情報の取得 145 $this->arrInfo = $objSiteInfo->data; 147 146 148 147 // ログイン判定 … … 192 191 $objCustomer = new SC_Customer(); 193 192 $objDb = new SC_Helper_DB_Ex(); 194 195 // 基本情報の取得196 $arrInfo = $objSiteInfo->data;197 193 198 194 // 商品購入中にカート内容が変更された。 … … 265 261 $arrData = array(); 266 262 } 267 $objDb->sfTotalCart($this, $objCartSess, $arrInfo); 268 $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer); 269 270 $this->arrInfo = $arrInfo; 263 $objDb->sfTotalCart($this, $objCartSess); 264 $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $objCustomer); 265 266 // 基本情報の取得 267 $this->arrInfo = $objSiteInfo->data; 271 268 272 269 // ログイン判定 -
branches/comu-ver2/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php
r17969 r18052 86 86 $arrInfo = $objSiteInfo->data; 87 87 // 購入金額合計 88 $ProductsTotal = $objCart->getAllProductsTotal( $arrInfo);88 $ProductsTotal = $objCart->getAllProductsTotal(); 89 89 90 90 // 合計数量 -
branches/comu-ver2/data/class/pages/rss/LC_Page_Rss_Products.php
r18051 r18052 60 60 61 61 //店舗情報をセット 62 $ arrSiteInfo = $objSiteInfo->data;62 $this->arrSiteInfo = $objSiteInfo->data; 63 63 64 64 //商品IDを取得 … … 73 73 foreach($arrProduct as $key => $val){ 74 74 //販売価格を税込みに編集 75 $arrProduct[$key]["price02"] = SC_ Utils_Ex::sfPreTax($arrProduct[$key]["price02"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);75 $arrProduct[$key]["price02"] = SC_Helper_DB_Ex::sfPreTax($arrProduct[$key]["price02"]); 76 76 77 77 // 画像ファイルのURLセット … … 98 98 foreach($arrProduct as $key => $val){ 99 99 //販売価格を税込みに編集 100 $arrProduct[$key]["price02_max"] = SC_ Utils_Ex::sfPreTax($arrProduct[$key]["price02_max"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);101 $arrProduct[$key]["price02_min"] = SC_ Utils_Ex::sfPreTax($arrProduct[$key]["price02_min"], $arrSiteInfo["tax"], $arrSiteInfo["tax_rule"]);100 $arrProduct[$key]["price02_max"] = SC_Helper_DB_Ex::sfPreTax($arrProduct[$key]["price02_max"]); 101 $arrProduct[$key]["price02_min"] = SC_Helper_DB_Ex::sfPreTax($arrProduct[$key]["price02_min"]); 102 102 103 103 // 画像ファイルのURLセット … … 120 120 $this->arrProductKeys = array_keys(SC_Utils_Ex::sfswaparray($arrProduct)); 121 121 } 122 123 //店舗情報をセット124 $this->arrSiteInfo = $arrSiteInfo;125 122 126 123 //セットしたデータをテンプレートファイルに出力 -
branches/comu-ver2/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
r17994 r18052 71 71 $objCampaignSess = new SC_CampaignSession(); 72 72 $objCustomer = new SC_Customer(); 73 $arrInfo = $objSiteInfo->data;74 73 $objQuery = new SC_Query(); 75 74 $objDb = new SC_Helper_DB_Ex(); … … 83 82 84 83 // カート集計処理 85 $objDb->sfTotalCart($this, $objCartSess , $arrInfo);84 $objDb->sfTotalCart($this, $objCartSess); 86 85 // 一時受注テーブルの読込 87 86 $arrData = $objDb->sfGetOrderTemp($uniqid); 88 87 // カート集計を元に最終計算 89 $arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $ arrInfo, $objCustomer, $objCampaignSess);88 $arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $objCustomer); 90 89 // キャンペーンからの遷移で送料が無料だった場合の処理 91 90 if($objCampaignSess->getIsCampaign()) { … … 161 160 162 161 $this->arrData = $arrData; 163 $this->arrInfo = $ arrInfo;162 $this->arrInfo = $objSiteInfo->data; 164 163 $objView->assignobj($this); 165 164 // フレームを選択(キャンペーンページから遷移なら変更) … … 187 186 $objSiteSess = new SC_SiteSession(); 188 187 $objCustomer = new SC_Customer(); 189 $arrInfo = $objSiteInfo->data;190 188 $objQuery = new SC_Query(); 191 189 $objDb = new SC_Helper_DB_Ex(); … … 199 197 200 198 // カート集計処理 201 $objDb->sfTotalCart($this, $objCartSess , $arrInfo);199 $objDb->sfTotalCart($this, $objCartSess); 202 200 // 一時受注テーブルの読込 203 201 $arrData = $objDb->sfGetOrderTemp($uniqid); 204 202 // カート集計を元に最終計算 205 $arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $ arrInfo, $objCustomer);203 $arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $objCustomer); 206 204 207 205 // カート内の商品の売り切れチェック … … 265 263 } 266 264 $this->arrData = $arrData; 267 $this->arrInfo = $ arrInfo;265 $this->arrInfo = $objSiteInfo->data; 268 266 $objView->assignobj($this); 269 267 $objView->display(SITE_FRAME); -
branches/comu-ver2/data/class/pages/shopping/LC_Page_Shopping_Payment.php
r18049 r18052 74 74 $objDb = new SC_Helper_DB_Ex(); 75 75 $this->objCustomer = new SC_Customer(); 76 $objSiteInfo = $objView->objSiteInfo;77 $arrInfo = $objSiteInfo->data;78 76 79 77 // パラメータ管理クラス … … 100 98 101 99 // 金額の取得 (購入途中で売り切れた場合にはこの関数内にてその商品の数量が0になる) 102 $objDb->sfTotalCart($this, $objCartSess , $arrInfo);100 $objDb->sfTotalCart($this, $objCartSess); 103 101 104 102 if (empty($arrData)) $arrData = array(); 105 $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess , $arrInfo);103 $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess); 106 104 107 105 // カート内の商品の売り切れチェック … … 149 147 } 150 148 151 // 店舗情報の取得152 $arrInfo = $objSiteInfo->data;153 149 // 購入金額の取得得 154 $total_pretax = $objCartSess->getAllProductsTotal( $arrInfo);150 $total_pretax = $objCartSess->getAllProductsTotal(); 155 151 // 支払い方法の取得 156 152 $this->arrPayment = $this->lfGetPayment($total_pretax); … … 189 185 $this->objCustomer = new SC_Customer(); 190 186 $objDb = new SC_Helper_DB_Ex(); 191 $objSiteInfo = $objView->objSiteInfo;192 $arrInfo = $objSiteInfo->data;193 187 194 188 // パラメータ管理クラス … … 211 205 212 206 // 金額の取得 (購入途中で売り切れた場合にはこの関数内にてその商品の数量が0になる) 213 $objDb->sfTotalCart($this, $objCartSess , $arrInfo);207 $objDb->sfTotalCart($this, $objCartSess); 214 208 if (empty($arrData)) $arrData = array(); 215 $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess , $arrInfo);209 $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess); 216 210 217 211 // カート内の商品の売り切れチェック … … 295 289 } 296 290 297 // 店舗情報の取得298 $arrInfo = $objSiteInfo->data;299 291 // 購入金額の取得得 300 $total_pretax = $objCartSess->getAllProductsTotal( $arrInfo);292 $total_pretax = $objCartSess->getAllProductsTotal(); 301 293 // 支払い方法の取得 302 294 $this->arrPayment = $this->lfGetPayment($total_pretax); … … 398 390 } 399 391 400 $objView = new SC_MobileView();401 $objSiteInfo = $objView->objSiteInfo;402 $arrInfo = $objSiteInfo->data;403 392 $objCartSess = new SC_CartSession(); 404 $arrInfo = $objSiteInfo->data;405 393 // 購入金額の取得得 406 $total_pretax = $objCartSess->getAllProductsTotal( $arrInfo);394 $total_pretax = $objCartSess->getAllProductsTotal(); 407 395 // 支払い方法の取得 408 396 $arrPayment = $this->lfGetPayment($total_pretax); -
branches/comu-ver2/data/class/util/SC_Utils.php
r17998 r18052 629 629 } 630 630 631 /* 税金計算 */ 632 function sfTax($price, $tax = null, $tax_rule = null) { 633 // 店舗基本情報を取得 634 static $CONF; 635 if ( 636 is_null($CONF) 637 && (is_null($tax) || is_null($tax_rule)) 638 ) { 639 $CONF = SC_Helper_DB_Ex::sf_getBasisData(); 640 } 641 642 if (is_null($tax)) { 643 $tax = $CONF['tax']; 644 } 645 646 if (is_null($tax_rule)) { 647 $tax_rule = $CONF['tax_rule']; 648 } 649 631 /** 632 * 税金額を返す 633 * 634 * ・店舗基本情報に基づいた計算は SC_Helper_DB::sfTax() を使用する 635 * 636 * @param integer $price 計算対象の金額 637 * @param integer $tax 税率(%単位) 638 * XXX integer のみか不明 639 * @param integer $tax_rule 端数処理 640 * @return integer 税金額 641 */ 642 function sfTax($price, $tax, $tax_rule) { 650 643 $real_tax = $tax / 100; 651 644 $ret = $price * $real_tax; … … 671 664 } 672 665 673 /* 税金付与 */ 674 function sfPreTax($price, $tax = null, $tax_rule = null) { 666 /** 667 * 税金付与した金額を返す 668 * 669 * ・店舗基本情報に基づいた計算は SC_Helper_DB::sfTax() を使用する 670 * 671 * @param integer $price 計算対象の金額 672 * @param integer $tax 税率(%単位) 673 * XXX integer のみか不明 674 * @param integer $tax_rule 端数処理 675 * @return integer 税金付与した金額 676 */ 677 function sfPreTax($price, $tax, $tax_rule) { 675 678 return $price + SC_Utils_Ex::sfTax($price, $tax, $tax_rule); 676 679 } … … 898 901 } 899 902 900 /* 加算ポイントの計算式 */ 901 function sfGetAddPoint($totalpoint, $use_point, $arrInfo) { 903 /** 904 * 加算ポイントの計算 905 * 906 * ・店舗基本情報に基づいた計算は SC_Helper_DB::sfGetAddPoint() を使用する 907 * 908 * @param integer $totalpoint 909 * @param integer $use_point 910 * @param integer $point_rate 911 * @return integer 加算ポイント 912 */ 913 function sfGetAddPoint($totalpoint, $use_point, $point_rate) { 902 914 // 購入商品の合計ポイントから利用したポイントのポイント換算価値を引く方式 903 $add_point = $totalpoint - intval($use_point * ($ arrInfo['point_rate']/ 100));915 $add_point = $totalpoint - intval($use_point * ($point_rate / 100)); 904 916 905 917 if($add_point < 0) {
Note: See TracChangeset
for help on using the changeset viewer.
