i am trying to make a customised print format, but facing some issues like not getting the IGST and CGST and SGST breakup at total section and also not getting the item HSN CODE also, and Customer Address details, and when trying to do intra state sales the SGST and CGST is getting correctly, But when doing the inter state sales the IGST percentage and total is not picking
.header, .footer { width: 100%; text-align: center; font-family: Arial, sans-serif; } .header-logo { max-height: 80px; margin-bottom: 10px; } .company-details { font-size: 12px; } .invoice-title { font-size: 18px; font-weight: bold; margin-top: 10px; margin-bottom: 8px; } .party-details, .invoice-data { font-size: 12px; margin-bottom: 8px; } table { width: 100%; font-size: 11px; border-collapse: collapse; } table th, table td { border: 1px solid #333; padding: 4px; text-align: left; } table th { background-color: #f0f0f0; } .totals-box { border: 1px solid #ccc; padding: 0.5em 1em 0.5em 1em; margin: 1em 0; font-size: 12px; } .flex-row { display: flex; justify-content: space-between; margin-bottom: 2px; } .invoice-grand-total-row { font-weight: bold; background: #efefef; border-top: 2px solid #aaa; padding-top: 6px; margin-top: 6px; font-size: 15px; } .amount-words { font-size: 12px; margin-top: 12px; } .declaration { font-size: 12px; margin-top: 12px; } .footer { margin-top: 30px; font-size: 10px; } .authorized-signatory { float: right; margin-top: 50px; font-weight: bold; } .bank-details { font-size: 12px; margin-top: 14px; margin-bottom: 12px; }
{{ doc.company }}
NO.418/1, PKM Road, Ayanambakkam
Phone no: 8891223228 | Email: stolzinnovation023@gmail.com
GSTIN: 33AAMFN9147R1ZD
NO.418/1, PKM Road, Ayanambakkam
Phone no: 8891223228 | Email: stolzinnovation023@gmail.com
GSTIN: 33AAMFN9147R1ZD
TAX INVOICE
| Invoice No: {{ doc.name }} | Date: {{ doc.posting_date }} | P.O#: {{ doc.po_no or '-' }} |
| Bill To | Ship To | |
|---|---|---|
|
{{ doc.customer_name }} {{ doc.customer_address.replace('\n', ' ')|safe }} State Code: {{ doc.customer_state_code or '' }} PIN Code: {{ doc.customer_pincode or '' }} GSTIN: {{ doc.customer_gstin or '' }} |
{{ doc.shipping_address_name or doc.customer_name }} {% if doc.shipping_address %} {{ doc.shipping_address.replace('\n', ' ')|safe }} {% else %} {{ doc.customer_address.replace('\n', ' ')|safe }} {% endif %} State Code: {{ doc.shipping_state_code or '' }} PIN Code: {{ doc.shipping_pincode or '' }} GSTIN: {{ doc.shipping_gstin or '' }} |
{% for item in doc.items %} {% endfor %}
| HSN Code | Item & Description | Qty | Rate | Discount % | IGST % | IGST Amt | CGST % | CGST Amt | SGST % | SGST Amt | Amount |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ item.hsn_code | default('-') }} | {{ item.item_name | default('') }} | {{ item.qty | default(0) }} | {{ "{:.2f}".format(item.rate or 0) }} | {{ "{:.2f}".format(item.discount_percentage or 0) }} | {{ "{:.2f}".format(item.gst_hsn.rate if item.gst_hsn else item.tax_rate or 0) }} | {{ "{:.2f}".format(item.tax_amount or 0) }} | {{ "{:.2f}".format(item.cgst_rate or 0) }} | {{ "{:.2f}".format(item.cgst_amount or 0) }} | {{ "{:.2f}".format(item.sgst_rate or 0) }} | {{ "{:.2f}".format(item.sgst_amount or 0) }} | {{ "{:.2f}".format(item.amount or 0) }} |
Total:-
{{ doc.get_formatted("total") }}
{% if doc.discount_amount and doc.discount_amount > 0 %}
Discount :-
{{ doc.get_formatted("discount_amount") }}
{% endif %}
{% if doc.place_of_supply == doc.company_state %}
{% if doc.cgst_total and doc.cgst_total > 0 %}
CGST Total :-
{{ doc.get_formatted("cgst_total") }}
{% endif %}
{% if doc.sgst_total and doc.sgst_total > 0 %}
SGST Total :-
{{ doc.get_formatted("sgst_total") }}
{% endif %}
{% else %}
{% if doc.igst_total and doc.igst_total > 0 %}
IGST Total :-
{{ doc.get_formatted("igst_total") }}
{% endif %}
{% endif %}
Invoice Total :-
{{ doc.get_formatted("grand_total") }}
Bank Details:
Bank Name: IDFC FIRST Bank Ltd
Account Name: STOLZ INNOVATION
Account Number: 10234110901
Branch Name: Calicut
Branch Code: 80931
IFSC Code: IDFB0080931
Bank Name: IDFC FIRST Bank Ltd
Account Name: STOLZ INNOVATION
Account Number: 10234110901
Branch Name: Calicut
Branch Code: 80931
IFSC Code: IDFB0080931
Total In Words: INR {{ doc.in_words or "" }}
Declaration: We declare that this invoice shows the actual price of goods described and that all particulars are true and correct
Stolz innovation
Authorized Signatory
Authorized Signatory
this is my code if any one know about this please alter the code and send here
OUT PUT of this CODE ![]()
