From 29034c218a34b7e233a732f62f7a58c3bd2e4b81 Mon Sep 17 00:00:00 2001 From: "MSI\\User" Date: Tue, 20 Aug 2024 15:53:19 +0800 Subject: [PATCH] minor dashboard api update --- .../com/ffii/tsms/modules/data/service/DashboardService.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt b/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt index 84e1729..0e8530e 100644 --- a/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt +++ b/src/main/java/com/ffii/tsms/modules/data/service/DashboardService.kt @@ -1986,8 +1986,8 @@ open class DashboardService( + " coalesce (expenditure.expenditure,0) as expenditure," + " ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) - coalesce (expenditure.expenditure,0) as remainingBudget," + " case" - + " when p.expectedTotalFee - expenditure.expenditure >= 0 then 'Within Budget'" - + " when p.expectedTotalFee - expenditure.expenditure < 0 then 'Overconsumption'" + + " when p.expectedTotalFee - coalesce (expenditure.expenditure,0) >= 0 then 'Within Budget'" + + " when p.expectedTotalFee - coalesce (expenditure.expenditure,0) < 0 then 'Overconsumption'" + " end as status," + " p.totalManhour as plannedResources," + " sum(ifnull(t.normalConsumed, 0) + ifnull(t.otConsumed, 0)) as resourcesSpent,"