PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.2.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.2.0
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.2.0, at templates/invoice-templates/legacy.php

409 lines 11.4 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 <!-- Header Section -->
295 <div class="invoice-header">
296 <div class="company-info">
297 <div class="company-logo">
298 <?php if (!empty($company_info['logo'])): ?>
299 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
300 <?php endif; ?>
301 </div>
302 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
303 <div class="company-details">
304 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
305 </div>
306 </div>
307
308 <div class="invoice-title-section">
309 <div class="invoice-title"><?php echo esc_html($invoice->getTitle() ?: __('Invoice', 'easy-invoice')); ?></div>
310 <div class="invoice-meta">
311 <div class="meta-item">
312 <span class="meta-label"><?php echo esc_html($text_settings['invoice_number']); ?></span>
313 <span class="meta-value"><?php echo esc_html($invoice->getNumber()); ?></span>
314 </div>
315 <div class="meta-item">
316 <span class="meta-label"><?php echo esc_html($text_settings['invoice_date']); ?></span>
317 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getIssueDate())); ?></span>
318 </div>
319 <div class="meta-item">
320 <span class="meta-label"><?php echo esc_html($text_settings['due_date']); ?></span>
321 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getDueDate())); ?></span>
322 </div>
323 <div class="meta-item">
324 <span class="meta-label"><?php echo esc_html($text_settings['total_due']); ?></span>
325 <span class="meta-value total-due"><?php echo esc_html($formatter->format($invoice->getTotal())); ?></span>
326 </div>
327 </div>
328 </div>
329 </div>
330
331 <!-- Address Section -->
332 <div class="address-section">
333 <div class="address-block">
334 <h2><?php echo esc_html($text_settings['to']); ?></h2>
335 <div class="address-content">
336 <div class="client-name"><?php echo esc_html($invoice->getCustomerName()); ?></div>
337 <?php if ($invoice->getCustomerAddress()): ?>
338 <?php echo nl2br(esc_html($invoice->getCustomerAddress())); ?><br>
339 <?php endif; ?>
340 <?php if ($invoice->getCustomerEmail()): ?>
341 <?php echo esc_html($invoice->getCustomerEmail()); ?><br>
342 <?php endif; ?>
343 </div>
344 </div>
345 </div>
346
347 <!-- Description Section -->
348 <?php if ($invoice->getNotes()): ?>
349 <div class="description-section">
350 <div class="description-content">
351 <?php echo nl2br(esc_html($invoice->getNotes())); ?>
352 </div>
353 </div>
354 <?php endif; ?>
355
356 <!-- Invoice Items -->
357 <table class="invoice-items">
358 <thead>
359 <tr>
360 <th><?php echo esc_html($text_settings['service']); ?></th>
361 <th><?php echo esc_html($text_settings['qty']); ?></th>
362 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
363 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
364 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
365 <?php endif; ?>
366 <th><?php echo esc_html($text_settings['total']); ?></th>
367 </tr>
368 </thead>
369 <tbody>
370 <?php foreach ($invoice->getItems() as $item): ?>
371 <tr>
372 <td class="item-name">
373 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
374 <?php if ($item->getDescription()): ?>
375 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
376 <?php endif; ?>
377 </td>
378 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
379 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
380 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
381 <td class="item-adjust"><?php
382 $adjust_percentage = $item->getAdjustPercentage();
383 if ($adjust_percentage != 0) {
384 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
385 } else {
386 echo esc_html__('', 'easy-invoice');
387 }
388 ?></td>
389 <?php endif; ?>
390 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
391 </tr>
392 <?php endforeach; ?>
393 </tbody>
394 </table>
395
396 <!-- Invoice Totals -->
397 <div class="invoice-totals">
398 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($invoice, $text_settings, $formatter, 'invoice'); ?>
399 </div>
400
401 <!-- Footer -->
402 <div class="invoice-footer">
403 <p>Payment is due within <?php echo esc_html($invoice->getDueDays() ?: 30); ?> days from date of invoice.</p>
404 <div class="footer-company">
405 Thanks for choosing <?php echo esc_html($company_info['name']); ?> | <?php echo esc_html($company_info['email'] ?? 'temp@example.com'); ?>
406 </div>
407 </div>
408 </div>
409