From d75a9364729e2f12290bdeac2b2ad02af9b08822 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Mon, 30 Jan 2017 21:34:32 -0500 Subject: [PATCH] Change the inventory reports to exclude non-stock items. --- application/models/reports/Inventory_low.php | 2 +- application/models/reports/Inventory_summary.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/reports/Inventory_low.php b/application/models/reports/Inventory_low.php index 943aef993..e2b23f0f6 100644 --- a/application/models/reports/Inventory_low.php +++ b/application/models/reports/Inventory_low.php @@ -27,7 +27,7 @@ class Inventory_low extends Report $this->db->join('stock_locations', 'item_quantities.location_id = stock_locations.location_id'); $this->db->where('items.deleted', 0); $this->db->where('stock_locations.deleted', 0); - $this->db->where('item_quantities.quantity <= items.reorder_level'); + $this->db->where('items.stock_type', 0); $this->db->order_by('items.name'); return $this->db->get()->result_array(); diff --git a/application/models/reports/Inventory_summary.php b/application/models/reports/Inventory_summary.php index 443290f9c..b2ed5b582 100644 --- a/application/models/reports/Inventory_summary.php +++ b/application/models/reports/Inventory_summary.php @@ -28,6 +28,7 @@ class Inventory_summary extends Report $this->db->join('item_quantities AS item_quantities', 'items.item_id = item_quantities.item_id'); $this->db->join('stock_locations AS stock_locations', 'item_quantities.location_id = stock_locations.location_id'); $this->db->where('items.deleted', 0); + $this->db->where('items.stock_type', 0); $this->db->where('stock_locations.deleted', 0); // should be corresponding to values Inventory_summary::getItemCountDropdownArray() returns...