forked from Pranav00076/Invoice-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
170 lines (159 loc) · 4.78 KB
/
index.html
File metadata and controls
170 lines (159 loc) · 4.78 KB
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Simple Invoice Generator</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="editor">
<h2>Edit Invoice</h2>
<div class="form-group">
<label>Invoice Header</label>
<input
type="text"
id="in-header"
value="INVOICE"
oninput="updatePreview()"
placeholder="Document Title"
/>
</div>
<div style="display: flex; gap: 10px">
<div class="form-group" style="flex: 1">
<label>Invoice #</label>
<input
type="text"
id="in-num"
value="001"
oninput="updatePreview()"
/>
</div>
<div class="form-group" style="flex: 1">
<label>Date</label>
<input type="date" id="in-date" oninput="updatePreview()" />
</div>
</div>
<div class="form-group">
<label>From (Your Details)</label>
<input
type="text"
id="in-from-name"
value="My Company"
oninput="updatePreview()"
placeholder="Business Name"
/>
<input
type="text"
id="in-from-address"
value="123 Business Rd, City"
oninput="updatePreview()"
placeholder="Address"
style="margin-top: 5px"
/>
</div>
<div class="form-group">
<label>Bill To (Client Details)</label>
<input
type="text"
id="in-to-name"
placeholder="Client Name"
oninput="updatePreview()"
/>
<input
type="text"
id="in-to-address"
placeholder="Client Address"
oninput="updatePreview()"
style="margin-top: 5px"
/>
</div>
<label>Items</label>
<table id="editor-table">
<thead>
<tr>
<th width="50%">Item</th>
<th width="15%">Qty</th>
<th width="20%">Price</th>
<th></th>
</tr>
</thead>
<tbody id="editor-rows"></tbody>
</table>
<div class="actions">
<button class="btn btn-add" onclick="addEditorRow()">
+ Add Item
</button>
<button class="btn btn-print" onclick="window.print()">
Print / Save PDF
</button>
</div>
</div>
<div class="preview-container">
<div class="invoice-paper">
<div
style="
display: flex;
justify-content: space-between;
margin-bottom: 40px;
"
>
<div>
<h1 id="out-header" style="margin: 0; color: #333">INVOICE</h1>
<p style="margin: 5px 0; color: #666">
#<span id="out-num">001</span>
</p>
</div>
<div style="text-align: right">
<h3 id="out-from-name" style="margin: 0"></h3>
<p id="out-from-address" style="margin: 5px 0; color: #666"></p>
<p id="out-date" style="margin-top: 10px; font-weight: bold">
2025-12-12
</p>
</div>
</div>
<div style="margin-bottom: 30px">
<p
style="
font-weight: bold;
color: #999;
font-size: 12px;
text-transform: uppercase;
margin-bottom: 5px;
"
>
Bill To:
</p>
<h3 id="out-to-name" style="margin: 0">Client Name</h3>
<p id="out-to-address" style="margin: 5px 0; color: #666">
Client Address
</p>
</div>
<table style="width: 100%; margin-bottom: 20px">
<thead>
<tr>
<th style="text-align: left">Description</th>
<th style="text-align: center">Qty</th>
<th style="text-align: right">Price</th>
<th style="text-align: right">Total</th>
</tr>
</thead>
<tbody id="preview-rows"></tbody>
</table>
<div
style="
text-align: right;
margin-top: 20px;
border-top: 2px solid #333;
padding-top: 10px;
"
>
<h3 style="margin: 0">Total: ₹<span id="out-total">0.00</span></h3>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>