<?php
/* Smarty version 3.1.30, created on 2021-07-13 09:17:27
  from "/home/patelin/vedantrey.in/templates/mcx.tpl" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_60ed0ccff32793_53038933',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '8044137fcb94323f004acc0f8142968745e6a00a' => 
    array (
      0 => '/home/patelin/vedantrey.in/templates/mcx.tpl',
      1 => 1622311087,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:./main.tpl' => 1,
  ),
),false)) {
function content_60ed0ccff32793_53038933 (Smarty_Internal_Template $_smarty_tpl) {
if (!is_callable('smarty_function_html_options')) require_once '/home/patelin/vedantrey.in/include/smarty/libs/plugins/function.html_options.php';
if (!is_callable('smarty_function_html_select_date')) require_once '/home/patelin/vedantrey.in/include/smarty/libs/plugins/function.html_select_date.php';
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_83236760160ed0ccfe64f85_94333876', 'head');
?>

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_75958185360ed0ccff27ae1_18003472', 'body');
$_smarty_tpl->inheritance->endChild();
$_smarty_tpl->_subTemplateRender("file:./main.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 2, false);
}
/* {block 'head'} */
class Block_83236760160ed0ccfe64f85_94333876 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<?php echo '<script'; ?>
 type="text/javascript">
function myFunction()
{
	if(confirm("Are You Sure To Delete")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function getAmount()
{
	var finalAmt = $('.finalAmt').val() ? $('.finalAmt').val() : 0;
	var brokrage = $('.brokrage').val() ? $('.brokrage').val() : 0;
	var TotAmt   = $('.TotAmt').val() ? $('.TotAmt').val() : 0;
	
	if(finalAmt < 0)
	{
	  grossAmt = Math.abs(finalAmt);
	  TotAmt  = (parseFloat(grossAmt) + parseFloat(brokrage));
	  $('.TotAmt').val(TotAmt.toFixed(0));
	}
	else
	{
	  grossAmt = Math.abs(finalAmt);
	  TotAmt  = (parseFloat(grossAmt) - parseFloat(brokrage));
	  $('.TotAmt').val(TotAmt.toFixed(0));
	}
}
<?php echo '</script'; ?>
>
<style>
td{
  text-align: center;
  font-weight: bold;
}
.td{
 border: none;
  
}
</style>
<?php
}
}
/* {/block 'head'} */
/* {block 'body'} */
class Block_75958185360ed0ccff27ae1_18003472 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<form name="partyForm"action="<?php echo $_SERVER['PHP_SELF'];?>
" method="POST">
<h1 align="center"><font size="5px">Mcx List</font></h1>
<table align="center" width="70%">
	<tr>
		<td>
			<select name="partyId">
				<option value="">Select Name</option>
				<?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['clientArray']->value['partyId'],'output'=>$_smarty_tpl->tpl_vars['clientArray']->value['partyName'],'selected'=>$_smarty_tpl->tpl_vars['partyId']->value),$_smarty_tpl);?>

			</select>
		</td>
		<td>From</td>
			<td><?php echo smarty_function_html_select_date(array('prefix'=>"to",'start_year'=>"-3",'end_year'=>"+1",'field_order'=>"DMY",'day_value_format'=>"%02d"),$_smarty_tpl);?>
</td>
		<td>To</td>
			<td><?php echo smarty_function_html_select_date(array('prefix'=>"from",'start_year'=>"-3",'end_year'=>"+1",'field_order'=>"DMY",'day_value_format'=>"%02d"),$_smarty_tpl);?>
</td>
		<td><input type="submit" name="submit" value="Submit"></td>
	</tr>
</h1>
<table cellpadding="3" cellspacing="0" border="" align="center" width=95<?php echo '%>';?>
  <tr>
 
	<td align="center">
		<table cellspacing="10">
			<tr><td colspan="7" align="center">Buy</td></tr>
			<tr>
				<td>Edit</td>
				<td>Delete</td>
				<td>Party Name</td>
				<td>Date</td>
				<td>Rate</td>
				<td>K.G.</td>
				<td>Total Amount</td>
			</tr>
  
		  <?php
$__section_sec1_0_saved = isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1'] : false;
$__section_sec1_0_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['javakDetail']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_sec1_0_total = $__section_sec1_0_loop;
$_smarty_tpl->tpl_vars['__smarty_section_sec1'] = new Smarty_Variable(array());
if ($__section_sec1_0_total != 0) {
for ($__section_sec1_0_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] = 0; $__section_sec1_0_iteration <= $__section_sec1_0_total; $__section_sec1_0_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']++){
?>
		   <tr style="color:Green;">
			<td><a href="mcxentry.php?mcxId=<?php echo $_smarty_tpl->tpl_vars['javakDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] : null)]['mcxId'];?>
"><img src="img/edit.png"></a></td>
			<td><a href="mcxdelete.php?mcxId=<?php echo $_smarty_tpl->tpl_vars['javakDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] : null)]['mcxId'];?>
" onclick="return confirm('DO You Want To Delete !!!!!')";><img src="img/delete.png"></a></td>
			 <td><?php echo $_smarty_tpl->tpl_vars['javakDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] : null)]['partyName'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['javakDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] : null)]['transDate'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['javakDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] : null)]['rate'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['javakDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] : null)]['kg'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['javakDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec1']->value['index'] : null)]['a'];?>
</td>
		  </tr>
		  <?php
}
}
if ($__section_sec1_0_saved) {
$_smarty_tpl->tpl_vars['__smarty_section_sec1'] = $__section_sec1_0_saved;
}
?>
		</table>
	</td>
	<td>
		<table cellspacing="10">
			<tr><td colspan="7" align="center">Sell</td></tr>
			<tr>
				<td>Edit</td>
				<td>Delete</td>
				<td>Party Name</td>
				<td>Date</td>
				<td>Rate</td>
				<td>K.G.</td>
				<td>Total Amount</td>
			</tr>
  
		  <?php
$__section_sec_1_saved = isset($_smarty_tpl->tpl_vars['__smarty_section_sec']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec'] : false;
$__section_sec_1_loop = (is_array(@$_loop=$_smarty_tpl->tpl_vars['clientDetail']->value) ? count($_loop) : max(0, (int) $_loop));
$__section_sec_1_total = $__section_sec_1_loop;
$_smarty_tpl->tpl_vars['__smarty_section_sec'] = new Smarty_Variable(array());
if ($__section_sec_1_total != 0) {
for ($__section_sec_1_iteration = 1, $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] = 0; $__section_sec_1_iteration <= $__section_sec_1_total; $__section_sec_1_iteration++, $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']++){
?>
		   <tr style="color:red;">
		   <td><a href="mcxentry.php?mcxId=<?php echo $_smarty_tpl->tpl_vars['clientDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] : null)]['mcxId'];?>
"><img src="img/edit.png"></a></td>
		   <td><a href="mcxdelete.php?mcxId=<?php echo $_smarty_tpl->tpl_vars['clientDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] : null)]['mcxId'];?>
" onclick="return confirm('DO You Want To Delete !!!!!')";><img src="img/delete.png"></a></td>
			 <td><?php echo $_smarty_tpl->tpl_vars['clientDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] : null)]['partyName'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['clientDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] : null)]['transDate'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['clientDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] : null)]['rate'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['clientDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] : null)]['kg'];?>
</td>
			 <td><?php echo $_smarty_tpl->tpl_vars['clientDetail']->value[(isset($_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_sec']->value['index'] : null)]['a'];?>
</td>
		  </tr>
		  <?php
}
}
if ($__section_sec_1_saved) {
$_smarty_tpl->tpl_vars['__smarty_section_sec'] = $__section_sec_1_saved;
}
?>
		</table>
	</td>
</table>
	<br/>
	<table cellspacing="14" align="center" border="1">
		<tr>
		 <!-- <?php if ($_smarty_tpl->tpl_vars['totalAmt']->value > 0) {?> -->
			<!-- <td style="color:green;"><?php echo $_smarty_tpl->tpl_vars['finalRasAmt']->value;?>
</td> -->
		<!-- <?php } else { ?> -->
			<!-- <td style="color:red;"><?php echo $_smarty_tpl->tpl_vars['finalRasAmt']->value;?>
</td> -->
		<!-- <?php }?>  -->
			<td class="td">Total Kg : </td>
			<td class="td"><?php echo $_smarty_tpl->tpl_vars['finalKg']->value;?>
</td>
		</tr> 
		<tr> 
			<td class="td">Total Amount : </td>
			<td class="td"><?php echo $_smarty_tpl->tpl_vars['finalAmt']->value;?>
</td>
		</tr>
	</table>
	<br/>
	<table align="center" width="70">
		<tr> 
			<td>Kg </td>
			<td><input type="text" value="<?php echo $_smarty_tpl->tpl_vars['mcxKg']->value;?>
" class="mcxKg"></td>
			<td>Amount </td>
			<td><input type="text" value="<?php echo $_smarty_tpl->tpl_vars['finalAmt']->value;?>
" class="finalAmt" onkeyup="getAmount();"> </td>
			<td>Brokrage </td>
			<td><input type="text" class="brokrage" onkeyup="getAmount();"></td>
			<td>Total Amount </td>
			<td><input type="text" class="TotAmt"></td>
		</tr>
	</table>
</form>
<?php
}
}
/* {/block 'body'} */
}
