-
Notifications
You must be signed in to change notification settings - Fork 2
/
qoutation.html
75 lines (54 loc) · 2.16 KB
/
qoutation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<html>
<title>QUOTATION FORM</title>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="placement">
<h1 style="
padding-left: 35%;"> Qoutation form</h1>
<form class="modal-content" id="form-shower" action="qoutation.php" method="post">
<div class="container">
<label><b>COMPANY</b></label>
<input type="text" placeholder="Enter Name" name="company" required>
<label class="dept"><b>Items</b></label>
<select name="item" required id="choose">
<option value="None selected">Please select below</option>
<option value="Crocin">Crocin</option>
<option value="Aspirin">Aspirin</option>
<option value="Diclogem">Diclogem</option>
<option value="Dispirin">Dispirin</option>
etc.
</select>
<br>
<br>
<label><b>Quantity</b></label>
<input type="textarea" placeholder="Enter Quantity" name="quantity" id="quantity" required>
<label><b>PRICE PER ITEM</b></label>
<input type="text" placeholder="Enter Total" name="total" id="cBalance" required value="">
<label><b>Discount</b></label>
<input type="text" placeholder="Enter Discount" name="discount" id="chDiscount" required>
<script src="js/jquery-3.2.1.js" type="text/javascript"></script>
<script>
$(document).on("change keyup blur", "#chDiscount", function() {
var qty = $('#quantity').val();
var bal = $('#cBalance').val();
var main = qty*bal;
var disc = $('#chDiscount').val();
var dec = (disc/100).toFixed(2); //its convert 10 into 0.10
var mult = main*dec; // gives the value for subtract from main value
var discont = main-mult;
$('#result').val(discont);
});
</script>
<label><b>Final Amount</b></label>
<input type="text" placeholder="Enter Final Amount" name="amount" id="result" readonly>
<div class="clearfix">
<button type="button" onclick="document.getElementById('id01').style.display='none'" class="cancelbtn" ">Cancel</button>
<button type="submit" class="signupbtn">Submit</button>
</div>
</div>
</form>
</div>
</body>
</html>