-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
68 lines (63 loc) · 2.81 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Expense Tracker</title>
<link rel="stylesheet" href="assets/css/styles.css">
<link rel="stylesheet" href="assets/bootstrap-4.6.2-dist/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-md-6">
<h1 class="text-center mb-4">Expense Tracker</h1>
<form id="expense-form">
<div class="form-group">
<label for="name">Name:</label>
<input type="text" class="form-control" id="name" required>
</div>
<div class="form-group">
<label for="item-cost">Item cost (£):</label>
<input type="text" class="form-control" id="item-cost" required>
<div class="form-group">
<label for="item-description">Item description:</label>
<input type="text" class="form-control" id="item-description" required>
</div>
<div class="form-group">
<label for="service-charge">Service charge (%):</label>
<input type="number" class="form-control" id="service-charge" step="0.01" value="10" required>
</div>
<button type="submit" class="btn btn-primary btn-block">Add Expense</button>
</form>
</div>
</div>
</div>
<div class="container mt-5">
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Item Cost (£)</th>
<th>Service Charge (£)</th>
<th>Total (£)</th>
<th>Item Description</th>
</tr>
</thead>
<tbody id="expense-list">
</tbody>
</table>
<p>Total Expense (Before Service Charge): <span id="total-expense">0.00</span></p>
<p>Total Service Charge: <span id="total-service-charge">0.00</span></p>
<p>Total Expense (Including Service Charge): <span id="total-expense-including-service">0.00</span></p>
</div>
<div class="container mt-5">
<div class="button-container">
<button id="clear-expenses">Clear Expenses</button>
</div>
</div>
<script src="assets/js/script.js"></script>
<script src="assets/bootstrap-4.6.2-dist/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script>
</body>
</html>