.{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;
	}
}

$(function() {
	$(".saudaId").click(function() {
	if ($(this).is(":checked")) 
	{
		 var dataString = "saudaId=" +$(this).val();
			$.ajax({
			type: "POST",
			url: "updateStatusCheckedmcx.php",
			data: dataString,
			success:function(data)
			{}
		});
	}
	else
	{
		var dataString = "saudaId=" +$(this).val();
			$.ajax({
			type: "POST",
			url: "updateStatusUnCheckedmcx.php",
			data: dataString,
			success:function(data)
			{
			  
			}
		});
	}
  });
});
</script>
<style>
td{
   font-size: 90%;
   vertical-align: text-top;
}	
a
{
  text-decoration:none;
}
</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">Pending Sauda List <a href="pendingprint_new.php"><font size="3px">Print</font></a></font></h1>
<table cellspacing="0" border="" width="90%" align="center">
  <tr>
    <td>
	  <table cellspacing="14">
	    <tr><td colspan="5" align="center">Buy</td></tr>
	    <tr>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <!-- <td valign="top">Type</td> -->
		  <td valign="top">Party Name</td>
		  <td valign="top">Branch</td>
		  <td valign="top">Date</td>
		  <td valign="top">Particular</td>
		  <td valign="top">Cash Type</td>
		  <td valign="top">Rate</td>
		  <td valign="top">Fine</td>
		  <td valign="top">Amount</td>
			
		</tr>
		  {section name="sec" loop=$rojmelArray}
		  <tr style="color:green;">
			 <td><a href="saudadelete.php?saudaId={$rojmelArray[sec].saudaId}" onclick="return confirm('DO You Want To Delete !!!!!')";><img src="img/delete.png"></a></td>
			 <td><a href="sauda.php?saudaId={$rojmelArray[sec].saudaId}"><img src="img/edit.png"></a></td>
			 <!-- {if $rojmelArray[sec].acc_type == 'D'} -->
				<!-- <td>Direct</td> -->
			  <!-- {else} -->
				<!-- <td>Khata</td> -->
			  <!-- {/if} -->
			 <td nowrap>{$rojmelArray[sec].partyName}</td>
			 <td nowrap>{$rojmelArray[sec].branch}</td>
			 <td nowrap>{$rojmelArray[sec].saudaDate}</td>
			 <td nowrap>{$rojmelArray[sec].particular}</td>
			 {if $rojmelArray[sec].cash_type == 'R'}
			 <td nowrap>RTGS</td>
			 {else}
			 <td nowrap>Cash</td>
			 {/if}
			 <td nowrap>{$rojmelArray[sec].rate}</td>
			 <td nowrap>{$rojmelArray[sec].fine|number_format:3}</td>
			 <td nowrap>{$rojmelArray[sec].amount|number_format:2}</td>
			 {if $rojmelArray[sec].mcxcheckStatus == 1}
			 <td><input type="checkbox" value="{$rojmelArray[sec].saudaId}" class="saudaId" checked></td>
			 {else}
			 <td><input type="checkbox" value="{$rojmelArray[sec].saudaId}" class="saudaId"></td>
			 {/if}
		  {/section}
	  </table>
		<td align="center">Sell
		  <table align="center" cellspacing="10">
			<tr>
			  <td>&nbsp;</td>
		      <td>&nbsp;</td>
			  <!-- <td>Type</td> -->
			  <td>Party Name</td>
			  <td>Branch</td>
			  <td>Date</td>
			  <td>Particular</td>
			  <td valign="top">Cash Type</td>
			  <td valign="top">Rate</td>
			  <td>Fine</td>
			  <td>Amount</td>
			</tr>
			  {section name="sec1" loop=$javakArray}
			   <tr style="color:red;">
			     <td><a href="saudadelete.php?saudaId={$javakArray[sec1].saudaId}" onclick="return confirm('DO You Want To Delete !!!!!')";><img src="img/delete.png"></a></td>
			     <td><a href="sauda.php?saudaId={$javakArray[sec1].saudaId}"><img src="img/edit.png"></a></td>
				 <!-- {if $javakArray[sec1].acc_type == 'D'} -->
					<!-- <td>Direct</td> -->
				  <!-- {else} -->
					<!-- <td>Khata</td> -->
				  <!-- {/if} -->
				 <td nowrap>{$javakArray[sec1].partyName}</td>
				 <td nowrap>{$javakArray[sec1].branch}</td>
				 <td nowrap>{$javakArray[sec1].saudaDate}</td>
				 <td nowrap>{$javakArray[sec1].particular}</td>
				 {if $javakArray[sec1].cash_type == 'R'}
				 <td nowrap>RTGS</td>
				 {else}
				 <td nowrap>Cash</td>
				{/if}
				 <td nowrap>{$javakArray[sec1].rate}</td>
				 <td nowrap>{$javakArray[sec1].fine|number_format:3}</td>
				 <td nowrap>{$javakArray[sec1].amount|string_format:"%.0f"}</td>
				 {if $javakArray[sec1].mcxcheckStatus == 1}
				 <td><input type="checkbox" value="{$javakArray[sec1].saudaId}" class="saudaId" checked></td>
				 {else}
				 <td><input type="checkbox" value="{$javakArray[sec1].saudaId}" class="saudaId"></td>
				 {/if}
			  </tr>
			  {/section}
		   </table>
		</td>
</table>
<br><br><br>
<table cellspacing="0" border="" width="90%" align="center">
  <tr>
    <td>
	  <table cellspacing="14">
	    <tr><td colspan="5" align="center">Buy</td></tr>
	    <tr>
		  <td>&nbsp;</td>
		  <td>&nbsp;</td>
		  <!-- <td valign="top">Type</td> -->
		  <td valign="top">Party Name</td>
		  <td valign="top">Branch</td>
		  <td valign="top">Date</td>
		  <td valign="top">Particular</td>
		  <td valign="top">Cash Type</td>
		  <td valign="top">Rate</td>
		  <td valign="top">Fine</td>
		  <td valign="top">Amount</td>
			
		</tr>
		  {section name="sec" loop=$rojmelArray1}
		  <tr style="color:green;">
			 <td><a href="saudadelete.php?saudaId={$rojmelArray1[sec].saudaId}" onclick="return confirm('DO You Want To Delete !!!!!')";><img src="img/delete.png"></a></td>
			 <td><a href="sauda.php?saudaId={$rojmelArray1[sec].saudaId}"><img src="img/edit.png"></a></td>
			 <!-- {if $rojmelArray[sec].acc_type == 'D'} -->
				<!-- <td>Direct</td> -->
			  <!-- {else} -->
				<!-- <td>Khata</td> -->
			  <!-- {/if} -->
			 <td nowrap>{$rojmelArray1[sec].partyName}</td>
			 <td nowrap>{$rojmelArray1[sec].branch}</td>
			 <td nowrap>{$rojmelArray1[sec].saudaDate}</td>
			 <td nowrap>{$rojmelArray1[sec].particular}</td>
			 {if $rojmelArray1[sec].cash_type == 'R'}
			 <td nowrap>RTGS</td>
			 {else}
			 <td nowrap>Cash</td>
			 {/if}
			 <td nowrap>{$rojmelArray1[sec].rate}</td>
			 <td nowrap>{$rojmelArray1[sec].fine|number_format:3}</td>
			 <td nowrap>{$rojmelArray1[sec].amount|number_format:2}</td>
			 {if $rojmelArray1[sec].mcxcheckStatus == 1}
			 <td><input type="checkbox" value="{$rojmelArray1[sec].saudaId}" class="saudaId" checked></td>
			 {else}
			 <td><input type="checkbox" value="{$rojmelArray1[sec].saudaId}" class="saudaId"></td>
			 {/if}
		  {/section}
	  </table>
		<td align="center">Sell
		  <table align="center" cellspacing="10">
			<tr>
			  <td>&nbsp;</td>
		      <td>&nbsp;</td>
			  <!-- <td>Type</td> -->
			  <td>Party Name</td>
			  <td>Branch</td>
			  <td>Date</td>
			  <td>Particular</td>
			  <td valign="top">Cash Type</td>
			  <td valign="top">Rate</td>
			  <td>Fine</td>
			  <td>Amount</td>
			</tr>
			  {section name="sec1" loop=$javakArray1}
			   <tr style="color:red;">
			     <td><a href="saudadelete.php?saudaId={$javakArray1[sec1].saudaId}" onclick="return confirm('DO You Want To Delete !!!!!')";><img src="img/delete.png"></a></td>
			     <td><a href="sauda.php?saudaId={$javakArray1[sec1].saudaId}"><img src="img/edit.png"></a></td>
				 <!-- {if $javakArray[sec1].acc_type == 'D'} -->
					<!-- <td>Direct</td> -->
				  <!-- {else} -->
					<!-- <td>Khata</td> -->
				  <!-- {/if} -->
				 <td nowrap>{$javakArray1[sec1].partyName}</td>
				 <td nowrap>{$javakArray1[sec1].branch}</td>
				 <td nowrap>{$javakArray1[sec1].saudaDate}</td>
				 <td nowrap>{$javakArray1[sec1].particular}</td>
				 {if $javakArray1[sec1].cash_type == 'R'}
				 <td nowrap>RTGS</td>
				 {else}
				 <td nowrap>Cash</td>
				{/if}
				 <td nowrap>{$javakArray1[sec1].rate}</td>
				 <td nowrap>{$javakArray1[sec1].fine|number_format:3}</td>
				 <td nowrap>{$javakArray1[sec1].amount|string_format:"%.0f"}</td>
				 {if $javakArray1[sec1].mcxcheckStatus == 1}
				 <td><input type="checkbox" value="{$javakArray1[sec1].saudaId}" class="saudaId" checked></td>
				 {else}
				 <td><input type="checkbox" value="{$javakArray1[sec1].saudaId}" class="saudaId"></td>
				 {/if}
			  </tr>
			  {/section}
		   </table>
		</td>
</table>
<table cellspacing="0" width="90%" align="center">
<tr>
  <td>Rtgs Fine : {$rtgsfine|string_format:"%.3f"} &nbsp; &nbsp; &nbsp; &nbsp; Rtgs Amount : {$rtgsAmt|string_format:"%.0f"}</td>
</tr>	
<tr>
  <td>Cash Fine : {$Cashfine|string_format:"%.3f"} &nbsp; &nbsp; &nbsp; &nbsp;  Cash Amount : {$CashAmt|string_format:"%.0f"}</td>
</tr> 
<tr>
  <td>Fine : {$netFine|string_format:"%.3f"}</td>
</tr>
<tr>
<td>Amount : {$netAmount|string_format:"%.0f"}</td>
</tr>
</table>
{/block}