Skip to content

Instantly share code, notes, and snippets.

@emreeren
emreeren / gist:5162270
Created March 14, 2013 15:24
Updated bill template
[LAYOUT]
-- General layout
<T>TICKET
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
@emreeren
emreeren / dtran.sql
Last active September 7, 2023 11:47
SambaPOS V3 Clear Transaction Data
DELETE FROM [TicketEntities]
GO
DELETE FROM [Tickets]
GO
DELETE FROM [AccountTransactionDocuments]
GO
DELETE FROM [AccountTransactions]
@emreeren
emreeren / gist:5821894
Created June 20, 2013 11:05
Printer Template with Group Footer formatting
[LAYOUT]
-- General layout
<T>TICKET
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
@emreeren
emreeren / gist:5821927
Created June 20, 2013 11:13
Printer Template with Grouping
[LAYOUT]
-- General layout
<T>TICKET
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
@emreeren
emreeren / gist:5896654
Created June 30, 2013 20:06
Printer Template with Tax Printing
[LAYOUT]
-- General layout
<T>Ticket
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
@emreeren
emreeren / fastpayment.txt
Last active August 29, 2015 14:17
SambaPOS Fast Payment Configuration
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":true,"Description":"Adds \/ Removes fast payment buttons that appears under orders. Clicking a fast payment button will close ticket without need of switching to payment screen. ","Language":"en","Name":"Setup Fast Payment Buttons","SortOrder":20,"TaskData":"[{\"Action\":\"var payments = sql.Query('select Name from PaymentTypes').Join('|');\\u000d\\u000aresult = '[?Payment Type::'+payments+']'\",\"ActionType\":4,\"Condition\":null,\"Description\":\"Initialize Parameters\"},{\"Action\":\"Data.Set('op','Create');\\u000d\\u000aif(!sql.Exists(\\\"SELECT Id from PaymentTypes where Name = '[:Payment Type]'\\\"))\\u000d\\u000a{\\u000d\\u000a dlg.ShowMessage(\\\"A Payment Type named [:Payment Type] does not exists.\\\");\\u000d\\u000a result = false;\\u000d\\u000a}\\u000d\\u000aelse result = true;\",\"ActionType\":3,\"Condition\
@emreeren
emreeren / config.yaml
Last active September 21, 2018 15:12
Auto Config files
Items:
- Description: Fast payment buttons and confirmation tasks
Url: https://gist.githubusercontent.com/emreeren/0c925ae66dafa3a7b6da/raw/
Version: 99
- Description: Switch themes
Url: https://gist.githubusercontent.com/emreeren/8c64d9ca1f4bfbdea801/raw/
Version: 98
- Description: UK Postal Codes integration
Url: https://gist.githubusercontent.com/emreeren/1894194f2f8fe9a179ff/raw/
Version: 103
@emreeren
emreeren / Theme.txt
Last active August 29, 2015 14:17
Change SambaPOS Theme
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":false,"Description":"Enable Dark or Light theme. Default table and menu colors will also update to match colors to theme.","Language":"en","Name":"Switch Theme","SortOrder":40,"TaskData":"[{\"Action\":\"[?Select Theme:Light|Dark:Light|Dark]\",\"ActionType\":4,\"Condition\":null,\"Description\":\"Initialize Parameters\"},{\"Action\":\"function UpdateColor(name,oldColor,newColor)\\u000d\\u000a{\\u000d\\u000a sql.ExecSql(\\\"Update States set Color = '\\\"+newColor+\\\"' where Name = '\\\"+name+\\\"' and Color = '\\\"+oldColor+\\\"'\\\");\\u000d\\u000a}\\u000d\\u000a\\u000d\\u000afunction UpdateMenuItem(oldColor,newColor)\\u000d\\u000a{\\u000d\\u000a sql.ExecSql(\\\"Update ScreenMenuCategories set MenuItemButtonColor = '\\\"+newColor+\\\"' where MenuItemButtonColor = '\\\"+oldColor+\\\"'\\\");\\u000d\\u000a}\\u000d\\u000a\\u000
@emreeren
emreeren / ukpostcode.txt
Last active February 9, 2019 11:09
ukpostcodes
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":true,"Description":"Enables UK Post Code lookup feature. Uses free Google Maps service and resolves Post Codes to Street level.","Language":"en","Name":"Enable UK Post Code Lookup","SortOrder":50,"TaskData":"[{\"Action\":\"dlg.AskQuestion(\\u000d\\u000a \\\"You'll need a Google Maps API Key to enable this feature.\\\",\\u000d\\u000a \\\"OK\\\",\\\"\\\",\\\"#CC000000\\\",0,\\u000d\\u000a \\\"You can visit <link https:\\\/\\\/developers.google.com\\\/maps\\\/documentation\\\/javascript\\\/get-api-key>Google Maps<\\\/link> website to have more info about creating an API Key.\\\")\\u000d\\u000aresult = '[?Google API Key]'\",\"ActionType\":4,\"Condition\":null,\"Description\":\"Ask Google Maps API Key\"},{\"Action\":\"var result = 'Customers';\\u000d\\u000aif(!sql.Exists(\\\"Select * from EntityTypes where Name='Customers'\\\"))
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":false,"Description":"Activates Time Clock, Creates Employee Entity Type and adds Employee Entities. On this configuration Time Clock users are tracked as Ticket Entities.","Language":"en","Name":"Activate Time Clock & Add Employees","SortOrder":0,"TaskData":"[{\"Action\":\"[?Employee Name:[A-Z][A-Za-z ]+]\\u000d\\u000a[?Entry PIN:.{4}]\\u000d\\u000a[?Operator Number:\\\\d+]\\u000d\\u000a[?Pay Rate:\\\\d+\\\\.\\\\d{0,2}]\",\"ActionType\":4,\"Condition\":null,\"Description\":\"Ask Employee Name\"},{\"Action\":\"var result = true;\\u000d\\u000avar exists = api.Rule('TC_Set Ticket Employee').Exists();\\u000d\\u000aif(!exists)\\u000d\\u000a{\\u000d\\u000a var operation = dlg.AskQuestion('Do you want to enable Time Clock?','Yes,No. Cancel It');\\u000d\\u000a if(operation == 'Yes')\\u000d\\u000a {\\u000d\\u000a Data.Se