This commit is contained in:
gowthaman 2024-06-17 16:40:08 +05:30
parent 0025d50677
commit 17d5422c43

View File

@ -291,6 +291,7 @@ fun exportPos(pos: List<PurchaseOrder>) {
"Open Till", "Open Till",
"Reference Quotation Number", "Reference Quotation Number",
"Vendor Name", "Vendor Name",
"Vendor Address",
"Product Id", "Product Id",
"Product Name", "Product Name",
"Unit Price", "Unit Price",
@ -363,7 +364,6 @@ fun exportIncomingInventory(tickets: List<IncomingInventory>) {
"Vehicle No", "Vehicle No",
"Loading Site", "Loading Site",
"Unloading Site", "Unloading Site",
"PO Num",
"Product Name", "Product Name",
"Unit Price", "Unit Price",
"Quantity", "Quantity",
@ -387,16 +387,9 @@ fun exportIncomingInventory(tickets: List<IncomingInventory>) {
row.createCell(i++).setCellValue(ticket.unloading) row.createCell(i++).setCellValue(ticket.unloading)
//6 would be repeated //6 would be repeated
val prod = ticket.products!![j] row.createCell(i++).setCellValue(ticket.products!![j].productName)
val po = if(prod.poId != null && prod.poId > 0){ row.createCell(i++).setCellValue(ticket.products!![j].unitPrice)
database.find(PurchaseOrder::class.java, prod.poId)?.poNum row.createCell(i++).setCellValue(ticket.products!![j].quantity)
} else {
""
}
row.createCell(i++).setCellValue(po)
row.createCell(i++).setCellValue(prod.productName)
row.createCell(i++).setCellValue(prod.unitPrice)
row.createCell(i).setCellValue(prod.quantity)
} }
} }