h6585
March 7, 2019, 1:06pm
1
How do I display the localtax1 and localtax2 rates in custom ODT. What are the tags for them. I can get the total numerical value but not the percentages to display in the table.
crabe generates it seamlessly however, I am unable to achieve the same.
Any help in this regard would be appreciated.
ksar
March 18, 2019, 1:41pm
3
Hi,
Evertihing is in there : https://wiki.dolibarr.org/index.php/Create_an_ODT_document_template
The localtax1 and localtax2 rates TAG doesn’t exist.
Either you create it by your self or you open a Feature Request on Git : https://github.com/Dolibarr/dolibarr/issues
h6585
March 18, 2019, 1:57pm
4
Hi,
I tried creating it. However couldn’t achieve the desired results.
There should be a simpler method as the same is achieved in the crabe file
Could you please guide me on this.
alanq
March 19, 2019, 9:55am
5
I couldn’t achieve the desired results.
192.168.0.1
h6585
March 20, 2019, 5:06am
6
Hi,
So this is the edit suggested by Eldy and I believe it should be included in the future updates.
Update your file located in htdocs/core/class/ and edit the file commondocgenerator.php
Delete line number 542 which should be ‘line_up’=>price2num($line->subprice),
and add the following 3 lines
'line_localtax1_vatrate'=>vatrate($line->localtax1_tx),
'line_localtax2_vatrate'=>vatrate($line->localtax1_tx),
'line_up'=>price2num($line->subprice),
Then in your ODT use the tag line_localtax1_vatrate and line_localtax2_vatrate
Thats it.
h6585
March 20, 2019, 5:09am
7
Here is eldy’s github commit link
committed 02:18PM - 19 Mar 19 UTC
ksar
March 20, 2019, 9:27am
8
Thanks,
So it will be integrated in V10…
h6585
March 20, 2019, 9:35am
9
Dont know which version it would include probably in 9.0.2. If they release one before V10
h6585
March 20, 2019, 9:38am
10
This lead me into another problem in my ODT.
In my product description and rate table if I have 3 rows of products a table of only 3 rows is generated whereas in crabe module we have a set table size so it doesn’t matter if you have 2 product rows or 10 product rows. Trying to figure out a similar set up in my ODT.
How can it be achieved?