<?php
/**
 * @copyright ONE/DEPO Project
 * @license   PHP License 3.01 <http://www.php.net/license/3_01.txt>
 */


/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

/**
 * [[機能説明]]
 *
 * @package     [[package名]]
 * @author      H.Watanabe <hiroshi.watanabe@netnee.jp>
 * @access      public
 */
class Admin_Itemmanage_Stock_Check
{
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    var $title;
    var $pagename;
    var $div;
    
    var $db_cast;
    var $db_struct;
    
    var $maker_capi;
    var $makercd;
    var $labelcd;
    var $stock;
    var $src_title;
    var $from;
    
    //var $ischecked;
    var $itemcd;
    var $structcd;
    var $stockcd;
    var $stockcnt;
    
    var $count;
    
    var $errmsg;
    
    function execute()
    {
        // 変更商品数
        $this->count = 0;
        foreach($this->stockcnt as $key => $value) {
            if(!empty($value) AND $value>0) {
                $this->count++;
            }
        }
        
        if($this->count==0) {
            $this->errmsg = '在庫数に1以上の数値を入れてください';
        }
        return 'success';
    }

    function getitem($param)
    {
        return $this->db_struct->getOneItemOneStruct($param['itemcd'], $param['structcd']);
    }
    
    // キャスト名取得
    function getCastnm($param)
    {
        $cast = $this->db_cast->getCastnmForItemcd($param['itemcd']);
        return $cast;
    }
}
?>
