mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-10 18:09:30 -04:00
More pogress on Item Maintenance.
This commit is contained in:
@@ -440,7 +440,7 @@ class Items extends Secure_Controller
|
||||
echo view('items/form_inventory', $data);
|
||||
}
|
||||
|
||||
public function count_details(int $item_id = NEW_ENTRY): void
|
||||
public function getCountDetails(int $item_id = NEW_ENTRY): void
|
||||
{
|
||||
$item_info = $this->item->get_info($item_id); //TODO: Duplicate code
|
||||
|
||||
@@ -923,7 +923,7 @@ class Items extends Secure_Controller
|
||||
|
||||
public function getCsvImport(): void
|
||||
{
|
||||
echo view('items/form_csv_import', NULL);
|
||||
echo view('items/form_csv_import');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -520,7 +520,7 @@ function get_item_data_row(object $item): array
|
||||
]
|
||||
),
|
||||
'stock' => anchor(
|
||||
"$controller/count_details/$item->item_id",
|
||||
"$controller/countDetails/$item->item_id",
|
||||
'<span class="glyphicon glyphicon-list-alt"></span>',
|
||||
[
|
||||
'class' => 'modal-dlg',
|
||||
|
||||
@@ -472,13 +472,17 @@ class Employee extends Person
|
||||
/**
|
||||
* Determines whether the employee specified employee has access the specific module.
|
||||
*/
|
||||
public function has_grant(?string $permission_id, int $person_id): bool
|
||||
public function has_grant(?string $permission_id, ?int $person_id): bool
|
||||
{
|
||||
//if no module_id is null, allow access
|
||||
if($permission_id == NULL)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
if($person_id == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$builder = $this->db->table('grants');
|
||||
$query = $builder->getWhere(['person_id' => $person_id, 'permission_id' => $permission_id], 1);
|
||||
|
||||
Reference in New Issue
Block a user