<?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      Your Name <mail@example.com>
 * @access      public
 */
class Admin_Ordermanage_Order_Detail_Depositdone
{
  
  var $order_date_start;
  var $order_date_end;
  var $order_time_start;
  var $order_time_end;
  var $orderno_start;
  var $orderno_end;
  var $ordermember;
  var $mailaddr;
  var $state;
  var $display;
  var $deposit_updcnt;

  var $from;
  var $deposit;
  
  var $orderno;
  var $orderdate;
  var $deposit_state;
  var $forwardstate;
  var $upduser;

  var $ms;
  var $fromdetail;
  
    /**
     * [[機能説明]]
     *
     * @access  public
     */
    function execute()
    {
      
        $log =& LogFactory::getLog();
        $log->debug("Admin_Ordermanage_Order_Detail_Formが実行されました", "Ordermanage_Order_Detail_Form#execute");
        
        $today = date("Y-m-d");
        
      $this->fromdetail = "set";
      
      if($this->deposit_state == "2"){
      $this->ms = "depositsate2";
      return "error";
      }
      if($this->forwardstate == "9"){
      $this->ms = "cancel";
      return "error";
      }
        //IngectRequest でorderno は渡るが、同functionをlist側の更新でも活用する為、引数として渡す
        $res = $this->deposit->DepositUpdate($this->orderno,$this->upduser,$today,$this->deposit_updcnt);
             
      if (!$res) return "error";

      return 'success';
    }
    
}
?>
