|
|
@@ -1496,8 +1496,8 @@ open class DashboardService( |
|
|
|
} |
|
|
|
|
|
|
|
fun BeforeCurrentYearCashFlowMonthlyCumulativeExpenditure(args: Map<String, Any>): List<Map<String, Any>> { |
|
|
|
val sql = StringBuilder("" |
|
|
|
+ " select" |
|
|
|
val sql = StringBuilder( |
|
|
|
" select" |
|
|
|
+ " coalesce (sum(result.expenditure),0) as beforeCurrentYearCumulativeExpenditure" |
|
|
|
+ " from(" |
|
|
|
+ " select" |
|
|
@@ -1544,6 +1544,26 @@ open class DashboardService( |
|
|
|
) |
|
|
|
return jdbcDao.queryForList(sql.toString(), args) |
|
|
|
} |
|
|
|
|
|
|
|
fun BeforeCurrentYearCashFlowMonthlyCumulativeIncome(args: Map<String, Any>): List<Map<String, Any>> { |
|
|
|
val sql = StringBuilder( |
|
|
|
" select" |
|
|
|
+ " coalesce (sum(result.income),0) as beforeCurrentYearCumulativeIncome" |
|
|
|
+ " from(" |
|
|
|
+ " select" |
|
|
|
+ " month(i.receiptDate) as invoiceMonth," |
|
|
|
+ " coalesce(sum(i.paidAmount),0) as income" |
|
|
|
+ " from project p" |
|
|
|
+ " left join invoice i on p.code = i.projectCode and i.deleted = 0 where p.status = 'On-going'" |
|
|
|
+ " and p.id in (1)" |
|
|
|
+ " and year(i.receiptDate) < 2025" |
|
|
|
+ " and i.id is not null" |
|
|
|
+ " group by month(i.receiptDate)" |
|
|
|
+ " ) as result" |
|
|
|
) |
|
|
|
return jdbcDao.queryForList(sql.toString(), args) |
|
|
|
} |
|
|
|
|
|
|
|
fun CashFlowReceivableAndExpenditure(args: Map<String, Any>): List<Map<String, Any>> { |
|
|
|
val sql = StringBuilder( |
|
|
|
// "select" |
|
|
|