mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-11 23:46:35 -04:00
Renamed index to getIndex in Controllers
This commit is contained in:
committed by
Steve Ireland
parent
4d6a3cc5e1
commit
3831503721
@@ -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');
|
||||
|
||||
/*
|
||||
* --------------------------------------------------------------------
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class Login extends BaseController
|
||||
{
|
||||
protected $helpers = ['form'];
|
||||
|
||||
public function index()
|
||||
public function getIndex()
|
||||
{
|
||||
$this->employee = model('Employee');
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class Receivings extends Secure_Controller
|
||||
$this->supplier = model('Supplier');
|
||||
}
|
||||
|
||||
public function index(): void
|
||||
public function getIndex(): void
|
||||
{
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user