|
@@ -708,14 +708,14 @@ open class DashboardService( |
|
|
+ " round(expenditure.cumulativeExpenditure,2) as manhoursExpenditure," |
|
|
+ " round(expenditure.cumulativeExpenditure,2) as manhoursExpenditure," |
|
|
+ " round(projectExpense.amount,2) as projectExpense," |
|
|
+ " round(projectExpense.amount,2) as projectExpense," |
|
|
+ " case" |
|
|
+ " case" |
|
|
+ " when coalesce(round(sum(i.issueAmount) / (expenditure.cumulativeExpenditure),3),0) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when coalesce(round(sum(i.issueAmount) / (expenditure.cumulativeExpenditure),3),0) < 1 then 'Negative'" |
|
|
|
|
|
|
|
|
+ " when coalesce(round(sum(i.issueAmount) / (expenditure.cumulativeExpenditure + projectExpense.amount),3),0) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when coalesce(round(sum(i.issueAmount) / (expenditure.cumulativeExpenditure + projectExpense.amount),3),0) < 1 then 'Negative'" |
|
|
+ " end as cashFlowStatus," |
|
|
+ " end as cashFlowStatus," |
|
|
+ " coalesce(format(sum(i.issueAmount) / (expenditure.cumulativeExpenditure),3),0) as cpi," |
|
|
|
|
|
+ " coalesce(format(coalesce(pj.totalFee,0) / (expenditure.cumulativeExpenditure),3),0) as projectedCpi," |
|
|
|
|
|
|
|
|
+ " coalesce(format(sum(i.issueAmount) / (expenditure.cumulativeExpenditure + projectExpense.amount),3),0) as cpi," |
|
|
|
|
|
+ " coalesce(format(coalesce(pj.totalFee,0) / (expenditure.cumulativeExpenditure + projectExpense.amount),3),0) as projectedCpi," |
|
|
+ " case" |
|
|
+ " case" |
|
|
+ " when coalesce(round(coalesce(pj.totalFee,0) / (expenditure.cumulativeExpenditure),3),0) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when coalesce(round(coalesce(pj.totalFee,0) / (expenditure.cumulativeExpenditure),3),0) < 1 then 'Negative'" |
|
|
|
|
|
|
|
|
+ " when coalesce(round(coalesce(pj.totalFee,0) / (expenditure.cumulativeExpenditure + projectExpense.amount),3),0) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when coalesce(round(coalesce(pj.totalFee,0) / (expenditure.cumulativeExpenditure + projectExpense.amount),3),0) < 1 then 'Negative'" |
|
|
+ " end as projectedCashFlowStatus" |
|
|
+ " end as projectedCashFlowStatus" |
|
|
+ " from team t" |
|
|
+ " from team t" |
|
|
+ " left join (" |
|
|
+ " left join (" |
|
@@ -870,14 +870,14 @@ open class DashboardService( |
|
|
+ " sum(p.expectedTotalFee) - sum(i.issueAmount) as unInvoiced," |
|
|
+ " sum(p.expectedTotalFee) - sum(i.issueAmount) as unInvoiced," |
|
|
+ " sum(i.paidAmount) as totalReceived," |
|
|
+ " sum(i.paidAmount) as totalReceived," |
|
|
+ " case" |
|
|
+ " case" |
|
|
+ " when round(sum(i.issueAmount) / (expenditure.cumulativeExpenditure),3) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when round(sum(i.issueAmount) / (expenditure.cumulativeExpenditure),3) < 1 then 'Negative'" |
|
|
|
|
|
|
|
|
+ " when round(sum(i.issueAmount) / ((expenditure.cumulativeExpenditure + projectExpense.amount)),3) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when round(sum(i.issueAmount) / ((expenditure.cumulativeExpenditure + projectExpense.amount)),3) < 1 then 'Negative'" |
|
|
+ " end as cashFlowStatus," |
|
|
+ " end as cashFlowStatus," |
|
|
+ " format(sum(i.issueAmount) / (expenditure.cumulativeExpenditure),3) as cpi," |
|
|
|
|
|
+ " format(sum(p.expectedTotalFee) / (expenditure.cumulativeExpenditure),3) as projectedCpi," |
|
|
|
|
|
|
|
|
+ " format(sum(i.issueAmount) / ((expenditure.cumulativeExpenditure + projectExpense.amount)),3) as cpi," |
|
|
|
|
|
+ " format(sum(p.expectedTotalFee) / ((expenditure.cumulativeExpenditure + projectExpense.amount)),3) as projectedCpi," |
|
|
+ " case" |
|
|
+ " case" |
|
|
+ " when round(sum(p.expectedTotalFee) / (expenditure.cumulativeExpenditure),3) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when round(sum(p.expectedTotalFee) / (expenditure.cumulativeExpenditure),3) < 1 then 'Negative'" |
|
|
|
|
|
|
|
|
+ " when round(sum(p.expectedTotalFee) / ((expenditure.cumulativeExpenditure + projectExpense.amount)),3) >= 1 then 'Positive'" |
|
|
|
|
|
+ " when round(sum(p.expectedTotalFee) / ((expenditure.cumulativeExpenditure + projectExpense.amount)),3) < 1 then 'Negative'" |
|
|
+ " end as projectedCashFlowStatus" |
|
|
+ " end as projectedCashFlowStatus" |
|
|
+ " from project p" |
|
|
+ " from project p" |
|
|
+ " left join (" |
|
|
+ " left join (" |
|
|