mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 09:05:00 +00:00
fix: reset entries qty to 1 for serial item
This commit is contained in:
@@ -133,7 +133,7 @@ class SerialandBatchBundle(Document):
|
||||
def calculate_total_qty(self, save=True):
|
||||
self.total_qty = 0.0
|
||||
for d in self.entries:
|
||||
d.qty = abs(d.qty) if d.qty else 0
|
||||
d.qty = 1 if self.has_serial_no and abs(d.qty) > 1 else abs(d.qty) if d.qty else 0
|
||||
d.stock_value_difference = abs(d.stock_value_difference) if d.stock_value_difference else 0
|
||||
if self.type_of_transaction == "Outward":
|
||||
d.qty *= -1
|
||||
|
||||
Reference in New Issue
Block a user