add date in excel

This commit is contained in:
gowthaman 2024-08-12 09:11:52 +05:30
parent d7097733e0
commit c0b41eb040

View File

@ -358,7 +358,8 @@ fun exportIncomingInventory(tickets: List<IncomingInventory>) {
val headers: List<String> = listOf(
"MRN",
"Date",
"Inward Date",
"Entry Date",
"Vendor Name",
"Vendor Bill Number",
"Vendor Bill Amount",
@ -383,6 +384,7 @@ fun exportIncomingInventory(tickets: List<IncomingInventory>) {
var i = 0
row.createCell(i++).setCellValue(ticket.mrn)
row.createCell(i++).setCellValue(ticket.date?.format(DateTimeFormatter.ofPattern("dd/MM/yyyy ")) ?: "")
row.createCell(i++).setCellValue(ticket.createdAt?.format(DateTimeFormatter.ofPattern("dd/MM/yyyy ")) ?: "")
row.createCell(i++).setCellValue(ticket.vendor?.name)
row.createCell(i++).setCellValue(ticket.vendorBillNum)
row.createCell(i++).setCellValue(ticket.vendorBillAmount)
@ -416,7 +418,8 @@ fun exportOutgoingInventory(tickets: List<OutgoingInventory>) {
val headers: List<String> = listOf(
"Plant",
"MDN",
"Date",
"Outward Date",
"Entry Date",
"Out Mode",
"Purpose",
"Person",
@ -437,6 +440,7 @@ fun exportOutgoingInventory(tickets: List<OutgoingInventory>) {
row.createCell(i++).setCellValue(ticket.unloading)
row.createCell(i++).setCellValue(ticket.mdn)
row.createCell(i++).setCellValue(ticket.date?.format(DateTimeFormatter.ofPattern("dd/MM/yyyy")) ?: "")
row.createCell(i++).setCellValue(ticket.createdAt?.format(DateTimeFormatter.ofPattern("dd/MM/yyyy")) ?: "")
row.createCell(i++).setCellValue(ticket.outMode?.name ?: "")
row.createCell(i++).setCellValue(ticket.purpose)
row.createCell(i++).setCellValue(ticket.person)