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

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

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