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 / corporate.php

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

559 lines 16.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 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::getInvoiceTextSettings();
8 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
9 ?>
10 <style>
11 /* Corporate Template - Business-Focused Design */
12 :root {
13 --primary-color: #1e3a8a;
14 --primary-light: #3b82f6;
15 --primary-dark: #1e40af;
16 --secondary-color: #64748b;
17 --accent-color: #f59e0b;
18 --success-color: #10b981;
19 --warning-color: #f59e0b;
20 --error-color: #ef4444;
21 --text-primary: #0f172a;
22 --text-secondary: #475569;
23 --text-muted: #64748b;
24 --border-color: #cbd5e1;
25 --border-light: #e2e8f0;
26 --background-primary: #ffffff;
27 --background-secondary: #f8fafc;
28 --background-accent: #f1f5f9;
29
30 --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
31 --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
32
33 --font-size-xs: 0.75rem;
34 --font-size-sm: 0.875rem;
35 --font-size-base: 1rem;
36 --font-size-lg: 1.125rem;
37 --font-size-xl: 1.25rem;
38 --font-size-2xl: 1.5rem;
39 --font-size-3xl: 1.875rem;
40 --font-size-4xl: 2.25rem;
41
42 --spacing-1: 0.25rem;
43 --spacing-2: 0.5rem;
44 --spacing-3: 0.75rem;
45 --spacing-4: 1rem;
46 --spacing-5: 1.25rem;
47 --spacing-6: 1.5rem;
48 --spacing-8: 2rem;
49 --spacing-10: 2.5rem;
50 --spacing-12: 3rem;
51 --spacing-16: 4rem;
52 --spacing-20: 5rem;
53
54 --radius-sm: 0.25rem;
55 --radius-md: 0.375rem;
56 --radius-lg: 0.5rem;
57 --radius-xl: 0.75rem;
58 --radius-2xl: 1rem;
59
60 --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
61 --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
62 --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
63 --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
64 --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
65 }
66
67 .template-corporate {
68 font-family: var(--font-family);
69 background: var(--background-primary);
70 color: var(--text-primary);
71 max-width: 1000px;
72 margin: 0 auto;
73 padding: var(--spacing-8);
74 box-shadow: var(--shadow-2xl);
75 border-radius: var(--radius-2xl);
76 line-height: 1.6;
77 position: relative;
78 overflow: hidden;
79 }
80
81 .template-corporate::before {
82 content: '';
83 position: absolute;
84 top: 0;
85 left: 0;
86 right: 0;
87 height: 8px;
88 background: var(--primary-color);
89 }
90
91 /* Header Section */
92 .template-corporate .invoice-header {
93 display: grid;
94 grid-template-columns: 1fr auto;
95 gap: var(--spacing-8);
96 margin-bottom: var(--spacing-12);
97 padding-bottom: var(--spacing-8);
98 border-bottom: 3px solid var(--border-light);
99 position: relative;
100 }
101
102 .template-corporate .invoice-header::after {
103 content: '';
104 position: absolute;
105 bottom: -3px;
106 left: 0;
107 width: 120px;
108 height: 3px;
109 background: var(--primary-color);
110 border-radius: var(--radius-sm);
111 }
112
113 .template-corporate .company-info {
114 display: flex;
115 flex-direction: column;
116 gap: var(--spacing-4);
117 }
118
119 .template-corporate .company-logo {
120 margin-bottom: 0;
121 }
122
123 .template-corporate .logo-image {
124 max-height: 60px;
125 max-width: 200px;
126 object-fit: contain;
127 filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
128 }
129
130 .template-corporate .company-name {
131 font-family: var(--font-family-heading);
132 font-size: var(--font-size-2xl);
133 font-weight: 700;
134 color: var(--text-primary);
135 margin-bottom: var(--spacing-3);
136 line-height: 1.2;
137 }
138
139 .template-corporate .company-details {
140 color: var(--text-secondary);
141 font-size: var(--font-size-sm);
142 line-height: 1.5;
143 }
144
145 .template-corporate .invoice-meta {
146 display: flex;
147 flex-direction: column;
148 gap: var(--spacing-4);
149 background: var(--background-secondary);
150 padding: var(--spacing-6);
151 border-radius: var(--radius-lg);
152 border: 1px solid var(--border-color);
153 min-width: 300px;
154 box-shadow: var(--shadow-md);
155 }
156
157 .template-corporate .invoice-title {
158 font-family: var(--font-family-heading);
159 font-size: var(--font-size-2xl);
160 font-weight: 700;
161 color: var(--primary-color);
162 margin-bottom: var(--spacing-4);
163 text-align: center;
164 text-transform: uppercase;
165 letter-spacing: -0.025em;
166 }
167
168 .template-corporate .meta-item {
169 display: flex;
170 justify-content: space-between;
171 align-items: center;
172 padding: var(--spacing-3) 0;
173 border-bottom: 1px solid var(--border-light);
174 }
175
176 .template-corporate .meta-item:last-child {
177 border-bottom: none;
178 }
179
180 .template-corporate .meta-label {
181 font-size: var(--font-size-sm);
182 color: var(--text-secondary);
183 font-weight: 500;
184 }
185
186 .template-corporate .meta-value {
187 font-size: var(--font-size-base);
188 color: var(--text-primary);
189 font-weight: 600;
190 }
191
192 /* Address Section */
193 .template-corporate .address-section {
194 display: grid;
195 grid-template-columns: 1fr 1fr;
196 gap: var(--spacing-8);
197 margin-bottom: var(--spacing-12);
198 }
199
200 .template-corporate .address-block {
201 background: var(--background-secondary);
202 padding: var(--spacing-6);
203 border-radius: var(--radius-lg);
204 border: 1px solid var(--border-color);
205 position: relative;
206 overflow: hidden;
207 }
208
209 .template-corporate .address-block::before {
210 content: '';
211 position: absolute;
212 top: 0;
213 left: 0;
214 right: 0;
215 height: 3px;
216 background: var(--primary-color);
217 }
218
219 .template-corporate .address-block h2 {
220 font-family: var(--font-family-heading);
221 font-size: var(--font-size-lg);
222 font-weight: 600;
223 color: var(--text-primary);
224 margin-bottom: var(--spacing-4);
225 text-transform: uppercase;
226 letter-spacing: 0.05em;
227 }
228
229 .template-corporate .client-name {
230 font-weight: 600;
231 color: var(--text-primary);
232 font-size: var(--font-size-base);
233 margin-bottom: var(--spacing-2);
234 }
235
236 .template-corporate .address-content {
237 color: var(--text-secondary);
238 font-size: var(--font-size-sm);
239 line-height: 1.5;
240 }
241
242 /* Invoice Items Table */
243 .template-corporate .invoice-items {
244 width: 100%;
245 border-collapse: collapse;
246 margin-bottom: var(--spacing-12);
247 background: var(--background-primary);
248 border-radius: var(--radius-lg);
249 overflow: hidden;
250 box-shadow: var(--shadow-lg);
251 border: 1px solid var(--border-color);
252 }
253
254 .template-corporate .invoice-items th {
255 background: var(--primary-color);
256 color: white;
257 font-weight: 600;
258 text-align: left;
259 padding: var(--spacing-4) var(--spacing-6);
260 font-size: var(--font-size-sm);
261 text-transform: uppercase;
262 letter-spacing: 0.05em;
263 }
264
265 .template-corporate .invoice-items td {
266 padding: var(--spacing-4) var(--spacing-6);
267 border-bottom: 1px solid var(--border-light);
268 vertical-align: top;
269 }
270
271 .template-corporate .invoice-items tr:last-child td {
272 border-bottom: none;
273 }
274
275 .template-corporate .invoice-items tr:hover {
276 background: var(--background-accent);
277 }
278
279 .template-corporate .item-name .item-title {
280 font-weight: 600;
281 color: var(--text-primary);
282 margin-bottom: var(--spacing-1);
283 }
284
285 .template-corporate .item-description {
286 color: var(--text-muted);
287 font-size: var(--font-size-sm);
288 line-height: 1.4;
289 font-weight: normal;
290 }
291
292 .template-corporate .item-quantity,
293 .template-corporate .item-price,
294 .template-corporate .item-total {
295 text-align: right;
296 font-weight: 500;
297 color: var(--text-primary);
298 }
299
300 /* Invoice Totals */
301 .template-corporate .invoice-totals {
302 margin-left: auto;
303 width: 400px;
304 background: var(--background-secondary);
305 padding: var(--spacing-8);
306 border-radius: var(--radius-lg);
307 border: 1px solid var(--border-color);
308 box-shadow: var(--shadow-md);
309 }
310
311 .template-corporate .invoice-total-row {
312 display: flex;
313 justify-content: space-between;
314 align-items: center;
315 padding: var(--spacing-3) 0;
316 border-bottom: 1px solid var(--border-light);
317 }
318
319 .template-corporate .invoice-total-row:last-child {
320 border-bottom: none;
321 }
322
323 .template-corporate .invoice-total-label {
324 font-weight: 500;
325 color: var(--text-secondary);
326 }
327
328 .template-corporate .invoice-total-value {
329 font-weight: 600;
330 color: var(--text-primary);
331 }
332
333 .template-corporate .invoice-grand-total {
334 font-size: var(--font-size-xl);
335 font-weight: 700;
336 color: var(--primary-color);
337 border-top: 2px solid var(--primary-color);
338 padding-top: var(--spacing-4);
339 margin-top: var(--spacing-4);
340 }
341
342 /* Notes Section */
343 .template-corporate .invoice-notes {
344 margin-top: var(--spacing-8);
345 padding: var(--spacing-6);
346 background: var(--background-secondary);
347 border-radius: var(--radius-lg);
348 border: 1px solid var(--border-color);
349 }
350
351 .template-corporate .invoice-notes h3 {
352 font-family: var(--font-family-heading);
353 font-size: var(--font-size-lg);
354 font-weight: 600;
355 color: var(--text-primary);
356 margin-bottom: var(--spacing-3);
357 border-bottom: 1px solid var(--border-color);
358 padding-bottom: var(--spacing-2);
359 }
360
361 .template-corporate .notes-content {
362 color: var(--text-secondary);
363 font-size: var(--font-size-sm);
364 line-height: 1.6;
365 }
366
367 .template-corporate .invoice-terms {
368 margin-top: var(--spacing-8);
369 padding: var(--spacing-6);
370 background: var(--background-secondary);
371 border-radius: var(--radius-lg);
372 border: 1px solid var(--border-color);
373 }
374
375 .template-corporate .invoice-terms h3 {
376 font-family: var(--font-family-heading);
377 font-size: var(--font-size-lg);
378 font-weight: 600;
379 color: var(--text-primary);
380 margin-bottom: var(--spacing-3);
381 border-bottom: 1px solid var(--border-color);
382 padding-bottom: var(--spacing-2);
383 }
384
385 .template-corporate .terms-content {
386 color: var(--text-secondary);
387 font-size: var(--font-size-sm);
388 line-height: 1.6;
389 }
390
391 /* Footer */
392 .template-corporate .invoice-footer {
393 margin-top: var(--spacing-8);
394 padding-top: var(--spacing-6);
395 border-top: 2px solid var(--border-light);
396 text-align: center;
397 color: var(--text-secondary);
398 font-size: var(--font-size-sm);
399 }
400
401 .template-corporate .invoice-footer p {
402 margin: 0;
403 font-size: var(--font-size-sm);
404 opacity: 0.9;
405 }
406
407 /* Responsive Design */
408 @media (max-width: 768px) {
409 .template-corporate {
410 padding: var(--spacing-4);
411 }
412
413 .template-corporate .invoice-header {
414 grid-template-columns: 1fr;
415 gap: var(--spacing-6);
416 }
417
418 .template-corporate .invoice-meta {
419 min-width: auto;
420 }
421
422 .template-corporate .address-section {
423 grid-template-columns: 1fr;
424 gap: var(--spacing-6);
425 }
426
427 .template-corporate .invoice-totals {
428 width: 100%;
429 }
430 }
431 </style>
432
433 <div class="template template-corporate">
434 <!-- Header -->
435 <div class="invoice-header">
436 <div class="company-info">
437 <div class="company-logo">
438 <?php if (!empty($company_info['logo'])): ?>
439 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
440 <?php endif; ?>
441 </div>
442 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
443 <div class="company-details">
444 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
445 </div>
446 </div>
447
448 <div class="invoice-meta">
449 <div class="invoice-title"><?php echo esc_html($invoice->getTitle() ?: __('Invoice', 'easy-invoice')); ?></div>
450 <div class="meta-item">
451 <span class="meta-label"><?php echo esc_html($text_settings['invoice_number']); ?></span>
452 <span class="meta-value"><?php echo esc_html($invoice->getNumber()); ?></span>
453 </div>
454 <div class="meta-item">
455 <span class="meta-label"><?php echo esc_html($text_settings['invoice_date']); ?></span>
456 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getIssueDate())); ?></span>
457 </div>
458 <div class="meta-item">
459 <span class="meta-label"><?php echo esc_html($text_settings['due_date']); ?></span>
460 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getDueDate())); ?></span>
461 </div>
462 </div>
463 </div>
464
465 <!-- Address Section -->
466 <div class="address-section">
467 <div class="address-block">
468 <h2><?php echo esc_html($text_settings['to']); ?></h2>
469 <div class="address-content">
470 <div class="client-name"><?php echo esc_html($invoice->getCustomerName()); ?></div>
471 <?php if ($invoice->getCustomerAddress()): ?>
472 <?php echo nl2br(esc_html($invoice->getCustomerAddress())); ?><br>
473 <?php endif; ?>
474 <?php if ($invoice->getCustomerEmail()): ?>
475 <?php echo esc_html($invoice->getCustomerEmail()); ?><br>
476 <?php endif; ?>
477 </div>
478 </div>
479 </div>
480
481 <!-- Invoice Items -->
482 <table class="invoice-items">
483 <thead>
484 <tr>
485 <th><?php echo esc_html($text_settings['service']); ?></th>
486 <th><?php echo esc_html($text_settings['qty']); ?></th>
487 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
488 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
489 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
490 <?php endif; ?>
491 <th><?php echo esc_html($text_settings['total']); ?></th>
492 </tr>
493 </thead>
494 <tbody>
495 <?php foreach ($invoice->getItems() as $item): ?>
496 <tr>
497 <td class="item-name">
498 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
499 <?php if ($item->getDescription()): ?>
500 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
501 <?php endif; ?>
502 </td>
503 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
504 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
505 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
506 <td class="item-adjust"><?php
507 $adjust_percentage = $item->getAdjustPercentage();
508 if ($adjust_percentage != 0) {
509 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
510 } else {
511 echo esc_html__('', 'easy-invoice');
512 }
513 ?></td>
514 <?php endif; ?>
515 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
516 </tr>
517 <?php endforeach; ?>
518 </tbody>
519 </table>
520
521 <!-- Invoice Totals -->
522 <div class="invoice-totals">
523 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($invoice, $text_settings, $formatter, 'invoice'); ?>
524 </div>
525
526 <!-- Notes -->
527 <?php if ($invoice->getNotes()): ?>
528 <div class="invoice-notes">
529 <h3><?php _e('Notes:', 'easy-invoice'); ?></h3>
530 <div class="notes-content">
531 <?php echo wp_kses_post($invoice->getNotes() ?: ''); ?>
532 </div>
533 </div>
534 <?php endif; ?>
535
536 <!-- Terms and Conditions -->
537 <?php
538 $terms_conditions = $invoice->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getInvoiceTermsConditions();
539 if ($terms_conditions):
540 ?>
541 <div class="invoice-terms">
542 <h3><?php _e('Terms & Conditions:', 'easy-invoice'); ?></h3>
543 <div class="terms-content">
544 <?php echo wp_kses_post($terms_conditions); ?>
545 </div>
546 </div>
547 <?php endif; ?>
548
549 <!-- Footer -->
550 <div class="invoice-footer">
551 <?php
552 $invoice_footer_text = $invoice->getFooterText();
553 if (!$invoice_footer_text) {
554 $invoice_footer_text = \EasyInvoice\Controllers\SettingsController::getInvoiceFooterText();
555 }
556 ?>
557 <p><?php echo wp_kses_post($invoice_footer_text); ?></p>
558 </div>
559 </div>