{extends file="./main.tpl"}
{block name=head}
<script type="text/javascript">
$(document).ready(function() {
	$('#example').dataTable();
});
function myFunction()
{
	if(confirm("Are You Sure To Delete")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
<style>
td{
  text-align: center;
  font-weight: bold;
  
}
</style>
{/block}
{block name=body}
<form name="partyForm"action="{$smarty.server.PHP_SELF}" method="POST" onsubmit="return confirm('DO You Want To Submit !!!!!')";>
<input type="hidden" name="partyId" value="{$partyId}">
<h1 align="center"><font size="5px">Vepari List</font>&nbsp;&nbsp;<a href="vepariprint.php?partyId={$partyId}" target="_blank" style="text-decoration:none;"><font size="3px;">Print</font></a></h1>
<table cellpadding="3" cellspacing="0"  align="center" width=90%>
   <tr>
    <td colspan="9">Vepari Name
	  <select name="partyId" onchange="this.form.submit();">
	     <option value="">Select Party</option>
	    {html_options values=$clientArray.partyId output=$clientArray.partyName selected=$partyId}
	  </select>
	</td>
  </tr>
</table>
<table id="example" class="display" cellspacing="0"  width="100%">
<thead>
  <tr>
    <td>Edit</td>
    <td>Particular</td>
    <td>Date</td>
    <td>Rate</td>
    <td>Diff</td>
    <td>Diff Amount</td>
    <td>Total</td>
    <td>Tax</td>
    <td>K.G.</td>
    <td>Total Amount</td>
  </tr>
</thead>
<tbody>
  {section name="sec" loop=$vepariDetail}
  {if $vepariDetail[sec].veTransType == 'A'}
   <tr style="color:green;">
     <td><a href="vepari.php?vepariId={$vepariDetail[sec].vepariId}"><img src="img/edit.png"></a></td>
     <td>{$vepariDetail[sec].vParti}</td>
     <td>{$vepariDetail[sec].vDate}</td>
     <td>{$vepariDetail[sec].vRate}</td>
     <td>{$vepariDetail[sec].vDiff}</td>
     <td>{$vepariDetail[sec].vDiffAmt}</td>
     <td>{$vepariDetail[sec].vTotal}</td>
     <td>{$vepariDetail[sec].vTax}</td>
     <td>{$vepariDetail[sec].vkg}</td>
     <td>{$vepariDetail[sec].vTotalAmt}</td>
  </tr>
  {else}
     <tr style="color:red;">
	 <td><a href="vepari.php?vepariId={$vepariDetail[sec].vepariId}"><img src="img/edit.png"></a></td>
     <td>{$vepariDetail[sec].vParti}</td>
     <td>{$vepariDetail[sec].vDate}</td>
     <td>{$vepariDetail[sec].vRate}</td>
     <td>{$vepariDetail[sec].vDiff}</td>
     <td>{$vepariDetail[sec].vDiffAmt}</td>
     <td>{$vepariDetail[sec].vTotal}</td>
     <td>{$vepariDetail[sec].vTax}</td>
     <td>{$vepariDetail[sec].vkg}</td>
     <td>{$vepariDetail[sec].vTotalAmt}</td>
  </tr>
  {/if}
  {/section}
</tbody>
</table>
<br>
<table align="center" border="">
<tr>
	{if $finalkg < 0}
      <td colspan="3" align="right" style="color:red;">Final Kg : &nbsp;&nbsp; 	{$finalkg}</td>
	{else}
	  <td colspan="3" align="right" style="color:green;">Final Kg : &nbsp;&nbsp; {$finalkg}</td>
	{/if}
</tr>
<tr>
   
	{if $finalkg < 0}
      <td colspan="3" align="right" style="color:red;">Final Amount : &nbsp;&nbsp; 	{$finalAmt}</td>
	{else}
	  <td colspan="3" align="right" style="color:green;">Final Amount : &nbsp;&nbsp; 	{$finalAmt}</td>
	{/if}
  </tr>
</table>
</form>
{/block}