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';