Changeset 21036
- Timestamp:
- 2011/07/21 17:49:18 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
r21019 r21036 125 125 $objFormParam->convParam(); 126 126 $order_id = $objFormParam->getValue('order_id'); 127 $arrValuesBefore = array(); 127 128 128 129 // DBから受注情報を読み込む … … 130 131 $this->setOrderToFormParam($objFormParam, $order_id); 131 132 $this->tpl_subno = 'index'; 133 $arrValuesBefore['payment_id'] = $objFormParam->getValue('payment_id'); 134 $arrValuesBefore['payment_method'] = $objFormParam->getValue('payment_method'); 132 135 } else { 133 136 $this->tpl_subno = 'add'; 134 137 $this->tpl_mode = 'add'; 138 $arrValuesBefore['payment_id'] = NULL; 139 $arrValuesBefore['payment_method'] = NULL; 135 140 } 136 141 … … 148 153 if (SC_Utils_Ex::isBlank($this->arrErr)) { 149 154 $message = '受注を編集しました。'; 150 $order_id = $this->doRegister($order_id, $objPurchase, $objFormParam, $message );155 $order_id = $this->doRegister($order_id, $objPurchase, $objFormParam, $message, $arrValuesBefore); 151 156 if ($order_id >= 0) { 152 157 $this->setOrderToFormParam($objFormParam, $order_id); … … 163 168 if (SC_Utils_Ex::isBlank($this->arrErr)) { 164 169 $message = '受注を登録しました。'; 165 $order_id = $this->doRegister(null, $objPurchase, $objFormParam, $message );170 $order_id = $this->doRegister(null, $objPurchase, $objFormParam, $message, $arrValuesBefore); 166 171 if ($order_id >= 0) { 167 172 $this->tpl_mode = 'edit'; … … 242 247 $this->tpl_onload .= $this->getAnchorKey($objFormParam); 243 248 $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); 249 if ($arrValuesBefore['payment_id']) 250 $this->arrPayment[$arrValuesBefore['payment_id']] = $arrValuesBefore['payment_method']; 251 244 252 } 245 253 … … 606 614 * @param SC_FormParam $objFormParam SC_FormParam インスタンス 607 615 * @param string $message 通知メッセージ 616 * @param array $arrValuesBefore 更新前の受注情報 608 617 * @return integer $order_id 受注ID 609 618 * 610 619 * エラー発生時は負数を返す。 611 620 */ 612 function doRegister($order_id, &$objPurchase, &$objFormParam, &$message ) {621 function doRegister($order_id, &$objPurchase, &$objFormParam, &$message, &$arrValuesBefore) { 613 622 614 623 $objQuery =& SC_Query_Ex::getSingletonInstance(); … … 618 627 619 628 $objQuery->begin(); 629 630 // 支払い方法が変更されたら、支払い方法名称も更新 631 if ($arrValues['payment_id'] != $arrValuesBefore['payment_id']) { 632 $arrValues['payment_method'] = $this->arrPayment[$arrValues['payment_id']]; 633 $arrValuesBefore['payment_id'] = NULL; 634 } 620 635 621 636 // 受注テーブルの更新
Note: See TracChangeset
for help on using the changeset viewer.