Changeset 22486 for branches/version-2_12-dev/data/class/SC_Product.php
- Timestamp:
- 2013/01/30 21:12:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Product.php
r22484 r22486 545 545 * 546 546 * @param array $arrProducts 商品情報の配列 547 * @return array 税込金額を設定した商品情報の配列 548 */ 549 function setPriceTaxTo($arrProducts) { 550 foreach ($arrProducts as $key => $value) { 551 $arrProducts[$key]['price01_min_format'] = number_format($arrProducts[$key]['price01_min']); 552 $arrProducts[$key]['price01_max_format'] = number_format($arrProducts[$key]['price01_max']); 553 $arrProducts[$key]['price02_min_format'] = number_format($arrProducts[$key]['price02_min']); 554 $arrProducts[$key]['price02_max_format'] = number_format($arrProducts[$key]['price02_max']); 555 556 $arrProducts[$key]['price01_min_tax'] = SC_Helper_DB_Ex::sfCalcIncTax($arrProducts[$key]['price01_min']); 557 $arrProducts[$key]['price01_max_tax'] = SC_Helper_DB_Ex::sfCalcIncTax($arrProducts[$key]['price01_max']); 558 $arrProducts[$key]['price02_min_tax'] = SC_Helper_DB_Ex::sfCalcIncTax($arrProducts[$key]['price02_min']); 559 $arrProducts[$key]['price02_max_tax'] = SC_Helper_DB_Ex::sfCalcIncTax($arrProducts[$key]['price02_max']); 560 561 $arrProducts[$key]['price01_min_tax_format'] = number_format($arrProducts[$key]['price01_min_tax']); 562 $arrProducts[$key]['price01_max_tax_format'] = number_format($arrProducts[$key]['price01_max_tax']); 563 $arrProducts[$key]['price02_min_tax_format'] = number_format($arrProducts[$key]['price02_min_tax']); 564 $arrProducts[$key]['price02_max_tax_format'] = number_format($arrProducts[$key]['price02_max_tax']); 565 } 547 * @return array 旧バージョン互換用のデータ 548 */ 549 static function setPriceTaxTo(&$arrProducts) { 550 foreach ($arrProducts as &$arrProduct) { 551 $arrProduct['price01_min_format'] = number_format($arrProduct['price01_min']); 552 $arrProduct['price01_max_format'] = number_format($arrProduct['price01_max']); 553 $arrProduct['price02_min_format'] = number_format($arrProduct['price02_min']); 554 $arrProduct['price02_max_format'] = number_format($arrProduct['price02_max']); 555 556 SC_Product_Ex::setIncTaxToProduct($arrProduct); 557 558 $arrProduct['price01_min_inctax_format'] = number_format($arrProduct['price01_min_inctax']); 559 $arrProduct['price01_max_inctax_format'] = number_format($arrProduct['price01_max_inctax']); 560 $arrProduct['price02_min_inctax_format'] = number_format($arrProduct['price02_min_inctax']); 561 $arrProduct['price02_max_inctax_format'] = number_format($arrProduct['price02_max_inctax']); 562 563 // @deprecated 2.12.4 564 // 旧バージョン互換用 565 // 本来は、税額の代入で使用すべきキー名。 566 $arrProduct['price01_min_tax_format'] =& $arrProduct['price01_min_inctax_format']; 567 $arrProduct['price01_max_tax_format'] =& $arrProduct['price01_max_inctax_format']; 568 $arrProduct['price02_min_tax_format'] =& $arrProduct['price02_min_inctax_format']; 569 $arrProduct['price02_max_tax_format'] =& $arrProduct['price02_max_inctax_format']; 570 } 571 // @deprecated 2.12.4 572 // 旧バージョン互換用 573 // 現在は参照渡しで戻せる 566 574 return $arrProducts; 567 575 }
Note: See TracChangeset
for help on using the changeset viewer.