-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathkfconline.html
198 lines (188 loc) · 6.59 KB
/
kfconline.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<head>
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
<style>
body {
background-color: maroon;
}
.CustomContainer {
margin: auto;
width: 90%;
height: 90%;
background-color: white;
}
header {
margin-top: 20px;
}
#summary {
top: 50px;
left:200px;
position: fixed;
margin:auto;
}
</style>
<script>
function OrderClick(){
document.getElementById("summary").style.display="block";
document.getElementById("register").style.opacity="0.3";
var mealName="";
var adonName="";
var mealCost=0;
var adonCost=0;
var total=0;
//Radios
var optBurger = document.getElementById("optBurger");
var optRoller = document.getElementById("optRoller");
//CheckBox
var optWings = document.getElementById("optWings");
var optKrusher = document.getElementById("optKrusher");
if(optBurger.checked) {
mealCost=140;
mealName=optBurger.value;
}
if(optRoller.checked) {
mealCost=100;
mealName=optRoller.value;
}
if(optWings.checked) {
adonCost=90;
adonName+=optWings.value + "<br>";
mealCost = mealCost + adonCost;
}
if(optKrusher.checked) {
adonCost=50;
adonName+=optKrusher.value + "<br>";
mealCost = mealCost + adonCost;
}
total=mealCost;
document.getElementById("lblName").innerHTML= document.getElementById("txtName").value;
document.getElementById("lblMobile").innerHTML= document.getElementById("txtMobile").value;
document.getElementById("lblDate").innerHTML= document.getElementById("txtDate").value;
document.getElementById("lblMeal").innerHTML= mealName;
document.getElementById("lblAdon").innerHTML= adonName;
document.getElementById("lblTotal").innerHTML= "₹" + total;
}
</script>
</head>
<body>
<div class="CustomContainer">
<div id="register" class="card">
<div class="card-header">
<img class="card-img-top" src="../Images/kfctop.PNG">
</div>
<div class="card-body">
<div class="text-center form-group">
<h3> Customer Info </h3>
</div>
<div class="form-inline">
<label>Name</label> :
<input type="text" id="txtName" class="form-control">
<label>Mobile</label>:
<input type="text" id="txtMobile" class="form-control">
<label>Date</label>
<input type="date" id="txtDate" class="form-control">
</div>
<div class="text-center form-group">
<h3>Select a Meal</h3>
<div class="card-deck">
<div class="card">
<div class="card-header">
<h4>OMG Burger</h4>
</div>
<div class="card-body">
<img src="../Images/omg1.PNG" width="200" height="200">
</div>
<div class="card-footer">
<input type="radio" id="optBurger" value="OMG Burger" class="form-control" name="meal">
<h4>₹ 140/-</h4>
</div>
</div>
<div class="card">
<div class="card-header">
<h4>OMG Roller</h4>
</div>
<div class="card-body">
<img src="../Images/omg2.PNG" width="200" height="200">
</div>
<div class="card-footer">
<input type="radio" id="optRoller" value="OMG Roller" class="form-control" name="meal">
<h4>₹ 100/-</h4>
</div>
</div>
</div>
</div>
<div class="text-center form-group">
<h3>Select Ad-ON</h3>
<div class="card-deck">
<div class="card">
<div class="card-header">
<h4>Hot Wings</h4>
</div>
<div class="card-body">
<img src="../Images/wings.PNG" width="200" height="200">
</div>
<div class="card-footer">
<input type="checkbox" id="optWings" value="Hot Wings" class="form-control">
<h4>₹ 90/-</h4>
</div>
</div>
<div class="card">
<div class="card-header">
<h4>Krusher Brownie</h4>
</div>
<div class="card-body">
<img src="../Images/krusher1.PNG" width="200" height="200">
</div>
<div class="card-footer">
<input type="checkbox" id="optKrusher" value="Krusher Brownie" class="form-control">
<h4>₹ 50/-</h4>
</div>
</div>
</div>
</div>
</div>
<div class="card-footer text-center">
<button onclick="OrderClick()" class="btn btn-danger">Place Order</button>
</div>
</div>
<!-- End of Register -->
<div id="summary" class="card" style="display: none;">
<!--Pop up-->
<div class="card-header">
<h3>Order Summary</h3>
</div>
<div class="card-body">
<table class="table table-hover">
<colgroup span="1" style="background-color: lightcyan; font-weight: bold;"></colgroup>
<tr>
<td>Customer Name</td>
<td id="lblName"></td>
</tr>
<tr>
<td>Mobile</td>
<td id="lblMobile"></td>
</tr>
<tr>
<td>Date</td>
<td id="lblDate"></td>
</tr>
<tr>
<td>Selected Meal</td>
<td id="lblMeal"></td>
</tr>
<tr>
<td>Selected Ad-On's</td>
<td id="lblAdon"></td>
</tr>
<tr>
<td>Total Amount</td>
<td id="lblTotal"></td>
</tr>
</table>
</div>
<div class="card-footer">
<button onclick="window.print()" class="btn btn-success">Print Bill</button>
<button onclick="location.reload()" class="btn btn-primary">Back</button>
</div>
</div>
</div>
</body>