fix: Inter company stock transfer for serialised items

This commit is contained in:
Nabin Hait 2019-01-17 18:34:09 +05:30
parent c338188ce2
commit 5a87ac0ad8

View File

@ -302,6 +302,9 @@ def has_duplicate_serial_no(sn, sle):
if sn.warehouse:
return True
if sn.company != sle.company:
return False
status = False
if sn.purchase_document_no:
if sle.voucher_type in ['Purchase Receipt', 'Stock Entry', "Purchase Invoice"] and \
@ -357,6 +360,7 @@ def auto_make_serial_nos(args):
sr.warehouse = args.get('warehouse') if args.get('actual_qty', 0) > 0 else None
sr.batch_no = args.get('batch_no')
sr.location = args.get('location')
sr.company = args.get('company')
if sr.sales_order and args.get('voucher_type') == "Stock Entry" \
and not args.get('actual_qty', 0) > 0:
sr.sales_order = None