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

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

510 lines 15.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Minimal Quote Template - Clean & Simple Design
4 * Minimal, clean, and simple quote template
5 */
6
7 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::getQuoteTextSettings();
8 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
9 ?>
10 <style>
11 /* Minimal Quote 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 .quote-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 .quote-meta {
117 text-align: right;
118 min-width: 200px;
119 }
120
121 .template-minimal .quote-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 /* Quote Description */
186 .template-minimal .quote-description {
187 margin-bottom: var(--spacing-8);
188 }
189 .template-minimal .quote-description .description-content {
190 color: var(--text-secondary);
191 line-height: 1.6;
192 font-size: var(--font-size-sm);
193 white-space: pre-wrap;
194 }
195
196 /* Quote Items Table */
197 .template-minimal .quote-items {
198 width: 100%;
199 border-collapse: collapse;
200 margin-bottom: var(--spacing-12);
201 background: var(--background-primary);
202 border: 1px solid var(--border-color);
203 }
204
205 .template-minimal .quote-items th {
206 background: var(--background-secondary);
207 color: var(--text-primary);
208 font-weight: 600;
209 text-align: left;
210 padding: var(--spacing-3) var(--spacing-4);
211 font-size: var(--font-size-sm);
212 border-bottom: 1px solid var(--border-color);
213 }
214
215 .template-minimal .quote-items td {
216 padding: var(--spacing-3) var(--spacing-4);
217 border-bottom: 1px solid var(--border-light);
218 vertical-align: top;
219 }
220
221 .template-minimal .quote-items tr:last-child td {
222 border-bottom: none;
223 }
224
225 .template-minimal .item-name .item-title {
226 font-weight: 500;
227 color: var(--text-primary);
228 margin-bottom: var(--spacing-1);
229 }
230
231 .template-minimal .item-description {
232 color: var(--text-muted);
233 font-size: var(--font-size-sm);
234 line-height: 1.4;
235 font-weight: normal;
236 }
237
238 .template-minimal .item-quantity,
239 .template-minimal .item-price,
240 .template-minimal .item-total {
241 text-align: right;
242 font-weight: 400;
243 color: var(--text-primary);
244 }
245
246 /* Quote Totals */
247 .template-minimal .quote-totals {
248 margin-left: auto;
249 width: 300px;
250 background: var(--background-secondary);
251 padding: var(--spacing-6);
252 border: 1px solid var(--border-color);
253 }
254
255 .template-minimal .quote-total-row {
256 display: flex;
257 justify-content: space-between;
258 align-items: center;
259 padding: var(--spacing-2) 0;
260 border-bottom: 1px solid var(--border-light);
261 }
262
263 .template-minimal .quote-total-row:last-child {
264 border-bottom: none;
265 }
266
267 .template-minimal .quote-total-label {
268 font-weight: 400;
269 color: var(--text-secondary);
270 }
271
272 .template-minimal .quote-total-value {
273 font-weight: 600;
274 color: var(--text-primary);
275 }
276
277 .template-minimal .quote-grand-total {
278 font-size: var(--font-size-lg);
279 font-weight: 700;
280 color: var(--text-primary);
281 border-top: 2px solid var(--border-color);
282 padding-top: var(--spacing-3);
283 margin-top: var(--spacing-3);
284 }
285
286 /* Notes Section */
287 .template-minimal .quote-notes {
288 margin-top: var(--spacing-12);
289 padding: var(--spacing-6);
290 background: var(--background-secondary);
291 border: 1px solid var(--border-color);
292 }
293
294 .template-minimal .quote-notes h3 {
295 font-family: var(--font-family-heading);
296 font-size: var(--font-size-base);
297 font-weight: 600;
298 color: var(--text-primary);
299 margin-bottom: var(--spacing-3);
300 }
301
302 .template-minimal .notes-content {
303 color: var(--text-secondary);
304 line-height: 1.6;
305 font-size: var(--font-size-sm);
306 }
307
308 /* Terms and Conditions Section */
309 .template-minimal .quote-terms {
310 margin-top: var(--spacing-12);
311 padding: var(--spacing-6);
312 background: var(--background-secondary);
313 border: 1px solid var(--border-color);
314 }
315
316 .template-minimal .quote-terms h3 {
317 font-family: var(--font-family-heading);
318 font-size: var(--font-size-base);
319 font-weight: 600;
320 color: var(--text-primary);
321 margin-bottom: var(--spacing-3);
322 }
323
324 .template-minimal .terms-content {
325 color: var(--text-secondary);
326 line-height: 1.6;
327 font-size: var(--font-size-sm);
328 }
329
330 /* Footer */
331 .template-minimal .quote-footer {
332 margin-top: var(--spacing-12);
333 padding: var(--spacing-6);
334 text-align: center;
335 background: var(--background-secondary);
336 border: 1px solid var(--border-color);
337 }
338
339 .template-minimal .quote-footer p {
340 margin: 0;
341 color: var(--text-secondary);
342 font-size: var(--font-size-sm);
343 }
344
345 /* Responsive Design */
346 @media (max-width: 768px) {
347 .template-minimal {
348 padding: var(--spacing-4);
349 }
350
351 .template-minimal .quote-header {
352 flex-direction: column;
353 gap: var(--spacing-6);
354 }
355
356 .template-minimal .quote-meta {
357 text-align: left;
358 min-width: auto;
359 }
360
361 .template-minimal .address-section {
362 grid-template-columns: 1fr;
363 gap: var(--spacing-6);
364 }
365
366 .template-minimal .quote-totals {
367 width: 100%;
368 }
369 }
370 </style>
371
372 <div class="template template-minimal">
373 <!-- Header -->
374 <div class="quote-header">
375 <div class="company-info">
376 <div class="company-logo">
377 <?php if (!empty($company_info['logo'])): ?>
378 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
379 <?php endif; ?>
380 </div>
381 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
382 <div class="company-details">
383 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
384 </div>
385 </div>
386
387 <div class="quote-meta">
388 <div class="quote-title"><?php echo esc_html($quote->getTitle() ?: __('Quote', 'easy-invoice')); ?></div>
389 <div class="meta-item">
390 <span class="meta-label"><?php echo esc_html($text_settings['quote_number']); ?></span>
391 <span class="meta-value"><?php echo esc_html($quote->getNumber()); ?></span>
392 </div>
393 <div class="meta-item">
394 <span class="meta-label"><?php echo esc_html($text_settings['quote_date']); ?></span>
395 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($quote->getIssueDate())); ?></span>
396 </div>
397 <div class="meta-item">
398 <span class="meta-label"><?php echo esc_html($text_settings['valid_until']); ?></span>
399 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($quote->getExpiryDate())); ?></span>
400 </div>
401 </div>
402 </div>
403
404 <!-- Address Section -->
405 <div class="address-section">
406 <div class="address-block">
407 <h2><?php echo esc_html($text_settings['to']); ?></h2>
408 <div class="address-content">
409 <div class="client-name"><?php echo esc_html($quote->getCustomerName()); ?></div>
410 <?php if ($quote->getCustomerAddress()): ?>
411 <?php echo nl2br(esc_html($quote->getCustomerAddress())); ?><br>
412 <?php endif; ?>
413 <?php if ($quote->getCustomerEmail()): ?>
414 <?php echo esc_html($quote->getCustomerEmail()); ?><br>
415 <?php endif; ?>
416 </div>
417 </div>
418 </div>
419
420 <!-- Quote Description -->
421 <?php if ($quote->getDescription()): ?>
422 <div class="quote-description">
423 <div class="description-content"><?php echo wp_kses_post($quote->getDescription()); ?></div>
424 </div>
425 <?php endif; ?>
426
427 <!-- Quote Items -->
428 <table class="quote-items">
429 <thead>
430 <tr>
431 <th><?php echo esc_html($text_settings['service']); ?></th>
432 <th><?php echo esc_html($text_settings['qty']); ?></th>
433 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
434 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowQuoteAdjustField()): ?>
435 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
436 <?php endif; ?>
437 <th><?php echo esc_html($text_settings['total']); ?></th>
438 </tr>
439 </thead>
440 <tbody>
441 <?php foreach ($quote->getItems() as $item): ?>
442 <tr>
443 <td class="item-name">
444 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
445 <?php if ($item->getDescription()): ?>
446 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
447 <?php endif; ?>
448 </td>
449 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
450 <td class="item-price"><?php echo esc_html((isset($formatter) && $formatter) ? $formatter->format($item->getPrice()) : (new \EasyInvoice\Helpers\QuoteFormatter($quote))->format($item->getPrice())); ?></td>
451 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowQuoteAdjustField()): ?>
452 <td class="item-adjust"><?php
453 $adjust_percentage = $item->getAdjustPercentage();
454 if ($adjust_percentage != 0) {
455 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
456 } else {
457 echo esc_html__('', 'easy-invoice');
458 }
459 ?></td>
460 <?php endif; ?>
461 <td class="item-total"><?php echo esc_html((isset($formatter) && $formatter) ? $formatter->format($item->getAmount()) : (new \EasyInvoice\Helpers\QuoteFormatter($quote))->format($item->getAmount())); ?></td>
462 </tr>
463 <?php endforeach; ?>
464 </tbody>
465 </table>
466
467 <!-- Quote Totals -->
468 <div class="quote-totals">
469 <?php
470 // Ensure we have a formatter
471 if (!isset($formatter) || !$formatter) {
472 $formatter = new \EasyInvoice\Helpers\QuoteFormatter($quote);
473 }
474 echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($quote, $text_settings, $formatter, 'quote');
475 ?>
476
477 <!-- Notes -->
478 <?php if ($quote->getNotes()): ?>
479 <div class="quote-notes">
480 <h3><?php _e('Notes:', 'easy-invoice'); ?></h3>
481 <div class="notes-content">
482 <?php echo wp_kses_post($quote->getNotes() ?: ''); ?>
483 </div>
484 </div>
485 <?php endif; ?>
486
487 <!-- Terms and Conditions -->
488 <?php
489 $terms_conditions = $quote->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getQuoteTermsConditions();
490 if ($terms_conditions):
491 ?>
492 <div class="quote-terms">
493 <h3><?php _e('Terms & Conditions:', 'easy-invoice'); ?></h3>
494 <div class="terms-content">
495 <?php echo wp_kses_post($terms_conditions); ?>
496 </div>
497 </div>
498 <?php endif; ?>
499
500 <!-- Footer -->
501 <div class="quote-footer">
502 <?php
503 $footer_text = $quote->getFooterText();
504 if (!$footer_text) {
505 $footer_text = \EasyInvoice\Controllers\SettingsController::getQuoteFooterText();
506 }
507 ?>
508 <p><?php echo wp_kses_post($footer_text); ?></p>
509 </div>
510 </div>