-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (106 loc) · 4.47 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Gochi+Hand&display=swap" rel="stylesheet">
<title>Online Inventory Alamangers</title>
<style type="text/css">
* {
font-family: 'Gochi Hand', cursive;
scroll-behavior: smooth;
}
</style>
</head>
<body>
<nav class="nav navbar bg-dark border border-bottom rounded fixed-top">
<div class="container text-white">
Online Inventory Alamangers
</div>
</nav>
<div class="container mt-5">
<table class="table">
<thead>
<tr>
<th>Status</th>
<th>Product Name</th>
<th>Product Price</th>
<th>Product Quantity</th>
<th>Place of Delivery</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>Direct Sale</td>
<td>Sweet and Spicy Alamang</td>
<td>50</td>
<td>1</td>
<td>Santiago</td>
<td id="firstSold"></td>
</tr>
<tr>
<td>Online Sale</td>
<td>Sweet and Spicy Alamang</td>
<td>100(50 * 2)</td>
<td>2</td>
<td>Ramon</td>
<td id="secondSold"></td>
</tr>
<tr>
<td>Online Sale</td>
<td>Sweet and Spicy Alamang</td>
<td>180(50 * 3 + (shipping 30))</td>
<td>3</td>
<td>Cordon</td>
<td id="thirdSold"></td>
</tr>
</tbody>
</table>
</div>
<div class="container mt-5 d-flex">
<div class="container col-6">
<h5><strong>Total Invested: </strong>PHP 182</h5>
<h5><strong>Total Products Made: </strong>10 pieces</h5>
<h5><strong>Total Products Sold: </strong>6 pieces</h5>
<h5><strong>Total Sold Products Price: </strong>PHP 330</h5><br>
</div>
<div class="container col-6">
<h5><strong>Revenue: </strong>PHP 330</h5>
<h5><strong>Expenses: </strong>PHP 182</h5>
<h5><strong>Income: </strong>PHP 148</h5>
<h5><strong>Number of Products Sold: </strong>6 pieces</h5><br>
</div>
</div>
<ul>
<h4><strong>Return of investment: </strong></h4>
<li>
<h5>(Total Price - Total Invested / Total Invested) * 100</h5>
</li>
<li>
<h5>(330 - 182 / 182) * 100 = <strong id="eq"></strong></h5>
</li>
<li>
<h5>ROI: <strong id="result"></strong></h5>
</li>
</ul>
</body>
<script>
const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
const firstSold = new Date("March 21, 2022");
const secondSold = new Date("May 31, 2022");
const thirdSold = new Date("June 1, 2022");
document.querySelector("#firstSold").innerHTML = months[firstSold.getMonth()] + ' ' + firstSold.getDate() + ', ' + firstSold.getFullYear();
document.querySelector("#secondSold").innerHTML = months[secondSold.getMonth()] + ' ' + secondSold.getDate() + ', ' + secondSold.getFullYear();
document.querySelector("#thirdSold").innerHTML = months[thirdSold.getMonth()] + ' ' + thirdSold.getDate() + ', ' + thirdSold.getFullYear();
document.querySelector("#eq").innerHTML = Math.round((((330 - 182) / 182) * 100) * 100) / 100;
document.querySelector("#result").innerHTML = Math.round((((330 - 182) / 182) * 100) * 100) / 100 + "%";
</script>
</html>