{% 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 %}
Commercial Proposal

Proposal Builder

Quote {{ q.quote_code }} • Version {{ q.version }} • {{ client_name }}
{{ q.quote_code }} {{ status_name if status_name else "No Status" }} {{ currency_full }} {% if readonly_mode %} Locked {% endif %}
Grand Total
{{ currency_symbol }} {{ money(q.total_amount or q.total) }}
{% if proposal_done %}
Created {{ q.proposal_created_at.strftime('%d %b %Y %H:%M') }}
{% else %}
Proposal not created yet
{% endif %}
{% if proposal_done %} Proposal Created {% else %} Not Created {% endif %} {% if readonly_mode %} Readonly / Sent {% else %} Editable {% endif %}
{% if proposal_done %} Download Proposal {% endif %} {% if is_selected and proposal_done and not readonly_mode %}
{% endif %} Back to Quote
Your Company
{{ company_name }}
Branch: {{ company_branch_name }}
{% if company_branch_address != "—" %}
Address: {{ company_branch_address }}
{% endif %} {% if company_city %}
City: {{ company_city }}
{% endif %}
State: {{ company_state }}
{% if company_country != "—" %}
Country: {{ company_country }}
{% endif %} {% if company_pin %}
Pin Code: {{ company_pin }}
{% endif %}
GST: {{ company_gst }}
PAN: {{ company_pan }}
Client Details
{{ client_name }}
Branch: {{ client_branch }}
State: {{ client_state or '—' }}
GST: {{ client_gst or '—' }}
{% if q.opportunity %}
Opportunity: {{ q.opportunity.opp_code }} • {{ q.opportunity.title }}
{% endif %}
Terms & Conditions
Proposal Content
Add formatted terms using bullets, numbering, bold, italic and underline.
{% if readonly_mode %} Locked {% endif %}
{% if readonly_mode %}
Proposal is locked because it is already sent or opened in readonly mode.
{% else %}
Use the toolbar below to format your proposal terms. Formatting will be saved and used in the generated PDF.
{% endif %}
{{ q.proposal_terms|safe }}
{% if not readonly_mode %}
Terms are saved only for this quote, so you can customize them project-wise.
{% endif %}
Financial Summary
Quote Value
Currency: {{ currency_full }}
Items
{% if items and items|length > 0 %}
{% for it in items %}
{{ it.item_name }}
{% if it.service %} {{ it.service.name }} {% endif %}
Amount
{{ currency_symbol }} {{ money(it.amount) }}
{% if it.description %}
{{ it.description }}
{% endif %}
Qty {{ it.qty }} × Rate {{ currency_symbol }} {{ money(it.rate) }}
{% endfor %}
{% else %}
No items found.
{% endif %}
Live Summary
Financials
{{ currency_symbol }}
Subtotal
{{ currency_symbol }} {{ money(q.subtotal) }}
Discount
{{ currency_symbol }} {{ money(q.discount) }}

Taxable Value
{{ currency_symbol }} {{ money(taxable_value) }}
{% if currency_code == "INR" and q.is_gst_applicable %}
{% if is_intrastate %}
Intra-state Supply (CGST + SGST)
CGST (9%)
{{ currency_symbol }} {{ money(q.cgst) }}
SGST (9%)
{{ currency_symbol }} {{ money(q.sgst) }}
{% else %}
Inter-state Supply (IGST)
IGST (18%)
{{ currency_symbol }} {{ money(q.igst) }}
{% endif %}
Total GST
{{ currency_symbol }} {{ money(q.tax) }}
{% else %}
GST not applicable for {{ currency_code }}.
{% endif %}
Grand Total
{{ currency_symbol }} {{ money(q.total_amount or q.total) }}
{% if proposal_done %}
Proposal created on {{ q.proposal_created_at.strftime('%d %b %Y %H:%M') }}
{% endif %}
{% endblock %}