<?php
/* Smarty version 3.1.30, created on 2021-12-01 20:27:06
  from "/home/rexbeenc/public_html/templates/sauda.tpl" */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.30',
  'unifunc' => 'content_61a78d422c5722_76564413',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '1bde55130c5f952affb2179be88beb2386d8e2bb' => 
    array (
      0 => '/home/rexbeenc/public_html/templates/sauda.tpl',
      1 => 1638370591,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:./main.tpl' => 1,
  ),
),false)) {
function content_61a78d422c5722_76564413 (Smarty_Internal_Template $_smarty_tpl) {
if (!is_callable('smarty_function_html_options')) require_once '/home/rexbeenc/public_html/include/smarty/libs/plugins/function.html_options.php';
if (!is_callable('smarty_function_html_select_date')) require_once '/home/rexbeenc/public_html/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_212602551961a78d421a3884_79332147', 'head');
?>

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_67111019061a78d422c0953_78079988', '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_212602551961a78d421a3884_79332147 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 getAmt()
{

  var amount  = 0;
  

}	
$(function() {
	$(".mcxId").click(function() {
	if ($(this).is(":checked")) 
	{
		 var dataString = "mcxId=" +$(this).val();
			$.ajax({
			type: "POST",
			url: "updateStatusCheckedmcx.php",
			data: dataString,
			success:function(data)
			{}
		});
	}
	else
	{
		var dataString = "mcxId=" +$(this).val();
			$.ajax({
			type: "POST",
			url: "updateStatusUnCheckedmcx.php",
			data: dataString,
			success:function(data)
			{
			  
			}
		});
	}
  });
});		

function gettype()
{
	var dataString = "partyId=" +$(".partyId").val();
	$.ajax({
			type: "POST",
			url: "gettype.php",
			data: dataString,
			success:function(data)
			{
			  $(".type").val(data); 
			}
		});
}
function getsign()
{
  var type   		  = $('.type').val() != '' ? $('.type').val() : 0;
  var rojTransType    = $('.rojTransType').val() != '' ? $('.rojTransType').val() : 0;
  var rate    		  = $('.rate').val() != '' ? $('.rate').val() : 0;
  var fine    		  = $('.fine').val() != '' ? $('.fine').val() : 0;
  
  //if(type == 'C' && rojTransType =='A')
  //{
	amount = (parseFloat(rate) * parseFloat (fine));
	var result = amount * -1;
	$('.amount').val(result.toFixed(2));
 // }
  <!-- else if (type == 'V' && rojTransType =='J') -->
  <!-- { -->
	<!-- amount = (parseFloat(rate) * parseFloat (fine)); -->
	<!-- $('.amount').val('-' + amount.toFixed(2)); -->
  <!-- } -->
  <!-- else -->
  <!-- { -->
	<!-- amount = (parseFloat(rate) * parseFloat (fine)); -->
	<!-- $('.amount').val(amount.toFixed(2)); -->
  <!-- } -->
  
}							
<?php echo '</script'; ?>
>
<style>
td{
  border: none;
}
</style>
<?php
}
}
/* {/block 'head'} */
/* {block 'body'} */
class Block_67111019061a78d422c0953_78079988 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="saudaId" value="<?php echo $_smarty_tpl->tpl_vars['saudaId']->value;?>
">
<input type="hidden" name="type" class="type" value="<?php echo $_smarty_tpl->tpl_vars['type']->value;?>
">
<h1 align="center"><font size="5px">Sauda Entry</font></h1>
<table cellpadding="3" cellspacing="0" border="" align="center" width=30<?php echo '%>';?>
	<tr>
		<td align="left">Client Name</td>
		<td>
		  <select name="partyId" class="partyId" required onchange="gettype();">
			 <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>
	</tr>
	<tr>
	<td>Date</td>
	<td>
	   <?php echo smarty_function_html_select_date(array('prefix'=>"rdt",'start_year'=>"-1",'end_year'=>"+0",'day_value_format'=>"%02d",'field_order'=>"DMY",'time'=>$_smarty_tpl->tpl_vars['saudaDate']->value),$_smarty_tpl);?>

	</td>
  </tr>
  <tr>
    <td>Cash Type</td>
    <td>
	  <select name="cash_type">
	    <?php echo smarty_function_html_options(array('values'=>$_smarty_tpl->tpl_vars['cashValue']->value,'output'=>$_smarty_tpl->tpl_vars['cashOutput']->value,'selected'=>$_smarty_tpl->tpl_vars['cash_type']->value),$_smarty_tpl);?>

	  </select>
	</td>
  </tr>
  <tr>
    <td>Type</td>
    <td>
	  <select name="rojTransType" class="rojTransType" onchange="getsign();">
	    <?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['rojTransType']->value),$_smarty_tpl);?>

	  </select>
	</td>
  </tr>
  
   <tr>
    <td>Direct / Khata</td>
    <td>
	  <select name="acc_type">
	    <?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['acc_type']->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" value="<?php echo $_smarty_tpl->tpl_vars['rate']->value;?>
" class="rate" onkeyup="getsign();"></td>
  </tr>
  <tr>
    <td>Fine</td>
	<td><input type="text" name="fine" value="<?php echo $_smarty_tpl->tpl_vars['fine']->value;?>
" class="fine" onkeyup="getsign();"></td>
  </tr>
  <tr>
    <td>Amount</td>
	<td><input type="text" name="amount" value="<?php echo $_smarty_tpl->tpl_vars['amount']->value;?>
" class="amount"></td>
  </tr>
  <tr>
  	<td colspan="3" align="center"><input type="submit" value="Submit" name="submit" class="btn"></td>
  </tr>
</table>
</form>
<?php
}
}
/* {/block 'body'} */
}
