Update erpnext/controllers/sales_and_purchase_return.py

Co-Authored-By: Mangesh-Khairnar <mkhairnar10@gmail.com>
This commit is contained in:
Deepesh Garg 2019-08-19 17:40:29 +05:30 committed by GitHub
parent 0487ad5515
commit 3965451c7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ def validate_return_against(doc):
else:
ref_doc = frappe.get_doc(doc.doctype, doc.return_against)
party_type == "customer" if doc.doctype in ("Sales Invoice", "Delivery Note") else "supplier"
party_type = "customer" if doc.doctype in ("Sales Invoice", "Delivery Note") else "supplier"
if ref_doc.company == doc.company and ref_doc.get(pary_type) == doc.get(party_type) and ref_doc.docstatus == 1:
# validate posting date time