Kraft Project

Configuration

Documentation


openSUSE.org

The following variable names can be used in the RML templates and are replaced by Kraft.

Please refer to the Google Template documentation to learn more about the templates.

Document Variables

TagDescription
DATEFormatted date
DOCTYPEThe document type
ADDRESSCompletely formatted client address
DOCIDThe document id
PROJECTLABELThe project label
SALUTThe salutation
GOODBYEThe goodbye label
PRETEXTThe entry text
POSTTEXTThe end text
BRUTTOSUMBrutto sum
NETTOSUMNetto sum

Client Data Variables

TagDescription
CLIENT_NAMEClient real name
CLIENT_ORGANISATIONClient Organization
CLIENT_URLClient Url
CLIENT_EMAILClient preferred email
CLIENT_PHONEClient work phone number
CLIENT_FAXClient fax
CLIENT_CELLClient cellphone number

the following data is taken from the client address marked as prefered in the KDE addressbook:

TagDescription
CLIENT_POSTBOXClient Postbox
CLIENT_EXTENDEDClient Address Extended
CLIENT_STREETClient Address Street
CLIENT_LOCALITYClient Locality
CLIENT_REGIONClient Region

Loop Variable POSITIONS for items

There is a loopable POSITIONS list which contains one entry for each item of the document.

See this example how to use it in the document template

    {{#POSITIONS}}
    <tr>
        <td><para style="{{POS_KIND}}text">{{POS_NUMBER}}.</para></td>
        <td>      {{POS_TEXT}}          </td>
        <td><para style="{{POS_KIND}}text">{{POS_AMOUNT}} </para></td>
        <td><para style="{{POS_KIND}}text">{{POS_UNIT}}   </para></td>
        <td><para style="{{POS_KIND}}rtext">{{POS_UNITPRICE}}</para></td>
        <td><para style="{{POS_KIND}}rtext">{{POS_TOTAL}}</para></td>
    </tr>
    {{/POSITIONS}}
TagDescription
POS_NUMBERItem Number
POS_TEXTItem Text
POS_AMOUNTItem amount
POS_UNITPRICEPrice of one unit
POS_TOTALTotal sum of the item
POS_KINDItem kind, out of alternative, demand or normal (UNSURE, FIXME)

Conditional SPECIAL_POS

The dictionary SPECIAL_POS is set with the value COUNT if the item list contains not normal items (alternative or demand items), see:

  {{#SPECIAL_POS}}
    <para style="text">
    Please note: This offer contains {{COUNT}} alternative or demand positions,
    printed in italic font. These do not add to the overall sum.
    </para>
  {{/SPECIAL_POS}}

Note that the dictionary acts as a conditional here instead as a loop. Refer to the documentation of the Google CTemplate for details.

Conditional for Taxes

There are conditionals for full and reduced tax. Both need to appear in the document to show the correct tax sum. Kraft enables the correct one.

Conditional SECTION_REDUCED_TAX:

TagDescription
REDUCED_TAX_SUMThe tax sum
REDUCED_TAXThe tax percentage, ie. 7%
REDUCED_TAX_LABELA label, in this case reduced VAT or a translation

Conditional SECTION_REDUCED_TAX:

TagDescription
FULL_TAX_SUMThe tax sum
FULL_TAXThe tax percentage, ie. 19%
FULL_TAX_LABELA label, in this case VAT or a translation

Tax Conditional usage example, please add all to your document:

 {{#SECTION_REDUCED_TAX}}
    <tr>
        <td><para style="text">+{{REDUCED_TAX}}% VAT</para></td>
        <td><para style="rtext">{{REDUCED_TAX_SUM}}</para></td>
    </tr>
    {{/SECTION_REDUCED_TAX}}
    {{#SECTION_FULL_TAX}}
    <tr>
        <td><para style="text">+{{FULL_TAX}}% VAT</para></td>
        <td><para style="rtext">{{FULL_TAX_SUM}}</para></td>
    </tr>
    {{/SECTION_FULL_TAX}}

My Own Address

The following values are picked from the address that is marked as my own address in the KDE addressbook.

Note that the address data is again taken from the work address.

Please refer to the Client Address values, all defined client values are also there for the own address. Note that the prefix CLIENT must be replaced with MY, for example MY_PHONE for my telephone number.


Page: Main.TemplateVariables - Last Modified : Fri, 31 May 19

Copyright 2009-2020 Klaas Freitag and the Kraft Team