From 3d38b2322eaea519e403fadb0649d767b83ea8b1 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Sat, 23 Sep 2017 20:46:16 -0400 Subject: [PATCH] Fix item maintenance issue where item cannot be saved if employee is not authorized to work with Item Kits. --- application/controllers/Items.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/Items.php b/application/controllers/Items.php index c014a5f86..fc40a9e75 100644 --- a/application/controllers/Items.php +++ b/application/controllers/Items.php @@ -369,8 +369,8 @@ class Items extends Secure_Controller 'name' => $this->input->post('name'), 'description' => $this->input->post('description'), 'category' => $this->input->post('category'), - 'item_type' => $this->input->post('item_type'), - 'stock_type' => $this->input->post('stock_type'), + 'item_type' => $this->input->post('item_type') == NULL ? ITEM : $this->input->post('item_type'), + 'stock_type' => $this->input->post('stock_type') == NULL ? HAS_STOCK : $this->input->post('stock_type'), 'supplier_id' => $this->input->post('supplier_id') == '' ? NULL : $this->input->post('supplier_id'), 'item_number' => $this->input->post('item_number') == '' ? NULL : $this->input->post('item_number'), 'cost_price' => parse_decimals($this->input->post('cost_price')),