<?php
/* Smarty version 3.1.30, created on 2024-03-02 16:38:24
  from "/home/hgsonsc1/raajaram.co.in/templates/vepari_new.tpl" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_65e308a8a46f80_81885913',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'c4534010b02f74804f62059cc9b08c8d9a6134d6' => 
    array (
      0 => '/home/hgsonsc1/raajaram.co.in/templates/vepari_new.tpl',
      1 => 1706808900,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:./main.tpl' => 1,
  ),
),false)) {
function content_65e308a8a46f80_81885913 (Smarty_Internal_Template $_smarty_tpl) {
if (!is_callable('smarty_function_html_select_date')) require_once '/home/hgsonsc1/raajaram.co.in/include/smarty/libs/plugins/function.html_select_date.php';
if (!is_callable('smarty_function_html_options')) require_once '/home/hgsonsc1/raajaram.co.in/include/smarty/libs/plugins/function.html_options.php';
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>

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

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_204854884865e308a8a14c11_69096928', '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_146412360365e308a8967985_63100486 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 finalRate()
{
  var rate      = $('.rate').val() != '' ? $('.rate').val() : 0;
  var diff      = $('.diff').val() != '' ? $('.diff').val() : 0;
  var diffAmt   = $('.diffAmt').val() != '' ? $('.diffAmt').val() : 0;
  var tcs   	= $('.tcs').val() != '' ? $('.tcs').val() : 0;
  var kg        = $('.kg').val() != '' ? $('.kg').val() : 0;
  var gorssRate = 0;
  var grossAmt  = 0;
  var tcsper    = 0;
  var fianlAmt  = 0;
  
    //gorssRate = (parseFloat(rate) - parseFloat(diffAmt));
    grossAmt  = (parseFloat(rate) * parseFloat(kg));
	$('.grossAmt').val('-' + grossAmt.toFixed(2));
	//$('.total').val(rate.toFixed(2));
	//$('.totalAmt').val(totalAmt.toFixed(2));
	tcsper  = (parseFloat(grossAmt) * parseFloat(0.1) / 100);
	$('.tcs').val(tcsper.toFixed(2));
	
	fianlAmt  = (parseFloat(grossAmt) - parseFloat(tcsper));
	$('.totalAmt').val('-' + fianlAmt.toFixed(2));
	
	 
}
<?php echo '</script'; ?>
>
<style>
td{
  text-align: center;
  border: none;
}
</style>
<?php
}
}
/* {/block 'head'} */
/* {block 'body'} */
class Block_204854884865e308a8a14c11_69096928 extends Smarty_Internal_Block
{
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

<form name="partyForm"action="<?php echo $_SERVER['PHP_SELF'];?>
" method="POST">
<input type="hidden" name="vepariId" value="<?php echo $_smarty_tpl->tpl_vars['vepariId']->value;?>
">
<h1 align="center"><font size="5px">Vepari Entry</font></h1>
<table cellpadding="3" cellspacing="0" border="" align="center" width=50<?php echo '%>';?>
   <tr>
   <td>Date
		<?php echo smarty_function_html_select_date(array('prefix'=>"cdt",'start_year'=>"-1",'end_year'=>"+0",'day_value_format'=>"%02d",'field_order'=>"DMY",'time'=>$_smarty_tpl->tpl_vars['vDate']->value),$_smarty_tpl);?>

	</td>
    <td>Vepari Name
	  <select name="partyId" required autofocus>
	     <option value="">Select Party</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>
</table>
<br>
<table cellpadding="3" cellspacing="0" border="" align="center" width=30<?php echo '%>';?>
	<!-- <tr> -->
		<!-- <td>Type</td> -->
		<!-- <td> -->
		  <!-- <select name="sell_type" required> -->
			 <!-- <option value="">Select Type</option> -->
			<!-- <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['sellTypeValue']->value,'output'=>$_smarty_tpl->tpl_vars['sellTypOutput']->value,'selected'=>$_smarty_tpl->tpl_vars['sell_type']->value),$_smarty_tpl);?>
 -->
		  <!-- </select> -->
		<!-- </td> -->
	<!-- </tr> -->
	<tr>
		<td>Transaction Type</td>
		<td>
		  <select name="veTransType" required>
			 <option value="">Transaction Type</option>
			<?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['typeArrayValue']->value,'output'=>$_smarty_tpl->tpl_vars['typeArrayOutput']->value,'selected'=>$_smarty_tpl->tpl_vars['veTransType']->value),$_smarty_tpl);?>

		  </select>
		</td>
	</tr>
	<tr>
		<td>Particular</td>
		<td><input type="text" name="particular" value="<?php echo $_smarty_tpl->tpl_vars['particular']->value;?>
"></td>
	</tr>
	<tr>
		<td>Rate</td>
		<td><input type="text" name="rate" class="rate" onkeyup="finalRate();" onblur="finalRate();" value="<?php echo $_smarty_tpl->tpl_vars['rate']->value;?>
" size="8" required></td>
	</tr>
	<tr>
		<td>K.G.</td>
		<td><input type="text" name="kg" class="kg" onkeyup="finalRate();" onblur="finalRate();" value="<?php echo $_smarty_tpl->tpl_vars['kg']->value;?>
" size="4" required></td>
	</tr>
	<tr>
		<td>Amount</td>
		<td><input type="text" name="grossAmt" class="grossAmt" size="8" value="<?php echo $_smarty_tpl->tpl_vars['grossAmt']->value;?>
"></td>
	</tr>
	<tr>
		<td>Tcs 0.1%</td>
		<td><input type="text" name="tcs" class="tcs" size="8" value="<?php echo $_smarty_tpl->tpl_vars['tcs']->value;?>
" onkeyup="finalRate();" onblur="finalRate();"></td>
	</tr>
	<tr>
		<td>Total Amount</td>
		<td><input type="text" name="totalAmt" class="totalAmt" size="8" value="<?php echo $_smarty_tpl->tpl_vars['totalAmt']->value;?>
"></td>
	</tr>
  <tr>
  	<td colspan="7" align="center"><input type="submit" value="Submit" name="submit" class="btn"></td>
  </tr>
</table>
</form>
<?php
}
}
/* {/block 'body'} */
}
