-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinventorytest.html
144 lines (126 loc) · 4.13 KB
/
inventorytest.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SalesPilot Web App</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<!-- Custom Styles -->
<style>
body {
background-color: #f8f9fa;
}
.navbar {
background-color: #343a40;
}
.navbar-brand {
color: #ffffff;
font-weight: bold;
}
.navbar-dark .navbar-toggler-icon {
background-color: #ffffff;
}
.navbar-nav .nav-link {
color: #ffffff;
}
.btn-group .btn {
background-color: #007bff;
color: #ffffff;
}
.btn-group .form-control {
border-color: #007bff;
}
.btn-primary {
background-color: #28a745;
border-color: #28a745;
}
.table th,
.table td {
border: 1px solid #dee2e6;
}
.table thead th {
background-color: #007bff;
color: #ffffff;
border-color: #007bff;
}
</style>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">
<img src="salespilot_logo.png" alt="SalesPilot Logo" height="30">
SalesPilot
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Sales</a>
</li>
<!-- Add other navigation items as needed -->
</ul>
</div>
</nav>
<!-- Page Content -->
<div class="container mt-3">
<!-- Interactive buttons for data fetching -->
<div class="btn-group" role="group" aria-label="Data Fetching">
<button type="button" class="btn btn-secondary" onclick="fetchData('daily')">Daily</button>
<button type="button" class="btn btn-secondary" onclick="fetchData('weekly')">Weekly</button>
<button type="button" class="btn btn-secondary" onclick="fetchData('monthly')">Monthly</button>
<button type="button" class="btn btn-secondary" onclick="fetchData('yearly')">Yearly</button>
<input type="date" class="form-control" id="selectedDate">
<button type="button" class="btn btn-primary" onclick="fetchData('selectedDate')">Fetch Data</button>
</div>
<!-- Inventory Table -->
<table class="table mt-3">
<thead>
<!-- Table header remains unchanged -->
<tr>
<th>Product Name</th>
<th>Stock Qty</th>
<th>Supply Qty</th>
<th>Inventory Qty</th>
<th>Sales Price</th>
<th>Cost Price</th>
<th>Inventory Cost</th>
<th>Inventory Value</th>
</tr>
</thead>
<tbody>
<!-- Populate table rows with PHP and MySQL data -->
<!-- Example: -->
<tr>
<td>Product A</td>
<td>100</td>
<td>50</td>
<td>150</td>
<!-- Add data for daily, weekly, monthly, yearly, selected date -->
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
</div>
<!-- Bootstrap JS and dependencies -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!-- Your custom script for fetching data based on selected options -->
<script>
function fetchData(fetchType) {
// Implement your logic to fetch data based on selected options
// Use JavaScript to interact with PHP and MySQL backend
// The 'fetchType' parameter can be 'daily', 'weekly', 'monthly', 'yearly', or 'selectedDate'
// Use the value of the selected date if 'fetchType' is 'selectedDate'
}
</script>
</body>
</html>