Create an ODT or ODS document template: Difference between revisions

m
no edit summary
mNo edit summary
Tag: 2017 source edit
mNo edit summary
Tag: 2017 source edit
Line 47: Line 47:
===Object information (invoice, commercial proposal, order, ...)===
===Object information (invoice, commercial proposal, order, ...)===
{{TagsOdtObjects}}
{{TagsOdtObjects}}
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:
<syntaxHighlight>
[!-- IF {object_total_vat_locale_x} --]
0
[!-- ELSE {object_total_vat_locale_x} --]
{object_total_vat_locale_x}
[!-- ENDIF {object_total_vat_locale_x} --]
</syntaxHighlight>
[File:Warning] 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 formating" (not doing this may make the code section not working).


===Lines of object===
===Lines of object===