From e28b86c46408b7c23db15fd3f6d3d0c30145c377 Mon Sep 17 00:00:00 2001 From: "cyril.tsui" Date: Thu, 6 Jun 2024 11:49:04 +0800 Subject: [PATCH 1/2] update cash flow report --- .../com/ffii/tsms/modules/report/service/ReportService.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt b/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt index ba386ac..dd6386f 100644 --- a/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt +++ b/src/main/java/com/ffii/tsms/modules/report/service/ReportService.kt @@ -755,11 +755,12 @@ open class ReportService( } val groupedInvoices = invoices.sortedBy { it.receiptDate }.filter { it.paidAmount != null } - .groupBy { invoiceEntry -> invoiceEntry.invoiceDate?.format(dateFormatter).toString() } + .groupBy { invoiceEntry -> invoiceEntry.receiptDate?.format(dateFormatter).toString() } .mapValues { (_, invoiceEntries) -> invoiceEntries.map { invoice -> mapOf( "paidAmount" to invoice.paidAmount?.toDouble(), + "invoiceNo" to invoice.invoiceNo, "description" to invoice.milestonePayment?.description ) } @@ -815,7 +816,8 @@ open class ReportService( } createCell(4)?.apply { - setCellValue(invoice["description"].toString()) +// setCellValue(invoice["description"].toString()) + setCellValue("Invoice Receipt: " + (invoice["invoiceNo"] ?: "N/A").toString()) } } } @@ -857,6 +859,7 @@ open class ReportService( } } } + } return workbook From a5d456f4c54c8a0c3daded5b3f52ee10fc8dc5c0 Mon Sep 17 00:00:00 2001 From: "cyril.tsui" Date: Thu, 6 Jun 2024 12:02:54 +0800 Subject: [PATCH 2/2] update --- .../modules/project/entity/projections/ProjectSearchInfo.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/ffii/tsms/modules/project/entity/projections/ProjectSearchInfo.kt b/src/main/java/com/ffii/tsms/modules/project/entity/projections/ProjectSearchInfo.kt index 7843a95..9a45a96 100644 --- a/src/main/java/com/ffii/tsms/modules/project/entity/projections/ProjectSearchInfo.kt +++ b/src/main/java/com/ffii/tsms/modules/project/entity/projections/ProjectSearchInfo.kt @@ -20,6 +20,9 @@ interface ProjectSearchInfo { @get:Value("#{target.teamLead.team.code}") val team: String? + @get:Value("#{target.teamLead.team.id}") + val teamId: Long? + @get:Value("#{target.customer.name}") val client: String? }