|
|
@@ -1733,9 +1733,10 @@ open class ReportService( |
|
|
|
+ " result.code, " |
|
|
|
+ " result.name, " |
|
|
|
+ " result.teamCode, " |
|
|
|
+ " result.custCode, " ) |
|
|
|
+ " result.custCode, " |
|
|
|
+ " result.subCode, " ) |
|
|
|
if (args.get("outstanding") as Boolean) { |
|
|
|
sql.append(" result.projectFee - (result.totalBudget - COALESCE(i.issueAmount , 0) + COALESCE(i.issueAmount, 0) - COALESCE(i.paidAmount, 0)) as `Receivable Remained`, ") |
|
|
|
sql.append(" result.projectFee - COALESCE(i.paidAmount, 0) as `Receivable Remained`, ") |
|
|
|
} |
|
|
|
sql.append( |
|
|
|
" DATE_FORMAT(result.actualEnd, '%d/%m/%Y') as actualEnd " |
|
|
@@ -1746,6 +1747,7 @@ open class ReportService( |
|
|
|
+ " min(p.name) as name, " |
|
|
|
+ " min(t.code) as teamCode, " |
|
|
|
+ " min(c.code) as custCode, " |
|
|
|
+ " COALESCE(concat(min(ss.code),' - ',min(ss.name)), 'N/A') as subCode, " |
|
|
|
+ " min(p.actualEnd) as actualEnd, " |
|
|
|
+ " min(p.expectedTotalFee) as projectFee, " |
|
|
|
+ " sum(COALESCE(tns.totalConsumed*sal.hourlyRate, 0)) as totalBudget " |
|
|
@@ -1766,6 +1768,7 @@ open class ReportService( |
|
|
|
+ " left join salary sal on s.salaryId = sal.salaryPoint " |
|
|
|
+ " left JOIN team t ON s.teamId = t.id " |
|
|
|
+ " left join customer c on c.id = p.customerId " |
|
|
|
+ " LEFT JOIN subsidiary ss on p.customerSubsidiaryId = ss.id " |
|
|
|
+ " where p.deleted = false " |
|
|
|
+ " and p.status = 'Completed' " |
|
|
|
+ " and p.actualEnd BETWEEN :startDate and :endDate " |
|
|
@@ -1806,7 +1809,7 @@ open class ReportService( |
|
|
|
+ " p.name, " |
|
|
|
+ " t.code as team, " |
|
|
|
+ " c.code as client, " |
|
|
|
+ " COALESCE(ss.name, 'N/A') as subsidiary, " |
|
|
|
+ " COALESCE(ss.code, 'N/A') as subsidiary, " |
|
|
|
+ " p.expectedTotalFee * 0.8 as plannedBudget, " |
|
|
|
+ " COALESCE(tns.totalBudget, 0) as actualConsumedBudget, " |
|
|
|
+ " COALESCE(p.totalManhour, 0) as plannedManhour, " |
|
|
|