Skip to content

Instantly share code, notes, and snippets.

Emre Eren emreeren

Block or report user

Report or block emreeren

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View script.js
var express = require('express');
var request = require('request');
var querystring = require('querystring');
var messageServer = 'localhost';
var messageServerPort = 9000;
var gloriaFoodKey = 'xxxxxxxxxxxxxxxxxx';
var serverKey = 'xxxxxxxxxxxxxxxxxxx';
var timeout = 30000;
var customerEntityType = 'Customers';
View ukpostcode.txt
{"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'\\\"))
View Reservation.txt
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":false,"Description":"Enable Reservation List to Keep track of reservations and deposit payments","Language":"en","Name":"Reservation Setup","SortOrder":0,"TaskData":"[{\"Action\":\"var miscTxt = gql.Exec('{getProduct(name:\\\"Deposit\\\"){name}}');\\u000d\\u000avar misc = JSON.parse(miscTxt);\\u000d\\u000a\\u000d\\u000aif(misc.data === null){\\u000d\\u000a gql.Exec('mutation m{addProduct(name:\\\"Deposit\\\",groupCode:\\\"Misc\\\",portions:[{name:\\\"Normal\\\",price:0}]){id}}');\\u000d\\u000a}\",\"ActionType\":1,\"Condition\":null,\"Description\":\"Create Deposit Product\"},{\"Action\":\"TicketTypes:\\u000d\\u000a- Name: Reservation Ticket\\u000d\\u000a ScreenMenuName: Menu\\u000d\\u000a TicketNumeratorName: Ticket Number Generator\\u000d\\u000a OrderNumeratorName: Order Number Generator\\u000d\\u000a SaleTransactionTyp
@emreeren
emreeren / config.yaml
Last active Sep 21, 2018
Auto Config files
View config.yaml
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 / dtran.sql
Last active May 2, 2018
SambaPOS V3 Clear Transaction Data
View dtran.sql
DELETE FROM [TicketEntities]
GO
DELETE FROM [Tickets]
GO
DELETE FROM [AccountTransactionDocuments]
GO
DELETE FROM [AccountTransactions]
View Tema Değiştir.txt
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":false,"Description":"Koyu veya Açık renk temayı etkinleştirin. Varsayılan masa ve menü renkleri de temaya uygun olarak değiştirilecektir.","Language":"tr","Name":"Tema Değiştir","SortOrder":40,"TaskData":"[{\"Action\":\"[?Tema Seçin:Açık|Koyu:Açık|Koyu]\",\"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 = N'\\\"+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}\\u000
View AdvancedDelivery_YS_tr.txt
{"AccountScreens":null,"AccountTransactionDocumentTypes":null,"AccountTransactionTypes":null,"AccountTypes":null,"Accounts":null,"Actions":null,"AutoConfigurationTasks":[{"CreateBackup":true,"Description":"SambaPOS'a Peket Servisi Özelliklerini aktif eder. Paket Servisi ile birlikte, Yemek Sepeti Entegrasyonu kullanıyorsanız gerekli olan ekranları ve ayarları da beraberinde yapar.\u000d\u000aGörevi çalıştırdıktan sonra, Yönetim > Varlıklar > Varlıklar menüsünden Paketçi varlıklarınızı oluşturmalısınız.","Language":"tr","Name":"Paket Servis (Yemek Sepeti ile Birlikte)","SortOrder":0,"TaskData":"[{\"Action\":\"var ds = sql.Exists(\\\"SELECT Id from EntityScreens where Name = 'Paket Servis'\\\");\\u000d\\u000avar et = sql.Exists(\\\"SELECT Id from EntityTypes where Name = 'Paketçiler'\\\");\\u000d\\u000avar tt = sql.Exists(\\\"SELECT Id from TicketTypes where Name = 'Paket Servis'\\\");\\u000d\\u000avar cr = sql.Exists(\\\"SELECT Id from CustomReports where Name = 'Metrics'\\\");\\u000d\\u000avar sc = sql.Exists
@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(!
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
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
You can’t perform that action at this time.