Changeset 20719


Ignore:
Timestamp:
2011/03/18 17:51:16 (10 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:20718
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php 15594@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Forder%2FLC_Page_Admin_Order_Edit.php
bzr:mapping-version:
v4
bzr:merge:

ohkouchi@loop-az.jp-20110318084733-b0z8swaesd7d1ikd
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20110318085113-7o8s1tirrqc1qryj
bzr:revno:
3433
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php ohkouchi@loop-az.jp-20110318084733-b0z8swaesd7d1ikd
bzr:timestamp:
2011-03-18 17:51:13.362999916 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2011-03-18T08:51:13.363000Z
Message:

#1174 (受注編集画面からの操作で, 在庫がマイナスになってしまう)

File:
1 edited

Legend:

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

    r20577 r20719  
    514514            // 加算ポイントの計算 
    515515            $totalpoint += SC_Utils_Ex::sfPrePoint($arrValues['price'][$i], $arrValues['point_rate'][$i]) * $arrValues['quantity'][$i]; 
     516 
     517            // 在庫数のチェック 
     518            $objProduct = new SC_Product_Ex(); 
     519            $arrProduct = $objProduct->getDetailAndProductsClass($arrValues['product_class_id'][$i]); 
     520 
     521            // 編集前の値と比較するため受注詳細を取得 
     522            $objPurchase = new SC_Helper_Purchase_Ex(); 
     523            $arrOrderDetail = SC_Utils_Ex::sfSwapArray($objPurchase->getOrderDetail($objFormParam->getValue('order_id'), false)); 
     524 
     525            if ($arrProduct['stock_unlimited'] != '1' 
     526                && $arrProduct['stock'] < $arrValues['quantity'][$i] - $arrOrderDetail['quantity'][$i]) { 
     527                $class_name1 = $arrValues['classcategory_name1'][$i]; 
     528                $class_name1 = SC_Utils_Ex::isBlank($class_name1) ? 'なし' : $class_name1; 
     529                $class_name2 = $arrValues['classcategory_name2'][$i]; 
     530                $class_name2 = SC_Utils_Ex::isBlank($class_name2) ? 'なし' : $class_name2; 
     531                $arrErr['quantity'][$i] .= $arrValues['product_name'][$i] 
     532                    . '/(' . $class_name1 . ')/(' . $class_name2 . ') の在庫が不足しています。 設定できる数量は「'  
     533                    . ($arrOrderDetail['quantity'][$i] + $arrProduct['stock']) . '」までです。<br />'; 
     534            } 
    516535        } 
    517536 
Note: See TracChangeset for help on using the changeset viewer.