diff --git a/app/Controllers/Items.php b/app/Controllers/Items.php index 43d03d1d9..bdbf8f551 100644 --- a/app/Controllers/Items.php +++ b/app/Controllers/Items.php @@ -1216,11 +1216,11 @@ class Items extends Secure_Controller 'Tax 2 Percent' => $row['Tax 2 Percent'] ]; -/* foreach($allowed_locations as $location_name) + foreach($allowed_locations as $location_name) { $check_for_numeric_values[] = $row["location_$location_name"]; } - */ + //Check for non-numeric values which require numeric foreach($check_for_numeric_values as $key => $value) { diff --git a/app/Models/Stock_location.php b/app/Models/Stock_location.php index f627b6e0f..dff255032 100644 --- a/app/Models/Stock_location.php +++ b/app/Models/Stock_location.php @@ -255,7 +255,7 @@ class Stock_location extends Model $this->employee = model('Employee'); // Retrieve the menu_group assigned to the grant for the module and use that for the new stock locations - $menu_group = $employee->get_menu_group($module, $employee['person_id']); + $menu_group = $this->employee->get_menu_group($module, $employee['person_id']); $grants_data = ['permission_id' => $permission_id, 'person_id' => $employee['person_id'], 'menu_group' => $menu_group];