diff --git a/erpnext/accounts/letter_head/__init__.py b/erpnext/accounts/letter_head/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/letter_head/company_letterhead/__init__.py b/erpnext/accounts/letter_head/company_letterhead/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/erpnext/accounts/letter_head/company_letterhead/company_letterhead.json b/erpnext/accounts/letter_head/company_letterhead/company_letterhead.json new file mode 100644 index 00000000000..e0b41c42e51 --- /dev/null +++ b/erpnext/accounts/letter_head/company_letterhead/company_letterhead.json @@ -0,0 +1,26 @@ +{ + "align": "Left", + "content": "
| \n\t\t\t\t \n\t\t\t\t\t{% set company_logo = frappe.db.get_value(\"Company\", doc.company, \"company_logo\") %} {% if\n\t\t\t\t\tcompany_logo %}\n\t\t\t\t\t \n\t\t\t | \n\n\t\t\t\n\t\t\t\t {{ doc.company }} \n\t\t\t\t{% if doc.company_address %} {% set company_address = frappe.db.get_value(\"Address\",\n\t\t\t\tdoc.company_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\",\n\t\t\t\t\"country\"], as_dict=True) %} {% elif doc.billing_address %} {% set company_address =\n\t\t\t\tfrappe.db.get_value(\"Address\", doc.billing_address, [\"address_line1\", \"address_line2\", \"city\",\n\t\t\t\t\"state\", \"pincode\", \"country\"], as_dict=True) %} {% endif %} {% if company_address %} {{\n\t\t\t\tcompany_address.address_line1 or \"\" }}\n\t\t\t\t{% if company_address.address_line2 %} {{ company_address.address_line2 }} \n\t\t\t\t{% endif %} {{ company_address.city or \"\" }}, {{ company_address.state or \"\" }} {{\n\t\t\t\tcompany_address.pincode or \"\" }}, {{ company_address.country or \"\"}} \n\t\t\t\t{% endif %}\n\t\t\t | \n\n\t\t\t\n\t\t\t\t{% set website = frappe.db.get_value(\"Company\", doc.company, \"website\") %} {% set email =\n\t\t\t\tfrappe.db.get_value(\"Company\", doc.company, \"email\") %} {% set phone_no =\n\t\t\t\tfrappe.db.get_value(\"Company\", doc.company, \"phone_no\") %}\n\n\t\t\t\t \n\t\t\t\t\t{{ doc.doctype }}\n\t\t\t\t\t{{ doc.name }}\n\t\t\t\t \n\t\t\t\t{% if website %}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Website:\") }}\n\t\t\t\t\t{{ website }}\n\t\t\t\t \n\t\t\t\t{% endif %} {% if email %}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Email:\") }}\n\t\t\t\t\t{{ email }}\n\t\t\t\t \n\t\t\t\t{% endif %} {% if phone_no %}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Contact:\") }}\n\t\t\t\t\t{{ phone_no }}\n\t\t\t\t \n\t\t\t\t{% endif %}\n\t\t\t | \n\t\t
| \n\t\t\t\t{% set company_logo = frappe.db.get_value(\"Company\", doc.company, \"company_logo\") %} {% if\n\t\t\t\tcompany_logo %}\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t{% endif %}\n\t\t\t\t{{ doc.company }} \n\t\t\t\t\n\t\t\t\t\t{% if doc.company_address %} {% set company_address = frappe.db.get_value(\"Address\",\n\t\t\t\t\tdoc.company_address, [\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\",\n\t\t\t\t\t\"country\"], as_dict=True) %} {% elif doc.billing_address %} {% set company_address =\n\t\t\t\t\tfrappe.db.get_value(\"Address\", doc.billing_address, [\"address_line1\", \"address_line2\",\n\t\t\t\t\t\"city\", \"state\", \"pincode\", \"country\"], as_dict=True) %} {% endif %} {% if company_address\n\t\t\t\t\t%} {{ company_address.address_line1 or \"\" }} \n\t\t\t\n\t\t\t\t\t{% if company_address.address_line2 %} {{ company_address.address_line2 }} \n\t\t\t\t\t{% endif %} {{ company_address.city or \"\" }}, {{ company_address.state or \"\" }} {{\n\t\t\t\t\tcompany_address.pincode or \"\" }}, {{ company_address.country or \"\"}} \n\t\t\t\t\t{% endif %}\n\t\t\t\t | \n\n\t\t\t\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t{{ doc.doctype }} \n\t\t\t\t\t{{ doc.name }} \n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t{% set company_details = frappe.db.get_value(\"Company\", doc.company, [\"website\", \"email\",\n\t\t\t\t\t\"phone_no\"], as_dict=True) %} {% set website = company_details.website %} {% set email =\n\t\t\t\t\tcompany_details.email %} {% set phone_no = company_details.phone_no %} {% if website %}\n\t\t\t\t\t \n\t\t\t\n\t\t\t\t\t\t{{ _(\"Website:\") }}{{ website }}\n\t\t\t\t\t \n\t\t\t\t\t{% endif %} {% if email %}\n\t\t\t\t\t\n\t\t\t\t\t\t{{ _(\"Email:\") }}{{ email }}\n\t\t\t\t\t \n\t\t\t\t\t{% endif %} {% if phone_no %}\n\t\t\t\t\t\n\t\t\t\t\t\t{{ _(\"Contact:\") }}{{ phone_no }}\n\t\t\t\t\t \n\t\t\t\t\t{% endif %}\n\t\t\t\t | \n\t\t
| \n\t\t\t\t{% set company = frappe.get_doc(\"Company\", doc.company) %}\n\n\t\t\t\t \n\t\t\t\t\t{% if company.company_logo %}\n\t\t\t\t\t \n\t\t\t | \n\n\t\t\t\n\t\t\t\t {{ company.name }} \n\n\t\t\t\t{% set company_address_name = frappe.db.get_value(\n\t\t\t\t\t\"Dynamic Link\",\n\t\t\t\t\t{\n\t\t\t\t\t\t\"link_doctype\": \"Company\",\n\t\t\t\t\t\t\"link_name\": company.name,\n\t\t\t\t\t\t\"parenttype\": \"Address\"\n\t\t\t\t\t},\n\t\t\t\t\t\"parent\"\n\t\t\t\t) %}\n\n\t\t\t\t{% if company_address_name %}\n\t\t\t\t\t{% set company_address = frappe.db.get_value(\n\t\t\t\t\t\t\"Address\",\n\t\t\t\t\t\tcompany_address_name,\n\t\t\t\t\t\t[\"address_line1\", \"address_line2\", \"city\", \"state\", \"pincode\", \"country\"],\n\t\t\t\t\t\tas_dict=True\n\t\t\t\t\t) %}\n\t\t\t\t{% endif %}\n\n\t\t\t\t{% if company_address %}\n\t\t\t\t\n\t\t\t\t\t{{ company_address.address_line1 or \"\" }}\n\n\t\t\t\t\t{% if company_address.address_line2 %}\n\t\t\t\t\t\t \n\t\t\t\t{% endif %}\n\t\t\t{{ company_address.address_line2 }}\n\t\t\t\t\t{% endif %}\n\n\t\t\t\t\t \n\n\t\t\t\t\t{{ company_address.city or \"\" }}\n\t\t\t\t\t{% if company_address.state %}, {{ company_address.state }}{% endif %}\n\t\t\t\t\t{{ company_address.pincode or \"\" }}\n\n\t\t\t\t\t{% if company_address.country %}\n\t\t\t\t\t\t, {{ company_address.country }}\n\t\t\t\t\t{% endif %}\n\t\t\t\t | \n\n\t\t\t\n\n\t\t\t\t{% set website = frappe.db.get_value(\"Company\", doc.company, \"website\") %}\n\t\t\t\t{% set email = frappe.db.get_value(\"Company\", doc.company, \"email\") %}\n\t\t\t\t{% set phone_no = frappe.db.get_value(\"Company\", doc.company, \"phone_no\") %}\n\n\t\t\t\t{% if website %}\n\t\t\t\t \n\t\t\t\t\t{{ _(\"Website:\") }}\n\t\t\t\t\t{{ website }}\n\t\t\t\t \n\t\t\t\t{% endif %}\n\n\t\t\t\t{% if email %}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Email:\") }}\n\t\t\t\t\t{{ email }}\n\t\t\t\t \n\t\t\t\t{% endif %}\n\n\t\t\t\t{% if phone_no %}\n\t\t\t\t\n\t\t\t\t\t{{ _(\"Contact:\") }}\n\t\t\t\t\t{{ phone_no }}\n\t\t\t\t \n\t\t\t\t{% endif %}\n\t\t\t | \n\n\t\t
|
-
- {% set company_logo = frappe.db.get_value("Company", doc.company, "company_logo") %} {% if
- company_logo %}
-
- |
-
-
- {{ doc.company }}
- {% if doc.company_address %} {% set company_address = frappe.db.get_value("Address",
- doc.company_address, ["address_line1", "address_line2", "city", "state", "pincode",
- "country"], as_dict=True) %} {% elif doc.billing_address %} {% set company_address =
- frappe.db.get_value("Address", doc.billing_address, ["address_line1", "address_line2", "city",
- "state", "pincode", "country"], as_dict=True) %} {% endif %} {% if company_address %} {{
- company_address.address_line1 or "" }}- {% if company_address.address_line2 %} {{ company_address.address_line2 }} - {% endif %} {{ company_address.city or "" }}, {{ company_address.state or "" }} {{ - company_address.pincode or "" }}, {{ company_address.country or ""}} - {% endif %} - |
-
-
- {% set website = frappe.db.get_value("Company", doc.company, "website") %} {% set email =
- frappe.db.get_value("Company", doc.company, "email") %} {% set phone_no =
- frappe.db.get_value("Company", doc.company, "phone_no") %}
-
-
- {{ doc.doctype }}
- {{ doc.name }}
-
- {% if website %}
-
- {{ _("Website:") }}
- {{ website }}
-
- {% endif %} {% if email %}
-
- {{ _("Email:") }}
- {{ email }}
-
- {% endif %} {% if phone_no %}
-
- {{ _("Contact:") }}
- {{ phone_no }}
-
- {% endif %}
- |
-
|
- {% set company_logo = frappe.db.get_value("Company", doc.company, "company_logo") %} {% if
- company_logo %}
-
-
- {% endif %}
- {{ doc.company }}
-
- {% if doc.company_address %} {% set company_address = frappe.db.get_value("Address",
- doc.company_address, ["address_line1", "address_line2", "city", "state", "pincode",
- "country"], as_dict=True) %} {% elif doc.billing_address %} {% set company_address =
- frappe.db.get_value("Address", doc.billing_address, ["address_line1", "address_line2",
- "city", "state", "pincode", "country"], as_dict=True) %} {% endif %} {% if company_address
- %} {{ company_address.address_line1 or "" }}
- - {% if company_address.address_line2 %} {{ company_address.address_line2 }} - {% endif %} {{ company_address.city or "" }}, {{ company_address.state or "" }} {{ - company_address.pincode or "" }}, {{ company_address.country or ""}} - {% endif %} - |
-
-
-
-
- {{ doc.doctype }}
- {{ doc.name }}
- -
- {% set company_details = frappe.db.get_value("Company", doc.company, ["website", "email",
- "phone_no"], as_dict=True) %} {% set website = company_details.website %} {% set email =
- company_details.email %} {% set phone_no = company_details.phone_no %} {% if website %}
-
-
- {{ _("Website:") }}{{ website }}
-
- {% endif %} {% if email %}
-
- {{ _("Email:") }}{{ email }}
-
- {% endif %} {% if phone_no %}
-
- {{ _("Contact:") }}{{ phone_no }}
-
- {% endif %}
- |
-