-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReceipt.html
More file actions
209 lines (197 loc) · 5.5 KB
/
Receipt.html
File metadata and controls
209 lines (197 loc) · 5.5 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
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script src="https://cdn.jsdelivr.net/npm/qrcodejs@1.0.0/qrcode.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
body {
font-family: 'Roboto', Arial, sans-serif;
margin: 0;
background-color: #f4f4f4;
}
.receipt-container {
width: 8.5in;
height: 5.5in;
padding: 0;
box-sizing: border-box;
border: 1px solid #ccc;
display: flex;
flex-direction: column;
background-color: #fff;
overflow: hidden;
margin: auto; /* Center in view */
}
.header {
background-color: #1C2790;
color: white;
display: flex;
align-items: center;
padding: 15px 25px;
}
.header img {
width: 80px;
margin-right: 20px;
}
.header-text h2 {
margin: 0;
font-size: 1.4em;
font-weight: 700;
letter-spacing: 0.5px;
}
.header-text p {
margin: 4px 0 0;
font-size: 0.85em;
opacity: 0.9;
}
.content-area {
padding: 20px 25px;
display: flex;
flex-grow: 1;
gap: 20px;
}
.details {
flex-grow: 1;
}
.details p {
font-size: 1em;
margin-top: 0;
margin-bottom: 10px;
}
.qr-code {
text-align: center;
padding-left: 20px;
border-left: 1px solid #eee;
display: flex;
flex-direction: column;
justify-content: center;
min-width: 150px;
}
.qr-code img {
width: 130px;
height: 130px;
}
.qr-code p {
font-weight: 500;
font-size: 0.8em;
margin-top: 8px;
color: #555;
}
/* Main Info Table */
.info-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 15px;
font-size: 0.95em;
}
.info-table td {
padding: 5px;
}
.info-label {
font-weight: bold;
width: 140px;
color: #333;
}
.info-value {
color: #1C2790;
font-weight: 700;
}
/* Documents List Table */
.docs-table {
border-collapse: collapse;
width: 100%;
font-size: 0.85em;
margin-top: 10px;
border: 1px solid #e0e0e0;
}
.docs-table th {
background-color: #f2f2f2;
padding: 8px;
text-align: left;
border-bottom: 1px solid #ccc;
}
.docs-table td {
padding: 8px;
border-bottom: 1px solid #eee;
vertical-align: top;
}
.footer {
font-size: 0.8em;
color: #666;
text-align: center;
padding: 10px;
border-top: 4px solid #CDAE2C;
background-color: #f9f9f9;
}
@media print {
body { background-color: #fff; }
.receipt-container { border: none; }
}
</style>
</head>
<body>
<div class="receipt-container">
<div class="header">
<img src="https://i.imgur.com/jaEbfAR.png" alt="DAP Logo">
<div class="header-text">
<h2>Document Acknowledgement</h2>
<p>Office of the Department Manager, Finance Department</p>
</div>
</div>
<div class="content-area">
<div class="details">
<p>This serves to acknowledge receipt of the following transaction:</p>
<table class="info-table">
<tr>
<td class="info-label">Transaction ID:</td>
<td class="info-value" style="font-size: 1.2em;"><?= transactionId ?></td>
</tr>
<tr>
<td class="info-label">Contact Person:</td>
<td><?= details.ContactPerson ?></td>
</tr>
<tr>
<td class="info-label">Date Submitted:</td>
<td><?= details.Timestamp ?></td>
</tr>
</table>
<p style="font-weight:bold; font-size: 0.9em; margin-bottom:5px;">Submitted Documents:</p>
<table class="docs-table">
<thead>
<tr>
<th style="width: 25%">Type</th>
<th style="width: 45%">Title</th>
<th style="width: 30%">Dates (If ALA)</th>
</tr>
</thead>
<tbody>
<? for (var i = 0; i < details.documents.length; i++) { ?>
<tr>
<td><?= details.documents[i].type ?></td>
<td><?= details.documents[i].title ?></td>
<td><?= details.documents[i].dates ?></td>
</tr>
<? } ?>
</tbody>
</table>
</div>
<div class="qr-code">
<div id="qrcode"></div>
<p>SCAN FOR STATUS</p>
</div>
</div>
<div class="footer">
<p style="margin:0;">Please keep this receipt for your reference. This is a system-generated receipt and does not require a signature.</p>
</div>
</div>
<script>
const fullLink = "<?= appUrl ?>?action=update&id=<?= transactionId ?>";
// Generate QR Code
const qrContainer = document.getElementById('qrcode');
qrContainer.innerHTML = "";
new QRCode(qrContainer, { text: fullLink, width: 130, height: 130 });
// Auto-print
window.onload = () => window.print();
</script>
</body>
</html>