Create an ODT or ODS document template: Difference between revisions

m
Tag: 2017 source edit
Tag: 2017 source edit
Line 50: Line 50:
[[File:Info.png]]  
[[File:Info.png]]  


For the tag {object_total_vat_locale_x}, if there is no amount for the vat rate x, the key is not replaced. So you can use the condition syntax to show 0 instead of the key when value is not defined:
For the tag {object_total_..._x}, if there is no amount for the vat rate x, the key is not replaced. So you can use the condition syntax to show 0 instead of the key when value is not defined:
<syntaxHighlight>
<syntaxHighlight>
[!-- IF {object_total_vat_locale_x} --]
[!-- IF {object_total_..._x} --]
0
0
[!-- ELSE {object_total_vat_locale_x} --]
[!-- ELSE {object_total_..._x} --]
{object_total_vat_locale_x}
{object_total_..._x}
[!-- ENDIF {object_total_vat_locale_x} --]
[!-- ENDIF {object_total_..._x} --]
</syntaxHighlight>
</syntaxHighlight>
[[File:Warning.png]] To be sure this part of code does not contains hidden text (added silently by LibreOffice for versioning/tracking change purpose), you must select all the code section, make a right click an  select the feature "Remove direct formatting" (not doing this may make the code section not working).
[[File:Warning.png]] To be sure this part of code does not contains hidden text (added silently by LibreOffice for versioning/tracking change purpose), you must select all the code section, make a right click an  select the feature "Remove direct formatting" (not doing this may make the code section not working).