|
@@ -1986,8 +1986,8 @@ open class DashboardService( |
|
|
+ " coalesce (expenditure.expenditure,0) as expenditure," |
|
|
+ " coalesce (expenditure.expenditure,0) as expenditure," |
|
|
+ " ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) - coalesce (expenditure.expenditure,0) as remainingBudget," |
|
|
+ " ((p.expectedTotalFee - ifnull(p.subContractFee, 0)) * 0.8) - coalesce (expenditure.expenditure,0) as remainingBudget," |
|
|
+ " case" |
|
|
+ " 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," |
|
|
+ " end as status," |
|
|
+ " p.totalManhour as plannedResources," |
|
|
+ " p.totalManhour as plannedResources," |
|
|
+ " sum(ifnull(t.normalConsumed, 0) + ifnull(t.otConsumed, 0)) as resourcesSpent," |
|
|
+ " sum(ifnull(t.normalConsumed, 0) + ifnull(t.otConsumed, 0)) as resourcesSpent," |
|
|