From ddf4a83cf86edc74f167fe24b463e54237b75ba7 Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Mon, 15 Sep 2025 16:22:39 +0530 Subject: [PATCH] fix: condition based address display --- .../sales_invoice_print_format.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html index 6a9b5f24564..a97d5f67790 100644 --- a/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html +++ b/erpnext/accounts/print_format/sales_invoice_print_format/sales_invoice_print_format.html @@ -171,9 +171,9 @@ print_heading_template=None) -%} {% if letter_head and not no_letterhead %} - {% set address = (doc.address_display) %} {% if address.rstrip().endswith("
") %} {% set + {% set address = (doc.address_display) %} {% if address and address.rstrip().endswith("
") %} {% set address = address[:-5] %} {% endif %} {% set company_address_display = - (doc.company_address_display) %} {% if company_address_display.rstrip().endswith("
") %} {% + (doc.company_address_display) %} {% if company_address_display and company_address_display.rstrip().endswith("
") %} {% set company_address_display = company_address_display[:-5] %} {% endif %} {{ _("Bill From") }}:
{{ address }} {{ _("Bill To") }}:
{{ company_address_display }}