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

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

501 lines 14.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Minimal Template - Clean & Simple Design
4 * Minimal, clean, and simple invoice template
5 */
6
7 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::getInvoiceTextSettings();
8 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
9 ?>
10 <style>
11 /* Minimal Template - Clean & Simple Design */
12 :root {
13 --primary-color: #374151;
14 --primary-light: #6b7280;
15 --primary-dark: #1f2937;
16 --secondary-color: #9ca3af;
17 --accent-color: #3b82f6;
18 --success-color: #10b981;
19 --warning-color: #f59e0b;
20 --error-color: #ef4444;
21 --text-primary: #111827;
22 --text-secondary: #6b7280;
23 --text-muted: #9ca3af;
24 --border-color: #d1d5db;
25 --border-light: #e5e7eb;
26 --background-primary: #ffffff;
27 --background-secondary: #f9fafb;
28 --background-accent: #f3f4f6;
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 }
65
66 .template-minimal {
67 font-family: var(--font-family);
68 background: var(--background-primary);
69 color: var(--text-primary);
70 max-width: 800px;
71 margin: 0 auto;
72 padding: var(--spacing-8);
73 line-height: 1.6;
74 }
75
76 /* Header Section */
77 .template-minimal .invoice-header {
78 display: flex;
79 justify-content: space-between;
80 align-items: flex-start;
81 margin-bottom: var(--spacing-12);
82 padding-bottom: var(--spacing-8);
83 border-bottom: 1px solid var(--border-light);
84 }
85
86 .template-minimal .company-info {
87 flex: 1;
88 }
89
90 .template-minimal .company-logo {
91 margin-bottom: 0;
92 }
93
94 .template-minimal .logo-image {
95 max-height: 60px;
96 max-width: 200px;
97 object-fit: contain;
98 filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
99 }
100
101 .template-minimal .company-name {
102 font-family: var(--font-family-heading);
103 font-size: var(--font-size-2xl);
104 font-weight: 700;
105 color: var(--text-primary);
106 margin-bottom: var(--spacing-3);
107 line-height: 1.2;
108 }
109
110 .template-minimal .company-details {
111 color: var(--text-secondary);
112 font-size: var(--font-size-sm);
113 line-height: 1.5;
114 }
115
116 .template-minimal .invoice-meta {
117 text-align: right;
118 min-width: 200px;
119 }
120
121 .template-minimal .invoice-title {
122 font-family: var(--font-family-heading);
123 font-size: var(--font-size-xl);
124 font-weight: 600;
125 color: var(--text-primary);
126 margin-bottom: var(--spacing-4);
127 }
128
129 .template-minimal .meta-item {
130 display: flex;
131 justify-content: space-between;
132 align-items: center;
133 margin-bottom: var(--spacing-2);
134 padding-bottom: var(--spacing-2);
135 border-bottom: 1px solid var(--border-light);
136 }
137
138 .template-minimal .meta-item:last-child {
139 margin-bottom: 0;
140 padding-bottom: 0;
141 border-bottom: none;
142 }
143
144 .template-minimal .meta-label {
145 font-size: var(--font-size-sm);
146 color: var(--text-secondary);
147 font-weight: 400;
148 }
149
150 .template-minimal .meta-value {
151 font-size: var(--font-size-sm);
152 color: var(--text-primary);
153 font-weight: 500;
154 }
155
156 /* Address Section */
157 .template-minimal .address-section {
158 display: grid;
159 grid-template-columns: 1fr 1fr;
160 gap: var(--spacing-8);
161 margin-bottom: var(--spacing-12);
162 }
163
164 .template-minimal .address-block h2 {
165 font-family: var(--font-family-heading);
166 font-size: var(--font-size-base);
167 font-weight: 600;
168 color: var(--text-primary);
169 margin-bottom: var(--spacing-3);
170 }
171
172 .template-minimal .client-name {
173 font-weight: 600;
174 color: var(--text-primary);
175 font-size: var(--font-size-base);
176 margin-bottom: var(--spacing-2);
177 }
178
179 .template-minimal .address-content {
180 color: var(--text-secondary);
181 font-size: var(--font-size-sm);
182 line-height: 1.5;
183 }
184
185 /* Invoice Items Table */
186 .template-minimal .invoice-items {
187 width: 100%;
188 border-collapse: collapse;
189 margin-bottom: var(--spacing-12);
190 background: var(--background-primary);
191 border: 1px solid var(--border-color);
192 }
193
194 .template-minimal .invoice-items th {
195 background: var(--background-secondary);
196 color: var(--text-primary);
197 font-weight: 600;
198 text-align: left;
199 padding: var(--spacing-3) var(--spacing-4);
200 font-size: var(--font-size-sm);
201 border-bottom: 1px solid var(--border-color);
202 }
203
204 .template-minimal .invoice-items td {
205 padding: var(--spacing-3) var(--spacing-4);
206 border-bottom: 1px solid var(--border-light);
207 vertical-align: top;
208 }
209
210 .template-minimal .invoice-items tr:last-child td {
211 border-bottom: none;
212 }
213
214 .template-minimal .item-name .item-title {
215 font-weight: 500;
216 color: var(--text-primary);
217 margin-bottom: var(--spacing-1);
218 }
219
220 .template-minimal .item-description {
221 color: var(--text-muted);
222 font-size: var(--font-size-sm);
223 line-height: 1.4;
224 font-weight: normal;
225 }
226
227 .template-minimal .item-quantity,
228 .template-minimal .item-price,
229 .template-minimal .item-total {
230 text-align: right;
231 font-weight: 400;
232 color: var(--text-primary);
233 }
234
235 /* Invoice Totals */
236 .template-minimal .invoice-totals {
237 margin-left: auto;
238 width: 300px;
239 background: var(--background-secondary);
240 padding: var(--spacing-6);
241 border: 1px solid var(--border-color);
242 }
243
244 .template-minimal .invoice-total-row {
245 display: flex;
246 justify-content: space-between;
247 align-items: center;
248 padding: var(--spacing-2) 0;
249 border-bottom: 1px solid var(--border-light);
250 }
251
252 .template-minimal .invoice-total-row:last-child {
253 border-bottom: none;
254 }
255
256 .template-minimal .invoice-total-label {
257 font-weight: 400;
258 color: var(--text-secondary);
259 }
260
261 .template-minimal .invoice-total-value {
262 font-weight: 600;
263 color: var(--text-primary);
264 }
265
266 .template-minimal .invoice-grand-total {
267 font-size: var(--font-size-lg);
268 font-weight: 700;
269 color: var(--text-primary);
270 border-top: 2px solid var(--border-color);
271 padding-top: var(--spacing-3);
272 margin-top: var(--spacing-3);
273 }
274
275 /* Notes Section */
276 .template-minimal .invoice-notes {
277 margin-top: var(--spacing-8);
278 padding: var(--spacing-6);
279 background: var(--background-secondary);
280 border-radius: var(--radius-lg);
281 border: 1px solid var(--border-color);
282 }
283
284 .template-minimal .invoice-notes h3 {
285 font-family: var(--font-family-heading);
286 font-size: var(--font-size-lg);
287 font-weight: 600;
288 color: var(--text-primary);
289 margin-bottom: var(--spacing-3);
290 border-bottom: 1px solid var(--border-color);
291 padding-bottom: var(--spacing-2);
292 }
293
294 .template-minimal .notes-content {
295 color: var(--text-secondary);
296 font-size: var(--font-size-sm);
297 line-height: 1.6;
298 }
299
300 .template-minimal .invoice-terms {
301 margin-top: var(--spacing-8);
302 padding: var(--spacing-6);
303 background: var(--background-secondary);
304 border-radius: var(--radius-lg);
305 border: 1px solid var(--border-color);
306 }
307
308 .template-minimal .invoice-terms h3 {
309 font-family: var(--font-family-heading);
310 font-size: var(--font-size-lg);
311 font-weight: 600;
312 color: var(--text-primary);
313 margin-bottom: var(--spacing-3);
314 border-bottom: 1px solid var(--border-color);
315 padding-bottom: var(--spacing-2);
316 }
317
318 .template-minimal .terms-content {
319 color: var(--text-secondary);
320 font-size: var(--font-size-sm);
321 line-height: 1.6;
322 }
323
324 .template-minimal .invoice-footer {
325 margin-top: var(--spacing-8);
326 padding-top: var(--spacing-6);
327 border-top: 2px solid var(--border-light);
328 text-align: center;
329 color: var(--text-secondary);
330 font-size: var(--font-size-sm);
331 }
332
333 /* Footer */
334 .template-minimal .invoice-footer {
335 margin-top: var(--spacing-12);
336 padding: var(--spacing-6);
337 text-align: center;
338 background: var(--background-secondary);
339 border: 1px solid var(--border-color);
340 }
341
342 .template-minimal .invoice-footer p {
343 margin: 0;
344 color: var(--text-secondary);
345 font-size: var(--font-size-sm);
346 }
347
348 /* Responsive Design */
349 @media (max-width: 768px) {
350 .template-minimal {
351 padding: var(--spacing-4);
352 }
353
354 .template-minimal .invoice-header {
355 flex-direction: column;
356 gap: var(--spacing-6);
357 }
358
359 .template-minimal .invoice-meta {
360 text-align: left;
361 min-width: auto;
362 }
363
364 .template-minimal .address-section {
365 grid-template-columns: 1fr;
366 gap: var(--spacing-6);
367 }
368
369 .template-minimal .invoice-totals {
370 width: 100%;
371 }
372 }
373 </style>
374
375 <div class="template template-minimal">
376 <!-- Header -->
377 <div class="invoice-header">
378 <div class="company-info">
379 <div class="company-logo">
380 <?php if (!empty($company_info['logo'])): ?>
381 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
382 <?php endif; ?>
383 </div>
384 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
385 <div class="company-details">
386 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
387 </div>
388 </div>
389
390 <div class="invoice-meta">
391 <div class="invoice-title"><?php echo esc_html($invoice->getTitle() ?: __('Invoice', 'easy-invoice')); ?></div>
392 <div class="meta-item">
393 <span class="meta-label"><?php echo esc_html($text_settings['invoice_number']); ?></span>
394 <span class="meta-value"><?php echo esc_html($invoice->getNumber()); ?></span>
395 </div>
396 <div class="meta-item">
397 <span class="meta-label"><?php echo esc_html($text_settings['invoice_date']); ?></span>
398 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getIssueDate())); ?></span>
399 </div>
400 <div class="meta-item">
401 <span class="meta-label"><?php echo esc_html($text_settings['due_date']); ?></span>
402 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getDueDate())); ?></span>
403 </div>
404 </div>
405 </div>
406
407 <!-- Address Section -->
408 <div class="address-section">
409 <div class="address-block">
410 <h2><?php echo esc_html($text_settings['to']); ?></h2>
411 <div class="address-content">
412 <div class="client-name"><?php echo esc_html($invoice->getCustomerName()); ?></div>
413 <?php if ($invoice->getCustomerAddress()): ?>
414 <?php echo nl2br(esc_html($invoice->getCustomerAddress())); ?><br>
415 <?php endif; ?>
416 <?php if ($invoice->getCustomerEmail()): ?>
417 <?php echo esc_html($invoice->getCustomerEmail()); ?><br>
418 <?php endif; ?>
419 </div>
420 </div>
421 </div>
422
423 <!-- Invoice Items -->
424 <table class="invoice-items">
425 <thead>
426 <tr>
427 <th><?php echo esc_html($text_settings['service']); ?></th>
428 <th><?php echo esc_html($text_settings['qty']); ?></th>
429 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
430 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
431 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
432 <?php endif; ?>
433 <th><?php echo esc_html($text_settings['total']); ?></th>
434 </tr>
435 </thead>
436 <tbody>
437 <?php foreach ($invoice->getItems() as $item): ?>
438 <tr>
439 <td class="item-name">
440 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
441 <?php if ($item->getDescription()): ?>
442 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
443 <?php endif; ?>
444 </td>
445 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
446 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
447 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
448 <td class="item-adjust"><?php
449 $adjust_percentage = $item->getAdjustPercentage();
450 if ($adjust_percentage != 0) {
451 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
452 } else {
453 echo esc_html__('', 'easy-invoice');
454 }
455 ?></td>
456 <?php endif; ?>
457 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
458 </tr>
459 <?php endforeach; ?>
460 </tbody>
461 </table>
462
463 <!-- Invoice Totals -->
464 <div class="invoice-totals">
465 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($invoice, $text_settings, $formatter, 'invoice'); ?>
466 </div>
467
468 <!-- Notes -->
469 <?php if ($invoice->getNotes()): ?>
470 <div class="invoice-notes">
471 <h3><?php _e('Notes:', 'easy-invoice'); ?></h3>
472 <div class="notes-content">
473 <?php echo wp_kses_post($invoice->getNotes() ?: ''); ?>
474 </div>
475 </div>
476 <?php endif; ?>
477
478 <!-- Terms and Conditions -->
479 <?php
480 $terms_conditions = $invoice->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getInvoiceTermsConditions();
481 if ($terms_conditions):
482 ?>
483 <div class="invoice-terms">
484 <h3><?php _e('Terms & Conditions:', 'easy-invoice'); ?></h3>
485 <div class="terms-content">
486 <?php echo wp_kses_post($terms_conditions); ?>
487 </div>
488 </div>
489 <?php endif; ?>
490
491 <!-- Footer -->
492 <div class="invoice-footer">
493 <?php
494 $invoice_footer_text = $invoice->getFooterText();
495 if (!$invoice_footer_text) {
496 $invoice_footer_text = \EasyInvoice\Controllers\SettingsController::getInvoiceFooterText();
497 }
498 ?>
499 <p><?php echo wp_kses_post($invoice_footer_text); ?></p>
500 </div>
501 </div>