mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
fix: remove already transferred batch
(cherry picked from commit b54067e04d)
This commit is contained in:
@@ -3443,10 +3443,12 @@ def move_sample_to_retention_warehouse(company, items):
|
||||
batch_no,
|
||||
)
|
||||
|
||||
sabe = next(item for item in sabb.entries if item.batch_no == batch_no)
|
||||
if sample_quantity:
|
||||
total_qty += sample_quantity
|
||||
sabe = next(item for item in sabb.entries if item.batch_no == batch_no)
|
||||
sabe.qty = -1 * sample_quantity
|
||||
else:
|
||||
sabb.entries.remove(sabe)
|
||||
|
||||
if total_qty:
|
||||
sabb.save()
|
||||
|
||||
Reference in New Issue
Block a user