mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-16 18:24:10 +00:00
In Purchase Return entry, make sle and gle as per actual inward entry's valuation rate
This commit is contained in:
@@ -62,8 +62,8 @@ def validate_returned_items(doc):
|
||||
|
||||
|
||||
if doc.doctype in ("Delivery Note", "Sales Invoice"):
|
||||
for d in frappe.db.sql("""select item_code, sum(qty) as qty, serial_no, batch_no from `tabPacked Item`
|
||||
where parent = %s group by item_code""".format(doc.doctype), doc.return_against, as_dict=1):
|
||||
for d in frappe.db.sql("""select item_code, qty, serial_no, batch_no from `tabPacked Item`
|
||||
where parent = %s""".format(doc.doctype), doc.return_against, as_dict=1):
|
||||
valid_items = get_ref_item_dict(valid_items, d)
|
||||
|
||||
already_returned_items = get_already_returned_items(doc)
|
||||
|
||||
Reference in New Issue
Block a user