Ignore:
Timestamp:
2010/06/10 15:57:58 (12 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_4-dev:18682
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:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20100610065755-il4vfnfm40myxhn7
bzr:revno:
1957
bzr:revprop:branch-nick:
branches/version-2_4-dev
bzr:root:
branches/version-2_4-dev
bzr:text-parents:

data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php ohkouchi@loop-az.jp-20100608075258-7sje2edc0g7kxjdh
bzr:timestamp:
2010-06-10 15:57:55.164000034 +0900
bzr:user-agent:
bzr2.1.1+bzr-svn1.0.2
svn:original-date:
2010-06-10T06:57:55.164000Z
Message:

在庫がマイナスになりうる場合はエラーとなるよう修正(#719)

File:
1 edited

Legend:

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

    r18678 r18683  
    497497            // 加算ポイントの計算 
    498498            $totalpoint += SC_Utils_Ex::sfPrePoint($arrVal['price'][$i], $arrVal['point_rate'][$i]) * $arrVal['quantity'][$i]; 
     499 
     500            // 在庫数のチェック 
     501            $productClass = $objDb->sfGetProductsClass(array($arrVal['product_id'][$i], 
     502                                                             $arrVal['classcategory_id1'][$i], 
     503                                                             $arrVal['classcategory_id2'][$i])); 
     504            if ($productClass['stock_unlimited'] != '1' 
     505                && $productClass['stock'] < ($arrVal['quantity'][$i] - $this->arrForm['quantity'][$i])) { 
     506                $className1 = $this->arrForm['classcategory_name1'][$i]; 
     507                $className1 = empty($className1) ? 'なし' : $className1; 
     508                $className2 = $this->arrForm['classcategory_name2'][$i]; 
     509                $className2 = empty($className2) ? 'なし' : $className2; 
     510 
     511                if (!isset($arrErr['quantity'])) $arrErr['quantity'] = ""; 
     512 
     513                $arrErr['quantity'] .= $this->arrForm['product_name'][$i] . '/(' . $className1 . ')/(' . $className2 . ')の数量(' . $arrVal['quantity'][$i]. ')と受注時の数量(' . $this->arrForm['quantity'][$i] . ')の差分(' . ($arrVal['quantity'][$i] - $this->arrForm['quantity'][$i]) . ')は在庫数(' . $productClass['stock'] . ')を上まわっています。<br />'; 
     514            } 
    499515        } 
    500516 
Note: See TracChangeset for help on using the changeset viewer.