From d00f6672a8d9db1e28f9a86ff8efbedcdc95c41a Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Tue, 26 Dec 2023 15:24:04 +0530 Subject: [PATCH] fix: not able to import serial batch bundle using csv (#38950) --- .../serial_and_batch_bundle/serial_and_batch_bundle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py index 9a3f7e5b46..afb53fb112 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/serial_and_batch_bundle.py @@ -1185,7 +1185,7 @@ def create_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse=Non doc.append( "entries", { - "qty": (row.qty or 1.0) * (1 if type_of_transaction == "Inward" else -1), + "qty": (flt(row.qty) or 1.0) * (1 if type_of_transaction == "Inward" else -1), "warehouse": warehouse, "batch_no": row.batch_no, "serial_no": row.serial_no, @@ -1213,7 +1213,7 @@ def update_serial_batch_no_ledgers(entries, child_row, parent_doc, warehouse=Non doc.append( "entries", { - "qty": (d.get("qty") or 1.0) * (1 if doc.type_of_transaction == "Inward" else -1), + "qty": (flt(d.get("qty")) or 1.0) * (1 if doc.type_of_transaction == "Inward" else -1), "warehouse": warehouse or d.get("warehouse"), "batch_no": d.get("batch_no"), "serial_no": d.get("serial_no"),