mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-16 20:38:32 -04:00
Fix Request variable retrieval
- getSearch functions to properly retrieve HTTP vars. - getVar() function calls replaced with getGet() or getPost() - replaced TRUE/FALSE constants with true/false keywords
This commit is contained in:
@@ -37,11 +37,11 @@ class Attributes extends Secure_Controller
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$attributes = $this->attribute->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->attribute->get_found_rows($search);
|
||||
@@ -168,7 +168,7 @@ class Attributes extends Secure_Controller
|
||||
*/
|
||||
public function getSuggestAttribute(int $definition_id): void
|
||||
{
|
||||
$suggestions = $this->attribute->get_suggestions($definition_id, html_entity_decode($this->request->getVar('term')));
|
||||
$suggestions = $this->attribute->get_suggestions($definition_id, html_entity_decode($this->request->getGet('term')));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
@@ -37,19 +37,19 @@ class Cashups extends Secure_Controller
|
||||
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$filters = [
|
||||
'start_date' => $this->request->getVar('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS), //TODO: Is this the best way to filter dates
|
||||
'end_date' => $this->request->getVar('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'start_date' => $this->request->getGet('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS), //TODO: Is this the best way to filter dates
|
||||
'end_date' => $this->request->getGet('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'is_deleted' => FALSE
|
||||
];
|
||||
|
||||
// check if any filter is set in the multiselect dropdown
|
||||
$filledup = array_fill_keys($this->request->getVar('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS), TRUE); //TODO: $filledup doesn't follow variable naming patterns we are using.
|
||||
$filledup = array_fill_keys($this->request->getGet('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS), TRUE); //TODO: $filledup doesn't follow variable naming patterns we are using.
|
||||
$filters = array_merge($filters, $filledup);
|
||||
$cash_ups = $this->cashup->search($search, $filters, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->cashup->get_found_rows($search, $filters);
|
||||
|
||||
@@ -124,7 +124,7 @@ class Customers extends Persons
|
||||
*/
|
||||
public function getSuggest(): void
|
||||
{
|
||||
$suggestions = $this->customer->get_search_suggestions($this->request->getVar('term'), 25,TRUE);
|
||||
$suggestions = $this->customer->get_search_suggestions($this->request->getGet('term'), 25,TRUE);
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ class Employees extends Persons
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$employees = $this->employee->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->employee->get_found_rows($search);
|
||||
@@ -47,14 +47,14 @@ class Employees extends Persons
|
||||
*/
|
||||
public function suggest(): void
|
||||
{
|
||||
$suggestions = $this->employee->get_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 25, TRUE);
|
||||
$suggestions = $this->employee->get_search_suggestions($this->request->getGet('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), 25, true);
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function suggest_search(): void
|
||||
{
|
||||
$suggestions = $this->employee->get_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
$suggestions = $this->employee->get_search_suggestions($this->request->getPost('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
@@ -38,24 +38,24 @@ class Expenses extends Secure_Controller
|
||||
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$filters = [
|
||||
'start_date' => $this->request->getVar('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'end_date' => $this->request->getVar('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'only_cash' => FALSE,
|
||||
'only_due' => FALSE,
|
||||
'only_check' => FALSE,
|
||||
'only_credit' => FALSE,
|
||||
'only_debit' => FALSE,
|
||||
'is_deleted' => FALSE
|
||||
'start_date' => $this->request->getGet('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'end_date' => $this->request->getGet('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'only_cash' => false,
|
||||
'only_due' => false,
|
||||
'only_check' => false,
|
||||
'only_credit' => false,
|
||||
'only_debit' => false,
|
||||
'is_deleted' => false
|
||||
];
|
||||
|
||||
// check if any filter is set in the multiselect dropdown
|
||||
$filledup = array_fill_keys($this->request->getVar('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS), TRUE); //TODO: variable naming does not match standard
|
||||
$filledup = array_fill_keys($this->request->getGet('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS), TRUE); //TODO: variable naming does not match standard
|
||||
$filters = array_merge($filters, $filledup);
|
||||
$expenses = $this->expense->search($search, $filters, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->expense->get_found_rows($search, $filters);
|
||||
|
||||
@@ -27,11 +27,11 @@ class Expenses_categories extends Secure_Controller //TODO: Is this class ever u
|
||||
**/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$expense_categories = $this->expense_category->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->expense_category->get_found_rows($search);
|
||||
|
||||
@@ -28,11 +28,11 @@ class Giftcards extends Secure_Controller
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$giftcards = $this->giftcard->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->giftcard->get_found_rows($search);
|
||||
@@ -52,7 +52,7 @@ class Giftcards extends Secure_Controller
|
||||
|
||||
public function getSuggest(): void
|
||||
{
|
||||
$suggestions = $this->giftcard->get_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), TRUE);
|
||||
$suggestions = $this->giftcard->get_search_suggestions($this->request->getGet('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), true);
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
@@ -73,11 +73,11 @@ class Item_kits extends Secure_Controller
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? '';
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? '';
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$item_kits = $this->item_kit->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->item_kit->get_found_rows($search);
|
||||
|
||||
@@ -55,8 +55,8 @@ class Receivings extends Secure_Controller
|
||||
*/
|
||||
public function getItemSearch(): void
|
||||
{
|
||||
$suggestions = $this->item->get_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), ['search_custom' => FALSE, 'is_deleted' => FALSE], TRUE);
|
||||
$suggestions = array_merge($suggestions, $this->item_kit->get_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS)));
|
||||
$suggestions = $this->item->get_search_suggestions($this->request->getGet('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), ['search_custom' => false, 'is_deleted' => false], true);
|
||||
$suggestions = array_merge($suggestions, $this->item_kit->get_search_suggestions($this->request->getGet('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS)));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
@@ -67,8 +67,8 @@ class Receivings extends Secure_Controller
|
||||
*/
|
||||
public function getStockItemSearch(): void
|
||||
{
|
||||
$suggestions = $this->item->get_stock_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), ['search_custom' => FALSE, 'is_deleted' => FALSE], TRUE);
|
||||
$suggestions = array_merge($suggestions, $this->item_kit->get_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS)));
|
||||
$suggestions = $this->item->get_stock_search_suggestions($this->request->getGet('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), ['search_custom' => false, 'is_deleted' => false], true);
|
||||
$suggestions = array_merge($suggestions, $this->item_kit->get_search_suggestions($this->request->getGet('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS)));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
@@ -103,27 +103,27 @@ class Sales extends Secure_Controller
|
||||
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$filters = [
|
||||
'sale_type' => 'all',
|
||||
'location_id' => 'all',
|
||||
'start_date' => $this->request->getVar('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'end_date' => $this->request->getVar('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'start_date' => $this->request->getGet('start_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'end_date' => $this->request->getGet('end_date', FILTER_SANITIZE_FULL_SPECIAL_CHARS),
|
||||
'only_cash' => FALSE,
|
||||
'only_due' => FALSE,
|
||||
'only_check' => FALSE,
|
||||
'only_creditcard' => FALSE,
|
||||
'only_invoices' => $this->config['invoice_enable'] && $this->request->getVar('only_invoices', FILTER_SANITIZE_NUMBER_INT),
|
||||
'only_invoices' => $this->config['invoice_enable'] && $this->request->getGet('only_invoices', FILTER_SANITIZE_NUMBER_INT),
|
||||
'is_valid_receipt' => $this->sale->is_valid_receipt($search)
|
||||
];
|
||||
|
||||
// check if any filter is set in the multiselect dropdown
|
||||
$filledup = array_fill_keys($this->request->getVar('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS), TRUE); //TODO: Variable does not meet naming conventions
|
||||
$filledup = array_fill_keys($this->request->getGet('filters', FILTER_SANITIZE_FULL_SPECIAL_CHARS), true); //TODO: Variable does not meet naming conventions
|
||||
$filters = array_merge($filters, $filledup);
|
||||
|
||||
$sales = $this->sale->search($search, $filters, $limit, $offset, $sort, $order);
|
||||
|
||||
@@ -83,7 +83,7 @@ class Secure_Controller extends BaseController
|
||||
{
|
||||
$result = true;
|
||||
|
||||
foreach($this->request->getVar(null, FILTER_SANITIZE_FULL_SPECIAL_CHARS) as $value)
|
||||
foreach($this->request->getGet(null, FILTER_SANITIZE_FULL_SPECIAL_CHARS) as $value)
|
||||
{
|
||||
$result &= (int)parse_decimals($value);
|
||||
}
|
||||
|
||||
@@ -68,14 +68,14 @@ class Suppliers extends Persons
|
||||
*/
|
||||
public function suggest(): void
|
||||
{
|
||||
$suggestions = $this->supplier->get_search_suggestions($this->request->getVar('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), TRUE);
|
||||
$suggestions = $this->supplier->get_search_suggestions($this->request->getGet('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), true);
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function suggest_search()
|
||||
{
|
||||
$suggestions = $this->supplier->get_search_suggestions($this->request->getPost('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), FALSE);
|
||||
$suggestions = $this->supplier->get_search_suggestions($this->request->getPost('term', FILTER_SANITIZE_FULL_SPECIAL_CHARS), false);
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ class Tax_categories extends Secure_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('tax_categories');
|
||||
|
||||
|
||||
$this->tax_category = model('Tax_category');
|
||||
}
|
||||
|
||||
@@ -28,11 +28,11 @@ class Tax_categories extends Secure_Controller
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$tax_categories = $this->tax_category->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->tax_category->get_found_rows($search);
|
||||
|
||||
@@ -12,7 +12,7 @@ class Tax_codes extends Secure_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('tax_codes');
|
||||
|
||||
|
||||
$this->tax_code = model('Tax_code');
|
||||
helper('tax_helper');
|
||||
}
|
||||
@@ -35,11 +35,11 @@ class Tax_codes extends Secure_Controller
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$tax_codes = $this->tax_code->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->tax_code->get_found_rows($search);
|
||||
|
||||
@@ -31,11 +31,11 @@ class Tax_jurisdictions extends Secure_Controller
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$tax_jurisdictions = $this->tax_jurisdiction->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->tax_jurisdiction->get_found_rows($search);
|
||||
|
||||
@@ -78,11 +78,11 @@ class Taxes extends Secure_Controller
|
||||
*/
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
|
||||
|
||||
$tax_rates = $this->tax->search($search, $limit, $offset, $sort, $order);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user