[21020] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * This file is part of EC-CUBE |
---|
| 4 | * |
---|
[21867] | 5 | * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved. |
---|
[21020] | 6 | * |
---|
| 7 | * http://www.lockon.co.jp/ |
---|
| 8 | * |
---|
| 9 | * This program is free software; you can redistribute it and/or |
---|
| 10 | * modify it under the terms of the GNU General Public License |
---|
| 11 | * as published by the Free Software Foundation; either version 2 |
---|
| 12 | * of the License, or (at your option) any later version. |
---|
| 13 | * |
---|
| 14 | * This program is distributed in the hope that it will be useful, |
---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 17 | * GNU General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with this program; if not, write to the Free Software |
---|
| 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
| 22 | */ |
---|
| 23 | |
---|
| 24 | // {{{ requires |
---|
[21488] | 25 | require_once CLASS_EX_REALDIR . 'page_extends/admin/order/LC_Page_Admin_Order_Ex.php'; |
---|
[21020] | 26 | |
---|
| 27 | /** |
---|
| 28 | * 受注情報表示 のページクラス. |
---|
| 29 | * |
---|
| 30 | * @package Page |
---|
| 31 | * @author LOCKON CO.,LTD. |
---|
| 32 | * @version $Id: LC_Page_Admin_Order_Disp.php 20767 2011-03-22 10:07:32Z nanasess $ |
---|
| 33 | */ |
---|
| 34 | class LC_Page_Admin_Order_Disp extends LC_Page_Admin_Order_Ex { |
---|
| 35 | |
---|
[21201] | 36 | var $arrShippingKeys = array( |
---|
| 37 | 'shipping_id', |
---|
| 38 | 'shipping_name01', |
---|
| 39 | 'shipping_name02', |
---|
| 40 | 'shipping_kana01', |
---|
| 41 | 'shipping_kana02', |
---|
| 42 | 'shipping_tel01', |
---|
| 43 | 'shipping_tel02', |
---|
| 44 | 'shipping_tel03', |
---|
| 45 | 'shipping_fax01', |
---|
| 46 | 'shipping_fax02', |
---|
| 47 | 'shipping_fax03', |
---|
| 48 | 'shipping_pref', |
---|
| 49 | 'shipping_zip01', |
---|
| 50 | 'shipping_zip02', |
---|
| 51 | 'shipping_addr01', |
---|
| 52 | 'shipping_addr02', |
---|
| 53 | 'shipping_date_year', |
---|
| 54 | 'shipping_date_month', |
---|
| 55 | 'shipping_date_day', |
---|
| 56 | 'time_id', |
---|
| 57 | ); |
---|
| 58 | |
---|
| 59 | var $arrShipmentItemKeys = array( |
---|
| 60 | 'shipment_product_class_id', |
---|
| 61 | 'shipment_product_code', |
---|
| 62 | 'shipment_product_name', |
---|
| 63 | 'shipment_classcategory_name1', |
---|
| 64 | 'shipment_classcategory_name2', |
---|
| 65 | 'shipment_price', |
---|
| 66 | 'shipment_quantity', |
---|
| 67 | ); |
---|
| 68 | |
---|
[21020] | 69 | // }}} |
---|
| 70 | // {{{ functions |
---|
| 71 | |
---|
| 72 | /** |
---|
| 73 | * Page を初期化する. |
---|
| 74 | * |
---|
| 75 | * @return void |
---|
| 76 | */ |
---|
| 77 | function init() { |
---|
| 78 | parent::init(); |
---|
| 79 | $this->tpl_mainpage = 'order/disp.tpl'; |
---|
| 80 | $this->tpl_mainno = 'order'; |
---|
| 81 | $this->tpl_subnavi = ''; |
---|
| 82 | $this->tpl_subno = ''; |
---|
| 83 | $this->tpl_subtitle = '受注情報表示'; |
---|
| 84 | |
---|
| 85 | $masterData = new SC_DB_MasterData_Ex(); |
---|
| 86 | $this->arrPref = $masterData->getMasterData('mtb_pref'); |
---|
[21481] | 87 | $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status'); |
---|
[21020] | 88 | $this->arrDeviceType = $masterData->getMasterData('mtb_device_type'); |
---|
| 89 | |
---|
| 90 | // 支払い方法の取得 |
---|
[21481] | 91 | $this->arrPayment = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method'); |
---|
[21020] | 92 | |
---|
| 93 | // 配送業者の取得 |
---|
[21481] | 94 | $this->arrDeliv = SC_Helper_DB_Ex::sfGetIDValueList('dtb_deliv', 'deliv_id', 'name'); |
---|
[21020] | 95 | } |
---|
| 96 | |
---|
| 97 | /** |
---|
| 98 | * Page のプロセス. |
---|
| 99 | * |
---|
| 100 | * @return void |
---|
| 101 | */ |
---|
| 102 | function process() { |
---|
| 103 | $this->action(); |
---|
| 104 | $this->sendResponse(); |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | /** |
---|
| 108 | * Page のアクション. |
---|
| 109 | * |
---|
| 110 | * @return void |
---|
| 111 | */ |
---|
| 112 | function action() { |
---|
[21591] | 113 | |
---|
[21020] | 114 | $objPurchase = new SC_Helper_Purchase_Ex(); |
---|
| 115 | $objFormParam = new SC_FormParam_Ex(); |
---|
[21201] | 116 | |
---|
[21020] | 117 | // パラメータ情報の初期化 |
---|
| 118 | $this->lfInitParam($objFormParam); |
---|
| 119 | $objFormParam->setParam($_REQUEST); |
---|
| 120 | $objFormParam->convParam(); |
---|
| 121 | $order_id = $objFormParam->getValue('order_id'); |
---|
[21201] | 122 | |
---|
[21020] | 123 | // DBから受注情報を読み込む |
---|
| 124 | $this->setOrderToFormParam($objFormParam, $order_id); |
---|
[21201] | 125 | |
---|
[21020] | 126 | $this->arrForm = $objFormParam->getFormParamList(); |
---|
[21201] | 127 | $this->arrAllShipping = $objFormParam->getSwapArray(array_merge($this->arrShippingKeys, $this->arrShipmentItemKeys)); |
---|
[21020] | 128 | $this->arrDelivTime = $objPurchase->getDelivTime($objFormParam->getValue('deliv_id')); |
---|
[21205] | 129 | $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); |
---|
[21201] | 130 | |
---|
[21020] | 131 | $this->setTemplate($this->tpl_mainpage); |
---|
[21591] | 132 | |
---|
[21020] | 133 | } |
---|
[21201] | 134 | |
---|
[21020] | 135 | /** |
---|
| 136 | * デストラクタ. |
---|
| 137 | * @return void |
---|
| 138 | */ |
---|
| 139 | function destroy() { |
---|
| 140 | parent::destroy(); |
---|
| 141 | } |
---|
| 142 | |
---|
| 143 | /** |
---|
| 144 | * パラメータ情報の初期化を行う. |
---|
| 145 | * |
---|
| 146 | * @param SC_FormParam $objFormParam SC_FormParam インスタンス |
---|
| 147 | * @return void |
---|
| 148 | */ |
---|
| 149 | function lfInitParam(&$objFormParam) { |
---|
| 150 | // 検索条件のパラメータを初期化 |
---|
| 151 | parent::lfInitParam($objFormParam); |
---|
| 152 | |
---|
| 153 | // お客様情報 |
---|
[21514] | 154 | $objFormParam->addParam('会員名1', 'order_name01', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 155 | $objFormParam->addParam('会員名2', 'order_name02', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 156 | $objFormParam->addParam('会員名カナ1', 'order_kana01', STEXT_LEN, 'KVCa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 157 | $objFormParam->addParam('会員名カナ2', 'order_kana02', STEXT_LEN, 'KVCa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 158 | $objFormParam->addParam('メールアドレス', 'order_email', null, 'KVCa', array('NO_SPTAB', 'EMAIL_CHECK', 'EMAIL_CHAR_CHECK')); |
---|
| 159 | $objFormParam->addParam('郵便番号1', 'order_zip01', ZIP01_LEN, 'n', array('NUM_CHECK', 'NUM_COUNT_CHECK')); |
---|
| 160 | $objFormParam->addParam('郵便番号2', 'order_zip02', ZIP02_LEN, 'n', array('NUM_CHECK', 'NUM_COUNT_CHECK')); |
---|
| 161 | $objFormParam->addParam('都道府県', 'order_pref', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 162 | $objFormParam->addParam('住所1', 'order_addr01', MTEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 163 | $objFormParam->addParam('住所2', 'order_addr02', MTEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 164 | $objFormParam->addParam('電話番号1', 'order_tel01', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); |
---|
| 165 | $objFormParam->addParam('電話番号2', 'order_tel02', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); |
---|
| 166 | $objFormParam->addParam('電話番号3', 'order_tel03', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); |
---|
[21020] | 167 | |
---|
| 168 | // 受注商品情報 |
---|
[21514] | 169 | $objFormParam->addParam('値引き', 'discount', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 170 | $objFormParam->addParam('送料', 'deliv_fee', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 171 | $objFormParam->addParam('手数料', 'charge', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
[21020] | 172 | |
---|
| 173 | // ポイント機能ON時のみ |
---|
| 174 | if (USE_POINT !== false) { |
---|
[21514] | 175 | $objFormParam->addParam('利用ポイント', 'use_point', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
[21020] | 176 | } |
---|
| 177 | |
---|
[21514] | 178 | $objFormParam->addParam('配送業者', 'deliv_id', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 179 | $objFormParam->addParam('お支払い方法', 'payment_id', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 180 | $objFormParam->addParam('対応状況', 'status', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 181 | $objFormParam->addParam('お支払方法名称', 'payment_method'); |
---|
[21020] | 182 | |
---|
| 183 | // 受注詳細情報 |
---|
[21514] | 184 | $objFormParam->addParam('商品種別ID', 'product_type_id', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 185 | $objFormParam->addParam('単価', 'price', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 186 | $objFormParam->addParam('数量', 'quantity', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 187 | $objFormParam->addParam('商品ID', 'product_id', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 188 | $objFormParam->addParam('商品規格ID', 'product_class_id', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 189 | $objFormParam->addParam('ポイント付与率', 'point_rate'); |
---|
| 190 | $objFormParam->addParam('商品コード', 'product_code'); |
---|
| 191 | $objFormParam->addParam('商品名', 'product_name'); |
---|
| 192 | $objFormParam->addParam('規格名1', 'classcategory_name1'); |
---|
| 193 | $objFormParam->addParam('規格名2', 'classcategory_name2'); |
---|
| 194 | $objFormParam->addParam('メモ', 'note', MTEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK')); |
---|
| 195 | $objFormParam->addParam('削除用項番', 'delete_no', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
[22197] | 196 | $objFormParam->addParam('消費税率', 'tax_rate'); |
---|
| 197 | $objFormParam->addParam('課税規則', 'tax_rule'); |
---|
[21020] | 198 | |
---|
| 199 | // DB読込用 |
---|
[21514] | 200 | $objFormParam->addParam('小計', 'subtotal'); |
---|
| 201 | $objFormParam->addParam('合計', 'total'); |
---|
| 202 | $objFormParam->addParam('支払い合計', 'payment_total'); |
---|
| 203 | $objFormParam->addParam('加算ポイント', 'add_point'); |
---|
| 204 | $objFormParam->addParam('お誕生日ポイント', 'birth_point'); |
---|
| 205 | $objFormParam->addParam('消費税合計', 'tax'); |
---|
| 206 | $objFormParam->addParam('最終保持ポイント', 'total_point'); |
---|
| 207 | $objFormParam->addParam('会員ID', 'customer_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 208 | $objFormParam->addParam('会員ID', 'edit_customer_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 209 | $objFormParam->addParam('現在のポイント', 'customer_point'); |
---|
| 210 | $objFormParam->addParam('受注前ポイント', 'point'); |
---|
| 211 | $objFormParam->addParam('注文番号', 'order_id'); |
---|
| 212 | $objFormParam->addParam('受注日', 'create_date'); |
---|
| 213 | $objFormParam->addParam('発送日', 'commit_date'); |
---|
| 214 | $objFormParam->addParam('備考', 'message'); |
---|
| 215 | $objFormParam->addParam('入金日', 'payment_date'); |
---|
| 216 | $objFormParam->addParam('端末種別', 'device_type_id'); |
---|
[21020] | 217 | |
---|
| 218 | // 複数情報 |
---|
[21514] | 219 | $objFormParam->addParam('配送数', 'shipping_quantity', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), 1); |
---|
| 220 | $objFormParam->addParam('配送ID', 'shipping_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), 0); |
---|
| 221 | $objFormParam->addParam('お名前1', 'shipping_name01', STEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 222 | $objFormParam->addParam('お名前2', 'shipping_name02', STEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 223 | $objFormParam->addParam('お名前(フリガナ・姓)', 'shipping_kana01', STEXT_LEN, 'KVCa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 224 | $objFormParam->addParam('お名前(フリガナ・名)', 'shipping_kana02', STEXT_LEN, 'KVCa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 225 | $objFormParam->addParam('郵便番号1', 'shipping_zip01', ZIP01_LEN, 'n', array('NUM_CHECK', 'NUM_COUNT_CHECK')); |
---|
| 226 | $objFormParam->addParam('郵便番号2', 'shipping_zip02', ZIP02_LEN, 'n', array('NUM_CHECK', 'NUM_COUNT_CHECK')); |
---|
| 227 | $objFormParam->addParam('都道府県', 'shipping_pref', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 228 | $objFormParam->addParam('住所1', 'shipping_addr01', MTEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 229 | $objFormParam->addParam('住所2', 'shipping_addr02', MTEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 230 | $objFormParam->addParam('電話番号1', 'shipping_tel01', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); |
---|
| 231 | $objFormParam->addParam('電話番号2', 'shipping_tel02', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); |
---|
| 232 | $objFormParam->addParam('電話番号3', 'shipping_tel03', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK')); |
---|
| 233 | $objFormParam->addParam('お届け時間ID', 'time_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 234 | $objFormParam->addParam('お届け日(年)', 'shipping_date_year', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 235 | $objFormParam->addParam('お届け日(月)', 'shipping_date_month', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 236 | $objFormParam->addParam('お届け日(日)', 'shipping_date_day', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 237 | $objFormParam->addParam('お届け日', 'shipping_date', STEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
| 238 | $objFormParam->addParam('配送商品数量', 'shipping_product_quantity', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
[21020] | 239 | |
---|
[21514] | 240 | $objFormParam->addParam('商品規格ID', 'shipment_product_class_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 241 | $objFormParam->addParam('商品コード', 'shipment_product_code'); |
---|
| 242 | $objFormParam->addParam('商品名', 'shipment_product_name'); |
---|
| 243 | $objFormParam->addParam('規格名1', 'shipment_classcategory_name1'); |
---|
| 244 | $objFormParam->addParam('規格名2', 'shipment_classcategory_name2'); |
---|
| 245 | $objFormParam->addParam('単価', 'shipment_price', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
| 246 | $objFormParam->addParam('数量', 'shipment_quantity', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '0'); |
---|
[21020] | 247 | |
---|
[21514] | 248 | $objFormParam->addParam('商品項番', 'no', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 249 | $objFormParam->addParam('追加商品規格ID', 'add_product_class_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 250 | $objFormParam->addParam('修正商品規格ID', 'edit_product_class_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); |
---|
| 251 | $objFormParam->addParam('アンカーキー', 'anchor_key', STEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK')); |
---|
[21020] | 252 | } |
---|
| 253 | |
---|
| 254 | /** |
---|
| 255 | * 受注データを取得して, SC_FormParam へ設定する. |
---|
| 256 | * |
---|
| 257 | * @param SC_FormParam $objFormParam SC_FormParam インスタンス |
---|
| 258 | * @param integer $order_id 取得元の受注ID |
---|
| 259 | * @return void |
---|
| 260 | */ |
---|
| 261 | function setOrderToFormParam(&$objFormParam, $order_id) { |
---|
| 262 | $objPurchase = new SC_Helper_Purchase_Ex(); |
---|
| 263 | |
---|
| 264 | // 受注詳細を設定 |
---|
| 265 | $arrOrderDetail = $objPurchase->getOrderDetail($order_id, false); |
---|
| 266 | $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrOrderDetail)); |
---|
| 267 | |
---|
[21201] | 268 | $arrShippingsTmp = $objPurchase->getShippings($order_id); |
---|
| 269 | $arrShippings = array(); |
---|
| 270 | foreach ($arrShippingsTmp as $row) { |
---|
| 271 | // お届け日の処理 |
---|
[21481] | 272 | if (!SC_Utils_Ex::isBlank($row['shipping_date'])) { |
---|
| 273 | $ts = strtotime($row['shipping_date']); |
---|
[21201] | 274 | $row['shipping_date_year'] = date('Y', $ts); |
---|
| 275 | $row['shipping_date_month'] = date('n', $ts); |
---|
| 276 | $row['shipping_date_day'] = date('j', $ts); |
---|
[21020] | 277 | } |
---|
[21201] | 278 | $arrShippings[$row['shipping_id']] = $row; |
---|
[21020] | 279 | } |
---|
| 280 | $objFormParam->setValue('shipping_quantity', count($arrShippings)); |
---|
| 281 | $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrShippings)); |
---|
| 282 | |
---|
| 283 | /* |
---|
| 284 | * 配送商品を設定 |
---|
| 285 | * |
---|
[21201] | 286 | * $arrShipmentItem['shipment_(key)'][$shipping_id][$item_index] = 値 |
---|
| 287 | * $arrProductQuantity[$shipping_id] = 配送先ごとの配送商品数量 |
---|
[21020] | 288 | */ |
---|
| 289 | $arrProductQuantity = array(); |
---|
| 290 | $arrShipmentItem = array(); |
---|
[21201] | 291 | foreach ($arrShippings as $shipping_id => $arrShipping) { |
---|
| 292 | $arrProductQuantity[$shipping_id] = count($arrShipping['shipment_item']); |
---|
[21020] | 293 | foreach ($arrShipping['shipment_item'] as $item_index => $arrItem) { |
---|
| 294 | foreach ($arrItem as $item_key => $item_val) { |
---|
[21201] | 295 | $arrShipmentItem['shipment_' . $item_key][$shipping_id][$item_index] = $item_val; |
---|
[21020] | 296 | } |
---|
| 297 | } |
---|
| 298 | } |
---|
| 299 | $objFormParam->setValue('shipping_product_quantity', $arrProductQuantity); |
---|
| 300 | $objFormParam->setParam($arrShipmentItem); |
---|
| 301 | |
---|
| 302 | /* |
---|
| 303 | * 受注情報を設定 |
---|
| 304 | * $arrOrderDetail と項目が重複しており, $arrOrderDetail は連想配列の値 |
---|
| 305 | * が渡ってくるため, $arrOrder で上書きする. |
---|
| 306 | */ |
---|
| 307 | $arrOrder = $objPurchase->getOrder($order_id); |
---|
| 308 | $objFormParam->setParam($arrOrder); |
---|
| 309 | |
---|
[21201] | 310 | // ポイントを設定 |
---|
[21166] | 311 | list($db_point, $rollback_point) = SC_Helper_DB_Ex::sfGetRollbackPoint( |
---|
| 312 | $order_id, $arrOrder['use_point'], $arrOrder['add_point'], $arrOrder['status'] |
---|
| 313 | ); |
---|
[21020] | 314 | $objFormParam->setValue('total_point', $db_point); |
---|
| 315 | $objFormParam->setValue('point', $rollback_point); |
---|
| 316 | |
---|
| 317 | if (!SC_Utils_Ex::isBlank($objFormParam->getValue('customer_id'))) { |
---|
[21201] | 318 | $arrCustomer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($objFormParam->getValue('customer_id')); |
---|
| 319 | $objFormParam->setValue('customer_point', $arrCustomer['point']); |
---|
[21020] | 320 | } |
---|
| 321 | } |
---|
| 322 | |
---|
| 323 | } |
---|