{% 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 %} {% set doc_title = doc_title if doc_title is defined else "Document" %} {% set doc_no = doc_no if doc_no is defined else "-" %} {% set doc_date = doc_date if doc_date is defined else "-" %} {% set doc = doc if doc is defined else none %} {% set quote = quote if quote is defined else none %} {% set client = client if client is defined else none %} {% set branch = branch if branch is defined else none %} {% set company_branch = company_branch if company_branch is defined else none %} {% set items = items if items is defined else [] %} {% set tenant_logo = tenant_logo if tenant_logo is defined else url_for('static', filename='img/company_logo.png') %} {% set subtotal = (doc.subtotal or 0) if doc else 0 %} {% set discount = (doc.discount or 0) if doc else 0 %} {% set taxable = (subtotal - discount) %} {% set cgst = (doc.cgst or 0) if doc else 0 %} {% set sgst = (doc.sgst or 0) if doc else 0 %} {% set igst = (doc.igst or 0) if doc else 0 %} {% set tax = (doc.tax or 0) if doc else 0 %} {% set total_amount = (doc.total_amount or 0) if doc else 0 %} {% set currency = (doc.currency or "INR") if doc else "INR" %} {% set currency_upper = currency|string|upper %} {% set currency_symbol = "₹" if currency_upper == "INR" else currency %} {% set is_intrastate = (cgst and (cgst|float) > 0) %} {% set is_inr = (currency_upper == "INR") %} {% set company_name = "-" %} {% if company_branch and company_branch.company %} {% set company_name = company_branch.company.name or company_branch.company.company_name or "-" %} {% endif %} {% set company_branch_name = "-" %} {% if company_branch %} {% set company_branch_name = company_branch.branch_name or company_branch.name or "-" %} {% endif %} {% set company_address = "-" %} {% if company_branch %} {% set company_address = company_branch.branch_address or company_branch.address or "-" %} {% endif %} {% set company_state = company_branch.state if company_branch and company_branch.state else "-" %} {% set company_country = company_branch.country if company_branch and company_branch.country else "-" %} {% set company_pin = company_branch.pin_code if company_branch and company_branch.pin_code else "-" %} {% set company_gst = "-" %} {% if company_branch %} {% set company_gst = company_branch.gst_no or company_branch.gst or "-" %} {% endif %} {% set company_pan = company_branch.company.pan if company_branch and company_branch.company and company_branch.company.pan else "-" %} {% set company_msme = company_branch.msme_no if company_branch and company_branch.msme_no else "-" %} {% set client_name = client.company_name if client and client.company_name else "-" %} {% set branch_address = branch.address if branch and branch.address else "-" %} {% set branch_city = branch.city if branch and branch.city else "-" %} {% set branch_pin = branch.pin_code if branch and branch.pin_code else "-" %} {% set branch_state = branch.state if branch and branch.state else "-" %} {% set branch_country = branch.country if branch and branch.country else "-" %} {% set branch_location = branch.branch_location if branch and branch.branch_location else "-" %} {% set branch_gst = branch.gst if branch and branch.gst else "-" %}
| S No. | Item | Description | Service | SAC Code | Qty | Rate | Amount |
|---|---|---|---|---|---|---|---|
| {{ loop.index }} |
{{ it.item_name }}
{% if it.service %}
Service: {{ it.service.name }}
{% endif %}
|
{{ it.description if it.description else "-" }} | {{ it.service.name if it.service else "-" }} | {{ it.sac_code if it.sac_code is defined and it.sac_code else "998395" }} | {{ it.qty }} | {{ currency_symbol }} {{ money(it.rate) }} | {{ currency_symbol }} {{ money(it.amount) }} |
| No items found. | |||||||