<?php
/* Smarty version 3.1.30, created on 2022-03-08 11:36:37
  from "/home/vithprat/jazzdot.info/templates/client.tpl" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_6226f26d2212c7_79033336',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'a14f72dbc3bd2b55fd4d62ce4717173723fd4341' => 
    array (
      0 => '/home/vithprat/jazzdot.info/templates/client.tpl',
      1 => 1595168177,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:./main.tpl' => 1,
  ),
),false)) {
function content_6226f26d2212c7_79033336 (Smarty_Internal_Template $_smarty_tpl) {
if (!is_callable('smarty_function_html_select_date')) require_once '/home/vithprat/jazzdot.info/include/smarty/libs/plugins/function.html_select_date.php';
if (!is_callable('smarty_function_html_options')) require_once '/home/vithprat/jazzdot.info/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_1924433436226f26d126152_50647417', 'head');
?>

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_6544488666226f26d217df3_61842956', '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_1924433436226f26d126152_50647417 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 kg        = $('.kg').val() != '' ? $('.kg').val() : 0;
  var gorssRate = 0;
  var totalAmt  = 0;
  var total     = 0;
 
  if(diff == '-')
  {
    gorssRate = (parseFloat(rate) - parseFloat(diffAmt));
    totalAmt  = (parseFloat(gorssRate) * parseFloat(kg));
	$('.total').val(gorssRate.toFixed(2));
	$('.totalAmt').val(totalAmt.toFixed(2));
	$('.totalAmt').val('-' + totalAmt.toFixed(2));
  }
  else
  {
    gorssRate = (parseFloat(rate) + parseFloat(diffAmt));
    totalAmt  = (parseFloat(gorssRate) * parseFloat(kg));
	$('.total').val(gorssRate.toFixed(2));
	$('.totalAmt').val('-' + totalAmt.toFixed(2));
  }
}
<?php echo '</script'; ?>
>
<style>
td{
  text-align: center;
  border: none;
}
</style>
<?php
}
}
/* {/block 'head'} */
/* {block 'body'} */
class Block_6544488666226f26d217df3_61842956 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="clientId" value="<?php echo $_smarty_tpl->tpl_vars['clientId']->value;?>
">
<h1 align="center"><font size="5px">Client Entry</font></h1>
<table cellpadding="3" cellspacing="0" border="" align="center" width=90<?php echo '%>';?>
   <tr>
   <td colspan="2">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['cDate']->value),$_smarty_tpl);?>

	</td>
    <td colspan="2">Client 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>
	<td>
	  <select name="cliTransType">
	    <?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['cliTransType']->value),$_smarty_tpl);?>

	  </select>
	</td>
	<td>
	  <select name="climcxid">
	    <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['mcxArray']->value['partyId'],'output'=>$_smarty_tpl->tpl_vars['mcxArray']->value['partyName'],'selected'=>$_smarty_tpl->tpl_vars['climcxid']->value),$_smarty_tpl);?>

	  </select>
	</td>
  </tr>
  <tr>
    <td>Particular</td>
    <td>Rate</td>
    <td>Diff</td>
    <td>Diff Amount</td>
    <td>Total</td>
    <td>K.G.</td>
    <td>Total Amount</td>
  </tr>
    <tr>
    <td><input type="text" name="particular" value="<?php echo $_smarty_tpl->tpl_vars['particular']->value;?>
"></td>
    <td><input type="text" name="rate" class="rate" onblur="finalRate();" value="<?php echo $_smarty_tpl->tpl_vars['rate']->value;?>
" size="8" required></td>
    <td><input type="text" name="diff" class="diff" size="4" value="<?php echo $_smarty_tpl->tpl_vars['diff']->value;?>
" onblur="finalRate();" required></td>
    <td><input type="text" name="diffAmt" class="diffAmt" size="4" value="<?php echo $_smarty_tpl->tpl_vars['diffAmt']->value;?>
" onblur="finalRate();" required></td>
    <td><input type="text" name="total" class="total" onblur="finalRate();" value="<?php echo $_smarty_tpl->tpl_vars['total']->value;?>
" required></td>
    <td><input type="text" name="kg" class="kg" onblur="finalRate();" value="<?php echo $_smarty_tpl->tpl_vars['kg']->value;?>
" size="4" required></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'} */
}
