Hi,
I have created tally style GST tax invoice similar to tally format, i am unable to find highlighted column while creating a new invoice. Can anyone please help with this.
These are the cells not able to see or call while creating invoice, however it appearing in print format or pdf
In other words i am unable to fetch below details.
- Delivery Note
- Supplier Reference
- Other Reference
- Mode of Payment
- Dispatch Document Number
- Terms of Payment
- Terms of Delivery
- Dispatch Through
- Destination
Here is the below code i have used: which i got from one of the active forum users and i have made few changes.
TAX INVOICE
{{ doc.company or "" }} {{ frappe.db.get_value("Company", doc.company, "registration_details") or "" }} |
Invoice No. {{ doc.name }} |
Dated {{ frappe.utils.formatdate(doc.posting_date) }} |
Delivery Note |
Mode/Terms of Payment |
|
Supplier's Ref. |
Other Reference(s) |
|
Customer {{ doc.customer_name or "" }} {{ doc.address_display or "" }} |
Buyer's Order No. |
Dated |
Despatch Document No. |
Dated |
|
Despatched through |
Destination |
|
Terms of Delivery |
{% set _ = it_sgst_rate.append(item_tax.tax_rate) %}
{% set _ = sgst_amt.append(row.amount * it_sgst_rate[0] / 100) -%}
{% set rate_found_item = 1 -%}
{% endif %}
{% if item_tax.tax_type == cgst_account_head[0] %}
{% set _ = it_cgst_rate.append(item_tax.tax_rate) %}
{% set _ = cgst_amt.append(row.amount * it_cgst_rate[0] / 100) -%}
{% set rate_found_item = 1 -%}
{% endif %}
{% endfor %}
{% if rate_found_item == 0 %}
{% if cgst_rate[0] -%}
{% set _ = cgst_amt.append((row.amount * cgst_rate[0])/100) -%}
{% set _= it_cgst_rate.append(cgst_rate[0]) -%}
{% set rate_found_inv = 1 -%}
{%- endif -%}
{% if sgst_rate[0] -%}
{% set _ = sgst_amt.append((row.amount * sgst_rate[0])/100) -%}
{% set _= it_sgst_rate.append(sgst_rate[0]) -%}
{%- endif -%}
{% if igst_rate[0] -%}
{% set _ = igst_amt.append((row.amount * igst_rate[0])/100) -%}
{% set _= it_igst_rate.append(igst_rate[0]) -%}
{% set rate_found_inv = 1 -%}
{%- endif -%}
{% endif %}
{% if not it_cgst_rate[0] %}
{% set _ = it_cgst_rate.append(0) %}
{% set _ = cgst_amt.append(0) %}
{% endif %}
{% if not it_sgst_rate[0] %}
{% set _ = it_sgst_rate.append(0) %}
{% set _ = sgst_amt.append(0) %}
{% endif %}
{% if not it_igst_rate[0] %}
{% set _ = it_igst_rate.append(0) %}
{% set _ = igst_amt.append(0) %}
{% endif %}
{% set temp_cgst_amt = grand_total["cgst_amt"] + cgst_amt[0] %}
{% set temp_sgst_amt = grand_total["sgst_amt"] + sgst_amt[0] %}
{% set temp_igst_amt = grand_total["igst_amt"] + igst_amt[0] %}
{% set temp_qty = grand_total["qty"] + row.qty %}
{% set temp_amount = grand_total["amount"] + row.amount %}
{% set check = grand_total.update({"qty": temp_qty, "amount": temp_amount, "cgst_amt":temp_cgst_amt, "sgst_amt":temp_sgst_amt, "igst_amt":temp_igst_amt}) %}
<td style="width: 5%;"><font size = "1">{{ row.idx }}</font></td>
<td style="width: 25%;"><font size = "1">
{% if row.item_code != row.item_name -%}
<b>{{ row.item_code}}</b><br>
{%- endif %}
{{ row.item_name }}
</font></td>
<td style="width: 10%;"><font size = "1">{{ row.gst_hsn_code }}</font></td>
<td style="width: 8%; text-align: left;"><font size = "1">{{ row.qty }}<br><small>{{ row.uom or row.stock_uom }}</small> </font></td>
<td style="width: 8%; text-align: right;"><font size = "1">{{
row.get_formatted("rate", doc) }}</font></td>
<td style="width: 11%; text-align: right;"><font size = "1">{{
"₹ {:,.2f}".format(cgst_amt[0]) }}<br><small>{{
it_cgst_rate[0] }}%</small></font></td>
<td style="width: 11%; text-align: right;"><font size = "1">{{
"₹ {:,.2f}".format(sgst_amt[0]) }}<br><small>{{
it_sgst_rate[0] }}%</small></font></td>
<td style="width: 11%; text-align: right;"><font size = "1">{{
"₹ {:,.2f}".format(igst_amt[0]) }}<br><small>{{
it_igst_rate[0] }}%</small></font></td>
<td style="width: 11%; text-align: right;"><font size = "1">{{
row.get_formatted("amount", doc) }}</font></td>
{% set trate = "" %}
{% endfor %}
SR | DISCRIPTION | HSN/ASN | QTY | UNIT RATE | CGST | SGST | IGST | TAXABLE AMOUNT |
---|---|---|---|---|---|---|---|---|
Amount in Words {{ doc.base_in_words }} |
SUB TOTAL | {{ doc.get_formatted("base_total", doc) }} | {{ doc.get_formatted("total", doc) }} |
GST | {{ doc.get_formatted("base_total_taxes_and_charges", doc) }} | {{ doc.get_formatted("total_taxes_and_charges", doc) }} | |
TOTAL | {{ doc.get_formatted("base_grand_total", doc) }} | {{ doc.get_formatted("grand_total", doc) }} | |
{{ doc.remarks }} |
for {{ doc.company }}
Authorised Signatory
|