Merge pull request #7677 from KanchanChauhan/serial-no-in-return

[Fix] Serial No if is_return
This commit is contained in:
Nabin Hait
2017-02-07 13:28:30 +05:30
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@@ -123,12 +123,13 @@ def apply_pricing_rule(args):
def get_serial_no_for_item(args):
from erpnext.stock.get_item_details import get_serial_no
item_details = frappe._dict({
"doctype": args.doctype,
"name": args.name,
"serial_no": args.serial_no
})
if args.get("parenttype") in ("Sales Invoice", "Delivery Note"):
if args.get("parenttype") in ("Sales Invoice", "Delivery Note") and args.qty > 0:
item_details.serial_no = get_serial_no(args)
return item_details