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

<div id="container">

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

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

<form action="{$scriptName}" id="form1" name="fm1" method="POST">
  <input type="hidden" name="div" value="{$action.div}">
  <input type="hidden" id="ac" name="action" value="">
  <input type="hidden" id="cd" name="cd" value="">
  <input type="hidden" id="structcd" name="structcd" value="">
  <input type="hidden" id="janc" name="jancode" value="{$action.jancode}">
  <input type="hidden" id="hb" name="hinban" value="{$action.hinban}">
  <input type="hidden" id="t" name="itemtitle" value="{$action.itemtitle}">
  <input type="hidden" id="rds" name="release_date_start" value="{$action.release_date_start}">
  <input type="hidden" id="rde" name="release_date_end" value="{$action.release_date_end}">
  <input type="hidden" id="pds" name="publish_date_start" value="{$action.publish_date_start}">
  <input type="hidden" id="pde" name="publish_date_end" value="{$action.publish_date_end}">
  <input type="hidden" id="mc" name="maker_capital" value="{$action.maker_capital}">
  <input type="hidden" id="mn" name="maker_name" value="{$action.maker_name}">
  <input type="hidden" id="mda" name="media" value="{$action.media}">
  <input type="hidden" id="cst" name="cast" value="{$action.cast}">
  <input type="hidden" id="stut" name="situation" value="{$action.situation}">
  <input type="hidden" id="phs" name="photo_situation" value="{$action.photo_situation}">
  <input type="hidden" id="pus" name="publish_situation" value="{$action.publish_situation}">
  <input type="hidden" id="srt" name="sort" value="{$action.sort}">
{foreach name=list from=$action.genre_select item=genre}
  <input type="hidden" name="genre_select[]" value="{$genre}">
{/foreach}
  <input type="hidden" id="itd" name="imgtypediv" value="">
  <input type="hidden" id="gcd" name="generalcd" value="">
  <input type="hidden" id="iit" name="imgintotitle" value="{$action.itemnm}">
  <input type="hidden" id="frac" name="fromaction" value="admin_itemmanage_reference">
  <input type="hidden" name="itemnm"         value="{$action.result.0.itemnm}">
  <input type="hidden" name="makeritemcd"    value="{$action.struct.0.makeritemcd}">
  <input type="hidden" name="medianm"        value="{$action.struct.0.medianm}">
  <input type="hidden" name="makerprice"     value="{$action.struct.0.makerprice}">
{errorList->getMessages assign=errmsg}
{if $errmsg}
  <input type="hidden" name="itemnm"         value="{$action.itemnm}">
  <input type="hidden" name="makeritemcd"    value="{$action.makeritemcd}">
  <input type="hidden" name="medianm"        value="{$action.medianm}">
  <input type="hidden" name="makerprice"     value="{$action.makerprice}">
{/if}
  <input type="hidden" name="stocktype" value="{$action.stocktype}">
  <input type="hidden" name="fromlist_salestartdate" value="{$action.fromlist_salestartdate}">
  <input type="hidden" name="fromlist_orderclosedate" value="{$action.fromlist_orderclosedate}">
  <input type="hidden" name="from" value="{$action.from}">
  
  <!-- ↓項目（上） --> 
    <table border="0" cellspacing="0" cellpadding="0" class="hyou">
      <tr>
        <th align="left">品目コード</th>
        <td align="left" colspan="2">{$action.cd}</td>
        <td align="right">
          <input type="button" onClick="document.getElementById('ac').value='admin_itemmanage_reference'; document.getElementById('cd').value='{$action.cd}'; document.fm1.submit();" value="詳細画面へ">
          <input type="button" onClick="document.getElementById('ac').value='admin_itemmanage_change_stock_list'; document.getElementById('cd').value='{$action.cd}'; document.getElementById('structcd').value='{$action.structcd}';  document.fm1.submit();" value="在庫入力へ"></td>
      </tr>
      <tr>
        <th align="left">タイトル</th>
        <td align="left" colspan="3">
          {$action.result.0.itemnm}
          {errorList->getMessages assign=errmsg}
          {if $errmsg}
          {$action.itemnm}
          {/if}</td>
      </tr>
      <tr>
        <th align="left"">品番</th>
        <td align="left"" colspan="3">
          {$action.struct.0.makeritemcd}
          {errorList->getMessages assign=errmsg}
          {if $errmsg}
          {$action.makeritemcd}
          {/if}</td>
      </tr>
      
  {*    
  　<tr>
        <th align="left">メーカー定価</th>
        <td align="left" colspan="3">
          {if $errmsg}
            {if $action.makerprice==0}オープンプライス{else}{$action.makerprice}円{/if}
          {else}
            {if $action.struct.0.makerprice==0}オープンプライス{else}{$action.struct.0.makerprice}円{/if}
          {/if}
        </td>
      </tr>
  *}
   
    </table>
  <!-- ↑項目（上） --> 

  <!-- ↓項目（下） --> 
    <!--↓エラーメッセージ -->
    {errorList->getMessages assign=errmsg}
    {if $errmsg}
    <br>
    <div class="error">
      <ul class="alert">
{foreach from=$errmsg item=msg}
        <li>{$msg|escape}</li>
{/foreach}
      </ul>
    </div>
    {/if}
    <!--↑エラーメッセージ -->

    <table border="0" cellspacing="0" cellpadding="0" class="hyou">
      <tr>
        <th>販売価格</th>
        <th>送料</th>
        <th>仕入単価</th>
       {* <th>仕入区分</th>*}
        <th>在庫数</th>
       {*<th>コンディション</th>*}
        <th>ステータス</th>
      </tr>
      <input type="hidden" name="updcnt" value="{$action.updcnt}">
      <input type="hidden" name="stockcd" value="{$action.stockcd}">
      <input type="hidden" name="actionnm" value="{$action.actionnm}">
      <input type="hidden" name="stocktitlecd" value="{$action.stocktitlecd}">
      

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

      <input type="hidden" name="orderitemcd" value="{$action.orderitemcd}">
      <input type="hidden" name="orderstructcd" value="{$action.orderstructcd}">
      <input type="hidden" name="sellingprice2" value="{$action.sellingprice2}">
      <input type="hidden" name="souryouprc2" value="{$action.souryouprc2}">
      <input type="hidden" name="condition2" value="{$action.condition2}">
     
     <input type="hidden" name="supplidiv" value="1">
     <input type="hidden" name="condition" value="1"> 
     
     
      <tr valign="middle">
        <td>
          <input type="text" name="sellingprice" value="{$action.sellingprice}" size="5">&nbsp;円</td>
        <td>
{if $action.souryouprc == ""}
          <input type="text" name="souryouprc" value="{$smarty.const.SITE_SOURYOU}" size="5">&nbsp;円&nbsp;
{else}
          <input type="text" name="souryouprc" value="{$action.souryouprc}" size="5">&nbsp;円&nbsp;
{/if}
          <b>0</b>：送料0円&nbsp;&nbsp;<b>-1</b>：宅急便の送料を利用
        </td>
        <td>
          <input type="text" name="costprice" value="{$action.costprice}" size="5">&nbsp;円</td>
          
       {* <td>
          {action->SupplidivList assign=supplidiv}
          <select name="supplidiv">
            <option value="0">選択なし</option>
{foreach from=$supplidiv item=supp}
            <option value="{$supp.namecd|escape}"{if $supp.namecd==$action.supplidiv} selected{/if}>{$supp.name|escape}</option>
{/foreach}
          </select>
          </td>
          *}
          
        <td>
          <input type="text" name="stocktitlecdcont" value={if $action.stockstate == 1}"0"{else}"{$action.stocktitlecdcont}"{/if}  size="5" >
        </td>
        
       {* <td>
          {action->ConditionList assign=condition}
          <select name="condition">
            <option value="0">選択なし</option>
{foreach from=$condition item=condi}
            <option value="{$condi.namecd|escape}"{if $condi.namecd==$action.condition} selected{/if}>{$condi.name|escape}</option>
{/foreach}
          </select>
          </td>
          *}
          
        <td>
          {action->StockstateList assign=stockstate}
          <select name="stockstate">
{foreach from=$stockstate item=ststate}
            <option value="{$ststate.namecd|escape}"{if $ststate.namecd == $action.stockstate} selected{/if}>{$ststate.name|escape}</option>
{/foreach}
          </select>
          </td>
      </tr>

      <tr>
        <th align="left" colspan="7">在庫コメント（ポータルにて複数在庫の表示を許可している場合のみ、在庫ごとのメッセージとして表示されます。<br />
        許可していない場合は、内部的なコメントとしてお使いください。）</th>
      </tr>
      <tr>
        <td colspan="7">
          <input type="text" name="itemexp" value="{$action.itemexp}" size="60"></td>
      </tr>


      <tr>
        <td align="right" colspan="7">
{if $action.actionnm == "insert"}        
          <input type="submit" onClick="document.getElementById('ac').value='admin_itemmanage_change_stock_insert_check'; 
                                        document.getElementById('cd').value='{$action.cd}'; 
                                        document.getElementById('structcd').value='{$action.structcd}';" value="変更確認">
{else}
          <input type="submit" onClick="document.getElementById('ac').value='admin_itemmanage_change_stock_update_check'; 
                                        document.getElementById('cd').value='{$action.cd}'; 
                                        document.getElementById('structcd').value='{$action.structcd}';" value="変更確認">
{/if}                                        
        </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"}
