Last active
January 23, 2020 05:19
-
-
Save karthikeyan5/b0d91cced3ae0f35263e00db38ed4cea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="border:0px solid #aaa; border-radius: 10px; border-collapse: collapse;" class="container-fluid"> | |
<div class="row"> | |
<div class="col-xs-7"> | |
<div class="row"> | |
<div class="col-xs-6" style="border-right:1px solid #ddd; padding: 0px 3px 0px 0px; font-size:95%;"> | |
<small>Deliver to Address:</small> | |
<br><strong>{{doc.shipping_address_title}}</strong> | |
<br>{{doc.shipping_address}} | |
{% if "GSTIN:" not in doc.shipping_address %} | |
{% if doc.customer_gstin %}<br>GSTIN: {{ doc.customer_gstin }} {% endif -%} | |
{% endif -%} | |
</div> | |
<div class="col-xs-6" style="border-right:0px solid #ddd; border-left:0px solid #ddd; padding: 0px 1px; font-size:95%;"> | |
<small>Bill to Address:</small> | |
<br><strong>{{doc.customer_name}}</strong> | |
<br>{{doc.address_display}} | |
{% if "GSTIN:" not in doc.address_display %} | |
{% if doc.billing_address_gstin %}<br>GSTIN: {{ doc.billing_address_gstin }} {% endif -%} | |
{% endif -%} | |
</div> | |
</div> | |
</div> | |
<div class="col-xs-5" style="border-left:0px solid #ddd;"> | |
<div class="row" style="border-bottom:1px solid #ddd;"> | |
<div class="col-xs-7" style="border-right:1px solid #ddd; padding: 0px 0px 0px 3px;"> | |
<small>Invoice No.:</small><br> | |
<strong style="font-size:105%;">{{doc.name}}</strong> | |
</div> | |
<div class="col-xs-5" style="padding: 0px 1px;"> | |
<small>Date:</small><br> | |
<strong>{{doc.get_formatted("posting_date")}}</strong> | |
</div> | |
</div> | |
<div class="row" style="border-bottom:1px solid #ddd;"> | |
<div class="col-xs-5" style="border-right:1px solid #ddd; padding: 0px 0px 0px 3px;"> | |
<small>Transport:</small><br> | |
<strong>{{doc.transport}}</strong> | |
</div> | |
<div class="col-xs-7" style="padding: 0px 1px;"> | |
<small>Destination:</small><br> | |
<strong style="font-size:105%;">{{doc.destination}}</strong> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-5" style="padding: 0px 1px; padding: 0px 0px 0px 3px;"> | |
<small>No. of Cartons: </small> | |
</div> | |
<div class="col-xs-7" style="padding: 0px 1px;"> | |
{{doc.number_of_cartons}} | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-xs-5" style="padding: 0px 1px; padding: 0px 0px 0px 3px;"> | |
<small>Packing Slip Nos.: </small> | |
</div> | |
<div class="col-xs-7" style="padding: 0px 1px;"> | |
{{doc.packing_slip_number}} | |
</div> | |
</div> | |
<div class="row" style="border-bottom:1px solid #ddd;"> | |
<div class="col-xs-5" style="padding: 0px 1px; padding: 0px 0px 0px 3px;"> | |
<small>Order Nos.: </small> | |
</div> | |
<div class="col-xs-7" style="padding: 0px 1px;"> | |
{{doc.order_number}} | |
</div> | |
</div> | |
<div class="row" style="border-bottom:1px solid #ddd;"> | |
<div class="col-xs-2 text-right" style="padding: 0px 1px 0px 2px;"> | |
<small>L.R. No.: </small> | |
</div> | |
<div class="col-xs-5" style="padding: 0px 1px;"> | |
{% if doc.lr_number %} | |
{{doc.lr_number}} | |
{% endif %} | |
</div> | |
<div class="col-xs-1" style="padding: 0px 1px;"> | |
<small>Date: </small> | |
</div> | |
<div class="col-xs-4" style="padding: 0px 0px 0px 8px;"> | |
<span><small>{{doc.get_formatted("lr_date")}}</small></span> | |
</div> | |
</div> | |
<br> | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="page-break-inside: avoid;"> | |
<table class="table table-bordered" style="margin-top:5px; margin-bottom:5px;"> | |
<tbody> | |
<tr> | |
<td colspan="7" class="text-center" style="padding: 1px !important; font-size: 0.8em;"> | |
<strong>Tax Breakup</strong> | |
</td> | |
</tr> | |
<tr> | |
<th style="padding: 1px !important; font-size: 0.8em;">Sr</th> | |
<th class="text-center" style="padding: 1px !important; font-size: 0.8em;">HSN</th> | |
<th class="text-center" style="padding: 1px !important; font-size: 0.8em;">Taxable Value</th> | |
<th class="text-right" style="padding: 1px !important; font-size: 0.8em;">CGST</th> | |
<th class="text-right" style="padding: 1px !important; font-size: 0.8em;">SGST</th> | |
<th class="text-right" style="padding: 1px !important; font-size: 0.8em;">IGST</th> | |
<th class="text-center" style="padding: 1px !important; font-size: 0.8em;">Total Tax</th> | |
</tr> | |
<div> | |
{%- set hsn_list = [] -%} | |
{%- set total_list = {} -%} | |
{%- set hsn_taxable_amount_list = {} -%} | |
{%- set total_taxable_amount_set = {'bool':0} -%} | |
{%- set total_taxable_amount = {'amount':0.0} -%} | |
{%- set total_discount = {'amount':0.0} -%} | |
{% set cgst_rate = [] -%} | |
{% set sgst_rate = [] -%} | |
{% set igst_rate = [] -%} | |
{% set cgst_amount = [] -%} | |
{% set sgst_amount = [] -%} | |
{% set igst_amount = [] -%} | |
{% set extra_discount_amount = [] -%} | |
{% set cgst_account_head = [] -%} | |
{% set sgst_account_head = [] -%} | |
{% set igst_account_head = [] -%} | |
{%- for row in doc.items -%} | |
{%- if row.gst_hsn_code not in hsn_list -%} | |
{%- set _ = hsn_list.append(row.gst_hsn_code) -%} | |
{%- endif -%} | |
{%- endfor -%} | |
{%- for hsn in hsn_list -%} | |
{% set _ = total_list.update({hsn: 0}) %} | |
{% set _ = total_list.update({hsn: total_list[hsn]+1}) %} | |
{% set _ = total_list.update({hsn: total_list[hsn]-1}) %} | |
{%- endfor -%} | |
{%- for row in doc.items -%} | |
{% set _ = total_list.update({row.gst_hsn_code: total_list[row.gst_hsn_code] + row.amount}) %} | |
{%- endfor -%} | |
{%- for row in doc.taxes -%} | |
{% if 'CGST' in row.account_head or 'SGST' in row.account_head or 'IGST' in row.account_head -%} | |
{% if total_taxable_amount_set['bool'] == 0 -%} | |
{% set _ = total_taxable_amount_set.update({'bool': 1}) %} | |
{% set _ = total_taxable_amount.update({'amount': row.total - row.tax_amount}) %} | |
{%- endif -%} | |
{%- endif -%} | |
{% if 'CGST' in row.account_head -%} | |
{% set _ = cgst_amount.append(row.tax_amount*1.0) %} | |
{% set _ = cgst_account_head.append(row.account_head) %} | |
{% set _ = cgst_rate.append((row.tax_amount/(total_taxable_amount['amount']))*100) %} | |
{% elif 'SGST' in row.account_head -%} | |
{% set _ = sgst_amount.append(row.tax_amount*1.0) %} | |
{% set _ = sgst_account_head.append(row.account_head) %} | |
{% set _ = sgst_rate.append((row.tax_amount/(total_taxable_amount['amount']))*100) %} | |
{% elif 'IGST' in row.account_head -%} | |
{% set _ = igst_amount.append(row.tax_amount*1.0) %} | |
{% set _ = igst_account_head.append(row.account_head) %} | |
{% set _ = igst_rate.append((row.tax_amount/(total_taxable_amount['amount']))*100) %} | |
{% elif 'Extra Discount' in row.account_head -%} | |
{% set _ = extra_discount_amount.append(row.tax_amount*1.0) %} | |
{%- endif -%} | |
{%- endfor -%} | |
{% if not cgst_rate[0] -%} | |
{% set _ = cgst_rate.append(0) %} | |
{%- endif -%} | |
{% if not sgst_rate[0] -%} | |
{% set _ = sgst_rate.append(0) %} | |
{%- endif -%} | |
{% if not igst_rate[0] -%} | |
{% set _ = igst_rate.append(0) %} | |
{%- endif -%} | |
{% if not extra_discount_amount[0] -%} | |
{% set _ = extra_discount_amount.append(0) %} | |
{%- endif -%} | |
{% set _ = total_discount.update({'amount': doc.total - total_taxable_amount['amount']}) %} | |
{%- for hsn in hsn_list -%} | |
{% set temp = total_list[hsn] - ((total_list[hsn]/doc.total) * total_discount['amount']) | float%} | |
{% set _ = hsn_taxable_amount_list.update({hsn: temp }) %} | |
{%- endfor -%} | |
</div> | |
{%- for hsn in hsn_list -%} | |
<tr> | |
<td style="padding: 1px !important; font-size: 0.8em;">{{loop.index}}</td> | |
<td style="padding: 1px !important; font-size: 0.8em;">{{hsn}}</td> | |
<td style="text-align: right; padding: 1px !important; font-size: 0.8em;">{{"₹ {:,.2f}".format(hsn_taxable_amount_list[hsn])}}</td> | |
<td style="width: 17%; text-align: right; padding: 1px !important;"><font size = "1">{{ | |
"₹ {:,.2f}".format(hsn_taxable_amount_list[hsn]*cgst_rate[0]/100) }}<small> ({{ | |
cgst_rate[0] | round(1, 'common') }}%)</small></font></td> | |
<td style="width: 17%; text-align: right; padding: 1px !important;"><font size = "1">{{ | |
"₹ {:,.2f}".format(hsn_taxable_amount_list[hsn]*sgst_rate[0]/100) }}<small> ({{ | |
sgst_rate[0] | round(1, 'common') }}%)</small></font></td> | |
<td style="width: 17%; text-align: right; padding: 1px !important;"><font size = "1">{{ | |
"₹ {:,.2f}".format(hsn_taxable_amount_list[hsn]*igst_rate[0]/100) }}<small> ({{ | |
igst_rate[0] | round(1, 'common') }}%)</small></font></td> | |
<td style="text-align: right; padding: 1px !important; font-size: 0.8em;">{{"₹ {:,.2f}".format((hsn_taxable_amount_list[hsn]*cgst_rate[0]/100)+(hsn_taxable_amount_list[hsn]*sgst_rate[0]/100) + (hsn_taxable_amount_list[hsn]*igst_rate[0]/100) ) }}</td> | |
</tr> | |
{%- endfor -%} | |
<tr> | |
<td colspan="2" style="padding: 1px !important; font-size: 0.8em;">Total Taxable Amount</td> | |
<td colspan="1" style="text-align: right; padding: 1px !important; font-size: 0.8em;">{{"₹ {:,.2f}".format(total_taxable_amount['amount'])}}</td> | |
<td colspan="4" style="padding: 1px !important; font-size: 0.8em;"></td> | |
</tr> | |
</tbody> | |
<table> | |
<div class="row"> | |
{% if doc.cd_cutoff_date -%} | |
<div class="col-md-12"> If payment made after {{ doc.get_formatted("cd_cutoff_date") }} then amount payable is {{ "₹ {:,.2f}".format(doc.rounded_total - extra_discount_amount[0]) }} </div> | |
{%- endif -%} | |
</div> | |
<div class="row"> | |
<div class="col-xs-6 text-center" style="border-right:1px solid #666;"> | |
</div> | |
<div class="col-xs-6 text-right"> | |
<small>For </small> | |
<strong>{{doc.company}}</strong> | |
<br> | |
<br> | |
Authorised Signatory | |
</div> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table class="table table-bordered" style="margin-top: 2px; margin-bottom: 2px; padding:0px;"> | |
<tbody> | |
<tr> | |
<th style="padding: 3px !important;">Sr</th> | |
<th style="padding: 3px !important;">Item Name</th> | |
<th style="font-size:0.8em; padding: 4px 3px !important;">HSN/SAC</th> | |
<th style="padding: 3px !important;">Pcs</th> | |
<th style="padding: 3px !important;" class="text-right">Qty</th> | |
<th style="padding: 3px !important;" class="text-right">Rate</th> | |
<th style="padding: 3px !important;" class="text-right">Amount</th> | |
</tr> | |
{%- for row in doc.items -%} | |
<tr> | |
<td style="width: 3%; padding: 3px !important; font-size: 0.9em;" class="nowrap">{{ row.idx }}</td> | |
<td style="width: 44%; padding: 3px !important; font-size: 0.9em;" class="nowrap"> | |
{{ row.item_name }} | |
{% if row.item_code != row.item_name -%} | |
<br>Item Code: {{ row.item_code}} | |
{%- endif %} | |
</td> | |
<td style="width: 6%; padding: 3px !important; font-size: 0.8em;" class="nowrap">{{ row.gst_hsn_code }}</td> | |
<td style="width: 11%; padding: 3px !important; font-size: 0.8em;" class="nowrap"> | |
<div style="border: 0px;">{{ row.description.split('<br>')[0] }}</div></td> | |
<td style="width: 12%; text-align: right; padding: 3px !important; font-size: 0.9em;" class="nowrap">{{ row.qty }} {{ row.uom or row.stock_uom }}</td> | |
<td style="width: 10%; text-align: right; padding: 3px !important; font-size: 0.9em;" class="nowrap">{{ | |
row.get_formatted("rate", doc) }}</td> | |
<td style="width: 17%; text-align: right; padding: 3px !important; font-size: 0.9em;" class="nowrap">{{ | |
row.get_formatted("amount", doc) }}</td> | |
</tr> | |
{%- endfor -%} | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment