PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.3.6
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.3.6
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 / standard.php

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

335 lines 9.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Standard Template - Clean SaaS Design
4 * Clean, modern, and professional invoice template
5 */
6
7 $text_settings = \EasyInvoice\Helpers\TemplateTextHelper::getInvoiceTextSettings();
8 $company_info = \EasyInvoice\Helpers\TemplateTextHelper::getCompanyInfo();
9 ?>
10 <style>
11 /* Standard Template - Clean and Simple Design */
12 .template-standard {
13 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
14 background: #ffffff;
15 color: #333333;
16 max-width: 800px;
17 margin: 0 auto;
18 padding: 2rem;
19 line-height: 1.5;
20 }
21
22 /* Header Section */
23 .template-standard .invoice-header {
24 display: flex;
25 justify-content: space-between;
26 align-items: flex-start;
27 margin-bottom: 2rem;
28 padding-bottom: 1rem;
29 border-bottom: 1px solid #e0e0e0;
30 }
31
32 .template-standard .company-info {
33 flex: 1;
34 }
35
36 .template-standard .company-logo {
37 margin-bottom: 1rem;
38 }
39
40 .template-standard .logo-image {
41 max-height: 50px;
42 max-width: 180px;
43 object-fit: contain;
44 }
45
46 .template-standard .company-name {
47 font-size: 1.5rem;
48 font-weight: 600;
49 margin-bottom: 0.5rem;
50 }
51
52 .template-standard .company-details {
53 color: #666666;
54 font-size: 0.9rem;
55 line-height: 1.4;
56 }
57
58 .template-standard .invoice-meta {
59 text-align: right;
60 min-width: 200px;
61 }
62
63 .template-standard .invoice-title {
64 font-size: 1.75rem;
65 font-weight: 600;
66 color: #333333;
67 margin-bottom: 1rem;
68 }
69
70 .template-standard .meta-item {
71 margin-bottom: 0.5rem;
72 }
73
74 .template-standard .meta-label {
75 color: #666666;
76 font-size: 0.9rem;
77 }
78
79 .template-standard .meta-value {
80 font-weight: 500;
81 }
82
83 /* Address Section */
84 .template-standard .address-section {
85 margin-bottom: 2rem;
86 }
87
88 .template-standard .address-block h2 {
89 font-size: 1rem;
90 font-weight: 600;
91 margin-bottom: 0.5rem;
92 text-transform: uppercase;
93 }
94
95 .template-standard .client-name {
96 font-weight: 500;
97 margin-bottom: 0.25rem;
98 }
99
100 .template-standard .address-content {
101 color: #666666;
102 font-size: 0.9rem;
103 }
104
105 /* Invoice Items Table */
106 .template-standard .invoice-items {
107 width: 100%;
108 border-collapse: collapse;
109 margin-bottom: 2rem;
110 border: 1px solid #e0e0e0;
111 }
112
113 .template-standard .invoice-items th {
114 background: #f5f5f5;
115 color: #333333;
116 font-weight: 600;
117 text-align: left;
118 padding: 0.75rem;
119 font-size: 0.9rem;
120 }
121
122 .template-standard .invoice-items td {
123 padding: 0.75rem;
124 border-bottom: 1px solid #e0e0e0;
125 vertical-align: top;
126 }
127
128 .template-standard .item-name .item-title {
129 font-weight: 500;
130 }
131
132 .template-standard .item-description {
133 color: #666666;
134 font-size: 0.9rem;
135 margin-top: 0.25rem;
136 font-weight: 300;
137 }
138
139 .template-standard .item-quantity,
140 .template-standard .item-price,
141 .template-standard .item-total {
142 text-align: right;
143 }
144
145 /* Invoice Totals */
146 .template-standard .invoice-totals {
147 margin-left: auto;
148 width: 300px;
149 margin-bottom: 2rem;
150 }
151
152 .template-standard .invoice-total-row {
153 display: flex;
154 justify-content: space-between;
155 padding: 0.5rem 0;
156 }
157
158 .template-standard .invoice-total-label {
159 color: #666666;
160 }
161
162 .template-standard .invoice-grand-total {
163 font-weight: 600;
164 border-top: 2px solid #333333;
165 padding-top: 0.5rem;
166 margin-top: 0.5rem;
167 }
168
169 /* Notes and Terms */
170 .template-standard .invoice-notes,
171 .template-standard .invoice-terms {
172 margin-top: 2rem;
173 font-size: 0.9rem;
174 color: #666666;
175 }
176
177 .template-standard .invoice-notes h3,
178 .template-standard .invoice-terms h3 {
179 font-size: 1rem;
180 font-weight: 600;
181 color: #333333;
182 margin-bottom: 0.5rem;
183 }
184
185 /* Footer */
186 .template-standard .invoice-footer {
187 margin-top: 2rem;
188 padding-top: 1rem;
189 border-top: 1px solid #e0e0e0;
190 text-align: center;
191 color: #666666;
192 font-size: 0.9rem;
193 }
194
195 /* Responsive Design */
196 @media (max-width: 768px) {
197 .template-standard {
198 padding: 1rem;
199 }
200
201 .template-standard .invoice-header {
202 flex-direction: column;
203 }
204
205 .template-standard .invoice-meta {
206 text-align: left;
207 margin-top: 1rem;
208 }
209
210 .template-standard .invoice-totals {
211 width: 100%;
212 }
213 }
214 </style>
215
216 <div class="template template-standard">
217 <div class="invoice-header">
218 <div class="company-info">
219 <div class="company-logo">
220 <?php if (!empty($company_info['logo'])): ?>
221 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
222 <?php endif; ?>
223 </div>
224 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
225 <div class="company-details">
226 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
227 </div>
228 </div>
229
230 <div class="invoice-meta">
231 <div class="invoice-title"><?php echo esc_html($invoice->getTitle() ?: __('Invoice', 'easy-invoice')); ?></div>
232 <div class="meta-item">
233 <span class="meta-label"><?php echo esc_html($text_settings['invoice_number']); ?></span>
234 <span class="meta-value"><?php echo esc_html($invoice->getNumber()); ?></span>
235 </div>
236 <div class="meta-item">
237 <span class="meta-label"><?php echo esc_html($text_settings['invoice_date']); ?></span>
238 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getIssueDate())); ?></span>
239 </div>
240 <div class="meta-item">
241 <span class="meta-label"><?php echo esc_html($text_settings['due_date']); ?></span>
242 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getDueDate())); ?></span>
243 </div>
244 </div>
245 </div>
246
247 <div class="address-section">
248 <div class="address-block">
249 <h2><?php echo esc_html($text_settings['to']); ?></h2>
250 <div class="address-content">
251 <div class="client-name"><?php echo esc_html($invoice->getCustomerName()); ?></div>
252 <?php if ($invoice->getCustomerAddress()): ?>
253 <?php echo nl2br(esc_html($invoice->getCustomerAddress())); ?><br>
254 <?php endif; ?>
255 <?php if ($invoice->getCustomerEmail()): ?>
256 <?php echo esc_html($invoice->getCustomerEmail()); ?><br>
257 <?php endif; ?>
258 </div>
259 </div>
260 </div>
261
262 <table class="invoice-items">
263 <thead>
264 <tr>
265 <th><?php echo esc_html($text_settings['service']); ?></th>
266 <th><?php echo esc_html($text_settings['qty']); ?></th>
267 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
268 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
269 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
270 <?php endif; ?>
271 <th><?php echo esc_html($text_settings['total']); ?></th>
272 </tr>
273 </thead>
274 <tbody>
275 <?php foreach ($invoice->getItems() as $item): ?>
276 <tr>
277 <td class="item-name">
278 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
279 <?php if ($item->getDescription()): ?>
280 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
281 <?php endif; ?>
282 </td>
283 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
284 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
285 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
286 <td class="item-adjust"><?php
287 $adjust_percentage = $item->getAdjustPercentage();
288 if ($adjust_percentage != 0) {
289 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
290 } else {
291 echo esc_html__('—', 'easy-invoice');
292 }
293 ?></td>
294 <?php endif; ?>
295 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
296 </tr>
297 <?php endforeach; ?>
298 </tbody>
299 </table>
300
301 <div class="invoice-totals">
302 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($invoice, $text_settings, $formatter, 'invoice'); ?>
303 </div>
304
305 <?php if ($invoice->getNotes()): ?>
306 <div class="invoice-notes">
307 <h3><?php _e('Notes:', 'easy-invoice'); ?></h3>
308 <div class="notes-content">
309 <?php echo wp_kses_post($invoice->getNotes() ?: ''); ?>
310 </div>
311 </div>
312 <?php endif; ?>
313
314 <?php
315 $terms_conditions = $invoice->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getInvoiceTermsConditions();
316 if ($terms_conditions):
317 ?>
318 <div class="invoice-terms">
319 <h3><?php _e('Terms & Conditions:', 'easy-invoice'); ?></h3>
320 <div class="terms-content">
321 <?php echo wp_kses_post($terms_conditions); ?>
322 </div>
323 </div>
324 <?php endif; ?>
325
326 <div class="invoice-footer">
327 <?php
328 $invoice_footer_text = $invoice->getFooterText();
329 if (!$invoice_footer_text) {
330 $invoice_footer_text = \EasyInvoice\Controllers\SettingsController::getInvoiceFooterText();
331 }
332 ?>
333 <p><?php echo wp_kses_post($invoice_footer_text); ?></p>
334 </div>
335 </div>