diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index e322911ef3c1f9a620724d00f90a38a745e5ee1a..68514fb5a2d72462eba361ac38080d24d52aeffe 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -1097,6 +1097,7 @@ class SerialBatchCreation: def set_serial_batch_entries(self, doc): incoming_rate = self.get("incoming_rate") + precision = frappe.get_precision("Serial and Batch Entry", "qty") if self.get("serial_nos"): serial_no_wise_batch = frappe._dict({}) if self.has_batch_no: @@ -1126,7 +1127,8 @@ class SerialBatchCreation: "entries", { "batch_no": batch_no, - "qty": batch_qty * (-1 if self.type_of_transaction == "Outward" else 1), + "qty": flt(batch_qty, precision) + * (-1 if self.type_of_transaction == "Outward" else 1), "incoming_rate": incoming_rate, }, )