<html>

<head>
    <title>SSR-Party Master</title>
    <link rel = "icon" href = "https:../image/ims.png" type = "image/x-icon">
</head>
<script src='../js/jquery-3.1.1.min.js' type='text/javascript'></script>
<script src='../js/jquery-ui.min.js' type='text/javascript'></script>
<link href="../css/style.css" rel="stylesheet" />
<link href="../css/style1.css" rel="stylesheet" />
<link href='../css/jquery-ui.min.css' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/all.css">
<link href="../css/bootstrap.min.css" rel="stylesheet" />
<link href="../css/font-awesome.min.css" rel="stylesheet" />
<link href="../css/styleg.css" rel="stylesheet" />
<script type="text/javascript" src="../js/jquery.placeholder.label.js"></script>
<script src="../js/jquery.min.js"></script>
<style>
    label {
        font-size: 15px;
        top: 11px;
        margin-bottom: .5rem;
        margin-left: 5px;
        font-weight:bold;
        display: inline-transparent;
    }
</style>
<body style="min-width: <?php echo $width; ?>; width: auto;">
<div style="min-width: <?php echo $width; ?>; width: auto;">
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary" style="min-width: <?php echo $width; ?>; width: auto; height: 62px; background-color: #007bff; font-size:24px;">
        <input style = "background-color: #007bff; font-size:24px; width:100px; height : 55px; margin-top : px;" type="button" onclick="location.href='../main/index';" value="Home">
        <input style = "background-color: #007bff; font-size:24px; height : 55px; margin-top : px;" type="button" onclick="exportToExcel('tblexportData', 'Export-data')" value="Export to Excel">
        <h1 style="color:white; font-size:24px; margin-top: -40px;" class="text-primary" align="center">Party Master</h1>
        <h1 style="color:white; font-size:24px; margin-top : -40px;margin-right :20px;" class="text-primary" id="demo2" align="right"></h1>
    </nav>
	<div class="container" style = "min-width: <?php echo $width; ?>; width: auto;">
	<center>
			<tr>
				<div class="col-xs-2">
					<label style="font-size:18px;" class="col-sm-2 control-label">Frame</label>
					<input type="text" name="frmamt" class="form-control price" id="frame">
				</div>
				<div class="col-xs-4">
					<label style="font-size:18px;" class="col-sm-2 control-label">Glass</label>
					<input type="text" name="glsamt" class="form-control price" id="price">
				</div>
				<div class="col-xs-3">
					<label style="font-size:18px;" class="col-sm-2 control-label">Total</label>
					<input disabled type="text" name="totamt" id="total" class="form-control total">
				</div>
				<div class="col-xs-3">
					<label style="font-size:18px;" class="col-sm-2 control-label">Discount</label>
					<input type="text" name="disamt" class="form-control discount">
				</div>
			</tr>
		</center>
		<center>
			<tr>
			    <div class="col-xs-4">
					<label style="font-size:18px;" class="col-sm-2 control-label">G_Total</label>
					<input type="text" name="gtotal" id="gtotal" class="form-control">
				</div>
				<div class="col-xs-2">
					<label style="font-size:18px;" class="col-sm-2 control-label">Advance</label>
					<input type="text" name="advamt" class="form-control advanced">
				</div>
				<div class="col-xs-2">
					<label style="font-size:18px;" class="col-sm-2 control-label">Due</label>
					<input type="text" name="dueamt" class="form-control due">
				</div>
			</tr>
		</center>
		
		<br><br><br><br><br><br><br><br>
	<div style="margin-top : 5px;min-width: <?php echo $width; ?>; width: auto;" align="center">
		<input type="hidden" style="font-size:18px; font-weight:bold;  color: #000066;" name="user_id" id="user_id" />
		<button type="button" name="action" id="action" style="width : 200px; height: 40px;" class="btn btn-primary">Add</button>
	</div>
	</div>
	<div class="container" style = "min-width: <?php echo $width; ?>; width: auto;">
	    <center>
			<tr>
			    <input style ="margin-left : 0px; width : 100%; height:40px; font-size:20px; font-weight:bold;" name="search_text" id="search_text" type="text" placeholder="search" alt="search">
			<tr>
		</center>
	</div>
	<div style="margin-top : 0px; margin-left : 0px;min-width: <?php echo $width; ?>; width: auto; height:50%; margin-left: 0px; margin-top: 0px; overflow:auto;" id="result" class="table-responsive"  align="center"></div>
	<div style="height: 60px; margin-left:0px; margin-top:0px; font-size:30px;" class="success"></div>
	<div style="height: 60px; margin-left:0px; margin-top:0px; font-size:30px;" class="error"></div>
	</div>
</body>

</html>

<!--div class="col-lg-3 form-group">
  <label>Frame</label>
  <input type="text" name="frmamt" class="form-control price" id="frame">
</div>
<div class="col-lg-3 form-group">
  <label>Glass</label>
  <input type="text" name="glsamt" class="form-control price" id="price">
</div>
<div class="col-lg-3 form-group">
  <label>Total</label>
  <input disabled type="text" name="totamt" id="total" class="form-control total">
</div>
<div class="col-lg-3 form-group">
  <label>Discount</label>
  <input type="text" name="disamt" class="form-control discount">
</div>
<div class="col-lg-3 form-group">
  <label>G-Total</label>
  <input type="text" name="gtotal" id="gtotal" class="form-control">
</div>
<div class="col-lg-3 form-group">
  <label>Advance</label>
  <input type="text" name="advamt" class="form-control advanced">
</div>
<div class="col-lg-3 form-group">
  <label>Due.</label>
  <input type="text" name="dueamt" class="form-control due">
</div-->

<script>
    $("#frame,#price").on('keyup', function() {
  calculateTotal();
});

$(".discount").on('focusout', function() {
  var gTotal = $(".total").val() - $(this).val();
  if (!isNaN(gTotal))
    $("#gtotal").val(gTotal);
});

$(".advanced").on('focusout', function() {
  var advance = $("#gtotal").val() - $(this).val();
  if (!isNaN(advance))
    $(".due").val(advance);
});

function calculateTotal() {
  var total = $("#frame").val() * $("#price").val();
  if (!isNaN(total))
    $(".total").val(total);
}
</script>
