What is the ODT tag for localtax1 & localtax2

What is the ODT tag for showing the rates of localtax1 & localtax2.

I can get the numerical value for the localtax1 and localtax2 amount however unable to show the percentage value in the ODT invoice template.

Regards and thanks in advance for the help

Hi,

As far as I konw, it doesn’t exist

You can create yours by following this https://wiki.dolibarr.org/index.php/Create_an_ODT_document_template on the Other personalized tags section

Okay, will try this. However, I believe there should be a pre-defined tag because the same is printed when I use the crabe file.

Hi tried doing this however I was unsuccessful putting my lib file below, is there something wrong that I did?

[code]
/** Function called to complete substitution array for lines (before generating on ODT, or a personalized email)

  •  functions xxx_completesubstitutionarray_lines are called by make_substitutions() if file
    
  •  is inside directory htdocs/core/substitutions
    
  •  @param	array		$substitutionarray	Array with substitution key=>val
    
  •  @param	Translate	$langs			Output langs
    
  •  @param	Object		$object			Object to use to get values
    
  •          @param  Object          $line                   Current line being processed, use this object to get values
    
  •  @return	void					The entry parameter $substitutionarray is modified
    

*/
function mymodule_completesubstitutionarray_lines(&$substitutionarray,$langs,$object,$line) {
{
global $conf,$db;

$localtax1_rate=$object->lines[$i]->localtax1_tx;
$localtax2_rate=$object->lines[$i]->localtax2_tx;
$substitutionarray[line_localtax1rate]=$localtax1_rate;
$substitutionarray[line_localtax2rate]=$localtax2_rate;
}[/code]

Unsuccessful means ?

And all the others files ?

I think you do not understand, you need to create your own module following that : https://wiki.dolibarr.org/index.php/Module_development
Then, add the substituioin inside.

Try creating your own module then add the substitution inside

Thank you, however, this method is not easy.

Which is why I am searching for alternatives.