-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
279 lines (276 loc) · 19.1 KB
/
Copy pathindex.html
File metadata and controls
279 lines (276 loc) · 19.1 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Invoicable - Simple Invoice</title>
<!-- Favicon -->
<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 16 16%22 fill=%22%234dabf7%22><path d=%22M4 0h5.293A1 1 0 0 1 10 .293L13.707 4a1 1 0 0 1 .293.707V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm5.5 1.5v2a1 1 0 0 0 1 1h2l-3-3zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM5.5 7h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm0 2h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm0 2h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1z%22/></svg>">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.9.1/font/bootstrap-icons.css">
<link href="./index.css" rel="stylesheet">
</head>
<body>
<div class="container unselectable">
<!-- General Configuration -->
<nav class="navbar fixed-top bg-white border-bottom py-2 shadow-sm">
<div class="container">
<span class="navbar-brand mb-0 h1 fw-bold d-flex align-items-center gap-2">
<i class="bi bi-file-earmark-text-fill text-primary-custom fs-4"></i>
<span
style="font-family: 'Inter', sans-serif; letter-spacing: -0.5px; font-size: 1.2rem;">Invoicable</span>
</span>
<div class="d-flex gap-2 align-items-center toolbar-actions flex-wrap justify-content-end">
<div class="toolbar-item" title="Document Type">
<i class="bi bi-file-earmark-diff text-muted"></i>
<select id="documentTypeSelect" class="toolbar-select form-select form-select-sm">
<option value="invoice">Invoice</option>
<option value="quotation">Quotation</option>
</select>
</div>
<div class="toolbar-item" title="Date Format">
<i class="bi bi-calendar-event text-muted"></i>
<select id="dateFormatSelect" class="toolbar-select form-select form-select-sm">
<option value="us">MM/DD/YYYY (US)</option>
<option value="jp">YYYY-MM-DD (JP)</option>
<option value="br">DD/MM/YYYY (BR)</option>
</select>
</div>
<div class="toolbar-item" title="Currency">
<i class="bi bi-cash-coin text-muted"></i>
<select id="currencySelect" class="toolbar-select form-select form-select-sm">
</select>
</div>
<div class="toolbar-item" title="Language">
<i class="bi bi-translate text-muted"></i>
<select id="languageSelect" class="toolbar-select form-select form-select-sm">
<option value="en">English</option>
<option value="jp">日本語</option>
<option value="pt">Português</option>
</select>
</div>
<div class="toolbar-item toolbar-item-range" title="Invoice Font Size">
<i class="bi bi-fonts text-muted"></i>
<input type="range" class="toolbar-range form-range" id="fontSizeRange" min="60" max="110"
step="5" value="100" aria-label="Invoice font size">
<span class="toolbar-value" id="fontSizeValue">100%</span>
</div>
<div class="color-picker-wrapper" title="Theme Color">
<input type="color" class="form-control form-control-color" id="colorPicker" value="#6750A4">
</div>
</div>
</div>
</nav>
<div class="navbar-spacer"></div>
<div class="row justify-content-center">
<!-- Invoice -->
<div class="col-lg-9 p-0">
<div class="card shadow-lg border-0 rounded-3 overflow-hidden mb-5">
<div id="pdf_element" class="bg-white p-5">
<div class="card-body p-0">
<div class="d-flex justify-content-between align-items-end mb-3">
<div>
<h2 class="fw-bold text-uppercase m-0 header-title" id="title"
data-i18n="invoice_title">INVOICE</h2>
</div>
<div class="text-end">
<div class="d-flex align-items-center justify-content-end gap-2">
<span class="text-muted small fw-bold text-uppercase"
data-i18n="invoice_number_label">Invoice #</span>
<span contenteditable="true" class="fs-5 fw-bold editable-field text-end"
id="invoice_number" title="Edit Number"></span>
</div>
<div class="d-flex align-items-center justify-content-end gap-2 mt-1">
<span class="text-muted small fw-bold text-uppercase text-nowrap"
data-i18n="date_label">Date:</span>
<input type="date" id="date" class="form-control date-picker-input"
title="Click to change date" style="min-width: 150px;">
</div>
</div>
</div>
<div class="header-banner mb-4" style="height: 4px; width: 100%; border-radius: 2px;"></div>
<div class="row mb-4 gx-5">
<div class="col-6">
<h6 class="text-uppercase text-muted fw-bold x-small mb-2" data-i18n="from_title">
From</h6>
<div contenteditable="true"
class="editable-field fw-bold fs-6 mb-1 text-nowrap-custom" id="bill_from_name"
data-placeholder="Your Name / Company">
</div>
<div class="mb-1">
<div contenteditable="true" class="editable-field fs-6" id="bill_from_address"
data-placeholder="Your Address">
</div>
</div>
<div class="d-flex align-items-center gap-2 text-muted x-small mt-2">
<i class="bi bi-telephone"></i>
<span contenteditable="true" class="editable-field" id="bill_from_phone"
data-placeholder="Phone"></span>
</div>
<div class="d-flex align-items-center gap-2 text-muted x-small">
<i class="bi bi-envelope"></i>
<span contenteditable="true" class="editable-field" id="bill_from_email"
data-placeholder="Email"></span>
</div>
</div>
<div class="col-6 text-end">
<h6 class="text-uppercase text-muted fw-bold x-small mb-2"
data-i18n="bill_to_title">Bill To</h6>
<div contenteditable="true"
class="editable-field fw-bold fs-6 mb-1 text-end text-nowrap-custom"
id="bill_to_name" data-placeholder="Client Name">
</div>
<div class="mb-1">
<div contenteditable="true" class="editable-field text-end fs-6"
id="bill_to_address" data-placeholder="Client Address">
</div>
</div>
</div>
</div>
<div class="mt-2 mb-3">
<table class="table table-sm table-hover align-middle mb-0">
<thead class="table-light">
<tr>
<th width="42%" class="border-0 ps-2 py-2 x-small text-uppercase text-muted"
data-i18n="col_description">Description</th>
<th width="15%"
class="border-0 text-center py-2 x-small text-uppercase text-muted"
data-i18n="col_qty">Qty</th>
<th width="20%"
class="border-0 text-center py-2 x-small text-uppercase text-muted"
data-i18n="col_price">Price</th>
<th width="15%"
class="border-0 text-center py-2 x-small text-uppercase text-muted"
data-i18n="col_amount">Amount</th>
<th width="8%" class="action-column border-0 text-center py-2"></th>
</tr>
</thead>
<tbody id="invoice_items" class="border-top-0">
</tbody>
<tfoot class="border-top">
<tr class="no-print">
<td colspan="5" class="pt-2 border-0">
<button type="button" class="btn btn-light btn-sm text-muted x-small"
onclick="invoiceApp.addItem()">
<i class="bi bi-plus-circle me-1"></i> <span
data-i18n="btn_add_item">Add Item</span>
</button>
</td>
</tr>
<tr>
<td colspan="2" class="border-0"></td>
<td class="text-end fw-bold fs-6 pt-2 border-0" data-i18n="total_label">
Total:</td>
<td class="text-end fw-bold fs-6 pt-2 border-0 text-primary-custom"
id="invoice_total">0.00</td>
<td class="border-0"></td>
</tr>
</tfoot>
</table>
</div>
<div class="row g-4 mt-1">
<div class="col-7" id="payment_details_section">
<div
class="p-3 rounded-2 bg-light bg-opacity-50 border border-light h-100 break-inside-avoid">
<h6 class="text-uppercase text-primary-custom fw-bold mb-3 pb-2 border-bottom border-primary-custom border-opacity-25"
data-i18n="payment_info_title"
style="font-size: 0.85rem; letter-spacing: 0.05em;">Payment Details</h6>
<div class="row g-2">
<div
class="col-12 d-flex justify-content-between border-bottom pb-1 mb-1 border-light">
<span class="text-muted x-small fw-bold"
data-i18n="bank_label">Bank</span>
<span contenteditable="true"
class="editable-field fw-medium text-dark small text-end"
id="bank_name" data-placeholder="..."></span>
</div>
<div
class="col-12 d-flex justify-content-between border-bottom pb-1 mb-1 border-light">
<span class="text-muted x-small fw-bold"
data-i18n="branch_label">Branch</span>
<span contenteditable="true"
class="editable-field fw-medium text-dark small text-end"
id="branch_name" data-placeholder="..."></span>
</div>
<div
class="col-12 d-flex justify-content-between border-bottom pb-1 mb-1 border-light">
<span class="text-muted x-small fw-bold"
data-i18n="account_type_label">Type</span>
<span contenteditable="true"
class="editable-field fw-medium text-dark small text-end"
id="account_type" data-placeholder="..."></span>
</div>
<div
class="col-12 d-flex justify-content-between border-bottom pb-1 mb-1 border-light">
<span class="text-muted x-small fw-bold"
data-i18n="account_number_label">Account #</span>
<span contenteditable="true"
class="editable-field fw-medium text-dark small text-end"
id="account_number" data-placeholder="..."></span>
</div>
<div class="col-12 d-flex justify-content-between">
<span class="text-muted x-small fw-bold"
data-i18n="account_holder_label">Holder</span>
<span contenteditable="true"
class="editable-field fw-medium text-dark small text-end"
id="account_holder" data-placeholder="..."></span>
</div>
</div>
</div>
</div>
<div class="col-5" id="notes_section">
<div class="h-100">
<h6 class="text-uppercase text-primary-custom fw-bold mb-3 pb-2 border-bottom border-primary-custom border-opacity-25"
data-i18n="notes_title" style="font-size: 0.85rem; letter-spacing: 0.05em;">
Notes</h6>
<div contenteditable="true"
class="editable-field d-block text-muted small fst-italic"
id="invoice_notes" data-placeholder="..."></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Buttons and Footer -->
<div class="col-lg-9 mb-5">
<div
class="d-flex gap-3 justify-content-end align-items-center bg-white p-3 rounded-pill shadow-sm border">
<div class="input-group input-group-sm border rounded-pill overflow-hidden"
style="max-width: 300px;">
<input type="text" class="form-control border-0 px-3 bg-light" id="share_link" readonly
placeholder="...">
<button class="btn btn-dark px-3" id="btn_copy_link" onclick="invoiceApp.copyShareLink();">
<i class="bi bi-link-45deg"></i> <span data-i18n="btn_copy_link">Copy</span>
</button>
</div>
<div class="vr mx-2"></div>
<button class="btn btn-primary rounded-pill px-4" onclick="invoiceApp.downloadPDF();">
<i class="bi bi-download me-2"></i> <span data-i18n="btn_download_pdf">PDF</span>
</button>
</div>
<footer class="text-center text-muted mt-5 pb-4 x-small">
<p data-i18n="footer_privacy">Data remains local. Auto-saved in your browser.</p>
<div class="opacity-75">
2025 © Tetsuaki Baba
<a href="https://github.com/TetsuakiBaba/invoicable" target="_blank"><i
class="bi bi-github"></i></a>
</div>
</footer>
</div>
</div>
</div>
<!-- JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js"></script>
<script src="./index.js"></script>
</body>
</html>