| @@ -755,11 +755,12 @@ open class ReportService( | |||||
| } | } | ||||
| val groupedInvoices = invoices.sortedBy { it.receiptDate }.filter { it.paidAmount != null } | 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) -> | .mapValues { (_, invoiceEntries) -> | ||||
| invoiceEntries.map { invoice -> | invoiceEntries.map { invoice -> | ||||
| mapOf( | mapOf( | ||||
| "paidAmount" to invoice.paidAmount?.toDouble(), | "paidAmount" to invoice.paidAmount?.toDouble(), | ||||
| "invoiceNo" to invoice.invoiceNo, | |||||
| "description" to invoice.milestonePayment?.description | "description" to invoice.milestonePayment?.description | ||||
| ) | ) | ||||
| } | } | ||||
| @@ -815,7 +816,8 @@ open class ReportService( | |||||
| } | } | ||||
| createCell(4)?.apply { | 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 | return workbook | ||||