I wanna get invoice no and book no such that when invoice no is 101 book no will be 3 .
When invoice no is 151 book no will be 4 .
I.e. on each 50 increament book no should be {{ invoice no | divided by : 50 | plus :1 }}
I wanna show total amount in words
As in previous versions of manager when there was view template {{ balance_due_in_words }} was worked . So how to show in this version ???
3 . [quote=“lubos, post:2, topic:7938”]
What are you trying to achieve?
[/quote]
I wanna show (amount before tax = total amount - vat amount ).
Just below sub total ( in case of tax inclusive.)
In liquid documentation if I’m not wrong these variables shouldn’t affect internal structure . Right ???
@lubos I think there should be freedom to do some mathematics using other variables .
On applying custom tax as that is also tax {{ title }} should write ’ Tax invoice ’ instead of only invoice.
I’m saying that , like when we use in built taxes invoice turns into tax invoice .
So likewise when we use custom taxes in that case also invoics should turns into tax invoice . Because custom tax is also type of tax .
If i will create as u said then there is chance of mistakes . In that case i have to switch back and forth between two themes again and again . And at any time some invoice will print with wrong titles… as because then i have to select that manually
I completely understood you, @ShubSingh39. But the use of custom tax codes does not necessarily mean the user wants to change titles of forms. In the case of some built-in tax codes, the local law is known to require substitution of Tax Invoice for Invoice. But that is not true everywhere. And the program has no way of knowing you want such a change for your custom tax code. So the Guide explains how to do it and the program allows you (and others) flexibility.
@lubos
In custom Theme, Is it possible to write Amount in Words ??? As like in View Template, You provide variable {{ Balance_due_in_words }}.
As like that any variable available for custom Theme also?
Because I hardly set Invoice format by View Template, (I still used View template). Please provide variable for " amount due in words " if possible.
In the latest version (17.1.67), you can spell out any number in custom theme. For example, to spell out “Balance due” total, you will need to loop through all totals to find “Balance due” total and then just spell out its number by using Liquid filter spell_out. I’m also using capitalize filter so the first letter of spelled out number is capitalized too.
{% for total in table.totals %}
{% if total.label == 'Balance due' %}
{{ total.number | spell_out | capitalize }}
{% endif %}
{% endfor %}