Receipt definition file format

<< Click to Display Table of Contents >>

Navigation:  Receipt editor >

Receipt definition file format

Previous pageReturn to chapter overviewNext page

The file contains definitions of all receipts in all languages. There are 3 types of receipts: Return receipt, Hold slip and Transfer slip. Each of these can be modified and the texts can be changed.

To locate the different types of receipts, look for lines beginning with printout element:

 

 <printout

         type=”returnReceipt”

         ...

 

This element begins a new printout, which in this case is a return receipt. It should also contain language code, for example for US English, there would be an attribute like this:

 

         languageCode=”en-US”

 

You will find a returnReceipt for each language used in the device.

Within each printout there are several sections. These are header, item and footer. They begin on lines like this:

 

 <section

         type=”header”>

 

The above would begin a header section in a receipt. Header and footer are simply the header and footer parts of a receipt, and the item section is a repeating part for each item. For example in a patron receipt, the item section will be printed once for each item the patron has checked in.

Each section can contain more than one line of text. A line of text is always inside a line element, starting and ending tags. For example the following segment would print a line with the text ”Return receipt”:

 

 <line>

         <label text=”Return receipt” />

 </line>

 

Note that XML requires all elements to have a defined beginning and ending. In this example, the <line> element begins a new line, and it ends in </line> - the forward slash being the only indicator that the latter tag is an ending tag. A tag can also consist of only a single like, as the <label... /> tag shows, by ending in a forward slash / before a closing angle bracket.

Each line can have either no text at all (in which case it is an empty line used to space out other lines), a simple static label of text, dynamic data (usually information from a SIP message) or both data and dynamic content. The example above contains only a static label. Following is a line with a label and a dynamic part; the name of an item:

 

 <line>

         <label text=”Item name:” />

         <data value=”{ITEM:NAME}” />

 </line>

 

This would print the label ”Item name:” on a line of text, followed by the name of a returned item, for example:

 

 Item name: Great Expectations