TeamWox HelpAccountingTemplatesMacros

Macros

Macros allow to substitute the names and values of fields from organizations and orders depending on which order is currently selected. The macros are specified in the code of template in a special format.

Field Value

<tw:macro_name />

This type of specifying allow to obtain the value of a field. The list of available macros is given in the corresponding section.

Field Name

<lng:macro_name>

In this case a macro allows to obtain the name of a field with a glance to the interface language of the user. The list of available macros is given in the corresponding section.

Example:

<table>

  <tr>

     <td><lng:ACCOUNTING_BENEFICIARY>: </td>

     <td><tw:COMPANY_BEN_NAME /></td>

  </tr>

</table>

The result of such template will be "Beneficiary: name of the beneficiary organization in the order". It is necessary to note that different macros are used for obtaining the values and the names of fields.

Construction of VAT Condition

These constructions allow to show/hide a block of information enclosed in tags, depending on the state of the "Include VAT" option.

<tw:INVOICE_BLOCK_TAX>

...

</tw:INVOICE_BLOCK_TAX>

or

<tw:INVOICE_BLOCK_NO_TAX>

...

</tw:INVOICE_BLOCK_NO_TAX>

In the first case, the contents enclosed between tags will be displayed if the "Include VAT" option is enabled, in the second case - if disabled.

Representation of Products List

Special construction is implemented to ease the composition of the list of products that are paid in the order:

<tw:INVOICE_LINE_REPEATER>

...

</tw:INVOICE_LINE_REPEATER>

Inside this construction one should specify which parameters of products from the order should be displayed. At that the information will be given for the whole list of products of the selected order.

Example:

<tw:INVOICE_LINE_REPEATER>

<table>

  <tr>

   <td><tw:INVOICE_LINE_PRODUCT /></td>

   <td><tw:INVOICE_LINE_QUANTITY /></td>

   <td><tw:INVOICE_LINE_PRICE /></td>

  </tr>

</table>

</tw:INVOICE_LINE_REPEATER>