PluginProbe
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce / 1.3.13
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce v1.3.13
1.17.9 1.17.8 1.17.7 1.17.6 1.17.5 1.17.4 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.3.0 1.3.1 1.3.11 1.3.12 1.3.13 1.3.14 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 143 releases
erp / includes / framework / settings / general.php

general.php in ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce 1.3.13, at includes/framework/settings/general.php

106 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use \WeDevs\ERP\Framework\ERP_Settings_Page;
4
5 /**
6 * General class
7 */
8 class ERP_Settings_General extends ERP_Settings_Page {
9
10 function __construct() {
11 $this->id = 'general';
12 $this->label = __( 'General', 'erp' );
13 }
14
15 /**
16 * Get settings array
17 *
18 * @return array
19 */
20 public function get_settings() {
21
22 $country = \WeDevs\ERP\Countries::instance();
23
24 $fields = array(
25
26 array( 'title' => __( 'General Options', 'erp' ), 'type' => 'title', 'desc' => '', 'id' => 'general_options' ),
27
28 array(
29 'title' => __( 'Company Start Date', 'erp' ),
30 'id' => 'gen_com_start',
31 'type' => 'text',
32 'desc' => __( 'The date the company officially started.', 'erp' ),
33 'class' => 'erp-date-field',
34 'tooltip' => true,
35 ),
36
37 array(
38 'title' => __( 'Financial Year Starts', 'erp' ),
39 'id' => 'gen_financial_month',
40 'type' => 'select',
41 'options' => erp_months_dropdown(),
42 'desc' => __( 'Financial and tax calculation starts from this month of every year.', 'erp' ),
43 'tooltip' => false,
44 ),
45
46 array(
47 'title' => __( 'Date Format', 'erp' ),
48 'id' => 'date_format',
49 'desc' => __( 'Format of date to show accross the system.', 'erp' ),
50 'tooltip' => true,
51 'type' => 'select',
52 'options' => [
53 'm-d-Y' => 'mm-dd-yyyy',
54 'd-m-Y' => 'dd-mm-yyyy',
55 'm/d/Y' => 'mm/dd/yyyy',
56 'd/m/Y' => 'dd/mm/yyyy',
57 'Y-m-d' => 'yyyy-mm-dd',
58 ]
59 ),
60
61 array(
62 'title' => __( 'Currency', 'erp' ),
63 'id' => 'erp_currency',
64 'type' => 'select',
65 'class' => 'erp-select2',
66 'options' => erp_get_currency_list_with_symbol(),
67 'default' => 'USD'
68 ),
69
70 array(
71 'title' => __( 'Default Country (HRM, CRM, AC)', 'erp' ),
72 'id' => 'erp_country',
73 'type' => 'select',
74 'class' => 'erp-select2',
75 'options' => $country->get_countries( -1 )
76 ),
77
78 array(
79 'title' => __( 'Role Based Login Redirection', 'erp' ),
80 'id' => 'role_based_login_redirection',
81 'type' => 'select',
82 'options' => [ 1 => __('On', 'erp'), 0 => __( 'Off', 'erp') ],
83 'desc' => __( 'User will be redirected to the related page regrading their role after login.', 'erp' ),
84 'tooltip' => true,
85 'default' => 0,
86 ),
87 array(
88 'title' => __( 'Enable Debug Mode', 'erp' ),
89 'id' => 'erp_debug_mode',
90 'type' => 'select',
91 'options' => [ 1 => __('On', 'erp'), 0 => __( 'Off', 'erp') ],
92 'desc' => __( 'Switching testing or production mode', 'erp' ),
93 'tooltip' => true,
94 'default' => 0,
95 ),
96
97 array( 'type' => 'sectionend', 'id' => 'script_styling_options' ),
98
99 ); // End general settings
100
101 return apply_filters( 'erp_settings_general', $fields );
102 }
103 }
104
105 return new ERP_Settings_General();
106