Changeset 23477
- Timestamp:
- 2014/05/30 18:14:20 (10 years ago)
- Location:
- branches/version-2_13-dev/data/class
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/helper/SC_Helper_DB.php
r23459 r23477 1461 1461 * SC_Utils_Ex::sfCalcIncTax とどちらか統一したほうが良い 1462 1462 * 1463 * @param integer $price 計算対象の金額 1464 * @return integer 税金付与した金額 1465 */ 1466 public function sfCalcIncTax($price, $tax = null, $tax_rule = null) 1463 * @param int $price 計算対象の金額 1464 * @param int $tax 1465 * @param int $tax_rule 1466 * @return int 税金付与した金額 1467 */ 1468 public static function sfCalcIncTax($price, $tax = null, $tax_rule = null) 1467 1469 { 1468 1470 // 店舗基本情報を取得 -
branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
r23394 r23477 977 977 * 978 978 * @param SC_FormParam $objFormParam SC_FormParam インスタンス 979 * @return アンカーキーの文字列979 * @return string アンカーキーの文字列 980 980 */ 981 981 public function getAnchorKey(&$objFormParam) … … 1034 1034 * 1035 1035 * @param SC_FormParam $objFormParam SC_FormParam インスタンス 1036 * @param integer $ add_product_class_id 変更商品規格ID1036 * @param integer $edit_product_class_id 変更商品規格ID 1037 1037 * @param integer $change_no 変更対象 1038 1038 * @return void … … 1115 1115 * 変更対象のデータを上書きする 1116 1116 * 1117 * @param array $arrShipmentProducts 変更対象配列1118 * @param array $arrProductInfo 上書きデータ1119 * @param int eger$shipping_id 配送先ID1120 * @param array$no 変更対象1117 * @param array $arrShipmentProducts 変更対象配列 1118 * @param array $arrProductInfo 上書きデータ 1119 * @param int $shipping_id 配送先ID 1120 * @param int $no 変更対象 1121 1121 * @return void 1122 1122 */ … … 1144 1144 // 配送先が存在する時のみ、商品個数の再設定を行います 1145 1145 if(!SC_Utils_Ex::isBlank($arrShipmentsItems)) { 1146 $arrUpdateQuantity = array(); 1146 1147 foreach ($arrShipmentsItems as $arritems) { 1147 1148 foreach ($arritems['shipment_product_class_id'] as $relation_index => $shipment_product_class_id) { … … 1151 1152 1152 1153 $arrProductsClass = $objFormParam->getValue('product_class_id'); 1153 $arr ProductsQuantity = $objFormParam->getValue('quantity');1154 $arrQuantity = array(); 1154 1155 foreach ($arrProductsClass as $relation_key => $product_class_id) { 1155 $arrQuantity[ 'quantity'][$relation_key] = $arrUpdateQuantity[$product_class_id];1156 } 1157 $objFormParam->setParam( $arrQuantity);1156 $arrQuantity[$relation_key] = isset($arrUpdateQuantity[$product_class_id]) ? $arrUpdateQuantity[$product_class_id] : 0; 1157 } 1158 $objFormParam->setParam(array('quantity' => $arrQuantity)); 1158 1159 } 1159 1160 } … … 1175 1176 foreach ($arrDeleteKeys as $delete_key) { 1176 1177 $arrProducts = $objFormParam->getValue($delete_key); 1178 $arrUpdateParams = array(); 1177 1179 foreach ($arrProducts as $index => $product_info) { 1178 1180 if ($index != $relation_index) { … … 1192 1194 * @param SC_FormParam $objFormParam SC_FormParam インスタンス 1193 1195 * @param array $arrShipmentDeleteKeys 削除項目 1194 * @param int eger $delete_shipping_id削除配送ID1195 * @param array$delete_no 削除対象1196 * @return void1197 */ 1198 public function deleteShipment(&$objFormParam, $arrShipmentDelet Keys, $delete_shipping_id, $delete_no)1199 { 1200 foreach ($arrShipmentDeletKeys as $delete_key) {1201 $arrShipments = $objFormParam->getValue($delete_key);1202 foreach ($arrShipments as $shipp_id => $arrKeyData) {1203 if (empty($arrKeyData)) continue;1204 foreach ($arrKeyData as $relation_index => $shipment_info) {1205 if ($relation_index != $delete_no || $shipp_id != $delete_shipping_id) {1206 $arrUpdateParams[$delete_key][$shipp_id][] = $shipment_info;1207 }1196 * @param int $delete_shipping_id 削除配送ID 1197 * @param int $delete_no 削除対象 1198 * @return array 1199 */ 1200 public function deleteShipment(&$objFormParam, $arrShipmentDeleteKeys, $delete_shipping_id, $delete_no) 1201 { 1202 $arrUpdateParams = array(); 1203 foreach ($arrShipmentDeleteKeys as $delete_key) { 1204 $arrShipments = $objFormParam->getValue($delete_key); 1205 foreach ($arrShipments as $shipp_id => $arrKeyData) { 1206 if (empty($arrKeyData)) continue; 1207 foreach ($arrKeyData as $relation_index => $shipment_info) { 1208 if ($relation_index != $delete_no || $shipp_id != $delete_shipping_id) { 1209 $arrUpdateParams[$delete_key][$shipp_id][] = $shipment_info; 1208 1210 } 1209 1211 } 1210 1212 } 1211 //$objFormParam->setParam($arrUpdateParams); 1212 return $arrUpdateParams; 1213 } 1213 } 1214 //$objFormParam->setParam($arrUpdateParams); 1215 return $arrUpdateParams; 1216 } 1214 1217 1215 1218 /** 1216 1219 * 受注商品一覧側に商品を追加 1217 1220 * 1218 * @param SC_FormParam $objFormParamSC_FormParam インスタンス1219 * @param array $arrProductClassIds対象配列の商品規格ID1220 * @param integer $indert_product_class_id 追??商品規格ID1221 * @param array $arrAddProductInfo追加データ1222 * @return array $arrAddProducts更新データ1221 * @param SC_FormParam $objFormParam SC_FormParam インスタンス 1222 * @param array $arrProductClassIds 対象配列の商品規格ID 1223 * @param int $insert_product_class_id 追加商品規格ID 1224 * @param array $arrAddProductInfo 追加データ 1225 * @return array|null $arrAddProducts 更新データ 1223 1226 */ 1224 1227 public function checkInsertOrderProducts(&$objFormParam, $arrProductClassIds, $insert_product_class_id, $arrAddProductInfo) -
branches/version-2_13-dev/data/class/util/GC_Utils.php
r23415 r23477 254 254 * [注釈] - 255 255 *----------------------------------------------------------------------*/ 256 public function gfMakePassword($pwLength)256 public static function gfMakePassword($pwLength) 257 257 { 258 258 // 乱数表のシードを決定 -
branches/version-2_13-dev/data/class/util/SC_Utils.php
r23463 r23477 693 693 * @return integer 税金額 694 694 */ 695 public function sfTax($price, $tax, $tax_rule)695 public static function sfTax($price, $tax, $tax_rule) 696 696 { 697 697 $real_tax = $tax / 100; … … 713 713 * @return integer 税金付与した金額 714 714 */ 715 public function sfCalcIncTax($price, $tax, $tax_rule)715 public static function sfCalcIncTax($price, $tax, $tax_rule) 716 716 { 717 717 return $price + SC_Utils_Ex::sfTax($price, $tax, $tax_rule); … … 723 723 $adjust = pow(10 ,$pow-1); 724 724 725 // 整数且つ0 出なければ桁数指定を行う725 // 整数且つ0でなければ桁数指定を行う 726 726 if (SC_Utils_Ex::sfIsInt($adjust) and $pow > 1) { 727 727 $ret = (round($value * $adjust)/$adjust); … … 741 741 * @return int 742 742 */ 743 public function sfPrePoint($price, $point_rate, $rule = POINT_RULE)743 public static function sfPrePoint($price, $point_rate, $rule = POINT_RULE) 744 744 { 745 745 $real_point = $point_rate / 100; … … 813 813 } 814 814 815 /* 配列をキー名ごとの配列に変更する */ 816 public function sfSwapArray($array, $isColumnName = true) 815 /** 816 * 配列をキー名ごとの配列に変更する 817 * 818 * @param array $array 819 * @param bool $isColumnName 820 * @return array 821 */ 822 public static function sfSwapArray($array, $isColumnName = true) 817 823 { 818 824 $arrRet = array(); … … 837 843 * $requires が指定された場合, $requires に含まれるキーの値のみを返す. 838 844 * 839 * @param array 連想配列840 * @param array 必須キーの配列845 * @param array $hash 連想配列 846 * @param array $requires 必須キーの配列 841 847 * @return array 連想配列の値のみの配列 842 848 */ … … 899 905 } 900 906 901 // 二回以上繰り返されているスラッシュ[/]を一つに変換する。 907 /** 908 * 二回以上繰り返されているスラッシュ[/]を一つに変換する。 909 * 910 * @param string $istr 911 * @return string 912 */ 902 913 public function sfRmDupSlash($istr) 903 914 { … … 910 921 } else { 911 922 $str = $istr; 923 $head = ''; 912 924 } 913 925 $str = preg_replace('|[/]+|', '/', $str);
Note: See TracChangeset
for help on using the changeset viewer.