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

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

451 lines 12.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Legacy Quote Template
4 * Clean, minimalist design with traditional business layout
5 */
6
7 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::getQuoteTextSettings();
8 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
9 // Ensure a formatter is available for currency formatting
10 if (!isset($formatter) || !$formatter) {
11 $formatter = new \EasyInvoice\Helpers\QuoteFormatter($quote ?? null);
12 }
13 ?>
14
15 <style>
16 /* Legacy Template Styles - Clean Minimalist Design (Older Version Style) */
17 .template-legacy {
18 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
19 max-width: 800px;
20 margin: 0 auto;
21 padding: 40px;
22 background: #ffffff;
23 color: #000000;
24 line-height: 1.5;
25 }
26
27 /* Header Section */
28 .template-legacy .quote-header {
29 display: flex;
30 justify-content: space-between;
31 align-items: flex-start;
32 }
33
34 .template-legacy .company-info {
35 flex: 1;
36 }
37
38 .template-legacy .company-logo {
39 margin-bottom: 5px;
40 }
41
42 .template-legacy .logo-image {
43 max-height: 60px;
44 max-width: 200px;
45 object-fit: contain;
46 }
47
48 .template-legacy .company-name {
49 font-size: 20px;
50 font-weight: 700;
51 color: #2563eb;
52 margin-bottom: 8px;
53 }
54
55 .template-legacy .company-details {
56 color: #333333;
57 font-size: 14px;
58 line-height: 1.4;
59 }
60
61 .template-legacy .quote-title-section {
62 text-align: right;
63 flex: 1;
64 }
65
66 .template-legacy .quote-title {
67 font-size: 20px;
68 font-weight: 700;
69 color: #000000;
70 margin-bottom: 20px;
71 }
72
73 .template-legacy .quote-meta {
74 border: 1px solid #d1d5db;
75 background: #ffffff;
76 width: 280px;
77 margin-left: auto;
78 }
79
80 .template-legacy .meta-item {
81 display: flex;
82 justify-content: space-between;
83 align-items: center;
84 padding: 12px 16px;
85 border-bottom: 1px solid #d1d5db;
86 }
87
88 .template-legacy .meta-item:last-child {
89 border-bottom: none;
90 }
91
92 .template-legacy .meta-label {
93 font-weight: 600;
94 color: #000000;
95 font-size: 13px;
96 }
97
98 .template-legacy .meta-value {
99 color: #000000;
100 font-size: 13px;
101 font-weight: 500;
102 }
103
104 .template-legacy .total-due {
105 font-weight: 700;
106 color: #000000;
107 }
108
109 /* Address Section */
110 .template-legacy .address-section {
111 margin-bottom: 20px;
112 }
113
114 .template-legacy .address-block {
115 margin-bottom: 20x;
116 }
117
118 .template-legacy .address-block h2 {
119 font-size: 16px;
120 font-weight: 700;
121 color: #000000;
122 margin-bottom: 12px;
123 text-transform: uppercase;
124 letter-spacing: 0.5px;
125 }
126
127 .template-legacy .address-content {
128 color: #333333;
129 font-size: 14px;
130 line-height: 1.4;
131 }
132
133 .template-legacy .client-name {
134 font-weight: 600;
135 color: #2563eb;
136 margin-bottom: 6px;
137 text-decoration: underline;
138 }
139
140 /* Description Section */
141 .template-legacy .description-section {
142 margin-bottom: 20px;
143 padding: 20px;
144 background: #f8f9fa;
145 border-radius: 6px;
146 border-left: 4px solid #e5e7eb;
147 }
148
149 .template-legacy .description-content {
150 color: #333333;
151 font-size: 14px;
152 line-height: 1.5;
153 }
154
155 /* Quote Items Table */
156 .template-legacy .quote-items {
157 width: 100%;
158 border-collapse: collapse;
159 margin-bottom: 20px;
160 border: 1px solid #d1d5db;
161 }
162
163 .template-legacy .quote-items thead {
164 background: #f3f4f6;
165 }
166
167 .template-legacy .quote-items th {
168 padding: 16px 20px;
169 text-align: left;
170 font-weight: 700;
171 color: #000000;
172 font-size: 13px;
173 border: 1px solid #d1d5db;
174 text-transform: uppercase;
175 letter-spacing: 0.5px;
176 }
177
178 .template-legacy .quote-items td {
179 padding: 16px 20px;
180 border: 1px solid #d1d5db;
181 font-size: 14px;
182 vertical-align: top;
183 color: #000000;
184 }
185
186 /* PDF-specific border fixes to prevent 2px borders */
187 .template-legacy .quote-items th,
188 .template-legacy .quote-items td {
189 border-width: 1px !important;
190 border-style: solid !important;
191 border-color: #d1d5db !important;
192 }
193
194 .template-legacy .quote-meta {
195 border-width: 1px !important;
196 border-style: solid !important;
197 border-color: #d1d5db !important;
198 }
199
200 .template-legacy .meta-item {
201 border-bottom-width: 1px !important;
202 border-bottom-style: solid !important;
203 border-bottom-color: #d1d5db !important;
204 }
205
206 .template-legacy .quote-items tr:last-child td {
207 border-bottom: none;
208 }
209
210 .template-legacy .quote-items tbody tr:hover {
211 background-color: #f8f9fa;
212 }
213
214 .template-legacy .item-name .item-title {
215 font-weight: 700;
216 color: #000000;
217 margin-bottom: 6px;
218 }
219
220 .template-legacy .item-name .item-description {
221 color: #666666;
222 font-size: 13px;
223 line-height: 1.4;
224 }
225
226 .template-legacy .item-quantity,
227 .template-legacy .item-price,
228 .template-legacy .item-adjust,
229 .template-legacy .item-total {
230 text-align: right;
231 }
232
233 /* Quote Totals */
234 .template-legacy .quote-totals {
235 margin-left: auto;
236 width: 320px;
237 border: 1px solid #dddddd;
238 border-radius: 4px;
239 overflow: hidden;
240 background: #ffffff;
241 }
242
243 .template-legacy .quote-total-row {
244 display: flex;
245 justify-content: space-between;
246 align-items: center;
247 padding: 14px 20px;
248 border-bottom: 1px solid #dddddd;
249 }
250
251 .template-legacy .quote-total-row:last-child {
252 border-bottom: none;
253 }
254
255 .template-legacy .quote-total-label {
256 font-weight: 600;
257 color: #333333;
258 font-size: 14px;
259 }
260
261 .template-legacy .quote-total-value {
262 color: #000000;
263 font-size: 14px;
264 font-weight: 500;
265 }
266
267 .template-legacy .quote-grand-total {
268 background: #f8f9fa;
269 border-top: 1px solid #dddddd;
270 margin-top: 0;
271 padding-top: 14px;
272 }
273
274 .template-legacy .quote-grand-total .quote-total-label,
275 .template-legacy .quote-grand-total .quote-total-value {
276 font-weight: 700;
277 font-size: 16px;
278 color: #000000;
279 }
280
281 /* Terms Section */
282 .template-legacy .terms-section {
283 margin-top: 20px;
284 padding: 20px;
285 background: #f9fafb;
286 border-radius: 8px;
287 border-left: 4px solid #e5e7eb;
288 }
289
290 .template-legacy .terms-section h3 {
291 font-size: 16px;
292 font-weight: 600;
293 color: #374151;
294 margin-bottom: 12px;
295 text-transform: uppercase;
296 letter-spacing: 0.5px;
297 }
298
299 .template-legacy .terms-content {
300 color: #6b7280;
301 font-size: 14px;
302 line-height: 1.6;
303 }
304
305 /* Footer */
306 .template-legacy .quote-footer {
307 margin-top: 20px;
308 border-top: 1px solid #e5e7eb;
309 text-align: center;
310 }
311
312 .template-legacy .quote-footer p {
313 color: #6b7280;
314 font-size: 14px;
315 margin-bottom: 16px;
316 }
317
318 .template-legacy .footer-company {
319 color: #9ca3af;
320 font-size: 13px;
321 }
322 </style>
323
324 <div class="template-legacy">
325 <!-- Header Section -->
326 <div class="quote-header">
327 <div class="company-info">
328 <div class="company-logo">
329 <?php if (!empty($company_info['logo'])): ?>
330 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
331 <?php endif; ?>
332 </div>
333 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
334 <div class="company-details">
335 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
336 </div>
337 </div>
338
339 <div class="quote-title-section">
340 <div class="quote-title"><?php echo esc_html($quote->getTitle() ?: __('Quote', 'easy-invoice')); ?></div>
341 <div class="quote-meta">
342 <div class="meta-item">
343 <span class="meta-label"><?php echo esc_html($text_settings['quote_number']); ?></span>
344 <span class="meta-value"><?php echo esc_html($quote->getNumber()); ?></span>
345 </div>
346 <div class="meta-item">
347 <span class="meta-label"><?php echo esc_html($text_settings['quote_date']); ?></span>
348 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($quote->getIssueDate())); ?></span>
349 </div>
350 <div class="meta-item">
351 <span class="meta-label"><?php echo esc_html($text_settings['valid_until']); ?></span>
352 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($quote->getExpiryDate())); ?></span>
353 </div>
354 <div class="meta-item">
355 <span class="meta-label"><?php echo esc_html($text_settings['total']); ?></span>
356 <span class="meta-value total-due"><?php echo esc_html($formatter->format($quote->getTotal())); ?></span>
357 </div>
358 </div>
359 </div>
360 </div>
361
362 <!-- Address Section -->
363 <div class="address-section">
364 <div class="address-block">
365 <h2><?php echo esc_html($text_settings['to']); ?></h2>
366 <div class="address-content">
367 <div class="client-name"><?php echo esc_html($quote->getCustomerName()); ?></div>
368 <?php if ($quote->getCustomerAddress()): ?>
369 <?php echo nl2br(esc_html($quote->getCustomerAddress())); ?><br>
370 <?php endif; ?>
371 <?php if ($quote->getCustomerEmail()): ?>
372 <?php echo esc_html($quote->getCustomerEmail()); ?><br>
373 <?php endif; ?>
374 </div>
375 </div>
376 </div>
377
378 <!-- Description Section -->
379 <?php if ($quote->getDescription()): ?>
380 <div class="description-section">
381 <div class="description-content"><?php echo wp_kses_post($quote->getDescription()); ?></div>
382 </div>
383 <?php endif; ?>
384
385 <!-- Quote Items -->
386 <table class="quote-items">
387 <thead>
388 <tr>
389 <th><?php echo esc_html($text_settings['service']); ?></th>
390 <th><?php echo esc_html($text_settings['qty']); ?></th>
391 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
392 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowQuoteAdjustField()): ?>
393 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
394 <?php endif; ?>
395 <th><?php echo esc_html($text_settings['total']); ?></th>
396 </tr>
397 </thead>
398 <tbody>
399 <?php foreach ($quote->getItems() as $item): ?>
400 <tr>
401 <td class="item-name">
402 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
403 <?php if ($item->getDescription()): ?>
404 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
405 <?php endif; ?>
406 </td>
407 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
408 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
409 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowQuoteAdjustField()): ?>
410 <td class="item-adjust"><?php
411 $adjust_percentage = $item->getAdjustPercentage();
412 if ($adjust_percentage != 0) {
413 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
414 } else {
415 echo esc_html__('', 'easy-invoice');
416 }
417 ?></td>
418 <?php endif; ?>
419 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
420 </tr>
421 <?php endforeach; ?>
422 </tbody>
423 </table>
424
425 <!-- Quote Totals -->
426 <div class="quote-totals">
427 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($quote, $text_settings, $formatter, 'quote'); ?>
428 </div>
429
430 <!-- Terms Section -->
431 <?php
432 $terms_conditions = $quote->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getQuoteTermsConditions();
433 if ($terms_conditions):
434 ?>
435 <div class="terms-section">
436 <h3>Terms & Conditions</h3>
437 <div class="terms-content">
438 <?php echo wp_kses_post($terms_conditions); ?>
439 </div>
440 </div>
441 <?php endif; ?>
442
443 <!-- Footer -->
444 <div class="quote-footer">
445 <p>This quote is valid for 30 days from the date of issue.</p>
446 <div class="footer-company">
447 Thanks for choosing <?php echo esc_html($company_info['name']); ?> | <?php echo esc_html($company_info['email'] ?? 'temp@example.com'); ?>
448 </div>
449 </div>
450 </div>
451