
DO (LOWER(JUSTPATH(sys(16))) + "\http_ppgm") WITH 'https://alto:1991.Altopraha@canteen-skf-backend.alto-production.mine.nu/'

*HTTP_READ_ONLY_MODE = .T.

SET REPROCESS TO AUTOMATIC
DO clos_data
o_set_point = SET("POINT")
SET POINT TO "."

DO vezmi_data_konzumaci

SET POINT TO (m.o_set_point)
oznam_hotovo()


*  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  
PROCEDURE vezmi_data_konzumaci

USE odbery_skf
INDEX on id_transak TO q4twe
SCAN
* {"client":317,"amount":"-76.00","kind":"KC","transacted_at":"2019-03-14T14:13:55.253752Z","description":"Z:SKJ2,V:1,P:,T:1048"}
    descr = 'Z:' + ALLTRIM(akronym) + ',V:' + ALLTRIM(volba) + ',P:,T:' + ALLTRIM(STR(id_transak))
    req = '{"client":' + ALLTRIM(osobni_c) + ',"amount":"-76.00","kind":"KC","transacted_at":"2019-03-14T13:13:13.' + TRANSFORM(id_transak, "@L 999999") + 'Z","description":"' + descr + '"}'
    json = http_request("kredit/crud/historic_transactions/", "POST", m.req)
ENDSCAN 
