[Fix] Stock entry multi uom batch validation issue (#11049)
This commit is contained in:
parent
65dfd09947
commit
1e2c554e61
@ -103,7 +103,7 @@ def split_batch(batch_no, item_code, warehouse, qty, new_batch_id = None):
|
||||
def set_batch_nos(doc, warehouse_field, throw = False):
|
||||
'''Automatically select `batch_no` for outgoing items in item table'''
|
||||
for d in doc.items:
|
||||
qty = d.get('stock_qty') or d.get('qty') or 0
|
||||
qty = d.get('stock_qty') or d.get('transfer_qty') or d.get('qty') or 0
|
||||
has_batch_no = frappe.db.get_value('Item', d.item_code, 'has_batch_no')
|
||||
warehouse = d.get(warehouse_field, None)
|
||||
if has_batch_no and warehouse and qty > 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user