diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 8608cea9d21..e1ca58c4583 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -2854,7 +2854,7 @@ def save_company_master_details(name, company, details): details = frappe.parse_json(details) if details.get("email"): - validate_email_address(details.email, throw=True) + validate_email_address(details.get("email"), throw=True) company_fields = ["company_logo", "website", "phone_no", "email"] company_fields_to_update = {field: details.get(field) for field in company_fields if details.get(field)} diff --git a/erpnext/public/js/print.js b/erpnext/public/js/print.js index 3949bcb2da9..56bb25b48d7 100644 --- a/erpnext/public/js/print.js +++ b/erpnext/public/js/print.js @@ -104,6 +104,7 @@ frappe.realtime.on("sales_invoice_before_print", (data) => { options: "Address", get_query: function () { return { + query: "frappe.contacts.doctype.address.address.address_query", filters: { link_doctype: "Company", link_name: data.company,