From 4123c27a5ea50b628cfba0e9ddf17da1a34d3170 Mon Sep 17 00:00:00 2001 From: "MSI\\2Fi" Date: Fri, 14 Jun 2024 22:47:33 +0800 Subject: [PATCH] Since paymentMilesrtone is not mandatory field, so add null checking when reading corressponding cell value --- .../com/ffii/tsms/modules/project/service/InvoiceService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ffii/tsms/modules/project/service/InvoiceService.kt b/src/main/java/com/ffii/tsms/modules/project/service/InvoiceService.kt index 0628d8e..bb087eb 100644 --- a/src/main/java/com/ffii/tsms/modules/project/service/InvoiceService.kt +++ b/src/main/java/com/ffii/tsms/modules/project/service/InvoiceService.kt @@ -404,7 +404,7 @@ open class InvoiceService( team = ExcelUtils.getCell(sheet, i, 3).stringCellValue stage = ExcelUtils.getCell(sheet, i, 4).numericCellValue.toString() paymentMilestone = ExcelUtils.getCell(sheet, i, 5).stringCellValue - paymentMilestoneDate = ExcelUtils.getCell(sheet, i, 6).dateCellValue.toInstant().atZone(ZoneId.systemDefault()).toLocalDate() + paymentMilestoneDate = ExcelUtils.getCell(sheet, i, 6).dateCellValue?.toInstant()?.atZone(ZoneId.systemDefault())?.toLocalDate() client = ExcelUtils.getCell(sheet, i, 7).stringCellValue address = ExcelUtils.getCell(sheet, i, 8).stringCellValue attention = ExcelUtils.getCell(sheet, i, 9).stringCellValue