mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-12 19:35:09 +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,
|
batch_no,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
sabe = next(item for item in sabb.entries if item.batch_no == batch_no)
|
||||||
if sample_quantity:
|
if sample_quantity:
|
||||||
total_qty += 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
|
sabe.qty = -1 * sample_quantity
|
||||||
|
else:
|
||||||
|
sabb.entries.remove(sabe)
|
||||||
|
|
||||||
if total_qty:
|
if total_qty:
|
||||||
sabb.save()
|
sabb.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user