{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{
  
  font-weight: bold;
  text-align: center;
}
</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="clientId" value="{$clientId}">
<h1 align="center"><font size="5px">Client List</font>&nbsp;&nbsp;<a href="clientprint.php?partyId={$partyId}" target="_blank" style="text-decoration:none;"><font size="3px">Print</font></a></h1>
<table align="center" width="100%">
	<tr>
	<td colspan="8">Client Name
	  <select name="partyId" onchange="this.form.submit();">
		 <option value="0">Select Party</option>
		{html_options values=$clientArray.partyId output=$clientArray.partyName selected=$partyId}
	  </select>
	</td>
	</tr>
</table>
<table id="example" class="cell-border" cellspacing="0" width="100%" border="1">
  <tr>
    <td>Edit</td>
    <td>Particular</td>
    <td>Date</td>
    <td>Rate</td>
    <td>Diff</td>
    <td>Diff Amount</td>
    <td>Total</td>
    <td>K.G.</td>
    <td>Total Amount</td>
    <td>Javak Date</td>
    <td>Javak Fine</td>
    <td>Javak Amount</td>
    <td>Aavak Date</td>
    <td>Aavak Fine</td>
    <td>Aavak Amount</td>
  </tr>
  {foreach from=$clientDetail item=onerow}
   <input type="hidden" name="clientId" value="{$onerow.clientId}">
     <td><a href="client.php?clientId={$onerow.clientId}"><img src="img/edit.png"></a></td>
     <td>{$onerow.particular}</td>
     <td>{$onerow.cDate}</td>
     <td>{$onerow.rate}</td>
     <td>{$onerow.diff}</td>
     <td>{$onerow.diffAmt}</td>
     <td>{$onerow.total}</td>
     <td>{$onerow.kg}</td>
     <td>{$onerow.totalAmt}</td>
     <td>{$onerow.javkDate}</td>
     <td>{$onerow.javkFine}</td>
     <td>{$onerow.javakAmt}</td>
     <td>{$onerow.avakDate}</td>
     <td>{$onerow.avakFine}</td>
     <td>{$onerow.avakAmt}</td>
  </tr>
  {/foreach}
</table>
<br>
<table align="center" border="" cellspacing="5" cellpadding="5"> 
  <tr>
    <td>Total Kg : </td>
	{if $finalKg > 0}
		<td style="color:green;">{$finalKg}</td>
	{else}
		<td style="color:red;">{$finalKg}</td>
	{/if}
  </tr>
  <tr>
    <td>Total Amount : </td>
	{if $finalAmount > 0}
		<td style="color:green;">{$finalAmount}</td>
	{else}
		<td style="color:red;">{$finalAmount}</td>
	{/if}
  </tr>
</table>
</form>
{/block}