Creating Printer Templates

Hello. Our topic is creating printer templates. In this tutorial we'll create a general ticket template and give some examples of new features.

When we create a new ticket template a blank screen with some descriptions of usable tags welcomes us.

V2 users will remember the sections available for different types of Ticket Lines (Orders). For example we used Gift Line section for defining printing template for gifted items. On V2 order states such as Gift, Void was hard coded. With V3 we can create new Order States for different uses such as returned or wasted items. So how we'll create templates for new types of Order States? To be able to solve this problem we introduced a new feature called “Dynamic Sections”. We'll type the section name in square brackets like [Orders:Gift] so SambaPOS can understand the lines under this section name relates with orders that have “Gift” state.

Now we can start creating the template.

This is the basic template. I've inserted two comments as a place holder for Resources and Orders.

As you know a Ticket contains some collections of things such as Orders, Resources, Discounts, Services, Roundings, etc. We want to list orders at the point I've inserted comment under “Ticket No:” part. To tell SambaPOS where we want to list orders we'll use {ORDERS} tag and {ENTITIES} for listing resource items. All possible tags are:

  • {ORDERS}
  • {TAXES}

Collection Tags are displayed in Blue color and defines the place where we want to list things.

But this format will print nothing for orders and resources because SambaPOS still don't know how to print orders or resources. So we'll create sections for defining these templates.

We created three sections. One for order line format and the other two are for Resources. The format we created at [ORDERS] section will be used for all order lines but [ENTITIES:Table] format will be used for printing table name and [ENTITIES:Customer] will used when the resource type is Customer and it will print Customer Name and Customer Phone. Customer Phone pulled with {ENTITIES DATA:Phone} tag because phone number is a custom data. For example if you add a custom data named Mobile for Customer Resource type you'll print it by using {ENTITIES DATA:Mobile} tag.

But of course we don't want to print all order lines on tickets. For example we want to remove voided lines and display Gifted lines with a different format. So we'll create two more sections.

We added an empty section for voided lines. If we do not create a section for [ORDERS:Void], default [ORDERS] template will used instead. To be able to skip them we created an empty section. [ORDERS:Gift] section is self descriptive. We'll print Gift instead of price.

We have already answers to
1029 questions
E-Posta Facebook Twitter RSS Skype
Telefon (212) 252 0634