PluginProbe
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce / 1.6.9
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce v1.6.9
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.6.9, at includes/framework/settings/general.php

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