{include file="admin/header.html"}
{include file="admin/gnavi.html"}

<div id="container">

{include file="admin/menu/submenu_order.html"}

<!-- ↓段組み メイン側 -->
<div id="main">

{if $action.untrans == "untrans"}
<h3>予約詳細情報</h3>
{else}
<h3>受注詳細情報</h3>
{/if}



<form method="get" action="" id ="search">

<table border="0" cellspacing="0" cellpadding="0" class="hyou">

  <tr>
    <th width="30%">受注番号</th>
    <td>
      {$action.orderno}
{if $action.remiseinfo!=""}
      <br />
      ルミーズにて、同一の決済になっている受注番号<br />
      {$action.remiseinfo}
{/if}      
    </td>
    <td align="right">{if $action.dl_check===false}<input type="button" onclick="javascript:window.open('{$scriptName}?action=admin_ordermanage_order_detail_form&odno={$action.orderno}&print=1')" value="納品書">{else}&nbsp;{/if}</td>
  </tr>
  <tr>
    <th>受注日時</th>
    <td colspan="2">{$action.orderdate|date_format:"%Y/%m/%d %H:%M:%S"}</td>
  </tr>
  
  <tr>
    <th>入金状態</th>
    <td colspan="2">{$action.deposit_statename}</td>
  </tr>
  <tr>
    <th>摘要</th>
    <td colspan="2">{$action.brief}</td>
  </tr>
  <tr>
    <th>決済方法</th>
    <td colspan="2">{$action.depositdivname}</td>
  </tr>
{if $action.cvsinfo !=""}
  <tr>
    <th>コンビニ決済情報</th>
    <td colspan="2">{$action.cvsinfo|nl2br}</td>
  </tr>
{/if}
  <tr>
    <th>配送</th>
    <td colspan="2">{if $action.depositdiv==3}コレクト{else}宅急便{/if}</td>
  </tr>
  <tr>
    <th>問い合わせ番号</th>
    <td colspan="2">{$action.enquiryno}</td>
  </tr>
  <tr>
    <th>取引金額</th>
    <td>{$action.sumprice|number_format}円</td>
    <td align="right">
{if $action.depositdiv == 1 AND $action.deposit_state == 1 AND $action.stockstate == 3}
<input type="submit" name="dispatch_admin_ordermanage_order_detail_reservsales" value="ベリトランス決済">
{elseif $action.deposit_state == 1 AND $action.stockstate == 3 AND $action.forwardstate!=9}
  <input type="submit" name="dispatch_admin_ordermanage_order_detail_depositdone" value="入金済にする">
{else}  
  &nbsp;
{/if}</td>
    
  </tr>
</table>

<table border="0" cellspacing="0" cellpadding="0" class="hyou">

  <tr>
    <th width="30%">注文者</th>
    <td colspan="2">{if !empty($action.sendbuyername)}{$action.sendbuyername}{else}{$action.lastnm}&nbsp;{$action.firstnm}{/if}</td>
  </tr>
  <tr>
    <th>E-Mail</th>
    <td colspan="2">{$action.mail}</td>
  </tr>
  <tr>
    <th>郵便番号</th>
    <td colspan="2">{$action.sendpostalcd}
  </tr>
  
   <tr>
    <th>都道府県</th>
    <td colspan="2">{$action.prefnm}</td>

  <tr>
    <th>送付先住所1</th>
    <td colspan="2">{$action.sendaddr1}</td>
    </tr>
  
  <tr>
    <th>送付先住所2</th>
    <td colspan="2">{$action.sendaddr2}</td>
  </tr>
  <tr>
    <th>送付先電話番号</th>
    <td colspan="2">{$action.sendtelno1}</td>
  </tr>
  <tr>
    <th>送付宛名</th>
  <td colspan="2">{$action.addressee}</td>

<input type="hidden" name="orderno"        value="{$action.stockstate}">

  <input type="hidden" name="orderno"        value="{$action.orderno}">
  <input type="hidden" name="deposit_updcnt" value="{$action.deposit_updcnt}">
  <input type="hidden" name="deposit_state"  value="{$action.deposit_state}">
  <input type="hidden" name="forwardstate"   value="{$action.forwardstate}">
  <input type="hidden" name="sumprice"       value="{$action.sumprice}">
  
<input type="hidden" id="order_date_start" name="order_date_start" value="{$action.order_date_start}">
<input type="hidden" id="order_date_end"   name="order_date_end"   value="{$action.order_date_end}">
<input type="hidden" id="order_time_start" name="order_time_start" value="{$action.order_time_start}">
<input type="hidden" id="order_time_end"   name="order_time_end"   value="{$action.order_time_end}">
<input type="hidden" id="orderno_start"    name="orderno_start"    value="{$action.orderno_start}">
<input type="hidden" id="orderno_end"      name="orderno_end"      value="{$action.orderno_end}">
<input type="hidden" id="ordermember"      name="ordermember"      value="{$action.ordermember}">
<input type="hidden" id="mailaddr"         name="mailaddr"         value="{$action.mailaddr}">
<input type="hidden" id="state"            name="state"            value="{$action.state}">
<input type="hidden" id="display"          name="display"          value="{$action.display}">
<input type="hidden" id="from"             name="from"             value="{$action.from}">
  </tr>
</table>

{if $action.dl_check===true}
<table border="0" cellspacing="0" cellpadding="0" class="hyou">
  <tr>
    <th width="30%">ダウンロード回数</th>
    <td>{if $action.dlorder.maxdlcount < 0}無制限{else}残り {$action.dlorder.maxdlcount} 回{/if}</td>
  </tr>
  <tr>
    <th>ダウンロード期間</th>
    <td>{$action.dlorder.dlperiodend|date_format:"%Y年%m月%d日"}まで</td>
  </tr>
</table>
{/if}


<table border="0" cellspacing="0" cellpadding="0" class="hyou">
  <tr>
    <th>番号</th>
    <th>タイトル</th>
    <th>数量</th>
    <th>金額</th>
    <th>在庫状態</th>
    <th>出荷状態</th>
    </td>
  </tr>

{foreach from=$action.results item="item" name="item" key="key" }
<input type="hidden" name="orderrowno[]" value="{$item.orderrowno}-{$item.fwd_detail_updcnt}-{$item.forwardstate}">
   <tr>

    <td align="center">{$smarty.foreach.item.iteration}</td>
    <td>{if $item.typediv<>1}({$item.orderdetailtypename}){else}{$item.itemnm}&nbsp;{$item.variationnm}{/if}</td>
    <td>{if $item.typediv == 1}{$item.count}{/if}</td>
    <td>{$item.price|number_format}</td>
    <td>{$item.syouhinstatename}</td>
    <td>{$item.fwstate}</td>
  </tr>
{/foreach}
</table>


<table border="0" cellspacing="0" cellpadding="0">
   <tr>
　	<td align="right" colspan="2">
{if $action.untrans == "untrans"}
<input type="hidden" name="disp_day"    value={$action.disp_day}>
<input type="hidden" name="disp_select" value={$action.disp_select}>
<input type="submit" name="dispatch_admin_ordermanage_untrans" value="一覧へ戻る">
{else}
  <input type="submit" name="dispatch_admin_ordermanage_order_list_list" value="一覧へ戻る">
  <input type="submit" name="dispatch_admin_ordermanage_order_search" value="検索画面へ">
{/if}

  <input type="hidden" name="odno" value="{$action.orderno}">
  <input type="hidden" id="ml" name="ml" value="">
  <input type="hidden" id="act" name="action" value=""> 
{if $action.dl_check===false}
{if $action.forwardstate==4}
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" onclick="$('ml').value=1; $('act').value='admin_ordermanage_order_detail_form'; return confirm('商品発送メールを再送信してかまいませんか？');" value="商品発送メール再送信">
{/if}
{/if}
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" onclick="$('ml').value=2; $('act').value='admin_ordermanage_order_detail_form'; return confirm('購入完了メールを再送信してかまいませんか？');" value="購入完了メール再送信">
 	</td>
	</tr>
</table>
</form>

<div class="pagetop" title="ページトップへ"><a href="#top">ページトップへ</a></div>

</div>
<!--End of main-->

<div class="cr"></div>
</div>
<!--End of container-->

{include file="admin/footer.html"}
