fix: Code cleanup

This commit is contained in:
deepeshgarg007 2019-08-19 16:40:29 +05:30
parent e2acc748c8
commit 0487ad5515

View File

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