SambaPOS

Open Source Restaurant POS Software

User Tools

Site Tools


Writing /var/www/doc.sambapos.org/public_html/data/cache/e/e7f6c6a9bbc730e487768356860ed3d6.metadata failed
en:v3:creating_printer_templates
Writing /var/www/doc.sambapos.org/public_html/data/cache/2/29c6cf9e7378489c77b920bc1fd6b103.xhtml failed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:v3:creating_printer_templates [2012/09/07 05:20]
Emre Eren
en:v3:creating_printer_templates [2012/10/15 00:19] (current)
Line 1: Line 1:
 ====== Creating Printer Templates ====== ====== Creating Printer Templates ======
 +{{tag>​v3blog}}
 Hello. I'm glad to create the first tutorial of SambaPOS V3 release. Our topic is creating printer templates. In this tutorial we'll create a general ticket template and give some examples of new features. ​ Hello. I'm glad to create the first tutorial of SambaPOS V3 release. 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. When we create a new ticket template a blank screen with some descriptions of usable tags welcomes us.
  
-{{:​en:​v3:​printer_template:​1.jpg?​650|}}+{{:​en:​v3:​printer_template:​1.jpg?​700|}}
  
 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. 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.
Line 10: Line 11:
 Now we can start creating the template. Now we can start creating the template.
  
-{{:​en:​v3:​printer_template:​2.jpg?​800|}}+{{:​en:​v3:​printer_template:​2.jpg?​650|}}
  
 This is the basic template. I've inserted two comments as a place holder for [[Resources]] and [[Orders]]. ​ This is the basic template. I've inserted two comments as a place holder for [[Resources]] and [[Orders]]. ​
Line 24: Line 25:
   * {PAYMENTS}   * {PAYMENTS}
  
-{{:​en:​v3:​printer_template:​3.jpg?​800|}}+{{:​en:​v3:​printer_template:​3.jpg?​650|}}
  
 Collection Tags are displayed in Blue color and defines the place where we want to list things. Collection Tags are displayed in Blue color and defines the place where we want to list things.
Line 30: Line 31:
 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. 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.
  
-{{:​en:​v3:​printer_template:​4.jpg?​800|}}+{{:​en:​v3:​printer_template:​4.jpg?​650|}}
  
 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 [RESOURCES:​Table] format will be used for printing table name and [RESOURCES:​Customer] will used when the resource type is Customer and it will print Customer Name and Customer Phone. Customer Phone pulled with {RESOURCE 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 {RESOURCE DATA:​Mobile} tag. 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 [RESOURCES:​Table] format will be used for printing table name and [RESOURCES:​Customer] will used when the resource type is Customer and it will print Customer Name and Customer Phone. Customer Phone pulled with {RESOURCE 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 {RESOURCE DATA:​Mobile} tag.
Line 36: Line 37:
 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. ​ 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. ​
  
-{{:​en:​v3:​printer_template:​5.jpg?​800|}} +{{:​en:​v3:​printer_template:​5.jpg?​650|}} 
  
 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 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. ​
en/v3/creating_printer_templates.1346980831.txt.gz ยท Last modified: 2012/09/07 09:30 (external edit)