fix: not able to submit purchase order (#16735)

This commit is contained in:
rohitwaghchaure 2019-02-20 15:47:06 +05:30 committed by Sagar Vora
parent e141865c43
commit ef3f864123

View File

@ -183,6 +183,9 @@ def get_invoice_summary(items, taxes):
#Preflight for successful e-invoice export. #Preflight for successful e-invoice export.
def sales_invoice_validate(doc): def sales_invoice_validate(doc):
#Validate company #Validate company
if doc.doctype != 'Sales Invoice':
return
if not doc.company_address: if not doc.company_address:
frappe.throw(_("Please set an Address on the Company '%s'" % doc.company), title=_("E-Invoicing Information Missing")) frappe.throw(_("Please set an Address on the Company '%s'" % doc.company), title=_("E-Invoicing Information Missing"))
else: else: