{action->getPager assign=pager}

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

<div id="container">

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

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

<h3>支払一覧</h3>


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

{*
<form action="{$scriptName}" method="GET">
{$action.cnt}件
<div class="pagenavi">{$pager}</div>
期間指定
<select name="month">
{section name=period loop=12}
  <option value="{$smarty.section.period.iteration}" {if $action.month == $smarty.section.period.iteration}selected{/if}>{$smarty.section.period.iteration}月〆
{/section}
</select>
<input type="Submit" name="dispatch_admin_moneymanage_paymentlist" value="検索">
</form>
*}

<!-- ↓ページナビ、データ件数、追加ボタン（上） -->
<table border="0" cellspacing="0" cellpadding="0" class="border-non">
  <tr>
    <td colspan="2">
        {$pager}
        {$action.cnt}件のデータ
	</td>
    <td>
        <form action="{$scriptName}" method="GET">
          <input type="hidden" name="action" value="admin_moneymanage_paymentlist">
          期間指定
          <select name="month">
          {section name=period loop=12}
            <option value="{$smarty.section.period.iteration}" {if $action.month == $smarty.section.period.iteration}selected{/if}>{$smarty.section.period.iteration}月〆
          {/section}
          </select>
          <input type="Submit" value="検索">
        </form>
        </td>
  </tr>
</table>
<!-- ↑ページナビ、データ件数、追加ボタン（上） -->

<table border="0" cellspacing="0" cellpadding="0" class="hyou">
  <tr>
    <th>出品者</th>
    <th>支払い金額</th>
    <th>売り上げ</th>
    <th>手数料</th>
    <th>返金</th>
  </tr>
  {foreach item=payment from=$action.paymentlist}
  {action->account_format number=$payment.sales assign=sales}
  {action->account_format number=$payment.commission assign=commission}
  {action->account_format number=$payment.refundprice assign=refundprice}
  {math equation="sales + commision + refundprice"
      sales=$payment.sales
      commision=$payment.commission
      refundprice=$payment.refundprice
      assign=totalpayment}
  {action->account_format number=$totalpayment assign=totalpayment}
  
    <tr>
      <td>{$payment.sellername}</td>
      <td>{$totalpayment}円</td>
      <td>{$sales}円</td>
      <td>{$commission}円</td>
      <td>{$refundprice}円</td>
    </tr>
  {foreachelse}
    <tr>
      <td height="30" colspan=5>この月に支払わなければならないユーザーはいません</td>
    </tr>
  {/foreach}
</table>

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