PluginProbe
VikBooking Hotel Booking Engine & PMS / trunk
VikBooking Hotel Booking Engine & PMS vtrunk
1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 All 36 releases
vikbooking / admin / helpers / src / help / wizard / drivers / reports / italy / ispat.php

ispat.php in VikBooking Hotel Booking Engine & PMS trunk, at admin/helpers/src/help/wizard/drivers/reports/italy/ispat.php

103 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package VikBooking
4 * @subpackage core
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 /**
15 * Wizard report ISPAT help instruction.
16 *
17 * @since 1.18.2 (J) - 1.8.2 (WP)
18 */
19 class VBOHelpWizardDriverReportsItalyIspat extends VBOHelpWizardInstructionaware
20 {
21 use VBOHelpWizardTraitReportConfigurable;
22
23 /**
24 * Class contructor.
25 */
26 public function __construct()
27 {
28 /**
29 * @see VBOHelpWizardTraitReportConfigurable::$reportId
30 */
31 $this->reportId = 'istat_ispat';
32
33 /**
34 * @see VBOHelpWizardTraitReportConfigurable::$autoExportFormat
35 */
36 $this->autoExportFormat = 'uploadC59Full';
37
38 /**
39 * @see VBOHelpWizardTraitReportConfigurable::$autoExportPayload
40 */
41 $this->autoExportPayload = [
42 'fromdate' => '{Y-m-d -1 day}',
43 'listings' => [],
44 '_reportAction' => 'uploadC59Full',
45 ];
46 }
47
48 /**
49 * @inheritDoc
50 */
51 public function getID()
52 {
53 return 'reports.italy.ispat';
54 }
55
56 /**
57 * @inheritDoc
58 */
59 public function getTitle()
60 {
61 return 'Istituto di statistica della Provincia di Trento (ISPAT)';
62 }
63
64 /**
65 * @inheritDoc
66 */
67 public function getIcon()
68 {
69 return VikBookingIcons::i('id-card');
70 }
71
72 /**
73 * @inheritDoc
74 */
75 public function getPriority()
76 {
77 return 998;
78 }
79
80 /**
81 * @inheritDoc
82 */
83 public function isSupported()
84 {
85 $config = VBOFactory::getConfig();
86
87 // check whether the main country is Italy and the main province is Trento
88 return $config->get('maincountry') === 'IT' && $config->get('mainstate') === 'TN';
89 }
90
91 /**
92 * @inheritDoc
93 *
94 * @see VBOHelpWizardTraitReportConfigurable::checkSettingsConfigured()
95 */
96 protected function checkSettingsConfigured()
97 {
98 $settings = VBOFactory::getConfig()->getArray('report_settings_istat_ispat', []);
99
100 return !empty($settings['propertyid']) && !empty($settings['user']) && !empty($settings['pwd']);
101 }
102 }
103