-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (44 loc) · 1.98 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Product Records</title>
<link rel="stylesheet" href="styles.css">
</head>
<body style="background-color: #f0f0f0;">
<h1>Product Records</h1>
<!-- Alert Message -->
<div id="alertMessage" class="alert" role="alert" style="display: none;"></div>
<!-- Form to Add or Update Records -->
<form id="productForm">
<input type="hidden" id="editId"> <!-- Hidden input for storing record ID during edit -->
<label for="productName">Product Name:</label>
<input type="text" id="productName" value="Diesel" name="productName" placeholder="Name" required><br>
<label for="description">Description:</label>
<input type="text" id="description" placeholder="Description" name="description" required><br>
<label for="date">Date:</label>
<input type="date" id="date" name="date" required><br>
<label for="number">Bill No:</label>
<input type="number" id="number" name="number" step="0.01" placeholder="Bill No" required><br>
<label for="price">Price:</label>
<input type="number" id="price" name="price" step="0.01" placeholder="Price" required><br>
<label for="amount">Amount:</label>
<input type="number" id="amount" name="amount" placeholder="amount" step="0.01" required><br>
<button type="button" onclick="submitForm()">Submit</button>
</form>
<!-- Section to Display Records -->
<br><h2>Grand Total: ₹<span id="grandTotal">0.00</span></h2><br>
<h2>Records</h2>
<div id="recordsContainer" class="card-container">
<!-- Records will be dynamically inserted here -->
</div>
<br>
<button type="button" onclick="window.location.href='print.html';">Print</button>
<br>
<br>
<br>
<button type="button" onclick="clearAllData()">Delete All</button>
<script src="script.js"></script>
</body>
</html>