|
|
@@ -1060,9 +1060,9 @@ open class DashboardService( |
|
|
|
+ " when coalesce(round(p.totalFee / (COALESCE(expenditure.cumulativeExpenditure,0)),3),0) < 1 then 'Negative'" |
|
|
|
+ " end as projectedCashFlowStatus," |
|
|
|
+ " case" |
|
|
|
+ " when p.totalFee - sum(i.issueAmount) >= 0 then coalesce(round(p.totalFee - sum(i.issueAmount),2),0)" |
|
|
|
+ " when p.totalFee - sum(i.issueAmount) < 0 then 0" |
|
|
|
+ " when p.totalFee - sum(i.issueAmount) is null then 0" |
|
|
|
+ " when p.totalFee - sum(coalesce(i.issueAmount, 0)) >= 0 then coalesce(round(p.totalFee - sum(coalesce(i.issueAmount, 0)),2),0)" |
|
|
|
+ " when p.totalFee - sum(coalesce(i.issueAmount, 0)) < 0 then 0" |
|
|
|
+ " when p.totalFee - sum(coalesce(i.issueAmount, 0)) is null then 0" |
|
|
|
+ " end as totalUninvoiced" |
|
|
|
+ " from team t" |
|
|
|
+ " left join (" |
|
|
@@ -1319,9 +1319,9 @@ open class DashboardService( |
|
|
|
+ " when coalesce(round(p.expectedTotalFee / (COALESCE(expenditure.cumulativeExpenditure,0)),3),0) < 1 then 'Negative'" |
|
|
|
+ " end as projectedCashFlowStatus," |
|
|
|
+ " case" |
|
|
|
+ " when p.expectedTotalFee - sum(i.issueAmount) >= 0 then coalesce(round(p.expectedTotalFee - sum(i.issueAmount),2),0)" |
|
|
|
+ " when p.expectedTotalFee - sum(i.issueAmount) < 0 then 0" |
|
|
|
+ " when p.expectedTotalFee - sum(i.issueAmount) is null then 0" |
|
|
|
+ " when p.expectedTotalFee - sum(coalesce(i.issueAmount, 0)) >= 0 then coalesce(round(p.expectedTotalFee - sum(coalesce(i.issueAmount, 0)),2),0)" |
|
|
|
+ " when p.expectedTotalFee - sum(coalesce(i.issueAmount, 0)) < 0 then 0" |
|
|
|
+ " when p.expectedTotalFee - sum(coalesce(i.issueAmount, 0)) is null then 0" |
|
|
|
+ " end as totalUninvoiced" |
|
|
|
+ " from team t" |
|
|
|
+ " left join project p on t.teamLead = p.teamLead" |
|
|
@@ -3449,7 +3449,7 @@ open class DashboardService( |
|
|
|
} |
|
|
|
|
|
|
|
createCell(9).apply { |
|
|
|
setCellValue(financialSummaryByClient.cumulativeExpenditure) |
|
|
|
setCellValue(financialSummaryByClient.totalExpenditure) |
|
|
|
cellStyle.apply { |
|
|
|
setFont(normalFont) |
|
|
|
dataFormat = accountingStyle |
|
|
@@ -3457,8 +3457,9 @@ open class DashboardService( |
|
|
|
CellUtil.setAlignment(this, HorizontalAlignment.RIGHT) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
createCell(10).apply { |
|
|
|
setCellValue(financialSummaryByClient.totalInvoiced) |
|
|
|
setCellValue(financialSummaryByClient.manhoursExpenditure) |
|
|
|
cellStyle.apply { |
|
|
|
setFont(normalFont) |
|
|
|
dataFormat = accountingStyle |
|
|
@@ -3467,7 +3468,7 @@ open class DashboardService( |
|
|
|
} |
|
|
|
|
|
|
|
createCell(11).apply { |
|
|
|
cellFormula = "IF(H${rowIndex}-K${rowIndex}<0,0,H${rowIndex}-K${rowIndex})" |
|
|
|
setCellValue(financialSummaryByClient.projectExpense) |
|
|
|
cellStyle.apply { |
|
|
|
setFont(normalFont) |
|
|
|
dataFormat = accountingStyle |
|
|
@@ -3476,6 +3477,24 @@ open class DashboardService( |
|
|
|
} |
|
|
|
|
|
|
|
createCell(12).apply { |
|
|
|
setCellValue(financialSummaryByClient.totalInvoiced) |
|
|
|
cellStyle.apply { |
|
|
|
setFont(normalFont) |
|
|
|
dataFormat = accountingStyle |
|
|
|
} |
|
|
|
CellUtil.setAlignment(this, HorizontalAlignment.RIGHT) |
|
|
|
} |
|
|
|
|
|
|
|
createCell(13).apply { |
|
|
|
cellFormula = "IF(H${rowIndex}-M${rowIndex}<0,0,H${rowIndex}-M${rowIndex})" |
|
|
|
cellStyle.apply { |
|
|
|
setFont(normalFont) |
|
|
|
dataFormat = accountingStyle |
|
|
|
} |
|
|
|
CellUtil.setAlignment(this, HorizontalAlignment.RIGHT) |
|
|
|
} |
|
|
|
|
|
|
|
createCell(14).apply { |
|
|
|
setCellValue(financialSummaryByClient.totalReceived) |
|
|
|
cellStyle.apply { |
|
|
|
setFont(normalFont) |
|
|
@@ -3903,7 +3922,7 @@ open class DashboardService( |
|
|
|
} |
|
|
|
|
|
|
|
createCell(14).apply { |
|
|
|
cellFormula = "IF(I${rowIndex}-L${rowIndex}<0,0,I${rowIndex}-N${rowIndex})" |
|
|
|
cellFormula = "IF(I${rowIndex}-N${rowIndex}<0,0,I${rowIndex}-N${rowIndex})" |
|
|
|
cellStyle.apply { |
|
|
|
setFont(normalFont) |
|
|
|
dataFormat = accountingStyle |
|
|
|