From 55ad3a20c28f74743384c92fa0dc6507da7905c4 Mon Sep 17 00:00:00 2001 From: jekkos-t520 Date: Thu, 7 Aug 2014 13:15:21 +0200 Subject: [PATCH] Fix requisitions report (can be found under receiving type = requisitions) --- application/models/reports/detailed_receivings.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/models/reports/detailed_receivings.php b/application/models/reports/detailed_receivings.php index fb5fb23a9..0ff381ed7 100644 --- a/application/models/reports/detailed_receivings.php +++ b/application/models/reports/detailed_receivings.php @@ -29,9 +29,9 @@ class Detailed_receivings extends Report { $this->db->where('quantity_purchased < 0'); } - elseif ($inputs['receiving_type'] == 'requisition') + elseif ($inputs['receiving_type'] == 'requisitions') { - $this->db->where('quantity_purchased = 0'); + $this->db->having('items_purchased = 0'); } $this->db->group_by('receiving_id'); $this->db->order_by('receiving_date'); @@ -65,6 +65,10 @@ class Detailed_receivings extends Report { $this->db->where('quantity_purchased < 0'); } + elseif ($inputs['receiving_type'] == 'requisitions') + { + $this->db->where('quantity_purchased = 0'); + } return $this->db->get()->row_array(); } }