{extends file="./main.tpl"}
{block name=head}
<script type="text/javascript">
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">
<input type="hidden" name="partyId" value="{$partyId}">
<h1 align="center"><font size="5px">Client List</font>
<table cellpadding="3" cellspacing="0"  align="center" width=90%>
   <tr>
    <td class="main">To
	  {html_select_date prefix="toDt" start_year="-1" end_year="+0"  day_value_format="%02d" field_order="DMY"}
	</td>
	<td class="main">From
	  {html_select_date prefix="fromDt" start_year="-1" end_year="+0"  day_value_format="%02d" field_order="DMY"}
	</td> 
    <td colspan="9">Client Name
	  <select name="partyId" onchange="this.form.submit();" autofocus>
	     <option value="">Select Party</option>
	    {html_options values=$clientArray.partyId output=$clientArray.partyName selected=$partyId}
	  </select>
	</td>
	<td class="main">
	  <input type="submit" name="submit" value="Submit">
	</td>
  </tr>
</table>
<table cellspacing="0"  width="100%" border="1">
  <tr>
    <td>Delete</td>
    <td>Edit</td>
    <td>Type</td>
    <td>Particular</td>
    <td>Date</td>
    <td>Rate</td>
    <td>Total</td>
    <td>K.G.</td>
    <td>Total Amount</td>
  </tr>
  {section name="sec" loop=$clientDetail}
     <td><a href="clientdelete.php?clientId={$clientDetail[sec].clientId}" onclick="return confirm('DO You Want To Delete !!!!!')";><img src="img/delete.png"></a></td>
     <td><a href="client.php?clientId={$clientDetail[sec].clientId}"><img src="img/edit.png"></a></td>
	 {if $clientDetail[sec].cliTransType == 'J'}
	   <td> Javak </td>
	 {else}
	   <td> Aavak </td>
	 {/if}
     <td>{$clientDetail[sec].particular}</td>
     <td>{$clientDetail[sec].cDate}</td>
     <td>{$clientDetail[sec].rate}</td>
     <td>{$clientDetail[sec].total}</td>
     <td>{$clientDetail[sec].kg}</td>
     <td>{$clientDetail[sec].totalAmt}</td>
  </tr>
  {/section}
</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; 	{$finalAmount}</td>
	{else}
	  <td colspan="3" align="right" style="color:green;">Final Amount : &nbsp;&nbsp; 	{$finalAmount}</td>
	{/if}
  </tr>
</table>
</form>
{/block}	