Changeset 20415


Ignore:
Timestamp:
2011/02/26 11:29:25 (13 years ago)
Author:
shutta
Message:

refs #1029
受注管理->受注入力・編集の商品変更が正しく動作していなかったのを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r20335 r20415  
    683683        if (SC_Utils_Ex::isBlank($product_class_id)) { 
    684684            $product_class_id = $objFormParam->getValue('edit_product_class_id'); 
    685         } 
    686  
    687         // フォームの内容を更新 
     685            $changed_no = $objFormParam->getValue('no'); 
     686        } 
     687 
     688        // 選択済みの商品であれば数量を1増やす 
    688689        $exists = false; 
    689690        $arrExistsProductClassIds = $objFormParam->getValue('product_class_id'); 
     
    699700 
    700701        // 新しく商品を追加した場合はフォームに登録 
     702        // 商品を変更した場合は、該当行を変更 
    701703        if (!$exists) { 
    702704            $objProduct = new SC_Product(); 
     
    713715            foreach ($arrUpdateKeys as $key) { 
    714716                $arrValues = $objFormParam->getValue($key); 
    715                 $arrValues[] = $arrProduct[$key]; 
     717                if (isset($changed_no)) { 
     718                    $arrValues[$changed_no] = $arrProduct[$key]; 
     719                } else { 
     720                    $arrValues[] = $arrProduct[$key]; 
     721                } 
    716722                $objFormParam->setValue($key, $arrValues); 
    717723            } 
     724        } elseif (isset($changed_no)) { 
     725            // 変更したが、既に選択していた場合は、 
     726            $this->doDeleteProduct($changed_no, $objFormParam); 
    718727        } 
    719728    } 
Note: See TracChangeset for help on using the changeset viewer.