sharpdrivetek:
<table style=“padding: 20px 20px”>
<thead>
<tr>
<td colspan=“99”>
<table style=“margin-bottom: 10px”><tr>
<td style=“font-weight: bold; font-size: 32px”>{% if title != ‘Invoice’ %}{{ title }}{% endif %}{% if title == ‘Invoice’ %}{{ title | replace: “Invoice”, “Tax Invoice” }}{% endif %}</td>
{% if business.logo != null %}<td style=“text-align: right”><img src=“{{ business.logo }}” style=“max-height: 100px; max-width: 300px”></td>{% endif %}
</tr></table>
<table style="margin-bottom: 20px"><tr>
<td style="width: 200px; border-left-width: 5px; padding-left: 10px; text-align: left">
{% for field in fields %}
<div style="font-weight: bold; font-size: 12px">{{ field.label }}</div>
<div style="margin-bottom: 10px; font-weight: bold; font-size: 16px">{{ field.text }}</div>
{% endfor %}
</td>
{% if title == 'Invoice' %}
<td style="width: 260px; padding-left: 20px; border-color: #000000; border-left-width: 1px">
{% for field in custom_fields %}
{% if field.label == "Shipped To:" %}{% continue %}{% endif %}
{% if field.label == "Notes" %}{% continue %}{% endif %}
<div style="font-size: 12px; padding-bottom: 10px"><b>{{ field.label }}</b> {{ field.text | newline_to_br }}</div>
{% endfor %}</td>{% endif %}
<td style="width: 300px; padding-left: 10px; padding-right: 5px; text-align: left; vertical-align: top; border-top-width: 3px; border-bottom-width: 5px">
<div style="text-align:LEFT;font-weight: bold;font-size: 18px">{{ business.name }}</div>
<div style="text-align:LEFT;font-size: 12px">{{ business.address | newline_to_br }}</div>
<div style="text-align:LEFT;font-weight: bold;font-size: 14px">{{ business.identifier }}</div>
</td>
</tr></table>
<table style="margin-bottom: 20px">
<td style="width: 380px; text-align: left; border-color: #000000; border-bottom-width: 2px; border-top-width: 2px; border-left-width: 2px; border-right-width: 2px">
{% if title == 'Invoice' %}<div style="padding-left: 5px; border-bottom-width: 2px; text-align:LEFT;font-weight: bold">Billed To:</div>{% endif %}
<div style="padding-left: 20px">
<div><b>{{ recipient.name }}</b> {{ recipient.code }}</div>
<div>{{ recipient.address | newline_to_br }}</div>
<div><b>{{ recipient.identifier }}</b></div></div>
</td>
{% if title == 'Invoice' %}{% for field in custom_fields %}{% if field.label == 'Shipped To:' %}
<td style="width: 375px; padding-left: 5px; text-align: left; border-color: #000000; border-bottom-width: 2px; border-top-width: 2px; border-left-width: 0px; border-right-width: 2px">
<div style="padding-left: 5px; border-bottom-width: 2px; text-align:LEFT;font-weight: bold">{{ field.label }}</div>
<div style="padding-left: 20px">{{ field.text | newline_to_br }}</div>
</td>{% endif %}{% endfor %}{% endif %}
</table>
<div style="font-size: 14px; font-weight: bold; margin-bottom: 20px">{{ description }}</div>
</td>
</tr>
<tr>
<td style="width: 25px; font-weight: bold; padding: 5px 5px; border-bottom-width: 1px; border-left-width: 1px; border-top-width: 1px; text-align:CENTER">#</td>
{% for column in table.columns %}
<td style="font-weight: bold; padding: 5px 10px; text-align: {{ column.align }}; border-left-width: 1px; border-bottom-width: 1px; border-top-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if column.nowrap %}; white-space: nowrap; width: 80px{% endif %}">{{ column.label }}</td>
{% endfor %}
</tr>
</thead>
<tbody>
{% assign i = 0 %}
{% for row in table.rows %}
{% assign i = i | plus: 1 %}
<tr>
<td style=“width: 25px; padding: 5px 5px; border-left-width: 1px; text-align:CENTER”>{{ i }}</td>
{% for cell in row.cells %}
<td style=“padding: 5px 10px; text-align: {{ table.columns[forloop.index0].align }}; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}{% if table.columns[forloop.index0].nowrap %}; white-space: nowrap; width: 80px{% endif %}”>{{ cell.text | newline_to_br }}</td>
{% endfor %}
</tr>
{% endfor %}
<tr>
{% for column in table.columns %}
<td style=“border-bottom-width: 1px; border-left-width: 1px{% if forloop.last == true %}; border-right-width: 1px{% endif %}”></td>
{% endfor %}
</tr>
{% for total in table.totals %}
<tr>
<td colspan=“{{ table.columns | size }}” style=“padding: 5px 10px; text-align: right{% if total.emphasis == true %}; font-weight: bold{% endif %}”>{{ total.label }}</td>
<td style=“border-left-width: 1px; white-space: nowrap; border-right-width: 1px; border-bottom-width: 1px; padding: 5px 10px; text-align: right{% if forloop.first == true %}; border-top-width: 1px{% endif %}{% if total.emphasis == true %}; font-weight: bold{% endif %}”>{{ total.text }}</td>
</tr>
{% endfor %}
<tr><td colspan=“{{ table.columns | size | plus:1 }}” style=“border-right-width: 1px; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 1px”><div style=“font-size: 12px; padding-left: 10px; padding-right: 10px”>{% for total in table.totals %}{% if total.label == ‘Total’ %}<b>INR {{ total.number | spell_out | capitalize }} Only</b></div>{% endif %}{% endfor %}</td></tr>
{% for field in custom_fields %}
{% if title == ‘Invoice’ %}
{% if field.label != “Notes” %}{% continue %}{% endif %}
{% endif %}
<tr>
<td colspan=“99”>
<div style=“font-weight: bold; padding-top: 20px”>{{ field.label }}</div>
<div>{{ field.text | newline_to_br }}</div>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
{% if title == ‘Invoice’ %}
<td colspan=“99”>
<div style=“text-align: right; font-weight: bold”>We declare that this invoice shows the actual price of the goods or<br>service described and that all particulars are true and correct.<br><br>For {{ business.name }}<br><br><br><br>Authorised Signatory</div></td>
{% endif %}
</tr>
</tfoot>
Super bro. Thank you for sharing the code. It is very helpful.
3 Likes
how to add hsn code column in sales and invoice ?
Please share the procedure to use this code and make changes.
create a new template under settings with the code in the following post.
I have customized a template for Indian users. It is limited to the known html variables and my knowledge. So those who find it useful may use the following template.
<table style="padding: 20px 20px">
<thead>
<tr>
<td colspan="99">
<table style="margin-bottom: 10px"><tr>
<td style="font-weight: bold; font-size: 32px">{% if title != 'Invoice' %}{{ title }}{% endif %}{% if title == 'Invoice' %}{{ title | replace: "Invoice", "Tax Invoice" }}{% endif %}</td>
…
2 Likes
try reading the post completely. information you are asking is already provided.
@lubos i need your help regarding this.
@lubos can you please provide me the code to implement the template as below.
[image]
Also, is there any update regarding the value in words?
It is necessary to mention the total of tax amounts under each tax category separately as a line when an invoice is made under Reverse Charge Mechanism.
Goto Settings → templates → New Template → In Template Paste the code
@lubos please enable mathematics in templates ,
That will solve our whole problem of invoice format.
super custom template
thank you sharp
Please resend new template code. I am unable to set the Invoice template provided. Just updated to the latest version.
…
Lorem Ipsum
This is the updated template as shown on my desktop.
Please help.
Settings → Templates → New Template → Paste the complete code there and set a Name of your choice.
After making invoice, click Switch Template at top right and select your newly created template.
Tax Invoice
Invoice date
28-06-2017
Due date
28-06-2017
Invoice number
5
LMC
1313 Webfoot Walk
Duckburg
Calisota
# Description Amount
This is what I am getting after following the Instructions on my sales Invoice after switching.
After posting it is showing like this.
But on my desktop it is still showing as the template language.
Copying the code alone will not work. You should set everything as per the instructions provided in the post.
I am sorry but i think i did not explain clearly.
We have three types of taxes namely CGST, SGST and IGST. Each of these have a tax rates of 5%, 12%, 18% and 28%.
When making an intra-state sale both CGST and SGST applies to every line item. Suppose we have two items in an invoice which falls under 12% and 18% tax slab, then the CGST & SGST for first item will be 6% each and for the second item it will be 9% each.
In this case total CGST is the total of CGST @ 6% and 9%, total of SGST is the total of SGST @ 6% and 9%.
Now the present invoice template only shows the tax value separately for 6% and 9%. But the actual tax to be filed is the total of these, both for CGST and SGST. Also, it is mandatory to mention this total of tax under each category if the invoice falls under Reverse Charge mechanism.
If i am not clear with the explanation you may please see my below post where I have attached an illustrative image.
@lubos can you please provide me the code to implement the template as below.
[image]
Also, is there any update regarding the value in words?
1 Like
Tut
June 28, 2017, 2:49pm
78
@sharpdrivetek , I moved your last post to this topic, as it had nothing to do with Malaysian tax schemes.
In the situation you describe, you need a multi-component custom tax code for each possible combination. So to one line item you would apply the code CGST 6% + SGST 6% and to the second you would apply CGST 9% + SGST 9% . When setting up the custom tax codes, you will probably want to use the system of subsidiary tax payable accounts described in this Guide .
Whether or not I have able to make myself clear, I have understood your situation from the beginning. And, as I keep trying to explain, Manager can handle it. I am not saying it is simple, but neither is your tax scheme. Better methods for handling and reporting multi-component schemes are also something I have been discussing with @lubos for more than a year.
As per the guide it explains a multi tax system which Manager is capable of handling, but now the situation is having two multi tax rates on the same invoice which further falls in the same sub category. I tried adding both totals by html codes so that i can show it on the invoice but it seems mathematical operations are disabled. I read in some topic Lubos mentioning this is disabled on purpose as this will create errors if not properly done and mess up the whole accounts. So i am in a situation now with no way forward.
2 Likes