PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.0
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.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 / elegant.php

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

633 lines 23.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elegant Template - Sophisticated Design
4 * Elegant, sophisticated, and refined invoice template
5 */
6
7 if ( ! defined( 'ABSPATH' ) ) {
8 exit;
9 }
10 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::forDocument(\EasyInvoice\Helpers\TemplateTextHelper::getInvoiceTextSettings(), $invoice);
11 $ei_is_credit_note = \EasyInvoice\Helpers\TemplateTextHelper::isCreditNote($invoice);
12 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
13 ?>
14 <style>
15 /* Elegant Template - Sophisticated Design */
16 :root {
17 --primary-color: #8a6a3d;
18 --primary-light: #b08d57;
19 --primary-dark: #5f4627;
20 --secondary-color: #8a6a3d;
21 --accent-color: #f59e0b;
22 --success-color: #10b981;
23 --warning-color: #f59e0b;
24 --error-color: #ef4444;
25 --text-primary: #1f1b16;
26 --text-secondary: #5b544c;
27 --text-muted: #8a8279;
28 --border-color: #d9d2c7;
29 --border-light: #ebe6de;
30 --background-primary: #ffffff;
31 --background-secondary: #ffffff;
32 --background-accent: #faf8f4;
33
34 --font-family: 'Georgia', 'Times New Roman', serif;
35 --font-family-heading: 'Georgia', 'Times New Roman', serif;
36 --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
37
38 --font-size-xs: 0.75rem;
39 --font-size-sm: 0.875rem;
40 --font-size-base: 1rem;
41 --font-size-lg: 1.125rem;
42 --font-size-xl: 1.25rem;
43 --font-size-2xl: 1.5rem;
44 --font-size-3xl: 1.875rem;
45 --font-size-4xl: 2.25rem;
46
47 --spacing-1: 0.25rem;
48 --spacing-2: 0.5rem;
49 --spacing-3: 0.75rem;
50 --spacing-4: 1rem;
51 --spacing-5: 1.25rem;
52 --spacing-6: 1.5rem;
53 --spacing-8: 2rem;
54 --spacing-10: 2.5rem;
55 --spacing-12: 3rem;
56 --spacing-16: 4rem;
57 --spacing-20: 5rem;
58
59 --radius-sm: 0.25rem;
60 --radius-md: 0.375rem;
61 --radius-lg: 0.5rem;
62 --radius-xl: 0.75rem;
63 --radius-2xl: 1rem;
64
65 --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
66 --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
67 --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
68 --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
69 --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
70 }
71
72 .template-elegant {
73 font-family: var(--font-family-body);
74 background: var(--background-primary);
75 color: var(--text-primary);
76 max-width: 1000px;
77 margin: 0 auto;
78 padding: var(--spacing-8);
79 box-shadow: var(--shadow-2xl);
80 border-radius: var(--radius-2xl);
81 line-height: 1.6;
82 position: relative;
83 overflow: hidden;
84 }
85
86 .template-elegant::before {
87 content: '';
88 position: absolute;
89 top: 0;
90 left: 0;
91 right: 0;
92 height: 8px;
93 background: var(--primary-color);
94 }
95
96 /* Header Section */
97 .template-elegant .invoice-header {
98 display: grid;
99 grid-template-columns: 1fr auto;
100 gap: var(--spacing-8);
101 margin-bottom: var(--spacing-12);
102 padding-bottom: var(--spacing-8);
103 border-bottom: 2px solid var(--border-light);
104 position: relative;
105 }
106
107 .template-elegant .invoice-header::after {
108 content: '';
109 position: absolute;
110 bottom: -2px;
111 left: 0;
112 width: 120px;
113 height: 2px;
114 background: var(--primary-color);
115 border-radius: var(--radius-sm);
116 }
117
118 .template-elegant .company-info {
119 display: flex;
120 flex-direction: column;
121 gap: var(--spacing-4);
122 }
123
124 .template-elegant .company-logo {
125 margin-bottom: 0;
126 }
127
128 .template-elegant .logo-image {
129 max-height: 60px;
130 max-width: 200px;
131 object-fit: contain;
132 filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
133 }
134
135 .template-elegant .company-name {
136 font-family: var(--font-family-heading);
137 font-size: var(--font-size-2xl);
138 font-weight: 700;
139 color: var(--text-primary);
140 margin-bottom: var(--spacing-3);
141 line-height: 1.2;
142 }
143
144 .template-elegant .company-details {
145 color: var(--text-secondary);
146 font-size: var(--font-size-sm);
147 line-height: 1.5;
148 }
149
150 .template-elegant .invoice-meta {
151 display: flex;
152 flex-direction: column;
153 gap: var(--spacing-4);
154 background: var(--background-secondary);
155 padding: var(--spacing-6);
156 border-radius: var(--radius-lg);
157 border: 1px solid var(--border-color);
158 min-width: 300px;
159 box-shadow: var(--shadow-md);
160 }
161
162 .template-elegant .invoice-title {
163 font-family: var(--font-family-heading);
164 font-size: var(--font-size-2xl);
165 font-weight: 700;
166 color: var(--primary-color);
167 margin-bottom: var(--spacing-4);
168 text-align: center;
169 text-transform: uppercase;
170 letter-spacing: -0.025em;
171 font-style: italic;
172 }
173
174 .template-elegant .meta-item {
175 display: flex;
176 justify-content: space-between;
177 align-items: center;
178 padding: var(--spacing-3) 0;
179 border-bottom: 1px solid var(--border-light);
180 }
181
182 .template-elegant .meta-item:last-child {
183 border-bottom: none;
184 }
185
186 .template-elegant .meta-label {
187 font-size: var(--font-size-sm);
188 color: var(--text-secondary);
189 font-weight: 500;
190 }
191
192 .template-elegant .meta-value {
193 font-size: var(--font-size-base);
194 color: var(--text-primary);
195 font-weight: 600;
196 }
197
198 /* Address Section */
199 .template-elegant .address-section {
200 display: grid;
201 grid-template-columns: 1fr 1fr;
202 gap: var(--spacing-8);
203 margin-bottom: var(--spacing-12);
204 }
205
206 .template-elegant .address-block {
207 background: var(--background-secondary);
208 padding: var(--spacing-6);
209 border-radius: var(--radius-lg);
210 border: 1px solid var(--border-color);
211 position: relative;
212 overflow: hidden;
213 }
214
215 .template-elegant .address-block::before {
216 content: '';
217 position: absolute;
218 top: 0;
219 left: 0;
220 right: 0;
221 height: 3px;
222 background: var(--primary-color);
223 }
224
225 .template-elegant .address-block h2 {
226 font-family: var(--font-family-heading);
227 font-size: var(--font-size-lg);
228 font-weight: 600;
229 color: var(--text-primary);
230 margin-bottom: var(--spacing-4);
231 text-transform: uppercase;
232 letter-spacing: 0.05em;
233 }
234
235 .template-elegant .client-name {
236 font-weight: 600;
237 color: var(--text-primary);
238 font-size: var(--font-size-base);
239 margin-bottom: var(--spacing-2);
240 }
241
242 .template-elegant .address-content {
243 color: var(--text-secondary);
244 font-size: var(--font-size-sm);
245 line-height: 1.5;
246 }
247
248 /* Invoice Items Table */
249 .template-elegant .invoice-items {
250 width: 100%;
251 border-collapse: collapse;
252 margin-bottom: var(--spacing-12);
253 background: var(--background-primary);
254 border-radius: var(--radius-lg);
255 overflow: hidden;
256 box-shadow: var(--shadow-lg);
257 border: 1px solid var(--border-color);
258 }
259
260 .template-elegant .invoice-items th {
261 background: var(--primary-color);
262 color: white;
263 font-weight: 600;
264 text-align: left;
265 padding: var(--spacing-4) var(--spacing-6);
266 font-size: var(--font-size-sm);
267 text-transform: uppercase;
268 letter-spacing: 0.05em;
269 }
270
271 .template-elegant .invoice-items td {
272 padding: var(--spacing-4) var(--spacing-6);
273 border-bottom: 1px solid var(--border-light);
274 vertical-align: top;
275 }
276
277 .template-elegant .invoice-items tr:last-child td {
278 border-bottom: none;
279 }
280
281 .template-elegant .invoice-items tr:hover {
282 background: var(--background-accent);
283 }
284
285 .template-elegant .item-name .item-title {
286 font-weight: 600;
287 color: var(--text-primary);
288 margin-bottom: var(--spacing-1);
289 }
290
291 .template-elegant .item-description {
292 color: var(--text-muted);
293 font-size: var(--font-size-sm);
294 line-height: 1.4;
295 font-weight: normal;
296 }
297
298 .template-elegant .item-quantity,
299 .template-elegant .item-price,
300 .template-elegant .item-total {
301 text-align: right;
302 font-weight: 500;
303 color: var(--text-primary);
304 }
305
306 /* Invoice Totals */
307 .template-elegant .invoice-totals {
308 margin-left: auto;
309 width: 400px;
310 background: var(--background-secondary);
311 padding: var(--spacing-8);
312 border-radius: var(--radius-lg);
313 border: 1px solid var(--border-color);
314 box-shadow: var(--shadow-md);
315 }
316
317 .template-elegant .invoice-total-row {
318 display: flex;
319 justify-content: space-between;
320 align-items: center;
321 padding: var(--spacing-3) 0;
322 border-bottom: 1px solid var(--border-light);
323 }
324
325 .template-elegant .invoice-total-row:last-child {
326 border-bottom: none;
327 }
328
329 .template-elegant .invoice-total-label {
330 font-weight: 500;
331 color: var(--text-secondary);
332 }
333
334 .template-elegant .invoice-total-value {
335 font-weight: 600;
336 color: var(--text-primary);
337 }
338
339 .template-elegant .invoice-totals .invoice-grand-total {
340 font-size: var(--font-size-xl);
341 font-weight: 700;
342 color: var(--primary-color);
343 border-top: 2px solid var(--primary-color);
344 padding-top: var(--spacing-4);
345 margin-top: var(--spacing-4);
346 }
347
348 /* Notes Section */
349 .template-elegant .invoice-notes {
350 margin-top: var(--spacing-8);
351 padding: var(--spacing-6);
352 background: var(--background-secondary);
353 border-radius: var(--radius-lg);
354 border: 1px solid var(--border-color);
355 }
356
357 .template-elegant .invoice-notes h3 {
358 font-family: var(--font-family-heading);
359 font-size: var(--font-size-lg);
360 font-weight: 600;
361 color: var(--text-primary);
362 margin-bottom: var(--spacing-3);
363 border-bottom: 1px solid var(--border-color);
364 padding-bottom: var(--spacing-2);
365 }
366
367 .template-elegant .notes-content {
368 color: var(--text-secondary);
369 font-size: var(--font-size-sm);
370 line-height: 1.6;
371 }
372
373 .template-elegant .invoice-terms {
374 margin-top: var(--spacing-8);
375 padding: var(--spacing-6);
376 background: var(--background-secondary);
377 border-radius: var(--radius-lg);
378 border: 1px solid var(--border-color);
379 }
380
381 .template-elegant .invoice-terms h3 {
382 font-family: var(--font-family-heading);
383 font-size: var(--font-size-lg);
384 font-weight: 600;
385 color: var(--text-primary);
386 margin-bottom: var(--spacing-3);
387 border-bottom: 1px solid var(--border-color);
388 padding-bottom: var(--spacing-2);
389 }
390
391 .template-elegant .terms-content {
392 color: var(--text-secondary);
393 font-size: var(--font-size-sm);
394 line-height: 1.6;
395 }
396
397 .template-elegant .invoice-footer {
398 margin-top: var(--spacing-8);
399 padding-top: var(--spacing-6);
400 border-top: 2px solid var(--border-light);
401 text-align: center;
402 color: var(--text-secondary);
403 font-size: var(--font-size-sm);
404 }
405
406 /* Responsive Design */
407 @media (max-width: 768px) {
408 .template-elegant {
409 padding: var(--spacing-4);
410 }
411
412 .template-elegant .invoice-header {
413 grid-template-columns: 1fr;
414 gap: var(--spacing-6);
415 }
416
417 .template-elegant .invoice-meta {
418 min-width: auto;
419 }
420
421 .template-elegant .address-section {
422 grid-template-columns: 1fr;
423 gap: var(--spacing-6);
424 }
425
426 .template-elegant .invoice-totals {
427 width: 100%;
428 }
429 }
430
431 /* Shared polish: numbers line up, numeric headings sit over their figures. */
432 .template-elegant .invoice-items th + th { text-align: right; }
433 .template-elegant .invoice-items .item-quantity,
434 .template-elegant .invoice-items .item-price,
435 .template-elegant .invoice-items .item-adjust,
436 .template-elegant .invoice-items .item-total,
437 .template-elegant .invoice-total-value { font-variant-numeric: tabular-nums; white-space: nowrap; }
438 .template-elegant .meta-value { white-space: nowrap; }
439 .template-elegant .invoice-items .item-adjust { text-align: right; }
440 .template-elegant .client-contact { font-weight: 500; margin-bottom: 0.15em; }
441 .template-elegant .client-tax-number,
442 .template-elegant .company-tax-number { margin-top: 0.35em; }
443 .template-elegant .invoice-items .item-description { white-space: pre-line; }
444
445 /* Elegant: ink, hairlines and small capitals; nothing sits in a tinted panel. */
446 .template-elegant { border-radius: 0; font-family: var(--font-family-body); }
447 .template-elegant::before { height: 4px; background: var(--primary-color); }
448 .template-elegant .invoice-header { border-bottom: 1px solid var(--border-color); padding-bottom: var(--spacing-6); margin-bottom: var(--spacing-8); }
449 .template-elegant .invoice-header::after { display: none; }
450 .template-elegant .company-name { font-family: var(--font-family-heading); font-weight: 400; font-size: var(--font-size-3xl); letter-spacing: 0.01em; }
451 .template-elegant .invoice-meta { background: transparent; border: 0; box-shadow: none; padding: 0; min-width: 280px; gap: 0; }
452 .template-elegant .invoice-title { font-family: var(--font-family-heading); font-style: normal; font-weight: 400; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.22em; font-size: var(--font-size-xl); text-align: right; margin-bottom: var(--spacing-4); }
453 .template-elegant .meta-item { border-bottom: 1px solid var(--border-light); padding: var(--spacing-2) 0; }
454 .template-elegant .meta-item:last-child { border-bottom: 0; }
455 .template-elegant .meta-label { text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--font-size-xs); color: var(--text-muted); }
456 .template-elegant .meta-value { font-weight: 500; font-size: var(--font-size-sm); }
457 .template-elegant .address-section { margin-bottom: var(--spacing-8); }
458 .template-elegant .address-block { background: transparent; border: 0; padding: 0; overflow: visible; }
459 .template-elegant .address-block::before { display: none; }
460 .template-elegant .address-block h2 { font-family: var(--font-family-body); font-size: var(--font-size-xs); letter-spacing: 0.16em; color: var(--text-muted); margin-bottom: var(--spacing-2); }
461 .template-elegant .client-name { font-family: var(--font-family-heading); font-size: var(--font-size-lg); font-weight: 400; }
462 .template-elegant .invoice-items { border: 0; box-shadow: none; border-radius: 0; border-top: 1px solid var(--text-primary); border-bottom: 1px solid var(--text-primary); margin-bottom: var(--spacing-8); }
463 .template-elegant .invoice-items th { background: transparent; color: var(--text-muted); font-size: var(--font-size-xs); letter-spacing: 0.16em; font-weight: 500; padding: var(--spacing-3) var(--spacing-3); border-bottom: 1px solid var(--border-color); }
464 .template-elegant .invoice-items td { padding: var(--spacing-4) var(--spacing-3); border-bottom: 1px solid var(--border-light); }
465 .template-elegant .invoice-items th:first-child, .template-elegant .invoice-items td:first-child { padding-left: 0; }
466 .template-elegant .invoice-items th:last-child, .template-elegant .invoice-items td:last-child { padding-right: 0; }
467 .template-elegant .invoice-items tr:hover { background: transparent; }
468 .template-elegant .item-name .item-title { font-family: var(--font-family-heading); font-weight: 400; font-size: var(--font-size-base); }
469 .template-elegant .invoice-totals { background: transparent; border: 0; box-shadow: none; padding: 0; width: 340px; }
470 .template-elegant .invoice-total-row { padding: var(--spacing-2) 0; border-bottom: 1px solid var(--border-light); }
471 .template-elegant .invoice-total-label { text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--font-size-xs); color: var(--text-muted); font-weight: 500; }
472 .template-elegant .invoice-total-value { font-weight: 500; }
473 .template-elegant .invoice-totals .invoice-grand-total { border-top: 1px solid var(--text-primary); border-bottom: 3px double var(--text-primary); color: var(--text-primary); padding: var(--spacing-3) 0; margin-top: var(--spacing-2); font-size: var(--font-size-lg); }
474 .template-elegant .invoice-totals .invoice-grand-total .invoice-total-label { color: var(--text-primary); font-size: var(--font-size-sm); }
475 .template-elegant .invoice-totals .invoice-grand-total .invoice-total-value { font-family: var(--font-family-heading); font-weight: 400; font-size: var(--font-size-2xl); color: var(--primary-color); }
476 .template-elegant .invoice-notes, .template-elegant .invoice-terms { background: transparent; border: 0; border-top: 1px solid var(--border-color); border-radius: 0; padding: var(--spacing-5) 0 0; margin-top: var(--spacing-6); }
477 .template-elegant .invoice-notes h3, .template-elegant .invoice-terms h3 { border: 0; padding: 0; font-family: var(--font-family-body); font-size: var(--font-size-xs); text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-muted); font-weight: 500; margin-bottom: var(--spacing-2); }
478 .template-elegant .invoice-footer { border-top: 1px solid var(--border-color); font-family: var(--font-family-heading); font-style: italic; }
479 .template-elegant .document-kind { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted, #8a8a8a); font-family: var(--font-family-body, inherit); font-style: normal; margin-bottom: 0.3em; line-height: 1.2; }
480 .template-elegant .invoice-totals .invoice-paid-row .invoice-total-value { color: var(--success-color, #047857); }
481 .template-elegant .invoice-totals .invoice-balance-due { font-weight: 700; }
482 .template-elegant .invoice-totals .invoice-balance-due .invoice-total-label { color: inherit; font-weight: 700; }
483 .template-elegant .meta-amount-due .meta-value { font-weight: 700; font-size: 1.08em; }
484 </style>
485
486 <div class="template template-elegant">
487 <div class="invoice-header">
488 <div class="company-info">
489 <?php if (!empty($company_info['logo'])): ?>
490 <div class="company-logo">
491 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image" onerror="this.parentNode.parentNode.removeChild(this.parentNode)">
492 </div>
493 <?php endif; ?>
494 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
495 <div class="company-details">
496 <?php echo wp_kses_post(\EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only')); ?>
497 </div>
498 </div>
499
500 <div class="invoice-meta">
501 <?php $ei_kind = \EasyInvoice\Helpers\TemplateTextHelper::documentKind($invoice); $ei_title = trim((string) $invoice->getTitle()); ?>
502 <div class="invoice-title"><?php if ('' !== $ei_title && 0 !== strcasecmp($ei_title, $ei_kind)) : ?><span class="document-kind"><?php echo esc_html($ei_kind); ?></span><?php endif; ?><?php echo esc_html('' !== $ei_title ? $ei_title : $ei_kind); ?></div>
503 <div class="meta-item">
504 <span class="meta-label"><?php echo esc_html($text_settings['invoice_number']); ?></span>
505 <span class="meta-value"><?php echo esc_html($invoice->getNumber()); ?></span>
506 </div>
507 <div class="meta-item">
508 <span class="meta-label"><?php echo esc_html($text_settings['invoice_date']); ?></span>
509 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getIssueDate())); ?></span>
510 </div>
511 <?php if (empty($ei_is_credit_note)) : ?>
512 <div class="meta-item">
513 <span class="meta-label"><?php echo esc_html($text_settings['due_date']); ?></span>
514 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getDueDate())); ?></span>
515 </div>
516 <?php endif; ?>
517 <?php if (empty($ei_is_credit_note)) : ?>
518 <div class="meta-item meta-amount-due">
519 <span class="meta-label"><?php echo esc_html($text_settings['total_due']); ?></span>
520 <span class="meta-value"><?php echo esc_html($formatter->format(\EasyInvoice\Helpers\TemplateTextHelper::amountDue($invoice))); ?></span>
521 </div>
522 <?php endif; ?>
523 </div>
524 </div>
525
526 <?php $ei_client_html = \EasyInvoice\Helpers\TemplateTextHelper::generateClientBlock($invoice); if ('' !== $ei_client_html) : ?>
527 <div class="address-section">
528 <div class="address-block">
529 <h2><?php echo esc_html($text_settings['to']); ?></h2>
530 <div class="address-content">
531 <?php echo wp_kses_post($ei_client_html); ?>
532 </div>
533 </div>
534 </div>
535 <?php endif; ?>
536
537 <?php
538 // The adjustment column appears only when at least one line uses it.
539 $ei_show_adjust = \EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField();
540 if ($ei_show_adjust) {
541 $ei_show_adjust = false;
542 foreach ($invoice->getItems() as $ei_item) {
543 if ((float) $ei_item->getAdjustPercentage() != 0.0) { $ei_show_adjust = true; break; }
544 }
545 }
546 ?>
547 <table class="invoice-items">
548 <thead>
549 <tr>
550 <th><?php echo esc_html($text_settings['service']); ?></th>
551 <th><?php echo esc_html($text_settings['qty']); ?></th>
552 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
553 <?php if ($ei_show_adjust): ?>
554 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
555 <?php endif; ?>
556 <th><?php echo esc_html($text_settings['line_total'] ?? $text_settings['total']); ?></th>
557 </tr>
558 </thead>
559 <tbody>
560 <?php if (!$invoice->getItems()) : ?>
561 <tr class="no-items"><td colspan="<?php echo $ei_show_adjust ? 5 : 4; ?>" style="text-align:center;color:#9ca3af;padding:18px;"><?php esc_html_e('No items yet.', 'easy-invoice'); ?></td></tr>
562 <?php endif; ?>
563 <?php foreach ($invoice->getItems() as $item): ?>
564 <tr>
565 <td class="item-name">
566 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
567 <?php if ($item->getDescription()): ?>
568 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
569 <?php endif; ?>
570 </td>
571 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
572 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
573 <?php if ($ei_show_adjust): ?>
574 <td class="item-adjust"><?php
575 $adjust_percentage = $item->getAdjustPercentage();
576 if ($adjust_percentage != 0) {
577 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
578 } else {
579 echo esc_html__('—', 'easy-invoice');
580 }
581 ?></td>
582 <?php endif; ?>
583 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
584 </tr>
585 <?php endforeach; ?>
586 </tbody>
587 </table>
588
589 <div class="invoice-totals">
590 <?php echo wp_kses_post(\EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($invoice, $text_settings, $formatter, 'invoice')); ?>
591 </div>
592
593 <?php if ($invoice->getNotes()): ?>
594 <div class="invoice-notes">
595 <h3><?php esc_html_e('Notes', 'easy-invoice'); ?></h3>
596 <div class="notes-content">
597 <?php echo wp_kses_post($invoice->getNotes() ?: ''); ?>
598 </div>
599 </div>
600 <?php endif; ?>
601
602 <?php
603 $terms_conditions = empty($ei_is_credit_note) ? ($invoice->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getInvoiceTermsConditions()) : '';
604 if ($terms_conditions):
605 ?>
606 <div class="invoice-terms">
607 <h3><?php esc_html_e('Terms & Conditions', 'easy-invoice'); ?></h3>
608 <div class="terms-content">
609 <?php echo wp_kses_post($terms_conditions); ?>
610 </div>
611 </div>
612 <?php endif; ?>
613
614 <?php
615 /**
616 * Fires inside the document card, after notes and terms and before the
617 * footer text: attachments, the signature block, e-invoicing notes. Being
618 * inside the card, it is part of what "Download as PDF" captures.
619 *
620 * @param object $document The invoice model.
621 * @param string $type 'invoice'.
622 */
623 do_action('easy_invoice_document_body_after', $invoice, 'invoice');
624
625 $ei_footer_text = \EasyInvoice\Helpers\TemplateTextHelper::footerText($invoice, 'invoice');
626 if ('' !== trim(wp_strip_all_tags((string) $ei_footer_text))) :
627 ?>
628 <div class="invoice-footer">
629 <p><?php echo wp_kses_post($ei_footer_text); ?></p>
630 </div>
631 <?php endif; ?>
632 </div>
633