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

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

342 lines 9.9 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 <!-- Header -->
218 <div class="invoice-header">
219 <div class="company-info">
220 <div class="company-logo">
221 <?php if (!empty($company_info['logo'])): ?>
222 <img src="<?php echo esc_url($company_info['logo']); ?>" alt="<?php echo esc_attr($company_info['name']); ?>" class="logo-image">
223 <?php endif; ?>
224 </div>
225 <div class="company-name"><?php echo esc_html($company_info['name']); ?></div>
226 <div class="company-details">
227 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateFromSection($company_info, false, 'details-only'); ?>
228 </div>
229 </div>
230
231 <div class="invoice-meta">
232 <div class="invoice-title"><?php echo esc_html($invoice->getTitle() ?: __('Invoice', 'easy-invoice')); ?></div>
233 <div class="meta-item">
234 <span class="meta-label"><?php echo esc_html($text_settings['invoice_number']); ?></span>
235 <span class="meta-value"><?php echo esc_html($invoice->getNumber()); ?></span>
236 </div>
237 <div class="meta-item">
238 <span class="meta-label"><?php echo esc_html($text_settings['invoice_date']); ?></span>
239 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getIssueDate())); ?></span>
240 </div>
241 <div class="meta-item">
242 <span class="meta-label"><?php echo esc_html($text_settings['due_date']); ?></span>
243 <span class="meta-value"><?php echo esc_html(\EasyInvoice\Controllers\SettingsController::formatDate($invoice->getDueDate())); ?></span>
244 </div>
245 </div>
246 </div>
247
248 <!-- Address Section -->
249 <div class="address-section">
250 <div class="address-block">
251 <h2><?php echo esc_html($text_settings['to']); ?></h2>
252 <div class="address-content">
253 <div class="client-name"><?php echo esc_html($invoice->getCustomerName()); ?></div>
254 <?php if ($invoice->getCustomerAddress()): ?>
255 <?php echo nl2br(esc_html($invoice->getCustomerAddress())); ?><br>
256 <?php endif; ?>
257 <?php if ($invoice->getCustomerEmail()): ?>
258 <?php echo esc_html($invoice->getCustomerEmail()); ?><br>
259 <?php endif; ?>
260 </div>
261 </div>
262 </div>
263
264 <!-- Invoice Items -->
265 <table class="invoice-items">
266 <thead>
267 <tr>
268 <th><?php echo esc_html($text_settings['service']); ?></th>
269 <th><?php echo esc_html($text_settings['qty']); ?></th>
270 <th><?php echo esc_html($text_settings['rate_price']); ?></th>
271 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
272 <th><?php echo esc_html($text_settings['adjust']); ?> (%)</th>
273 <?php endif; ?>
274 <th><?php echo esc_html($text_settings['total']); ?></th>
275 </tr>
276 </thead>
277 <tbody>
278 <?php foreach ($invoice->getItems() as $item): ?>
279 <tr>
280 <td class="item-name">
281 <div class="item-title"><?php echo esc_html($item->getName()); ?></div>
282 <?php if ($item->getDescription()): ?>
283 <div class="item-description"><?php echo esc_html($item->getDescription()); ?></div>
284 <?php endif; ?>
285 </td>
286 <td class="item-quantity"><?php echo esc_html($item->getQuantity() ?: '0'); ?></td>
287 <td class="item-price"><?php echo esc_html($formatter->format($item->getPrice())); ?></td>
288 <?php if (\EasyInvoice\Controllers\SettingsController::shouldShowInvoiceAdjustField()): ?>
289 <td class="item-adjust"><?php
290 $adjust_percentage = $item->getAdjustPercentage();
291 if ($adjust_percentage != 0) {
292 echo esc_html($adjust_percentage > 0 ? '+' : '') . esc_html($adjust_percentage) . '%';
293 } else {
294 echo esc_html__('', 'easy-invoice');
295 }
296 ?></td>
297 <?php endif; ?>
298 <td class="item-total"><?php echo esc_html($formatter->format($item->getAmount())); ?></td>
299 </tr>
300 <?php endforeach; ?>
301 </tbody>
302 </table>
303
304 <!-- Invoice Totals -->
305 <div class="invoice-totals">
306 <?php echo \EasyInvoice\Helpers\TemplateTextHelper::generateTotalsSection($invoice, $text_settings, $formatter, 'invoice'); ?>
307 </div>
308
309 <!-- Notes -->
310 <?php if ($invoice->getNotes()): ?>
311 <div class="invoice-notes">
312 <h3><?php _e('Notes:', 'easy-invoice'); ?></h3>
313 <div class="notes-content">
314 <?php echo wp_kses_post($invoice->getNotes() ?: ''); ?>
315 </div>
316 </div>
317 <?php endif; ?>
318
319 <!-- Terms and Conditions -->
320 <?php
321 $terms_conditions = $invoice->getTerms() ?: \EasyInvoice\Controllers\SettingsController::getInvoiceTermsConditions();
322 if ($terms_conditions):
323 ?>
324 <div class="invoice-terms">
325 <h3><?php _e('Terms & Conditions:', 'easy-invoice'); ?></h3>
326 <div class="terms-content">
327 <?php echo wp_kses_post($terms_conditions); ?>
328 </div>
329 </div>
330 <?php endif; ?>
331
332 <!-- Footer -->
333 <div class="invoice-footer">
334 <?php
335 $invoice_footer_text = $invoice->getFooterText();
336 if (!$invoice_footer_text) {
337 $invoice_footer_text = \EasyInvoice\Controllers\SettingsController::getInvoiceFooterText();
338 }
339 ?>
340 <p><?php echo wp_kses_post($invoice_footer_text); ?></p>
341 </div>
342 </div>