1. Files and folders

1.1. Get

1.1.1. Can be found in RK7 distributive folder \BIN\RDS\.

1.1.2. The following files are being used (take from distributive \BIN\WIN\ them): dllman.dll, errors32.dll, Netkern.dll, TCPSOC.dll, Thread32.dll, RDSSERV.exe, rds.ini.

1.1.3. In working folder will be created: database (RDSDB.udb), log (RDS.stk), 'Backup' folder.

1.2. Set

1.2.1. Setting RDS server RDS.ini file Parameters:

Server = (RDSServer)                //network ID of RDS server. Set the same as in RK7 interface driver
BasePath = (path + .exe)           //path to RDSSERV.exe, may not be set (deprecated)
StartLang = (.\rds.rus')               //translation file of server
RECREATEBASE = (0)             //if 1 – recreates working base after start, if -1 – does not recreate, even if the version was changed
TransactionLag = (3600000)     //time in msec, which is allowed after discount is not active any more (if discount was already registered in order, but check was not printed)
Port=15151 Set like PDS server.

2. How real system works

1) System works with disposable discounts by barcode. Purpose of such action is to attract bar clients to the shop (in case there is a network of bars and shops).  
2) Discount for every check is automatically applied, size of discount depends on sum of the check (displays like printed barcode on check).
3) Discount affects the whole check (discount is of percent type).
4) This discount can be applied in any of shops (from the whole network), but only once. Barcode scanner is used.
5) Discount is active only in definite period of time (from moment of check printing) – 24 hours.
6) Text (which was defined previously) is printed with barcode on receipt. Also discount name (which will be available in the shop) is printed.

Scheme of RDS server working
1) After order is paid and printed receipt with barcode, new record about possible discount is added to RDS DB.
2) Reference to discount information in RDS DB is printed on receipt as barcode.
3) After barcode was read on cash station, discount is blocked in DB (marked as used).
4) After order with given discount is paid and printed, transaction of this discount is made.
5) Only after this discount is considered as “used”.

3. Settings on manager station

3.1) Service – Stations and devices – “Interfaces” of midserver – add RDS interface (additional settings of interface please see below).

3.2) Add percent discount (can be 100%), which will be applied after barcode was read.

3.3) In Service – Interfaces create logical interface RDS and in property with midserver name choose RDS (Receipt Discount Server) Interface.

3.4) Create MCR Algorithm with type “Mask” or “Prefix”.
Mask example: 9876iiiiiiii? (for barcode prefix 9876)
Device type: “Barcode”.
Scope: interface, which was created in p.3

3.5) Set layout for receipt. Add field, where you should enter escape-command
3.5.1. <barcode XXXX00000000> (versions before, where XXXX – prefix, for example, 9876 ; Length of barcode should be 12, on right side there should be zeros.
3.5.2. <barcode [PrintChecks.StrTag]>  (versions later than ; StrTag contains prefix and record number : Prefix (RDS) + ID (RDS) = PrintChecks.StrTag (RK7)
Note: you can also use another maket (without such a barcode) in case you don’t need to give discount after some order.
3.6) In settings of printer driver define barcode type = EAN-13.
3.7) On cash server run preload .\rkeeper.ini, after that copy file intrds.dll from folder PRELOAD and place in the same folder with midserv.exe (in case it's not yet there).
3.8. Interface additional parameters
3.8.1. RDS Server Name (RDSServer) – network name of RDS server. This one set in RDS.ini
3.8.2. Discount Code (0) – code of discount.
3.8.3. Percent For Discount (0) – percent of check sum. It defines sum, which limits future discount.
3.8.4. Active Time (hours) (24) – time interval (in hours), during that future discount can be used.
3.8.5. Call Timeout (ms) (60000) – timeout for network operation of addressing to RDS server (in msec)
3.8.5. Bar Code Prefix (9876) – prefix of barcode for discount. The same as in printing maket and in MCR Algorithm "prefix".