-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
108 lines (99 loc) · 3.63 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
<html>
<head>
<meta charset="utf-8">
<title>Invoice</title>
<link rel="stylesheet" href="assets/font-awesome-4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="assets/css/style.css">
<link rel="license" href="https://www.opensource.org/licenses/mit-license/">
<script src="assets/js/script.js"></script>
</head>
<body>
<header>
<h1>Invoice</h1>
<address contenteditable>
<p>Client Dele Name</p>
<p>Client Address, Country</p>
<p>Client Email Address</p>
<p>(800) 555-1234</p>
</address>
<span><img alt="" src="assets/img/image.png" width="50" height="50"><input type="file" accept="image/*"></span>
</header>
<article>
<h1>Recipient</h1>
<address contenteditable>
<p>Digits<br>Designs & Brands</p>
</address>
<table class="meta">
<tr>
<th><span contenteditable>Invoice #</span></th>
<td><span contenteditable id="content-invoice-no">101138</span></td>
</tr>
<tr>
<th><span contenteditable>Date</span></th>
<td><span contenteditable id="content-date">January 1, 2021</span></td>
</tr>
<tr>
<th><span contenteditable>Amount Due</span></th>
<td><span id="prefix" contenteditable class="content-currency">$</span><span>600.00</span></td>
</tr>
</table>
<table class="inventory">
<thead>
<tr>
<th><span contenteditable>Item</span></th>
<th><span contenteditable>Description</span></th>
<th><span contenteditable>Rate</span></th>
<th><span contenteditable>Quantity</span></th>
<th><span contenteditable>Price</span></th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="cut">-</a><span contenteditable>Front End Consultation</span></td>
<td><span contenteditable>Experience Review</span></td>
<td><span data-prefix class="content-currency">$</span><span contenteditable>150.00</span></td>
<td><span contenteditable>4</span></td>
<td><span data-prefix class="content-currency">$</span><span>600.00</span></td>
</tr>
</tbody>
</table>
<a class="add">+</a>
<table class="balance">
<tr>
<th><span contenteditable>Total</span></th>
<td><span data-prefix class="content-currency">$</span><span>600.00</span></td>
</tr>
<tr>
<th><span contenteditable>Amount Paid</span></th>
<td><span data-prefix class="content-currency">$</span><span contenteditable>0.00</span></td>
</tr>
<tr>
<th><span contenteditable>Balance Due</span></th>
<td><span data-prefix class="content-currency">$</span><span>600.00</span></td>
</tr>
</table>
</article>
<aside>
<h1><span contenteditable>Additional Notes</span></h1>
<div contenteditable>
<p>A finance charge of 1.5% will be made on unpaid balances after 30 days.</p>
</div>
</aside>
<a href="javascript:void(0);" onclick="window.print()" class="floater">
<i class="fa fa-print my-floater"></i>
</a>
<script>
const month = ["January","February","March","April","May","June","July","August","September","October","November","December"];
const currentDate = new Date();
const invoiceNumber = randomNumberRange(5000000, 1000000);
const fullDate = `${month[currentDate.getMonth()]} ${currentDate.getDay()}, ${currentDate.getFullYear()}`;
const currencyCode = '₦';
document.querySelector('#content-date').innerHTML = fullDate;
document.querySelector('#content-invoice-no').innerHTML = invoiceNumber;
document.querySelector('.content-currency').innerHTML = currencyCode;
function randomNumberRange(max, min) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
</script>
</body>
</html>