mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 19:55:29 +00:00
fix: add precision in serial_batch_bundle.py
(cherry picked from commit 4bf85d1a5a)
This commit is contained in:
@@ -1080,6 +1080,7 @@ class SerialBatchCreation:
|
|||||||
def set_serial_batch_entries(self, doc):
|
def set_serial_batch_entries(self, doc):
|
||||||
incoming_rate = self.get("incoming_rate")
|
incoming_rate = self.get("incoming_rate")
|
||||||
|
|
||||||
|
precision = frappe.get_precision("Serial and Batch Entry", "qty")
|
||||||
if self.get("serial_nos"):
|
if self.get("serial_nos"):
|
||||||
serial_no_wise_batch = frappe._dict({})
|
serial_no_wise_batch = frappe._dict({})
|
||||||
if self.has_batch_no:
|
if self.has_batch_no:
|
||||||
@@ -1109,7 +1110,8 @@ class SerialBatchCreation:
|
|||||||
"entries",
|
"entries",
|
||||||
{
|
{
|
||||||
"batch_no": batch_no,
|
"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,
|
"incoming_rate": incoming_rate,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user