Nová stránka
Komunikácia s programom tretej strany
Ak zariadenie - platobný terminál slúži pre komunikáciu s cudzím systémom, je vhodné použiť formát JSON s tu uvedenou štruktúrou. Je možné požiadať o vytvorenie alternatívnych formátov a ich zloženie.
Princíp komunikácie
Terminál ak je len v režime POI, potom sa gePOS.apk nastaví na mock pre eKasa a doklady budú uložené v zariadení na zvolenú dobu. Ak je terminál zároveň aj eKasa, potom okrem uloženia v lokále budú dáta predaja exportované aj do gecommerce.solutions (sklady).
- Na FTP sa uloží JSON (lokálny server, či WampServer alebo XAMPP)
- gePOS -> Predaj -> Predaj -> Katalóg(podržanie) : dôjde k importu
- ďalej stlačiť Platiť -> Platba kartou : volá sa POI-Besteron a prípadne POS-FiscalCore
- alebo stlačiť platiť -> Platba : ak je zariadenie zároveň eKasa
Príklad JSON
Táto štruktúra (prvý vzor je pradaj, druhý vzor je vrátenie) je momentálne zapracovaná - toto je praktický príklad:
{
"head": {
"date": "20241118",
"id": 4,
"note": "myEcr receiptExport",
"sum": 8.38,
"user": "1 admin"
},
"footer": {
"note": "Thanks for visit"
},
"items": [
{
"code": "00020",
"costpricebase": 0.500,
"costpricefull": 0.615,
"costpricetax": 0.115,
"customerpricebase": 0.976,
"customerpricefull": 1.200,
"customerpricetax": 0.224,
"hour": "14.20",
"name": "Komodita test 23%",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 1,
"qty": 2,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "",
"selected": true,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": 1.951,
"sumcustomerpricefull": 2.400,
"sumcustomerpricetax": 0.449,
"vatid": 1,
"vatlevel": 23
},
{
"code": "00010",
"costpricebase": 0.500,
"costpricefull": 0.595,
"costpricetax": 0.095,
"customerpricebase": 0.924,
"customerpricefull": 1.100,
"customerpricetax": 0.176,
"hour": "14.20",
"name": "Komodita test 19%",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 2,
"qty": 2,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "",
"selected": true,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": 1.849,
"sumcustomerpricefull": 2.200,
"sumcustomerpricetax": 0.351,
"vatid": 2,
"vatlevel": 19
},
{
"code": "00099",
"costpricebase": 0.150,
"costpricefull": 0.150,
"costpricetax": 0,
"customerpricebase": 0.150,
"customerpricefull": 0.150,
"customerpricetax": 0,
"hour": "14.20",
"name": "Komodita test 0% VratObal",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 3,
"qty": 2,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "",
"selected": false,
"sktype": "",
"sktypezerovat": "VO",
"stock": 1,
"sumcustomerpricebase": 0.300,
"sumcustomerpricefull": 0.300,
"sumcustomerpricetax": 0,
"vatid": 3,
"vatlevel": 0
},
{
"code": "muka",
"costpricebase": 0.500,
"costpricefull": 0.525,
"costpricetax": 0.025,
"customerpricebase": 1,
"customerpricefull": 1.050,
"customerpricetax": 0.050,
"hour": "14.20",
"name": "Múka 1kg 5%",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 7,
"qty": 2,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "",
"selected": true,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": 2,
"sumcustomerpricefull": 2.100,
"sumcustomerpricetax": 0.100,
"vatid": 4,
"vatlevel": 5
},
{
"code": "10",
"costpricebase": 1.500,
"costpricefull": 1.845,
"costpricetax": 0.345,
"customerpricebase": 2.276,
"customerpricefull": 2.800,
"customerpricetax": 0.524,
"hour": "13.14",
"name": "Plzen 12° .5",
"note": "èochtan",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 5,
"qty": 1,
"receiptdivisor": 2,
"receiptplu": 1,
"referenceid": "",
"selected": false,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": 2.276,
"sumcustomerpricefull": 2.800,
"sumcustomerpricetax": 0.524,
"vatid": 1,
"vatlevel": 23
},
{
"code": "010",
"costpricebase": 0.909,
"costpricefull": 1.118,
"costpricetax": 0.209,
"customerpricebase": 1.626,
"customerpricefull": 2,
"customerpricetax": 0.374,
"hour": "13.14",
"name": "Plzen 12° .3",
"note": "po èiarku",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 5,
"qty": 1,
"receiptdivisor": 3.3,
"receiptplu": 2,
"referenceid": "",
"selected": false,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": 1.626,
"sumcustomerpricefull": 2,
"sumcustomerpricetax": 0.374,
"vatid": 1,
"vatlevel": 23
},
{
"code": "00099",
"costpricebase": 0.150,
"costpricefull": 0.150,
"costpricetax": 0,
"customerpricebase": 0.150,
"customerpricefull": 0.150,
"customerpricetax": 0,
"hour": "13.14",
"name": "Komodita test 0% VratObal",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 3,
"qty": 1,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "",
"selected": false,
"sktype": "",
"sktypezerovat": "VO",
"stock": 1,
"sumcustomerpricebase": 0.150,
"sumcustomerpricefull": 0.150,
"sumcustomerpricetax": 0,
"vatid": 3,
"vatlevel": 0
},
{
"code": "00099",
"costpricebase": 0.150,
"costpricefull": 0.150,
"costpricetax": 0,
"customerpricebase": 0.150,
"customerpricefull": 0.150,
"customerpricetax": 0,
"hour": "13.15",
"name": "Komodita test 0% VratObal",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 3,
"qty": -2,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "",
"selected": false,
"sktype": "",
"sktypezerovat": "VO",
"stock": 1,
"sumcustomerpricebase": -0.300,
"sumcustomerpricefull": -0.300,
"sumcustomerpricetax": 0,
"vatid": 3,
"vatlevel": 0
},
{
"code": "9993",
"costpricebase": 3,
"costpricefull": 3,
"costpricetax": 0,
"customerpricebase": 3,
"customerpricefull": 3,
"customerpricetax": 0,
"hour": "13.15",
"name": "Voucher 3eur",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 4,
"qty": -1,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "",
"selected": false,
"sktype": "VP",
"sktypezerovat": "N",
"stock": 1,
"sumcustomerpricebase": -3,
"sumcustomerpricefull": -3,
"sumcustomerpricetax": 0,
"vatid": 3,
"vatlevel": 0
},
{
"code": "sal",
"costpricebase": 0.100,
"costpricefull": 0.119,
"costpricetax": 0.019,
"customerpricebase": 1,
"customerpricefull": 1.190,
"customerpricetax": 0.190,
"hour": "13.15",
"name": "Salama",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 8,
"qty": -0.2300,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "O-1234TEST",
"selected": false,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": -0.227,
"sumcustomerpricefull": -0.270,
"sumcustomerpricetax": -0.043,
"vatid": 2,
"vatlevel": 19
}
]
}
vrátenie:
{
"head": {
"date": "20241223",
"id": 3,
"note": "-test",
"sum": -3.30,
"user": "1 (hos)"
},
"footer": {
"note": "Thanks for visit"
},
"items": [
{
"code": "p20",
"costpricebase": 0.100,
"costpricefull": 0.120,
"costpricetax": 0.020,
"customerpricebase": 1,
"customerpricefull": 1.200,
"customerpricetax": 0.200,
"hour": "17.47",
"name": "Product 20%",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 10,
"qty": -1,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "O-3004E4A90359408084E4A90359E080E2",
"selected": false,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": -1,
"sumcustomerpricefull": -1.200,
"sumcustomerpricetax": -0.200,
"vatid": 1,
"vatlevel": 20
},
{
"code": "p10",
"costpricebase": 0.100,
"costpricefull": 0.110,
"costpricetax": 0.010,
"customerpricebase": 1,
"customerpricefull": 1.100,
"customerpricetax": 0.100,
"hour": "17.47",
"name": "Product 10%",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 11,
"qty": -1,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "O-3004E4A90359408084E4A90359E080E2",
"selected": false,
"sktype": "",
"sktypezerovat": "",
"stock": 1,
"sumcustomerpricebase": -1,
"sumcustomerpricefull": -1.100,
"sumcustomerpricetax": -0.100,
"vatid": 2,
"vatlevel": 10
},
{
"code": "00",
"costpricebase": 0.100,
"costpricefull": 0.100,
"costpricetax": 0,
"customerpricebase": 1,
"customerpricefull": 1,
"customerpricetax": 0,
"hour": "17.47",
"name": "Komodita test 0%",
"note": "",
"orderprinterid1": 0,
"orderprinterid2": 0,
"plu": 9,
"qty": -1,
"receiptdivisor": 0,
"receiptplu": 0,
"referenceid": "O-3004E4A90359408084E4A90359E080E2",
"selected": false,
"sktype": "",
"sktypezerovat": "N",
"stock": 1,
"sumcustomerpricebase": -1,
"sumcustomerpricefull": -1,
"sumcustomerpricetax": 0,
"vatid": 3,
"vatlevel": 0
}
]
}