diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 8c7b90171..7fc0090da 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -31,37 +31,37 @@ $routes->set404Override(); // route since we don't have to scan directories. $routes->get('/', 'Login::index'); -$routes->add('no_access/([^/]+)', 'No_access::index/$1'); -$routes->add('no_access/([^/]+)/([^/]+)', 'No_access::index/$1/$2'); - -$routes->add('sales/index/([^/]+)', 'Sales::manage/$1'); -$routes->add('sales/index/([^/]+)/([^/]+)', 'Sales::manage/$1/$2'); -$routes->add('sales/index/([^/]+)/([^/]+)/([^/]+)', 'Sales::manage/$1/$2/$3'); - -$routes->add('reports/(summary_:any)/([^/]+)/([^/]+)', 'Reports::summary_(.+)/$1/$2/$3/$4'); //TODO - double check all TODOs -$routes->add('reports/summary_expenses_categories', 'Reports::date_input_only'); -$routes->add('reports/summary_payments', 'Reports::date_input_only'); -$routes->add('reports/summary_discounts', 'Reports::summary_discounts_input'); -$routes->add('reports/summary_:any', 'Reports::date_input'); - -$routes->add('reports/(graphical_:any)/([^/]+)/([^/]+)', 'Reports::/$1/$2/$3/$4'); //TODO -$routes->add('reports/graphical_summary_expenses_categories', 'Reports::date_input_only'); -$routes->add('reports/graphical_summary_discounts', 'Reports::summary_discounts_input'); -$routes->add('reports/graphical_:any', 'Reports::date_input'); - -$routes->add('reports/(inventory_:any)/([^/]+)', 'Reports::/$1/$2'); //TODO -$routes->add('reports/inventory_summary', 'Reports::inventory_summary_input'); -$routes->add('reports/(inventory_summary)/([^/]+)/([^/]+)/([^/]+)', 'Reports::/$1/$2'); //TODO - -$routes->add('reports/(detailed_:any)/([^/]+)/([^/]+)/([^/]+)', 'Reports::/$1/$2/$3/$4'); //TODO -$routes->add('reports/detailed_sales', 'Reports::date_input_sales'); -$routes->add('reports/detailed_receivings', 'Reports::date_input_recv'); - -$routes->add('reports/(specific_:any)/([^/]+)/([^/]+)/([^/]+)', 'Reports::/$1/$2/$3/$4'); //TODO -$routes->add('reports/specific_customer', 'Reports::specific_customer_input'); -$routes->add('reports/specific_employee', 'Reports::specific_employee_input'); -$routes->add('reports/specific_discount', 'Reports::specific_discount_input'); -$routes->add('reports/specific_supplier', 'Reports::specific_supplier_input'); +//$routes->add('no_access/([^/]+)', 'No_access::index/$1'); +//$routes->add('no_access/([^/]+)/([^/]+)', 'No_access::index/$1/$2'); +// +//$routes->add('sales/index/([^/]+)', 'Sales::manage/$1'); +//$routes->add('sales/index/([^/]+)/([^/]+)', 'Sales::manage/$1/$2'); +//$routes->add('sales/index/([^/]+)/([^/]+)/([^/]+)', 'Sales::manage/$1/$2/$3'); +// +//$routes->add('reports/(summary_:any)/([^/]+)/([^/]+)', 'Reports::summary_(.+)/$1/$2/$3/$4'); //TODO - double check all TODOs +//$routes->add('reports/summary_expenses_categories', 'Reports::date_input_only'); +//$routes->add('reports/summary_payments', 'Reports::date_input_only'); +//$routes->add('reports/summary_discounts', 'Reports::summary_discounts_input'); +//$routes->add('reports/summary_:any', 'Reports::date_input'); +// +//$routes->add('reports/(graphical_:any)/([^/]+)/([^/]+)', 'Reports::/$1/$2/$3/$4'); //TODO +//$routes->add('reports/graphical_summary_expenses_categories', 'Reports::date_input_only'); +//$routes->add('reports/graphical_summary_discounts', 'Reports::summary_discounts_input'); +//$routes->add('reports/graphical_:any', 'Reports::date_input'); +// +//$routes->add('reports/(inventory_:any)/([^/]+)', 'Reports::/$1/$2'); //TODO +//$routes->add('reports/inventory_summary', 'Reports::inventory_summary_input'); +//$routes->add('reports/(inventory_summary)/([^/]+)/([^/]+)/([^/]+)', 'Reports::/$1/$2'); //TODO +// +//$routes->add('reports/(detailed_:any)/([^/]+)/([^/]+)/([^/]+)', 'Reports::/$1/$2/$3/$4'); //TODO +//$routes->add('reports/detailed_sales', 'Reports::date_input_sales'); +//$routes->add('reports/detailed_receivings', 'Reports::date_input_recv'); +// +//$routes->add('reports/(specific_:any)/([^/]+)/([^/]+)/([^/]+)', 'Reports::/$1/$2/$3/$4'); //TODO +//$routes->add('reports/specific_customer', 'Reports::specific_customer_input'); +//$routes->add('reports/specific_employee', 'Reports::specific_employee_input'); +//$routes->add('reports/specific_discount', 'Reports::specific_discount_input'); +//$routes->add('reports/specific_supplier', 'Reports::specific_supplier_input'); /* * -------------------------------------------------------------------- diff --git a/app/Controllers/Attributes.php b/app/Controllers/Attributes.php index f8c90e3ee..611d257ef 100644 --- a/app/Controllers/Attributes.php +++ b/app/Controllers/Attributes.php @@ -21,7 +21,7 @@ class Attributes extends Secure_Controller $this->attribute = model('Attribute'); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_attribute_definition_manage_table_headers(); diff --git a/app/Controllers/Cashups.php b/app/Controllers/Cashups.php index 336a9f67b..43f5fcf80 100644 --- a/app/Controllers/Cashups.php +++ b/app/Controllers/Cashups.php @@ -22,7 +22,7 @@ class Cashups extends Secure_Controller $this->summary_payments = model('Reports/Summary_payments'); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_cashups_manage_table_headers(); diff --git a/app/Controllers/Customers.php b/app/Controllers/Customers.php index 29b1c5357..b8377fc44 100644 --- a/app/Controllers/Customers.php +++ b/app/Controllers/Customers.php @@ -44,7 +44,7 @@ class Customers extends Persons $this->_list_id = $this->encrypter->decrypt(config('OSPOS')->settings['mailchimp_list_id']); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_customer_manage_table_headers(); diff --git a/app/Controllers/Expenses.php b/app/Controllers/Expenses.php index 437a82c24..2bfce324b 100644 --- a/app/Controllers/Expenses.php +++ b/app/Controllers/Expenses.php @@ -19,7 +19,7 @@ class Expenses extends Secure_Controller $this->expense_category = model('Expense_category'); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_expenses_manage_table_headers(); diff --git a/app/Controllers/Expenses_categories.php b/app/Controllers/Expenses_categories.php index 161a4a7d5..fe1415191 100644 --- a/app/Controllers/Expenses_categories.php +++ b/app/Controllers/Expenses_categories.php @@ -16,7 +16,7 @@ class Expenses_categories extends Secure_Controller //TODO: Is this class ever u $this->expense_category = model('Expense_category'); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_expense_category_manage_table_headers(); diff --git a/app/Controllers/Giftcards.php b/app/Controllers/Giftcards.php index 849658b6c..61323ee15 100644 --- a/app/Controllers/Giftcards.php +++ b/app/Controllers/Giftcards.php @@ -16,7 +16,7 @@ class Giftcards extends Secure_Controller $this->giftcard = model('Giftcard'); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_giftcards_manage_table_headers(); diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index 2efdbeceb..090cfef58 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -9,7 +9,7 @@ class Home extends Secure_Controller parent::__construct(NULL, NULL, 'home'); } - public function index(): void + public function getIndex(): void { echo view('home/home'); } diff --git a/app/Controllers/Item_kits.php b/app/Controllers/Item_kits.php index d86e6567f..9079b5d2b 100644 --- a/app/Controllers/Item_kits.php +++ b/app/Controllers/Item_kits.php @@ -64,7 +64,7 @@ class Item_kits extends Secure_Controller return $item_kit; } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_item_kits_manage_table_headers(); diff --git a/app/Controllers/Items.php b/app/Controllers/Items.php index eb0f4f792..7d340e9ec 100644 --- a/app/Controllers/Items.php +++ b/app/Controllers/Items.php @@ -58,7 +58,7 @@ class Items extends Secure_Controller $this->tax_category = model('Tax_category'); } - public function index(): void + public function getIndex(): void { $this->session->set('allow_temp_items', 0); diff --git a/app/Controllers/Login.php b/app/Controllers/Login.php index 25d63c2f7..52970ef8b 100644 --- a/app/Controllers/Login.php +++ b/app/Controllers/Login.php @@ -14,7 +14,7 @@ class Login extends BaseController { protected $helpers = ['form']; - public function index() + public function getIndex() { $this->employee = model('Employee'); diff --git a/app/Controllers/Messages.php b/app/Controllers/Messages.php index c1f57e806..d396e9a5f 100644 --- a/app/Controllers/Messages.php +++ b/app/Controllers/Messages.php @@ -25,7 +25,7 @@ class Messages extends Secure_Controller $this->person = model('Person'); } - public function index(): void + public function getIndex(): void { echo view('messages/sms'); } diff --git a/app/Controllers/No_access.php b/app/Controllers/No_access.php index 95805c44f..14ce68d04 100644 --- a/app/Controllers/No_access.php +++ b/app/Controllers/No_access.php @@ -16,7 +16,7 @@ class No_Access extends BaseController { $this->module = model('Module'); } - public function index(string $module_id = '', string $permission_id = ''): void + public function getIndex(string $module_id = '', string $permission_id = ''): void { $data['module_name'] = $this->module->get_module_name($module_id); $data['permission_id'] = $permission_id; diff --git a/app/Controllers/Office.php b/app/Controllers/Office.php index 1892baa9f..3b212b438 100644 --- a/app/Controllers/Office.php +++ b/app/Controllers/Office.php @@ -14,7 +14,7 @@ class Office extends Secure_Controller parent::__construct('office', NULL, 'office'); } - public function index(): void + public function getIndex(): void { echo view('home/office'); } diff --git a/app/Controllers/Persons.php b/app/Controllers/Persons.php index e2037ab22..8acf164b8 100644 --- a/app/Controllers/Persons.php +++ b/app/Controllers/Persons.php @@ -16,7 +16,7 @@ abstract class Persons extends Secure_Controller $this->person = model('Person'); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_people_manage_table_headers(); diff --git a/app/Controllers/Receivings.php b/app/Controllers/Receivings.php index a8f512420..e02761f20 100644 --- a/app/Controllers/Receivings.php +++ b/app/Controllers/Receivings.php @@ -42,7 +42,7 @@ class Receivings extends Secure_Controller $this->supplier = model('Supplier'); } - public function index(): void + public function getIndex(): void { $this->_reload(); } diff --git a/app/Controllers/Reports.php b/app/Controllers/Reports.php index 48678990f..7ecbe9164 100644 --- a/app/Controllers/Reports.php +++ b/app/Controllers/Reports.php @@ -80,7 +80,7 @@ class Reports extends Secure_Controller } //Initial Report listing screen - public function index(): void + public function getIndex(): void { $data['grants'] = $this->employee->get_employee_grants($this->session->get('person_id')); diff --git a/app/Controllers/Sales.php b/app/Controllers/Sales.php index e54444aa3..95afb75ff 100644 --- a/app/Controllers/Sales.php +++ b/app/Controllers/Sales.php @@ -55,7 +55,7 @@ class Sales extends Secure_Controller $this->token_lib = new Token_lib(); } - public function index(): void + public function getIndex(): void { $this->session->set('allow_temp_items', 1); $this->_reload(); //TODO: Hungarian Notation diff --git a/app/Controllers/Secure_Controller.php b/app/Controllers/Secure_Controller.php index bd7511530..42db9688c 100644 --- a/app/Controllers/Secure_Controller.php +++ b/app/Controllers/Secure_Controller.php @@ -80,7 +80,7 @@ class Secure_Controller extends BaseController } // this is the basic set of methods most OSPOS Controllers will implement - public function index() { return FALSE; } + public function getIndex() { return FALSE; } public function search() { return FALSE; } public function suggest_search() { return FALSE; } public function view(int $data_item_id = -1) { return FALSE; } diff --git a/app/Controllers/Suppliers.php b/app/Controllers/Suppliers.php index 223a726fb..941114f5a 100644 --- a/app/Controllers/Suppliers.php +++ b/app/Controllers/Suppliers.php @@ -19,7 +19,7 @@ class Suppliers extends Persons $this->supplier = model('Supplier'); } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_suppliers_manage_table_headers(); diff --git a/app/Controllers/Tax_categories.php b/app/Controllers/Tax_categories.php index 212e8a3cf..d2348f54c 100644 --- a/app/Controllers/Tax_categories.php +++ b/app/Controllers/Tax_categories.php @@ -16,7 +16,7 @@ class Tax_categories extends Secure_Controller $this->tax_category = model('Tax_category'); } - public function index(): void + public function getIndex(): void { $data['tax_categories_table_headers'] = get_tax_categories_table_headers(); diff --git a/app/Controllers/Tax_codes.php b/app/Controllers/Tax_codes.php index 21a30b167..bae34c567 100644 --- a/app/Controllers/Tax_codes.php +++ b/app/Controllers/Tax_codes.php @@ -18,7 +18,7 @@ class Tax_codes extends Secure_Controller } - public function index(): void + public function getIndex(): void { echo view('taxes/tax_codes', $this->get_data()); } diff --git a/app/Controllers/Tax_jurisdictions.php b/app/Controllers/Tax_jurisdictions.php index 5df28470f..8b49f7597 100644 --- a/app/Controllers/Tax_jurisdictions.php +++ b/app/Controllers/Tax_jurisdictions.php @@ -19,7 +19,7 @@ class Tax_jurisdictions extends Secure_Controller } - public function index(): void + public function getIndex(): void { $data['table_headers'] = get_tax_jurisdictions_table_headers(); diff --git a/app/Controllers/Taxes.php b/app/Controllers/Taxes.php index 2b02539ee..4f2e7178c 100644 --- a/app/Controllers/Taxes.php +++ b/app/Controllers/Taxes.php @@ -34,7 +34,7 @@ class Taxes extends Secure_Controller helper('tax_helper'); } - public function index(): void + public function getIndex(): void { $data['tax_codes'] = $this->tax_code->get_all()->getResultArray(); if (count($data['tax_codes']) == 0)