{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">Sauda List <a href="saudaprint_new.php?from={$from}&&to={$to}"><font size="3px">Print</font></a></font></h1>

<table cellpadding="3" cellspacing="0" border="" align="center" width=70%>
	<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 class="main">
	  <input type="submit" name="submit" value="Submit">
	</td>
  </tr>
  </table>
<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">Date</td>
		  <td valign="top">Branch</td>
		  <td valign="top">Metal Type</td>
		  <td valign="top">Particular</td>
		  <td valign="top">Sauda Type</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].saudaDate}</td>
			 <td nowrap>{$rojmelArray[sec].branch}</td>
			 <td nowrap>{$rojmelArray[sec].metal_type}</td>
			 <td nowrap>{$rojmelArray[sec].particular}</td>
			 {if $rojmelArray[sec].acc_type == 'D'}
			  <td nowrap>Direct</td>
			 {else}
			 <td nowrap>Khata</td>
			{/if}
			 {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}</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>Date</td>
			  <td>Branch</td>
			  <td>Metal Type</td>
			  <td>Particular</td>
			  <td valign="top">Sauda Type</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].saudaDate}</td>
				 <td nowrap>{$javakArray[sec1].branch}</td>
				 <td nowrap>{$javakArray[sec1].metal_type}</td>
				 <td nowrap>{$javakArray[sec1].particular}</td>
				 {if $javakArray[sec1].acc_type == 'D'}
				 <td nowrap>Direct</td>
				 {else}
				 <td nowrap>Khata</td>
				{/if}
				 {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}</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>
<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">Date</td>
		  <td valign="top">Branch</td>
		  <td valign="top">Metal Type</td>
		  <td valign="top">Particular</td>
		  <td valign="top">Sauda Type</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].saudaDate}</td>
			 <td nowrap>{$rojmelArray1[sec].branch}</td>
			 <td nowrap>{$rojmelArray1[sec].metal_type}</td>
			 <td nowrap>{$rojmelArray1[sec].particular}</td>
			 {if $rojmelArray1[sec].acc_type == 'D'}
			  <td nowrap>Direct</td>
			 {else}
			 <td nowrap>Khata</td>
			{/if}
			 {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}</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>Date</td>
			  <td>Branch</td>
			  <td valign="top">Metal Type</td>
			  <td>Particular</td>
			  <td valign="top">Sauda Type</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].saudaDate}</td>
				 <td nowrap>{$javakArray1[sec1].branch}</td>
				 <td nowrap>{$javakArray1[sec1].metal_type}</td>
				 <td nowrap>{$javakArray1[sec1].particular}</td>
				 {if $javakArray1[sec1].acc_type == 'D'}
				 <td nowrap>Direct</td>
				 {else}
				 <td nowrap>Khata</td>
				{/if}
				 {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}</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>
			<table cellspacing="0" width="90%" align="left">
				<tr><td><b>Today</b></td></tr>	
				<tr>
					<td>Branch 0 : Fine : {$rtgsfine|number_format:3} &nbsp; &nbsp; &nbsp; &nbsp; Amount : {$rtgsAmt}</td>
				</tr>	
				<tr>
				  <td>Branch 1 :  Fine : {$Cashfine|number_format:3} &nbsp; &nbsp; &nbsp; &nbsp;   Amount : {$CashAmt}</td>
				</tr> 
				<tr>
				  <td>Fine : {$todayFine|number_format:3}</td>
				</tr>
				<tr>
					<td>Amount : {$todayAmt}</td>
				</tr>
			</table>
		</td>
		<!-- <td> -->
			<!-- <table cellspacing="0" width="90%" align="right"> -->
				<!-- <tr><td><b>All</b></td></tr>	 -->
				<!-- <tr> -->
					<!-- <td>Rtgs Fine : {$rtgsfine|number_format:3} &nbsp; &nbsp; &nbsp; &nbsp; Rtgs Amount : {$rtgsAmt}</td> -->
				<!-- </tr>	 -->
				<!-- <tr> -->
				  <!-- <td>Cash Fine : {$Cashfine|number_format:3} &nbsp; &nbsp; &nbsp; &nbsp;  Cash Amount : {$CashAmt}</td> -->
				<!-- </tr>  -->
				<!-- <tr> -->
				  <!-- <td>Fine : {$netFine|number_format:3}</td> -->
				<!-- </tr> -->
				<!-- <tr> -->
					<!-- <td>Amount : {$netAmount}</td> -->
				<!-- </tr> -->
			<!-- </table> -->
		<!-- </td> -->
	</tr>
</table>
		
	
{/block}