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