{% extends "base.html" %} {% block title %}Proposal • {{ q.quote_code }}{% endblock %} {% block header %}Proposal Builder{% endblock %} {% block content %} {% set proposal_done = q.proposal_created_at is not none %} {% set status_name = q.status.name if q.status else "" %} {% set is_sent = (status_name == "Sent") %} {% set is_selected = (status_name == "Selected") %} {% set ro = (readonly if readonly is defined else false) %} {% set readonly_mode = ro or is_sent %} {% set taxable_value = (q.subtotal or 0) - (q.discount or 0) %} {% set is_intrastate = (q.cgst and q.cgst > 0) %} {% set client_name = q.client.company_name if q.client else (q.opportunity.company if q.opportunity and q.opportunity.company else "—") %} {% set client_branch = q.branch.branch_location if q.branch and q.branch.branch_location else "—" %} {% set client_gst = q.billing_gstin or (q.branch.gst if q.branch and q.branch.gst else "—") %} {% set client_state = q.billing_state or (q.branch.state if q.branch and q.branch.state else "—") %} {% set company_name = "Company" %} {% if q.company_branch and q.company_branch.company %} {% if q.company_branch.company.name %} {% set company_name = q.company_branch.company.name %} {% elif q.company_branch.company.company_name %} {% set company_name = q.company_branch.company.company_name %} {% endif %} {% endif %} {% set company_branch_name = "—" %} {% if q.company_branch %} {% if q.company_branch.branch_name %} {% set company_branch_name = q.company_branch.branch_name %} {% elif q.company_branch.name %} {% set company_branch_name = q.company_branch.name %} {% endif %} {% endif %} {% set company_branch_address = "—" %} {% if q.company_branch %} {% if q.company_branch.branch_address %} {% set company_branch_address = q.company_branch.branch_address %} {% elif q.company_branch.address %} {% set company_branch_address = q.company_branch.address %} {% endif %} {% endif %} {% set company_city = q.company_branch.city if q.company_branch and q.company_branch.city else "" %} {% set company_state = "—" %} {% if q.company_branch %} {% if q.company_branch.state_master and q.company_branch.state_master.name %} {% set company_state = q.company_branch.state_master.name %} {% elif q.company_branch.state %} {% set company_state = q.company_branch.state %} {% endif %} {% endif %} {% set company_country = "—" %} {% if q.company_branch %} {% if q.company_branch.country_master and q.company_branch.country_master.name %} {% set company_country = q.company_branch.country_master.name %} {% elif q.company_branch.country %} {% set company_country = q.company_branch.country %} {% endif %} {% endif %} {% set company_pin = q.company_branch.pin_code if q.company_branch and q.company_branch.pin_code else "" %} {% set company_gst = "—" %} {% if q.company_branch %} {% if q.company_branch.gst_no %} {% set company_gst = q.company_branch.gst_no %} {% elif q.company_branch.gst %} {% set company_gst = q.company_branch.gst %} {% endif %} {% endif %} {% set company_pan = q.company_branch.company.pan if q.company_branch and q.company_branch.company and q.company_branch.company.pan else "—" %} {% set currency_code = currency_meta.code if currency_meta is defined and currency_meta.code else (q.currency or "INR") %} {% set currency_symbol = currency_meta.display if currency_meta is defined and currency_meta.display else currency_code %} {% set currency_full = currency_meta.full if currency_meta is defined and currency_meta.full else currency_code %} {% macro money(v) -%} {%- if v is none -%}0.00 {%- else -%} {%- set s = v|string -%} {%- set s = s|replace(",", "") -%} {%- if s == "" -%}0.00 {%- else -%}{{ indian_amount(s|float) }} {%- endif -%} {%- endif -%} {%- endmacro %}