{include file="mheader.tpl"}
<div class="col-md-12">
            <div class="card">
                <h5 class="card-header bg-primary text-white">Deposit History</h5>
<div class="card-body">
{literal}
<script language=javascript>
function go(p)
{
  document.opts.page.value = p;
  document.opts.submit();
}
</script>
{/literal}
<div class="row">
<div class="col-md-12">
<form method=post name=opts>
<input type=hidden name=a value=deposit_history>
<input type=hidden name=page value={$current_page}>
<div class="row">
    <div class="col-md-12">
        <div class="row">

  
 <div class="col-md-1">
 <label>From:</label>
 </div>
 <div class="col-md-2">
 <select name=month_from class="form-control">
{section name=month_from loop=$month}
<option value={$smarty.section.month_from.index+1} {if $smarty.section.month_from.index+1 == $frm.month_from}selected{/if}>{$month[month_from]}
{/section}
</select> &nbsp;
</div>
 <div class="col-md-2">
<select name=day_from class="form-control">
{section name=day_from loop=$day}
<option value={$smarty.section.day_from.index+1} {if $smarty.section.day_from.index+1 == $frm.day_from}selected{/if}>{$day[day_from]}
{/section}
</select> &nbsp;
</div>
<div class="col-md-2">
<select name=year_from class="form-control">
{section name=year_from loop=$year}
<option value={$year[year_from]} {if $year[year_from] == $frm.year_from}selected{/if}>{$year[year_from]}
{/section}
</select><br><img src=images/q.gif width=1 height=4><br>

</div>
 </div> 
   </div>
   </div>
   <div class="row">
       <div class="col-md-12">
            <div class="row">
       

  
<div class="col-md-1">
    <label>To:</label>
    </div>
    <div class="col-md-2">
<select name=month_to class="form-control">
{section name=month_to loop=$month}
<option value={$smarty.section.month_to.index+1} {if $smarty.section.month_to.index+1 == $frm.month_to}selected{/if}>{$month[month_to]}
{/section}
</select> &nbsp;
</div>
<div class="col-md-2">
<select name=day_to class="form-control">
{section name=day_to loop=$day}
<option value={$smarty.section.day_to.index+1} {if $smarty.section.day_to.index+1 == $frm.day_to}selected{/if}>{$day[day_to]}
{/section}
</select> &nbsp;
</div>
<div class="col-md-2">
<select name=year_to class="form-control">
{section name=year_to loop=$year}
<option value={$year[year_to]} {if $year[year_to] == $frm.year_to}selected{/if}>{$year[year_to]}
{/section}
</select>
</div>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="col-md-4">
&nbsp; <input type=submit value="Go" class="btn btn-primary ml-auto">
</div>
</div>
</form>
</div>
</div>
<br><br>

{if $settings.use_history_balance_mode}
<div class="table-responsive">
<table class="table">
    <thead>
<tr>
 <th class=inheader>Date</th>
 <th class=inheader>Type</th>
 <th class=inheader>Credit</th>
 <th class=inheader>Debit</th>
 <th class=inheader>Balance</th>
 <th class=inheader>P.S.</th>
</tr>
</thead>
{if $qtrans > 0}
{section name=trans loop=$trans}
<tr>
 <td align=center nowrap>{$trans[trans].d}</td>
 <td><b>{$trans[trans].transtype}</b><br><small class=gray>{$trans[trans].description}</small></td>
 <td align=right><b>
  {if $trans[trans].debitcredit == 0}
  {$currency_sign}{$trans[trans].actual_amount}
  </b>
  {else}
  &nbsp;
  {/if}
 </td>
 <td align=right><b>
  {if $trans[trans].debitcredit == 1}
  {$currency_sign}{$trans[trans].actual_amount}
  </b> 
  {else}
  &nbsp;
  {/if}
 </td>
 <td align=right><b>
  {$currency_sign}{$trans[trans].balance}
 </td>
 <td><img src="images/{$trans[trans].ec}.gif" align=absmiddle hspace=1 height=17></td>
</tr>
{/section}
{else}
<tr>
 <td colspan=6 align=center><div class="alert alert-warning m-b-lg" role="alert">
                                No transactions found
                            </div></td>
</tr>
{/if}


{if $qtrans > 0}
<tr>
 <td>Total for this period:</td>
 <td align=right nowrap><b>{$currency_sign}{$periodcredit}</b></td>
 <td align=right nowrap><b>{$currency_sign}{$perioddebit}</b></td>
 <td align=right nowrap><b>{$currency_sign}{$periodbalance}</b></td>
</tr>
{/if}
<tr>
 <td>Total:</td>
 <td align=right nowrap><b>{$currency_sign}{$allcredit}</b></td>
 <td align=right nowrap><b>{$currency_sign}{$alldebit}</b></td>
 <td align=right nowrap><b>{$currency_sign}{$allbalance}</b></td>
</tr>
</table>
</div>
{else}
<div class="table-responsive">
<table class="table">
    <thead>
<tr>
 <th><b>Type</b></th>
 <th><b>Amount</b></th>
 <th><b>Date</b></th>
</tr>
</thead>
{if $qtrans > 0}
{section name=trans loop=$trans}
<tr>
 <td><b>{$trans[trans].transtype}</b></td>
 <td ><b>{$currency_sign} {$trans[trans].actual_amount}</b> <img src="images/{$trans[trans].ec}.gif" align=absmiddle hspace=1 height=17></td>
 <td><b><small>{$trans[trans].d}</small></b></td>
</tr>
<tr>
 <td class=gray><small>{$trans[trans].description}</small></td>
</tr>
{/section}
{else}
<tr>
 <td colspan=3 align=center><div class="alert alert-warning m-b-lg" role="alert">
                                No transactions found
                            </div></td>
</tr>
{/if}


{if $qtrans > 0}
<tr>
    <td colspan=2>For this period:</td>
 <td align=right><b>{$currency_sign} {$periodsum}</b></td>
</tr>
{/if}
<tr>
    <td colspan=2>Total:</td>
 <td align=right><b>{$currency_sign} {$allsum}</b></td>
</tr>
</table>
</div>
{/if}

{if $colpages > 1}
<center>
{if $prev_page > 0}
 <a href="javascript:go('{$prev_page}')">&lt;&lt;</a>
{/if}
{section name=p loop=$pages}
{if $pages[p].current == 1}
{$pages[p].page}
{else}
 <a href="javascript:go('{$pages[p].page}')">{$pages[p].page}</a>
{/if}
{/section}
{if $next_page > 0}
 <a href="javascript:go('{$next_page}')">&gt;&gt;</a>
{/if}
</center>
{/if}
</div></div></div>
{include file="mfooter.tpl"}
