From de368a6afb49cf1f737f93a58fdc957dca18b796 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Wed, 25 Mar 2020 14:29:43 +0000 Subject: [PATCH] Missed two queries - MIssed two queries --- app/Models/Item/AllocatedExpense.php | 2 ++ app/Models/Item/SimpleExpense.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/Models/Item/AllocatedExpense.php b/app/Models/Item/AllocatedExpense.php index b6f3be85..049a80d1 100644 --- a/app/Models/Item/AllocatedExpense.php +++ b/app/Models/Item/AllocatedExpense.php @@ -312,6 +312,7 @@ public function paginatedCollection( $category_join = true; + $select_fields[] = 'item_category.id AS item_category_id'; $select_fields[] = 'category.id AS category_id'; $select_fields[] = 'category.name AS category_name'; $select_fields[] = 'category.description AS category_description'; @@ -330,6 +331,7 @@ public function paginatedCollection( $subcategory_join = true; + $select_fields[] = 'item_sub_category.id AS item_subcategory_id'; $select_fields[] = 'sub_category.id AS subcategory_id'; $select_fields[] = 'sub_category.name AS subcategory_name'; $select_fields[] = 'sub_category.description AS subcategory_description'; diff --git a/app/Models/Item/SimpleExpense.php b/app/Models/Item/SimpleExpense.php index acba4acc..699bd7bd 100644 --- a/app/Models/Item/SimpleExpense.php +++ b/app/Models/Item/SimpleExpense.php @@ -226,6 +226,7 @@ public function paginatedCollection( $category_join = true; + $select_fields[] = 'item_category.id AS item_category_id'; $select_fields[] = 'category.id AS category_id'; $select_fields[] = 'category.name AS category_name'; $select_fields[] = 'category.description AS category_description'; @@ -244,6 +245,7 @@ public function paginatedCollection( $subcategory_join = true; + $select_fields[] = 'item_sub_category.id AS item_subcategory_id'; $select_fields[] = 'sub_category.id AS subcategory_id'; $select_fields[] = 'sub_category.name AS subcategory_name'; $select_fields[] = 'sub_category.description AS subcategory_description';