PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.3.6
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.3.6
2.4.0 2.4.1 2.3.8 2.3.7 2.3.6 2.3.5 2.3.4 2.3.3 2.3.2 2.3.1 2.2.0 2.1.21 2.1.20 2.1.19 2.1.18 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.2 All 57 releases
easy-invoice / templates / invoice-templates / legacy.php

legacy.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.3.6, at templates/invoice-templates/legacy.php

403 lines 11.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Legacy Invoice Template
4 * Clean, minimalist design with traditional business layout
5 */
6
7 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::getInvoiceTextSettings();
8 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
9 ?>
10
11 <style>
12 /* Legacy Template Styles - Clean Minimalist Design */
13 .template-legacy {
14 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
15 max-width: 800px;
16 margin: 0 auto;
17 padding: 40px;
18 background: #ffffff;
19 color: #000000;
20 line-height: 1.6;
21 font-weight: 400;
22 }
23
24 /* Header Section */
25 .template-legacy .invoice-header {
26 display: flex;
27 justify-content: space-between;
28 align-items: flex-start;
29
30 }
31
32 .template-legacy .company-info {
33 flex: 1;
34 }
35
36 .template-legacy .company-logo {
37 margin-bottom: 1rem;
38 }
39
40 .template-legacy .logo-image {
41 max-height: 50px;
42 max-width: 180px;
43 object-fit: contain;
44 }
45
46 .template-legacy .company-name {
47 font-size: 22px;
48 font-weight: 800;
49 color: #2563eb;
50 margin-bottom: 8px;
51 letter-spacing: -0.025em;
52 }
53
54 .template-legacy .company-details {
55 color: #333333;
56 font-size: 14px;
57 line-height: 1.6;
58 font-weight: 500;
59 }
60
61 .template-legacy .invoice-title-section {
62 text-align: right;
63 flex: 1;
64 }
65
66 .template-legacy .invoice-title {
67 font-size: 20px;
68 font-weight: 700;
69 color: #111827;
70 margin-bottom: 5px;
71 }
72
73 .template-legacy .invoice-meta {
74 border: 1px solid #d1d5db;
75 background: #ffffff;
76 width: 280px;
77 margin-left: auto;
78 }
79
80 .template-legacy .meta-item {
81 display: flex;
82 justify-content: space-between;
83 align-items: center;
84 padding: 12px 16px;
85 border-bottom: 1px solid #d1d5db;
86 }
87
88 .template-legacy .meta-item:last-child {
89 border-bottom: none;
90 }
91
92 .template-legacy .meta-label {
93 font-weight: 600;
94 color: #000000;
95 font-size: 14px;
96 }
97
98 .template-legacy .meta-value {
99 color: #111827;
100 font-size: 14px;
101 }
102
103 .template-legacy .total-due {
104 font-weight: 700;
105 font-size: 16px;
106 color: #111827;
107 }
108
109 /* Address Section */
110 .template-legacy .address-section {
111 margin-bottom: 20px;
112 }
113
114 .template-legacy .address-block {
115 margin-bottom: 20px;
116 }
117
118 .template-legacy .address-block h2 {
119 font-size: 16px;
120 font-weight: 600;
121 color: #000000;
122 margin-bottom: 8px;
123 text-transform: uppercase;
124 letter-spacing: 0.5px;
125 }
126
127 .template-legacy .address-content {
128 color: #333333;
129 font-size: 14px;
130 line-height: 1.5;
131 }
132
133 .template-legacy .client-name {
134 font-weight: 600;
135 color: #111827;
136 margin-bottom: 4px;
137 }
138
139 /* Description Section */
140 .template-legacy .description-section {
141 margin-bottom: 30px;
142 padding: 16px;
143 background: #f9fafb;
144 border-radius: 8px;
145 border-left: 4px solid #e5e7eb;
146 }
147
148 .template-legacy .description-content {
149 color: #000000;
150 font-size: 14px;
151 line-height: 1.6;
152 }
153
154 /* Invoice Items Table */
155 .template-legacy .invoice-items {
156 width: 100%;
157 border-collapse: collapse;
158 margin-bottom: 20px;
159 border: 1px solid #d1d5db;
160 }
161
162 .template-legacy .invoice-items thead {
163 background: #f3f4f6;
164 }
165
166 .template-legacy .invoice-items th {
167 padding: 14px 16px;
168 text-align: left;
169 font-weight: 700;
170 color: #000000;
171 font-size: 14px;
172 border: 1px solid #d1d5db;
173 text-transform: uppercase;
174 letter-spacing: 0.5px;
175 }
176
177 .template-legacy .invoice-items td {
178 padding: 14px 16px;
179 border: 1px solid #d1d5db;
180 font-size: 14px;
181 vertical-align: top;
182 color: #000000;
183 }
184
185 /* PDF-specific border fixes to prevent 2px borders */
186 .template-legacy .invoice-items th,
187 .template-legacy .invoice-items td {
188 border-width: 1px !important;
189 border-style: solid !important;
190 border-color: #d1d5db !important;
191 }
192
193 .template-legacy .invoice-meta {
194 border-width: 1px !important;
195 border-style: solid !important;
196 border-color: #d1d5db !important;
197 }
198
199 .template-legacy .meta-item {
200 border-bottom-width: 1px !important;
201 border-bottom-style: solid !important;
202 border-bottom-color: #d1d5db !important;
203 }
204
205 .template-legacy .invoice-items tbody tr:hover {
206 background-color: #f9fafb;
207 }
208
209 .template-legacy .item-name .item-title {
210 font-weight: 600;
211 color: #111827;
212 margin-bottom: 4px;
213 }
214
215 .template-legacy .item-name .item-description {
216 color: #6b7280;
217 font-size: 13px;
218 }
219
220 .template-legacy .item-quantity,
221 .template-legacy .item-price,
222 .template-legacy .item-adjust,
223 .template-legacy .item-total {
224 text-align: right;
225 }
226
227 /* Invoice Totals */
228 .template-legacy .invoice-totals {
229 margin-left: auto;
230 width: 300px;
231 border: 1px solid #e5e7eb;
232 border-radius: 8px;
233 overflow: hidden;
234 background: #ffffff;
235 }
236
237 .template-legacy .invoice-total-row {
238 display: flex;
239 justify-content: space-between;
240 align-items: center;
241 padding: 12px 16px;
242 border-bottom: 1px solid #e5e7eb;
243 }
244
245 .template-legacy .invoice-total-row:last-child {
246 border-bottom: none;
247 }
248
249 .template-legacy .invoice-total-label {
250 font-weight: 600;
251 color: #374151;
252 font-size: 14px;
253 }
254
255 .template-legacy .invoice-total-value {
256 color: #111827;
257 font-size: 14px;
258 }
259
260 .template-legacy .invoice-grand-total {
261 background: #f9fafb;
262 border-top: 1px solid #e5e7eb;
263 margin-top: 0;
264 padding-top: 12px;
265 }
266
267 .template-legacy .invoice-grand-total .invoice-total-label,
268 .template-legacy .invoice-grand-total .invoice-total-value {
269 font-weight: 700;
270 font-size: 16px;
271 color: #111827;
272 }
273
274 /* Footer */
275 .template-legacy .invoice-footer {
276 margin-top: 20px;
277 border-top: 1px solid #e5e7eb;
278 text-align: center;
279 }
280
281 .template-legacy .invoice-footer p {
282 color: #6b7280;
283 font-size: 14px;
284 margin-bottom: 16px;
285 }
286
287 .template-legacy .footer-company {
288 color: #9ca3af;
289 font-size: 13px;
290 }
291 </style>
292
293 <div class="template-legacy">
294 <div class="invoice-header">
295 <div class="company-info">
296 <div class="company-logo">
297 <?php if (!empty($company_info['logo'])): ?>
298 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
299 <?php endif; ?>
300 </div>
301 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
302 <div class="company-details">
303 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
304 </div>
305 </div>
306
307 <div class="invoice-title-section">
308 <div class="invoice-title"><?php echo esc_html($invoice->getTitle() ?: __('Invoice', 'easy-invoice')); ?></div>
309 <div class="invoice-meta">
310 <div class="meta-item">
311 <span class="meta-label"><?php echo esc_html($text_settings['invoice_number']); ?></span>
312 <span class="meta-value"><?php echo esc_html($invoice->getNumber()); ?></span>
313 </div>
314 <div class="meta-item">
315 <span class="meta-label"><?php echo esc_html($text_settings['invoice_date']); ?></span>
316 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getIssueDate())); ?></span>
317 </div>
318 <div class="meta-item">
319 <span class="meta-label"><?php echo esc_html($text_settings['due_date']); ?></span>
320 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getDueDate())); ?></span>
321 </div>
322 <div class="meta-item">
323 <span class="meta-label"><?php echo esc_html($text_settings['total_due']); ?></span>
324 <span class="meta-value total-due"><?php echo esc_html($formatter->format($invoice->getTotal())); ?></span>
325 </div>
326 </div>
327 </div>
328 </div>
329
330 <div class="address-section">
331 <div class="address-block">
332 <h2><?php echo esc_html($text_settings['to']); ?></h2>
333 <div class="address-content">
334 <div class="client-name"><?php echo esc_html($invoice->getCustomerName()); ?></div>
335 <?php if ($invoice->getCustomerAddress()): ?>
336 <?php echo nl2br(esc_html($invoice->getCustomerAddress())); ?><br>
337 <?php endif; ?>
338 <?php if ($invoice->getCustomerEmail()): ?>
339 <?php echo esc_html($invoice->getCustomerEmail()); ?><br>
340 <?php endif; ?>
341 </div>
342 </div>
343 </div>
344
345 <?php if ($invoice->getNotes()): ?>
346 <div class="description-section">
347 <div class="description-content">
348 <?php echo nl2br(esc_html($invoice->getNotes())); ?>
349 </div>
350 </div>
351 <?php endif; ?>
352
353 <table class="invoice-items">
354 <thead>
355 <tr>
356 <th><?php echo esc_html($text_settings['service']); ?></th>
357 <th><?php echo esc_html($text_settings['qty']); ?></th>
358 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
359 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
360 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
361 <?php endif; ?>
362 <th><?php echo esc_html($text_settings['total']); ?></th>
363 </tr>
364 </thead>
365 <tbody>
366 <?php foreach ($invoice->getItems() as $item): ?>
367 <tr>
368 <td class="item-name">
369 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
370 <?php if ($item->getDescription()): ?>
371 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
372 <?php endif; ?>
373 </td>
374 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
375 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
376 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
377 <td class="item-adjust"><?php
378 $adjust_percentage = $item->getAdjustPercentage();
379 if ($adjust_percentage != 0) {
380 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
381 } else {
382 echo esc_html__('—', 'easy-invoice');
383 }
384 ?></td>
385 <?php endif; ?>
386 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
387 </tr>
388 <?php endforeach; ?>
389 </tbody>
390 </table>
391
392 <div class="invoice-totals">
393 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($invoice, $text_settings, $formatter, 'invoice'); ?>
394 </div>
395
396 <div class="invoice-footer">
397 <p>Payment is due within <?php echo esc_html($invoice->getDueDays() ?: 30); ?> days from date of invoice.</p>
398 <div class="footer-company">
399 Thanks for choosing <?php echo esc_html($company_info['name']); ?> | <?php echo esc_html($company_info['email'] ?? '[email protected]'); ?>
400 </div>
401 </div>
402 </div>
403