Changeset 21165


Ignore:
Timestamp:
2011/08/09 16:48:44 (13 years ago)
Author:
habu
Message:

#1419 受注管理画面の「使用ポイント」欄に入力する値によって、異常なエラー画面が表示される

Location:
branches/version-2_11-dev/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/helper/SC_Helper_DB.php

    r21068 r21165  
    200200     * @param integer $use_point 利用ポイント 
    201201     * @param integer $add_point 加算ポイント 
     202     * @param integer $order_status 受注ステータス 
    202203     * @return array オーダー前ポイントの配列 
    203204     */ 
    204     function sfGetRollbackPoint($order_id, $use_point, $add_point) { 
     205    function sfGetRollbackPoint($order_id, $use_point, $add_point, $order_status) { 
    205206        $objQuery = new SC_Query_Ex(); 
    206207        $arrRet = $objQuery->select("customer_id", "dtb_order", "order_id = ?", array($order_id)); 
     
    209210            $arrRet = $objQuery->select('point', "dtb_customer", "customer_id = ?", array($customer_id)); 
    210211            $point = $arrRet[0]['point']; 
    211             $rollback_point = $arrRet[0]['point'] + $use_point; 
     212            $rollback_point = $arrRet[0]['point']; 
     213 
     214            // 対応状況がポイント利用対象の場合、使用ポイント分を戻す 
     215            if (SC_Helper_Purchase_Ex::isUsePoint($order_status)) { 
     216                $rollback_point += $use_point; 
     217            } 
     218 
     219            // 対応状況がポイント加算対象の場合、加算ポイント分を戻す 
     220            if (SC_Helper_Purchase_Ex::isAddPoint($order_status)) { 
     221                $rollback_point -= $add_point; 
     222            } 
    212223        } else { 
    213224            $rollback_point = ""; 
  • branches/version-2_11-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r21118 r21165  
    524524        $objFormParam->setParam($arrOrder); 
    525525 
    526         // XXX ポイントを設定 
    527         list($db_point, $rollback_point) = SC_Helper_DB_Ex::sfGetRollbackPoint($order_id, $arrOrder['use_point'], $arrOrder['add_point']); 
     526        // ポイントを設定 
     527        list($db_point, $rollback_point) = SC_Helper_DB_Ex::sfGetRollbackPoint( 
     528            $order_id, $arrOrder['use_point'], $arrOrder['add_point'], $arrOrder['status'] 
     529        ); 
    528530        $objFormParam->setValue('total_point', $db_point); 
    529531        $objFormParam->setValue('point', $rollback_point); 
Note: See TracChangeset for help on using the changeset viewer.