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

<div id="container">

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

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

<h3>在庫一括変更</h3>

<!--↓エラーメッセージ -->
{errorList->getMessages assign=errmsg}
{if $action.errmsg}
<div class="error">
  <ul class="alert">
  
    <li>{$action.errmsg|escape}</li>
  
  </ul>
</div>
{/if}
<!--↑エラーメッセージ -->

<!-- ↓入力フォーム -->
<form name="from1" id="form1" action="{$scriptName}" method="POST">

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

<!-- ↓アイテム -->
<div class="item">


<!-- ↓検索結果 -->
<table class="hyou">
  <tr>
    <th class="name">メーカー</th>
    <th class="name">レーベル</th>
    <th class="name">品番</th>
    <th class="name">タイトル</th>
    <th class="name">女優</th>
    <th class="name">メディア</th>
    <th class="name">在庫数</th>
  </tr>
  
  {foreach from=$action.stockcnt item=data key=key}
  {if $action.stockcnt[$key] != ""}
  <tr>
    <td class="name">
{* 商品情報取得 *}
{action->getitem itemcd=$action.itemcd[$key] structcd=$action.structcd[$key] assign=item}
      {$item.makernm}
      <input type="hidden" name="itemcd[{$key}]" value="{$action.itemcd[$key]}">
      <input type="hidden" name="structcd[{$key}]" value="{$action.structcd[$key]}">
      <input type="hidden" name="stockcd[{$key}]" value="{$action.stockcd[$key]}">
      <input type="hidden" name="stockcnt[{$key}]" value="{$action.stockcnt[$key]}">
    </td>

    <td class="name">{$item.labelnm}</td>
    <td class="name">{$item.makeritemcd}</td>
    <td class="name">{$item.itemnm}</td>
    {action->getCastnm itemcd=$item.itemcd assign=cast}
    <td class="name">{foreach from=$cast item=cast}{$cast.0} {/foreach}</td>
    <td class="name">{$item.medianm}</td>
    <td class="name">{$action.stockcnt[$key]}</td>
  </tr>
  {/if}
  {/foreach}

</table>
<!-- ↑検索結果 -->

 <table width="680" border="0" cellpadding="0">
   <tr>
     <td width="30" align="right"><div align="center">
     </div></td>
     <td width="390"><table width="350" border="0" cellpadding="0" cellspacing="1" bgcolor="#A69649">
       <tr>
         <td width="348" bgcolor="#F7F5ED"><table width="312" border="0" align="center" cellpadding="3" cellspacing="0">
             <tr>
               <input type="hidden" name="maker_capi" value="{$action.maker_capi}">
               <input type="hidden" name="makercd" value="{$action.makercd}">
               <input type="hidden" name="labelcd" value="{$action.labelcd}">
               <input type="hidden" name="stock" value="{$action.stock}">
               <input type="hidden" name="src_title" value="{$action.src_title}">
               <input type="hidden" name="from" value="{$action.from}">
               <td width="150"><input type="submit" name="dispatch_admin_itemmanage_stock_list" value="戻る"></td>
{if $action.count!=0}
               <td width="150"><input type="submit" name="dispatch_admin_itemmanage_stock_done" value="変更"></td>
{/if}
             </tr>
         </table></td>
       </tr>
     </table></td>
   </tr>
 </table>



</div>
<!-- ↑アイテム -->

</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"}
