fix outward excel

This commit is contained in:
gowthaman 2024-08-01 10:44:04 +05:30
parent 66a5a20c0c
commit 59e9dd6e67

View File

@ -414,13 +414,15 @@ fun exportOutgoingInventory(tickets: List<OutgoingInventory>) {
val sh = wb.createSheet()
val headers: List<String> = listOf(
"Plant",
"MDN",
"Date",
"Out Mode",
"Purpose",
"Product Id",
"Person",
"Vehicle",
"Job Card",
"Product Name",
"Unit Price",
"Quantity",
)
createHeaderRow(headers, sh, wb)
@ -432,15 +434,17 @@ fun exportOutgoingInventory(tickets: List<OutgoingInventory>) {
for (j in 0..<prodCnt!!) {
val row = sh.createRow(rowCnt++)
var i = 0
row.createCell(i++).setCellValue(ticket.unloading)
row.createCell(i++).setCellValue(ticket.mdn)
row.createCell(i++).setCellValue(ticket.date)
row.createCell(i++).setCellValue(ticket.outMode.toString())
row.createCell(i++).setCellValue(ticket.purpose)
row.createCell(i++).setCellValue(ticket.person)
row.createCell(i++).setCellValue(ticket.vehicle)
row.createCell(i++).setCellValue(ticket.jobCard)
//6 would be repeated
row.createCell(i++).setCellValue(ticket.products!![j].productId.toString())
row.createCell(i++).setCellValue(ticket.products!![j].productName)
row.createCell(i++).setCellValue(ticket.products!![j].unitPrice)
row.createCell(i++).setCellValue(ticket.products!![j].quantity)
}