From b5c739d1cc0d58fa654df19dede4fe7d3b18fc89 Mon Sep 17 00:00:00 2001 From: khushi8112 Date: Wed, 10 Sep 2025 14:21:50 +0530 Subject: [PATCH] fix: broken img tag in letterhead --- erpnext/fixtures/letter_head.json | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/erpnext/fixtures/letter_head.json b/erpnext/fixtures/letter_head.json index 32d56e77475..36314aa4317 100644 --- a/erpnext/fixtures/letter_head.json +++ b/erpnext/fixtures/letter_head.json @@ -1,30 +1,7 @@ [ { "align": "Left", - "content": "\n\n
\n
\n
\n {% if frappe.db.get_value(\"Company\", doc.company, \"company_logo\") %}\n \n {% endif %}\n
\n
\n
{{ doc.company }}
\n {% set company_address = frappe.get_all(\n \"Dynamic Link\",\n fields=[\"parent\"],\n filters={\n \"link_doctype\": \"Company\",\n \"link_name\": doc.company,\n \"parenttype\": \"Address\"\n },\n limit=1\n ) %}\n \n {% if company_address %}\n {% set address = frappe.get_doc(\"Address\", company_address[0].parent) %}\n {{ address.address_line1 or \"\" }}
\n {% if address.address_line2 %}{{ address.address_line2 }}
{% endif %}\n {{ address.city or \"\" }} {{ address.state or \"\" }} {{ address.pincode or \"\" }} {{ address.country or \"\" }}
\n {% endif %}\n
\n
\n \n\n
\n {% set website = frappe.db.get_value(\"Company\", doc.company, \"website\") %}\n {% set email = frappe.db.get_value(\"Company\", doc.company, \"email\") %}\n {% set phone_no = frappe.db.get_value(\"Company\", doc.company, \"phone_no\") %}\n \n
\n
\n
{{ _(\"Invoice:\") }}
\n
{{ doc.name }}

\n
\n
\n \n {% if website %}\n
\n
{{ _(\"Website:\") }}
\n
{{ website }}

\n
\n {% endif %}\n {% if email %}\n
\n
{{ _(\"Email:\") }}
\n
{{ email }}

\n
\n {% endif %}\n {% if phone_no %}\n
\n
{{ _(\"Contact:\") }}
\n
{{ phone_no }}

\n
\n {% endif %}\n
\n
\n", - "disabled": 0, - "docstatus": 0, - "doctype": "Letter Head", - "footer": null, - "footer_align": "Left", - "footer_image": null, - "footer_image_height": 0.0, - "footer_image_width": 0.0, - "footer_script": null, - "footer_source": "HTML", - "header_script": null, - "image": null, - "image_height": 0.0, - "image_width": 0.0, - "is_default": 0, - "letter_head_name": "Sales Invoice Letter Head", - "modified": "2025-09-10 00:56:32.108422", - "name": "Sales Invoice Letter Head", - "source": "HTML" - }, - { - "align": "Left", - "content": "\n\n
\n
\n
\n {% if frappe.db.get_value(\"Company\", doc.company, \"company_logo\") %}\n \n {% endif %}\n
\n
\n
\n {{ _(\"Sales Invoice\") }}\n
\n
\n {{ doc.name }}\n
\n
\n
\n
\n
\n
{{ doc.company }}
\n \n {% set company_address = frappe.get_all(\n \"Dynamic Link\",\n fields=[\"parent\"],\n filters={\n \"link_doctype\": \"Company\",\n \"link_name\": doc.company,\n \"parenttype\": \"Address\"\n },\n limit=1\n ) %}\n \n {% if company_address %}\n {% set address = frappe.get_doc(\"Address\", company_address[0].parent) %}\n {{ address.address_line1 or \"\" }}
\n {% if address.address_line2 %}{{ address.address_line2 }}
{% endif %}\n {{ address.city or \"\" }} {{ address.state or \"\" }} {{ address.pincode or \"\" }} {{ address.country or \"\" }}
\n {% endif %}\n
\n
\n\n
\n {% set website = frappe.db.get_value(\"Company\", doc.company, \"website\") %}\n {% set email = frappe.db.get_value(\"Company\", doc.company, \"email\") %}\n {% set phone_no = frappe.db.get_value(\"Company\", doc.company, \"phone_no\") %}\n \n \n {% if website %}\n
\n
{{ _(\"Website:\") }}
\n
{{ website }}

\n
\n {% endif %}\n {% if email %}\n
\n
{{ _(\"Email:\") }}
\n
{{ email }}

\n
\n {% endif %}\n {% if phone_no %}\n
\n
{{ _(\"Contact:\") }}
\n
{{ phone_no }}

\n
\n {% endif %}\n \n
\n
\n
\n", + "content": "\n\n
\n
\n
\n {% set company_logo = frappe.db.get_value(\"Company\", doc.company, \"company_logo\") %}\n {% if company_logo %}\n \n {% endif %}\n
\n
\n
{{ doc.company }}
\n {% set company_address = frappe.get_all(\n \"Dynamic Link\",\n fields=[\"parent\"],\n filters={\n \"link_doctype\": \"Company\",\n \"link_name\": doc.company,\n \"parenttype\": \"Address\"\n },\n limit=1\n ) %}\n \n {% if company_address %}\n {% set address = frappe.get_doc(\"Address\", company_address[0].parent) %}\n {{ address.address_line1 or \"\" }}
\n {% if address.address_line2 %}{{ address.address_line2 }}
{% endif %}\n {{ address.city or \"\" }} {{ address.state or \"\" }} {{ address.pincode or \"\" }} {{ address.country or \"\" }}
\n {% endif %}\n
\n
\n \n\n
\n {% set website = frappe.db.get_value(\"Company\", doc.company, \"website\") %}\n {% set email = frappe.db.get_value(\"Company\", doc.company, \"email\") %}\n {% set phone_no = frappe.db.get_value(\"Company\", doc.company, \"phone_no\") %}\n \n
\n
\n
{{ _(\"Invoice:\") }}
\n
{{ doc.name }}

\n
\n
\n \n {% if website %}\n
\n
{{ _(\"Website:\") }}
\n
{{ website }}

\n
\n {% endif %}\n {% if email %}\n
\n
{{ _(\"Email:\") }}
\n
{{ email }}

\n
\n {% endif %}\n {% if phone_no %}\n
\n
{{ _(\"Contact:\") }}
\n
{{ phone_no }}

\n
\n {% endif %}\n
\n
\n", "disabled": 0, "docstatus": 0, "doctype": "Letter Head", @@ -40,8 +17,31 @@ "image_height": 0.0, "image_width": 0.0, "is_default": 1, + "letter_head_name": "Sales Invoice Letter Head", + "modified": "2025-09-10 14:21:04.051369", + "name": "Sales Invoice Letter Head", + "source": "HTML" + }, + { + "align": "Left", + "content": "\n\n
\n
\n
\n {% set company_logo = frappe.db.get_value(\"Company\", doc.company, \"company_logo\") %}\n {% if company_logo %}\n \n {% endif %}\n
\n
\n
\n {{ _(\"Sales Invoice\") }}\n
\n
\n {{ doc.name }}\n
\n
\n
\n
\n
\n
{{ doc.company }}
\n \n {% set company_address = frappe.get_all(\n \"Dynamic Link\",\n fields=[\"parent\"],\n filters={\n \"link_doctype\": \"Company\",\n \"link_name\": doc.company,\n \"parenttype\": \"Address\"\n },\n limit=1\n ) %}\n \n {% if company_address %}\n {% set address = frappe.get_doc(\"Address\", company_address[0].parent) %}\n {{ address.address_line1 or \"\" }}
\n {% if address.address_line2 %}{{ address.address_line2 }}
{% endif %}\n {{ address.city or \"\" }} {{ address.state or \"\" }} {{ address.pincode or \"\" }} {{ address.country or \"\" }}
\n {% endif %}\n
\n
\n\n
\n {% set website = frappe.db.get_value(\"Company\", doc.company, \"website\") %}\n {% set email = frappe.db.get_value(\"Company\", doc.company, \"email\") %}\n {% set phone_no = frappe.db.get_value(\"Company\", doc.company, \"phone_no\") %}\n \n \n {% if website %}\n
\n
{{ _(\"Website:\") }}
\n
{{ website }}

\n
\n {% endif %}\n {% if email %}\n
\n
{{ _(\"Email:\") }}
\n
{{ email }}

\n
\n {% endif %}\n {% if phone_no %}\n
\n
{{ _(\"Contact:\") }}
\n
{{ phone_no }}

\n
\n {% endif %}\n \n
\n
\n
\n", + "disabled": 0, + "docstatus": 0, + "doctype": "Letter Head", + "footer": null, + "footer_align": "Left", + "footer_image": null, + "footer_image_height": 0.0, + "footer_image_width": 0.0, + "footer_script": null, + "footer_source": "HTML", + "header_script": null, + "image": null, + "image_height": 0.0, + "image_width": 0.0, + "is_default": 0, "letter_head_name": "Print Format Letter Head", - "modified": "2025-09-10 00:56:32.101771", + "modified": "2025-09-10 14:21:04.063016", "name": "Print Format Letter Head", "source": "HTML" }