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 afab1a3..6382dd0 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 @@ -3963,6 +3963,7 @@ open class DashboardService( else "") + " group by pe.projectId " + " ) " + // project_fee + " , projectFee as ( " + " select " + " m.projectId, " @@ -3991,7 +3992,7 @@ open class DashboardService( + " (coalesce(pf.projectFee, 0) - ifnull(p.subContractFee, 0)) * 0.8 as totalBudget, " + " coalesce(me.manhourExpense, 0) as manhourExpense, " + " coalesce(id.invoicedAmount, 0) as invoicedAmount, " - + " coalesce(id.uninvoicedAmount, 0) as uninvoicedAmount, " +// + " coalesce(id.uninvoicedAmount, 0) as uninvoicedAmount, " + " coalesce(id.paidAmount, 0) as paidAmount, " + " coalesce(pe.projectExpense, 0) as projectExpense " + " from project p " @@ -4006,8 +4007,10 @@ open class DashboardService( + " where p.status = 'On-going' " + " and p.deleted = false " + (if (args.containsKey("teamId")) "and s.teamId = :teamId" else "") + + (if (args.containsKey("endDate")) " and coalesce(p.planStart, p.actualStart) <= :endDate" else "") + " order by p.code " + " ) result ") + println(sql) return jdbcDao.queryForList(sql.toString(), args) }