From 17d5422c4334e2c390b582b8557737ad4041a5d9 Mon Sep 17 00:00:00 2001 From: gowthaman Date: Mon, 17 Jun 2024 16:40:08 +0530 Subject: [PATCH] po excel --- src/main/kotlin/com/restapi/controllers/Excel.kt | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/com/restapi/controllers/Excel.kt b/src/main/kotlin/com/restapi/controllers/Excel.kt index 14548ca..f7819b3 100644 --- a/src/main/kotlin/com/restapi/controllers/Excel.kt +++ b/src/main/kotlin/com/restapi/controllers/Excel.kt @@ -291,6 +291,7 @@ fun exportPos(pos: List) { "Open Till", "Reference Quotation Number", "Vendor Name", + "Vendor Address", "Product Id", "Product Name", "Unit Price", @@ -363,7 +364,6 @@ fun exportIncomingInventory(tickets: List) { "Vehicle No", "Loading Site", "Unloading Site", - "PO Num", "Product Name", "Unit Price", "Quantity", @@ -387,16 +387,9 @@ fun exportIncomingInventory(tickets: List) { row.createCell(i++).setCellValue(ticket.unloading) //6 would be repeated - val prod = ticket.products!![j] - val po = if(prod.poId != null && prod.poId > 0){ - database.find(PurchaseOrder::class.java, prod.poId)?.poNum - } else { - "" - } - row.createCell(i++).setCellValue(po) - row.createCell(i++).setCellValue(prod.productName) - row.createCell(i++).setCellValue(prod.unitPrice) - row.createCell(i).setCellValue(prod.quantity) + row.createCell(i++).setCellValue(ticket.products!![j].productName) + row.createCell(i++).setCellValue(ticket.products!![j].unitPrice) + row.createCell(i++).setCellValue(ticket.products!![j].quantity) } }