More pogress on Item Maintenance.

This commit is contained in:
Steve Ireland
2023-03-25 17:18:05 -04:00
parent 30bf97679a
commit 34ee5cc752
3 changed files with 8 additions and 4 deletions

View File

@@ -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');
}
/**

View File

@@ -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',

View File

@@ -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);