{% set u_company = frappe.get_doc('Company', doc.company) %}
{% set links = frappe.get_all('Dynamic Link', filters={'link_doctype': 'Company', 'link_name': doc.company, 'parenttype': 'Address'}, fields=['parent']) %}
{{ doc.company }}
{% if links %}
{{frappe.db.get_value("Address", links[0].parent, "address_line1")}} -
{{frappe.db.get_value("Address", links[0].parent, "pincode")}} -
{{frappe.db.get_value("Address", links[0].parent, "city")}}
{% set province = frappe.db.get_value("Address", links[0].parent, "state") %}
{% if province %}
({{ province }})
{% endif %}
{% endif %}
VAT: {{ u_company.tax_id }} - F.C.: {{ u_company.fiscal_code }}
QUOTATION nr. {{ doc.name }} of {{ frappe.utils.formatdate(doc.get('transaction_date'),"dd-mm-yyyy") }}