|
|
@@ -426,7 +426,7 @@ open class StockInLineService( |
|
|
else -> 1 |
|
|
else -> 1 |
|
|
} |
|
|
} |
|
|
val firstLine = stockInLines.firstOrNull() |
|
|
val firstLine = stockInLines.firstOrNull() |
|
|
val doNo = firstLine?.dnNo?.takeIf { it != "DN00000" } ?: "" |
|
|
|
|
|
|
|
|
val doNo = (firstLine?.dnNo?.takeIf { it != "DN00000" } ?: "").trim() |
|
|
val tDate = firstLine?.receiptDate?.toLocalDate()?.format(DateTimeFormatter.ofPattern("MM/dd/yyyy")) |
|
|
val tDate = firstLine?.receiptDate?.toLocalDate()?.format(DateTimeFormatter.ofPattern("MM/dd/yyyy")) |
|
|
?: LocalDate.now().format(DateTimeFormatter.ofPattern("MM/dd/yyyy")) |
|
|
?: LocalDate.now().format(DateTimeFormatter.ofPattern("MM/dd/yyyy")) |
|
|
// Group by POL first for udfpartiallyreceived: true = any POL short (accepted < ordered), false = all fully received |
|
|
// Group by POL first for udfpartiallyreceived: true = any POL short (accepted < ordered), false = all fully received |
|
|
@@ -449,7 +449,7 @@ open class StockInLineService( |
|
|
staffId = 329, |
|
|
staffId = 329, |
|
|
virDeptId = po.shop?.m18Id?.toInt(), |
|
|
virDeptId = po.shop?.m18Id?.toInt(), |
|
|
tDate = tDate, |
|
|
tDate = tDate, |
|
|
udfMTMSDNNO2 = doNo.ifEmpty { null }, |
|
|
|
|
|
|
|
|
udfMTMSDNNO2 = doNo.ifBlank { "" }, // always include for log audit; "" when no DN |
|
|
udfpartiallyreceived = udfpartiallyreceived, |
|
|
udfpartiallyreceived = udfpartiallyreceived, |
|
|
) |
|
|
) |
|
|
) |
|
|
) |
|
|
|