PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.4.1
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.4.1
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 / corporate.php

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

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