Skip to content

Instantly share code, notes, and snippets.

@emreeren
emreeren / fastpayment.txt
Last active Aug 29, 2015
SambaPOS Fast Payment Configuration
View fastpayment.txt
{"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 / Theme.txt
Last active Aug 29, 2015
Change SambaPOS Theme
View Theme.txt
{"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
View Add Employee.txt
{"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
@emreeren
emreeren / gist:5162270
Created Mar 14, 2013
Updated bill template
View gist:5162270
[LAYOUT]
-- General layout
<T>TICKET
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
@emreeren
emreeren / gist:5821894
Created Jun 20, 2013
Printer Template with Group Footer formatting
View gist:5821894
[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 Jun 20, 2013
Printer Template with Grouping
View gist:5821927
[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 Jun 30, 2013
Printer Template with Tax Printing
View gist:5896654
[LAYOUT]
-- General layout
<T>Ticket
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
View Advanced Delivery.txt
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":true,"Description":"Advanced Delivery screen setup that's compatible with Gloria Food online ordering integration sample.","Language":"en","Name":"Advanced Delivery Screen Setup","SortOrder":0,"TaskData":"[{\"Action\":\"var ds = sql.Exists(\\\"SELECT Id from EntityScreens where Name = 'Delivery'\\\");\\u000d\\u000avar et = sql.Exists(\\\"SELECT Id from EntityTypes where Name = 'Deliverers'\\\");\\u000d\\u000avar tt = sql.Exists(\\\"SELECT Id from TicketTypes where Name = 'Delivery Ticket'\\\");\\u000d\\u000avar cr = sql.Exists(\\\"SELECT Id from CustomReports where Name = 'Metrics'\\\");\\u000d\\u000avar sc = sql.Exists(\\\"SELECT Id from Scripts where Name = 'Metrics'\\\");\\u000d\\u000a\\u000d\\u000aData.Set('canCreateMetrics',!cr && !sc);\\u000d\\u000a\\u000d\\u000avar question = '';\\u000d\\u000aif(ds) question += 'Deliver
View config2.yaml
Items:
- Description: Activate Time Clock & Add Employees
Url: https://gist.githubusercontent.com/emreeren/e43e4df6f01fed80f7eb/raw/
Version: 115
- Description: Enable crediting change amount to customer accounts
Url: https://gist.githubusercontent.com/emreeren/c9813310319b72717768c2933d3a6fcf/raw/
Version: 141
@emreeren
emreeren / credit change amount.txt
Last active Mar 20, 2017
Import file for crediting change amounts to customer accounts
View credit change amount.txt
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":true,"Description":"Enables payment screen buttons to credit Change Amounts to Customer Account.","Language":"en","Name":"Enable crediting change amounts to customer accounts","SortOrder":0,"TaskData":"[{\"Action\":\"var ac = sql.Exists(\\\"SELECT Id from Accounts where Name = 'Receivables'\\\");\\u000d\\u000avar at = sql.Exists(\\\"SELECT Id from AccountTypes where Name = 'Receivable Accounts'\\\");\\u000d\\u000avar ct = sql.Exists(\\\"SELECT Id from AccountTypes where Name = 'Customer Accounts'\\\");\\u000d\\u000avar pt = sql.Exists(\\\"SELECT Id from AccountTypes where Name = 'Payment Accounts'\\\");\\u000d\\u000a\\u000d\\u000avar message = '';\\u000d\\u000a\\u000d\\u000aif(!ac) message += 'Receivables Account not Found<br\\\/>';\\u000d\\u000aif(!at) message += 'Receivable Accounts Type not Found<br\\\/>';\\u000d\\u000aif(!
You can’t perform that action at this time.