PluginProbe
Easy Invoice – Invoice Generator, PDF Quotes & Payments / 2.3.4
Easy Invoice – Invoice Generator, PDF Quotes & Payments v2.3.4
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 / includes / Forms / Quote / QuoteFieldRegistration.php

QuoteFieldRegistration.php in Easy Invoice – Invoice Generator, PDF Quotes & Payments 2.3.4, at includes/Forms/Quote/QuoteFieldRegistration.php

708 lines 27.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Quote Field Registration Class
4 *
5 * @package EasyInvoice
6 * @author Your Name
7 * @copyright Copyright (c) 2023, Your Company
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.0.0
10 */
11
12 namespace EasyInvoice\Forms\Quote;
13
14 use EasyInvoice\Forms\BaseFieldRegistration;
15
16 /**
17 * Quote Field Registration
18 *
19 * Handles registration of quote-specific form fields, tabs, and templates.
20 *
21 * @since 1.0.0
22 */
23 class QuoteFieldRegistration extends BaseFieldRegistration {
24
25 /**
26 * Register default tabs
27 *
28 * @since 1.0.0
29 * @return void
30 */
31 public function registerDefaultTabs(): void {
32 // Define all tabs in a single array for easy modification by pro plugins
33 $all_tabs = $this->getDefaultTabsArray();
34
35 // Apply filter to allow pro plugins to modify tabs
36 $all_tabs = apply_filters('easy_invoice_quote_form_tabs', $all_tabs);
37
38 // Register all tabs from the array
39 foreach ($all_tabs as $tab_id => $tab_config) {
40 $this->registerTab($tab_id, $tab_config);
41 }
42 }
43
44 /**
45 * Get default tabs array
46 *
47 * @since 1.0.0
48 * @return array
49 */
50 private function getDefaultTabsArray(): array {
51 return [
52 'quote-tab' => [
53 'label' => __('Quote Details', 'easy-invoice'),
54 'icon' => 'fas fa-file-invoice',
55 'active' => true,
56 'order' => 1
57 ],
58 'items-tab' => [
59 'label' => __('Items', 'easy-invoice'),
60 'icon' => 'fas fa-list',
61 'active' => false,
62 'order' => 2
63 ],
64 'client-tab' => [
65 'label' => __('Client', 'easy-invoice'),
66 'icon' => 'fas fa-user',
67 'active' => false,
68 'order' => 3
69 ],
70 'discounts-taxes-tab' => [
71 'label' => __('Discounts & Taxes', 'easy-invoice'),
72 'icon' => 'fas fa-percentage',
73 'active' => false,
74 'order' => 4
75 ],
76 'payments-tab' => [
77 'label' => __('Payment', 'easy-invoice'),
78 'icon' => 'fas fa-credit-card',
79 'active' => false,
80 'order' => 5
81 ]
82 ];
83 }
84
85 /**
86 * Register default fields
87 *
88 * @since 1.0.0
89 * @return void
90 */
91 public function registerDefaultFields(): void {
92 // Define all fields in a single array for easy modification by pro plugins
93 $all_fields = $this->getDefaultFieldsArray();
94
95 // Gate basic tax fields on the global Settings → Tax → Enable
96 // Tax setting — matches the invoice builder. When tax is
97 // globally off, the override checkbox / rate / prices-include-tax
98 // are all hidden from the quote builder.
99 if (get_option('easy_invoice_tax_enabled', 'no') !== 'yes') {
100 $tax_field_names = ['tax_enabled', 'tax_rate', 'prices_include_tax'];
101 $all_fields = array_values(array_filter(
102 $all_fields,
103 static fn($f) => !in_array($f['name'] ?? '', $tax_field_names, true)
104 ));
105 }
106
107 // Apply filter to allow pro plugins to modify fields
108 $all_fields = apply_filters('easy_invoice_quote_form_fields', $all_fields);
109
110 // Register all fields from the array
111 foreach ($all_fields as $field_config) {
112 $tab_id = $field_config['tab_id'] ?? '';
113 unset($field_config['tab_id']); // Remove tab_id from config
114
115 if (!empty($tab_id)) {
116 $this->registerField($tab_id, $field_config);
117 }
118 }
119 }
120
121 /**
122 * Get default fields array
123 *
124 * @since 1.0.0
125 * @return array
126 */
127 private function getDefaultFieldsArray(): array {
128 return [
129 // Quote Tab Fields
130 [
131 'tab_id' => 'quote-tab',
132 'id' => 'quote_template',
133 'type' => 'hidden',
134 'label' => __('Quote Template', 'easy-invoice'),
135 'name' => 'quote_template',
136 'required' => false,
137 'grid_cols' => 'sm:col-span-6',
138 'order' => 0,
139 'default_value' => 'standard',
140 'sanitize_callback' => 'sanitize_text_field',
141 'validate_callback' => function($value) {
142 return !empty(trim($value)) ? true : __('Quote template is required.', 'easy-invoice');
143 }
144 ],
145 [
146 'tab_id' => 'quote-tab',
147 'id' => 'quote_title',
148 'type' => 'text',
149 'label' => __('Quote Title', 'easy-invoice'),
150 'name' => 'title',
151 'placeholder' => __('Enter quote title', 'easy-invoice'),
152 'required' => true,
153 'grid_cols' => 'sm:col-span-6',
154 'order' => 1,
155 'default_value' => __('New Quote', 'easy-invoice'),
156 'sanitize_callback' => 'sanitize_text_field',
157 'validate_callback' => function($value) {
158 return !empty(trim($value)) ? true : __('Quote title is required.', 'easy-invoice');
159 }
160 ],
161 [
162 'tab_id' => 'quote-tab',
163 'id' => 'quote_description',
164 'type' => 'textarea',
165 'label' => __('Quote Description', 'easy-invoice'),
166 'name' => 'description',
167 'placeholder' => __('Enter quote description or additional details', 'easy-invoice'),
168 'required' => false,
169 'grid_cols' => 'sm:col-span-6',
170 'rows' => 3,
171 'order' => 2,
172 'description' => __('Optional description or additional details about this quote.', 'easy-invoice'),
173 'sanitize_callback' => 'sanitize_textarea_field',
174 ],
175 [
176 'tab_id' => 'quote-tab',
177 'id' => 'quote-number',
178 'type' => 'text',
179 'label' => __('Quote Number', 'easy-invoice'),
180 'name' => 'number',
181 'placeholder' => __('QT-001', 'easy-invoice'),
182 'required' => true,
183 'readonly' => true,
184 'description' => __('This is the unique number for your quote. It cannot be changed.', 'easy-invoice'),
185 'grid_cols' => 'sm:col-span-3',
186 'order' => 3,
187 'default_value' => function() {
188 // For new quotes, show the next number without incrementing
189 // For existing quotes, this will be overridden by the quote object's getNumber() method
190 if (class_exists('\\EasyInvoice\\Services\\QuoteNumberService')) {
191 $service = new \EasyInvoice\Services\QuoteNumberService();
192 return $service->getNextNumber();
193 }
194 return 'QT-' . str_pad(time(), 6, '0', STR_PAD_LEFT);
195 },
196 'sanitize_callback' => 'sanitize_text_field',
197 'validate_callback' => function($value) {
198 return !empty(trim($value)) ? true : __('Quote number is required.', 'easy-invoice');
199 }
200 ],
201 [
202 'tab_id' => 'quote-tab',
203 'id' => 'quote-date',
204 'type' => 'date',
205 'label' => __('Quote Date', 'easy-invoice'),
206 'name' => 'issue_date',
207 'required' => true,
208 'grid_cols' => 'sm:col-span-3',
209 'order' => 4,
210 'default_value' => date('Y-m-d'),
211 'sanitize_callback' => 'sanitize_text_field',
212 'validate_callback' => function($value) {
213 return !empty($value) && strtotime($value) ? true : __('Please enter a valid quote date.', 'easy-invoice');
214 }
215 ],
216 [
217 'tab_id' => 'quote-tab',
218 'id' => 'expiry-date',
219 'type' => 'date',
220 'label' => __('Expiry Date', 'easy-invoice'),
221 'name' => 'expiry_date',
222 'required' => true,
223 'grid_cols' => 'sm:col-span-3',
224 'order' => 5,
225 'sanitize_callback' => 'sanitize_text_field',
226 'validate_callback' => function($value) {
227 return !empty($value) && strtotime($value) ? true : __('Please enter a valid expiry date.', 'easy-invoice');
228 }
229 ],
230 [
231 'tab_id' => 'quote-tab',
232 'id' => 'status',
233 'type' => 'select',
234 'label' => __('Status', 'easy-invoice'),
235 'name' => 'status',
236 'required' => true,
237 'grid_cols' => 'sm:col-span-3',
238 'options' => [
239 'available' => __('Available', 'easy-invoice'),
240 'draft' => __('Draft', 'easy-invoice'),
241 'accepted' => __('Accepted', 'easy-invoice'),
242 'declined' => __('Declined', 'easy-invoice'),
243 'cancelled' => __('Cancelled', 'easy-invoice'),
244 'expired' => __('Expired', 'easy-invoice'),
245 'sent' => __('Sent', 'easy-invoice')
246 ],
247 'order' => 5
248 ],
249 [
250 'tab_id' => 'quote-tab',
251 'id' => 'notes',
252 'type' => 'textarea',
253 'label' => __('Notes', 'easy-invoice'),
254 'name' => 'notes',
255 'placeholder' => __('Additional notes for the client', 'easy-invoice'),
256 'grid_cols' => 'sm:col-span-6',
257 'rows' => 3,
258 'section' => 'notes',
259 'order' => 6,
260 'description' => __('These notes will be visible to your client on the quote.', 'easy-invoice'),
261 ],
262 [
263 'tab_id' => 'quote-tab',
264 'id' => 'internal_notes',
265 'type' => 'textarea',
266 'label' => __('Internal Notes', 'easy-invoice'),
267 'name' => 'internal_notes',
268 'placeholder' => __('Internal notes (not visible to client)', 'easy-invoice'),
269 'grid_cols' => 'sm:col-span-6',
270 'rows' => 3,
271 'section' => 'notes',
272 'order' => 7,
273 'description' => __('Only you and your team can see these notes. Clients will not see them.', 'easy-invoice'),
274 ],
275 [
276 'tab_id' => 'quote-tab',
277 'id' => 'terms',
278 'type' => 'textarea',
279 'label' => __('Quote Terms', 'easy-invoice'),
280 'name' => 'terms',
281 'placeholder' => __('Quote terms and conditions', 'easy-invoice'),
282 'grid_cols' => 'sm:col-span-6',
283 'rows' => 3,
284 'section' => 'notes',
285 'order' => 8,
286 'default_value' => function() {
287 return \EasyInvoice\Controllers\SettingsController::getQuoteTermsConditions();
288 },
289 'description' => __('Specify the terms and conditions for this quote.', 'easy-invoice'),
290 ],
291
292 // Client Tab Fields
293 [
294 'tab_id' => 'client-tab',
295 'id' => 'client_id',
296 'type' => 'select',
297 'label' => __('Select Client', 'easy-invoice'),
298 'name' => 'client_id',
299 'required' => false,
300 'grid_cols' => 'sm:col-span-6',
301 'options' => $this->getClientOptions(),
302 'order' => 1,
303 'description' => __('Choose an existing client or add a new one.', 'easy-invoice'),
304 ],
305
306 // Discounts & Taxes Tab Fields
307 [
308 'tab_id' => 'discounts-taxes-tab',
309 'name' => 'discount_type',
310 'type' => 'select',
311 'label' => __('Discount Type', 'easy-invoice'),
312 'grid_cols' => 'sm:col-span-2',
313 'section' => 'discount',
314 'options' => [
315 'none' => __('No Discount', 'easy-invoice'),
316 'percentage' => __('Percentage', 'easy-invoice'),
317 'fixed' => __('Fixed Amount', 'easy-invoice')
318 ],
319 'order' => 1,
320 'description' => __('Choose how the discount should be applied to this quote.', 'easy-invoice'),
321 ],
322 [
323 'tab_id' => 'discounts-taxes-tab',
324 'name' => 'discount_value',
325 'type' => 'number',
326 'label' => __('Discount Value', 'easy-invoice'),
327 'placeholder' => '0.00',
328 'grid_cols' => 'sm:col-span-2',
329 'section' => 'discount',
330 'min' => '0',
331 'step' => '0.01',
332 'order' => 2,
333 'sanitize_callback' => 'floatval',
334 'validate_callback' => function($value) {
335 return is_numeric($value) && $value >= 0 ? true : __('Discount value must be a non-negative number.', 'easy-invoice');
336 },
337 'description' => __('Enter the discount amount or percentage for this quote.', 'easy-invoice'),
338 ],
339 [
340 // Per-quote "Enable Tax" override — mirrors the
341 // identical field on the invoice builder. See
342 // InvoiceFieldRegistration for the design rationale.
343 'tab_id' => 'discounts-taxes-tab',
344 'name' => 'tax_enabled',
345 'type' => 'checkbox',
346 'label' => __('Apply Tax to This Quote', 'easy-invoice'),
347 'grid_cols' => 'sm:col-span-6',
348 'section' => 'tax',
349 'order' => 2.5,
350 'default_value' => function() {
351 return get_option('easy_invoice_tax_enabled', 'no') === 'yes' ? 'yes' : 'no';
352 },
353 'sanitize_callback' => function($value) {
354 if ($value === 'yes' || $value === '1' || $value === 1 || $value === true || $value === 'on') return 'yes';
355 return 'no';
356 },
357 'description' => __('Override the global tax setting for this quote.', 'easy-invoice'),
358 ],
359 [
360 // Discount calculation timing — belongs in the discount
361 // section (controls when discount applies relative to
362 // tax, not how tax is calculated).
363 'tab_id' => 'discounts-taxes-tab',
364 'name' => 'discount_calculation_method',
365 'type' => 'select',
366 'label' => __('Discount Timing', 'easy-invoice'),
367 'grid_cols' => 'sm:col-span-2',
368 'section' => 'discount',
369 'options' => [
370 'before_tax' => __('Before Tax', 'easy-invoice'),
371 'after_tax' => __('After Tax', 'easy-invoice')
372 ],
373 'default_value' => 'before_tax',
374 'order' => 3,
375 'description' => __('Apply discount before tax (reduces taxable amount) or after tax (tax on full amount)', 'easy-invoice'),
376 ],
377 [
378 // Tax sub-fields sit on one row (3 + 3 = 6 cols) so
379 // Tax Rate and Price Includes Tax appear side-by-side
380 // under the Apply Tax checkbox.
381 'tab_id' => 'discounts-taxes-tab',
382 'name' => 'tax_rate',
383 'type' => 'number',
384 'label' => __('Tax Rate (%)', 'easy-invoice'),
385 'placeholder' => '0.00',
386 'grid_cols' => 'sm:col-span-3',
387 'section' => 'tax',
388 'min' => '0',
389 'max' => '100',
390 'step' => '0.01',
391 'order' => 4,
392 'default_value' => function() {
393 return easy_invoice_get_tax_rate();
394 },
395 'sanitize_callback' => 'floatval',
396 'validate_callback' => function($value) {
397 return is_numeric($value) && $value >= 0 && $value <= 100 ? true : __('Tax rate must be between 0 and 100.', 'easy-invoice');
398 },
399 'description' => __('The tax rate that will be applied to taxable items in this quote.', 'easy-invoice'),
400 ],
401 [
402 'tab_id' => 'discounts-taxes-tab',
403 'name' => 'prices_include_tax',
404 'type' => 'select',
405 'label' => __('Price Includes Tax', 'easy-invoice'),
406 'grid_cols' => 'sm:col-span-3',
407 'section' => 'tax',
408 'options' => [
409 'no' => __('No', 'easy-invoice'),
410 'yes' => __('Yes', 'easy-invoice')
411 ],
412 'order' => 5,
413 'description' => __('Choose whether the prices in this quote include tax or not.', 'easy-invoice'),
414 ],
415
416
417 // Payments Tab Fields
418
419 // Currency Section in Payment Tab
420 [
421 'tab_id' => 'payments-tab',
422 'id' => 'currency_code',
423 'type' => 'select',
424 'label' => __('Currency', 'easy-invoice'),
425 'name' => 'currency_code',
426 'grid_cols' => 'sm:col-span-3',
427 'section' => 'currency',
428 'options' => array_merge(
429 ['global' => __('Use from Global Settings', 'easy-invoice')],
430 \EasyInvoice\Helpers\CurrencyHelper::getCurrencyOptions()
431 ),
432 'default_value' => 'global',
433 'order' => 1,
434 'description' => __('Select the currency for this quote or use global settings.', 'easy-invoice'),
435 ],
436 [
437 'tab_id' => 'payments-tab',
438 'id' => 'currency_position',
439 'type' => 'select',
440 'label' => __('Currency Symbol Position', 'easy-invoice'),
441 'name' => 'currency_position',
442 'grid_cols' => 'sm:col-span-3',
443 'section' => 'currency',
444 'options' => [
445 'global' => __('Use from Global Settings', 'easy-invoice'),
446 'before' => __('Before Amount', 'easy-invoice'),
447 'after' => __('After Amount', 'easy-invoice'),
448 ],
449 'default_value' => 'global',
450 'order' => 2,
451 'description' => __('Choose where to display the currency symbol or use global setting.', 'easy-invoice'),
452 ],
453 ];
454 }
455
456 /**
457 * Register default templates
458 *
459 * @since 1.0.0
460 * @return void
461 */
462 public function registerDefaultTemplates(): void {
463 // Define all templates in a single array for easy modification by pro plugins
464 $all_templates = $this->getDefaultTemplatesArray();
465
466 // Apply filter to allow pro plugins to modify templates
467 $all_templates = apply_filters('easy_invoice_quote_templates', $all_templates);
468
469 // Register all templates from the array
470 foreach ($all_templates as $template_id => $template_config) {
471 $this->registerTemplate($template_id, $template_config);
472 }
473 }
474
475 /**
476 * Get default templates array
477 *
478 * @since 1.0.0
479 * @return array
480 */
481 private function getDefaultTemplatesArray(): array {
482 // Check if this is the free version (no pro plugin active)
483 $is_free_version = !easy_invoice_has_pro();
484
485 return [
486 'standard' => [
487 'name' => __('Standard', 'easy-invoice'),
488 'description' => __('A clean, professional quote template', 'easy-invoice'),
489 'icon' => 'fas fa-file-invoice',
490 'order' => 1,
491 'is_free' => true
492 ],
493 'legacy' => [
494 'name' => __('Legacy', 'easy-invoice'),
495 'description' => __('Clean, minimalist design with traditional business layout', 'easy-invoice'),
496 'icon' => 'fas fa-file-alt',
497 'order' => 2,
498 'is_free' => true
499 ],
500 'modern' => [
501 'name' => __('Modern', 'easy-invoice'),
502 'description' => __('A contemporary quote template', 'easy-invoice'),
503 'icon' => 'fas fa-star',
504 'order' => 3,
505 'is_free' => !$is_free_version
506 ],
507 'minimal' => [
508 'name' => __('Minimal', 'easy-invoice'),
509 'description' => __('A simple, clean quote template', 'easy-invoice'),
510 'icon' => 'fas fa-minus',
511 'order' => 4,
512 'is_free' => !$is_free_version
513 ]
514 ];
515 }
516
517 /**
518 * Register default item fields
519 *
520 * @since 1.0.0
521 * @return void
522 */
523 public function registerDefaultItemFields(): void {
524 // Define all item fields in a single array for easy modification by pro plugins
525 $all_item_fields = $this->getDefaultItemFieldsArray();
526
527 // Apply filter to allow pro plugins to modify item fields
528 $all_item_fields = apply_filters('easy_invoice_quote_item_fields', $all_item_fields);
529
530 // Register all item fields from the array
531 foreach ($all_item_fields as $field_config) {
532 $this->registerItemField($field_config);
533 }
534 }
535
536 /**
537 * Get default item fields array
538 *
539 * @since 1.0.0
540 * @return array
541 */
542 private function getDefaultItemFieldsArray(): array {
543 $fields = [
544 [
545 'id' => 'title',
546 'type' => 'text',
547 'label' => __('Item Title', 'easy-invoice'),
548 'name' => 'title',
549 'placeholder' => __('Enter item title', 'easy-invoice'),
550 'required' => true,
551 'container_class' => 'sm:col-span-6',
552 'order' => 1,
553 'description' => __('A short name for this item (e.g. Service Fee, Product Name).', 'easy-invoice'),
554 ],
555 [
556 'id' => 'description',
557 'type' => 'textarea',
558 'label' => __('Description', 'easy-invoice'),
559 'name' => 'description',
560 'placeholder' => __('Enter item description', 'easy-invoice'),
561 'container_class' => 'sm:col-span-6',
562 'rows' => 3,
563 'order' => 2,
564 'description' => __('Details about this item for your client.', 'easy-invoice'),
565 ],
566 [
567 'id' => 'quantity',
568 'type' => 'number',
569 'label' => __('Quantity', 'easy-invoice'),
570 'name' => 'quantity',
571 'placeholder' => '0',
572 'required' => true,
573 'container_class' => 'sm:col-span-1',
574 'min' => '0',
575 'step' => '0.01',
576 'default_value' => '0',
577 'order' => 3,
578 'description' => __('How many units of this item are being billed?', 'easy-invoice'),
579 ],
580 [
581 'id' => 'price',
582 'type' => 'number',
583 'label' => __('Price', 'easy-invoice'),
584 'name' => 'price',
585 'placeholder' => '0.00',
586 'required' => true,
587 'container_class' => 'sm:col-span-1',
588 'min' => '0',
589 'step' => '0.01',
590 'default_value' => '0.00',
591 'order' => 4,
592 'description' => __('Unit price for this item.', 'easy-invoice'),
593 ]
594 ];
595
596 // Add adjust field only if setting allows it
597 if (\EasyInvoice\Controllers\SettingsController::shouldShowQuoteAdjustField()) {
598 $fields[] = [
599 'id' => 'adjust_percentage',
600 'type' => 'number',
601 'label' => __('Adjust (%)', 'easy-invoice'),
602 'name' => 'adjust_percentage',
603 'placeholder' => '0.00',
604 'container_class' => 'sm:col-span-1',
605 'min' => '-100',
606 'max' => '1000',
607 'step' => '0.01',
608 'default_value' => '0.00',
609 'order' => 5,
610 'description' => __('Percentage adjustment to apply to this item (positive for markup, negative for discount).', 'easy-invoice'),
611 ];
612 $current_order = 5; // Adjust field is present
613 } else {
614 $current_order = 4; // Adjust field is not present, start after price field
615 }
616
617 // Calculate order for remaining fields
618
619 $fields[] = [
620 'id' => 'total',
621 'type' => 'number',
622 'label' => __('Total', 'easy-invoice'),
623 'name' => 'total',
624 'placeholder' => '0.00',
625 'container_class' => 'sm:col-span-1',
626 'min' => '0',
627 'step' => '0.01',
628 'default_value' => '0.00',
629 'readonly' => true,
630 'order' => $current_order + 1,
631 'description' => __('Total amount for this item (Quantity x Price) with adjustment applied.', 'easy-invoice'),
632 ];
633
634 $fields[] = [
635 'id' => 'taxable',
636 'type' => 'checkbox',
637 'label' => __('Taxable', 'easy-invoice'),
638 'name' => 'taxable',
639 'container_class' => 'sm:col-span-6',
640 'default_value' => '1',
641 'order' => $current_order + 2,
642 'description' => __('Check if this item is subject to tax.', 'easy-invoice'),
643 ];
644
645 return $fields;
646 }
647
648 /**
649 * Get client options for select field
650 *
651 * @since 1.0.0
652 * @return array
653 */
654 private function getClientOptions(): array {
655 $options = ['' => __('Select a client', 'easy-invoice')];
656
657 // Get clients from repository
658 $client_repository = new \EasyInvoice\Repositories\ClientRepository();
659 $clients = $client_repository->all();
660
661 foreach ($clients as $client) {
662 $client_name = $client->getBusinessClientName() ?: ($client->getFirstName() . ' ' . $client->getLastName());
663 $options[$client->getId()] = $client_name;
664 }
665
666 return $options;
667 }
668
669 /**
670 * Get the filter name for tabs
671 *
672 * @since 1.0.0
673 * @return string
674 */
675 protected function getTabFilterName(): string {
676 return 'easy_invoice_quote_register_tab';
677 }
678
679 /**
680 * Get the filter name for fields
681 *
682 * @since 1.0.0
683 * @return string
684 */
685 protected function getFieldFilterName(): string {
686 return 'easy_invoice_quote_register_field';
687 }
688
689 /**
690 * Get the filter name for templates
691 *
692 * @since 1.0.0
693 * @return string
694 */
695 protected function getTemplateFilterName(): string {
696 return 'easy_invoice_quote_register_template';
697 }
698
699 /**
700 * Get the filter name for item fields
701 *
702 * @since 1.0.0
703 * @return string
704 */
705 protected function getItemFieldFilterName(): string {
706 return 'easy_invoice_quote_register_item_field';
707 }
708 }