diff --git a/print_format/sales_invoice.jinja b/print_format/sales_invoice.jinja index adcca72..338ff7f 100644 --- a/print_format/sales_invoice.jinja +++ b/print_format/sales_invoice.jinja @@ -1,6 +1,6 @@ {% set company = frappe.get_doc("Company", doc.company) %} {% set cmp_addr = frappe.get_doc("Address", doc.company_address) if doc.company_address else None %} -{% set pay_addr = frappe.get_doc("Address", doc.customer_address) %} +{% set pay_addr = frappe.get_doc("Address", doc.customer_address) if doc.customer_address else None %} {% if doc.contact_person %} {% set contact = frappe.get_doc("Contact", doc.contact_person) %} diff --git a/print_format/sales_order.jinja b/print_format/sales_order.jinja index 8bbb265..26ce6b8 100644 --- a/print_format/sales_order.jinja +++ b/print_format/sales_order.jinja @@ -1,6 +1,6 @@ {% set company = frappe.get_doc("Company", doc.company) %} {% set cmp_addr = frappe.get_doc("Address", doc.company_address) if doc.company_address else None %} -{% set pay_addr = frappe.get_doc("Address", doc.customer_address) %} +{% set pay_addr = frappe.get_doc("Address", doc.customer_address) if doc.customer_address else None %} {% if doc.contact_person %} {% set contact = frappe.get_doc("Contact", doc.contact_person) %}