Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)

Include si sistemul de depanare/testare headless din Teste\ (harness UI cu capturi, verificare de sintaxa prin compilare, wrappere text<->binar) si docs\depanare_testare_flora2roa.md.
This commit is contained in:
2026-08-02 08:56:52 +03:00
commit 2736cbd525
49 changed files with 16011 additions and 0 deletions

240
app.prg Normal file
View File

@@ -0,0 +1,240 @@
*!* app.prg
*!* MyApp *!*
#INCLUDE COMUN.H
#DEFINE CRLF CHR(13) + CHR(10)
*** ==================== MyApp ============================ ***
Define Class MyApp As cApp
Enddefine && MyApp
Define Class Settings As cSettings
cIniText = ;
"[general]" + CRLF + ;
"host = ROA" + CRLF + ;
"user = XENOTI" + CRLF + ;
"password = +vIcfGb3NCfLCZXaqOM19Q==" + CRLF + ;
"cale_import_fidelioD:\PROIECTE\FLORA\FLORA2ROA\EXEMPLE\hotel\" + CRLF + ;
"cale_import_biz=D:\PROIECTE\FLORA\FLORA2ROA\EXEMPLE\restaurant\" + CRLF + ;
"cale_import=D:\PROIECTE\FLORA\FLORA2ROA\EXEMPLE\import\" + CRLF + ;
"last_data1 =" + CRLF + ;
"last_data2 =" + CRLF + ;
"tva_incasare = 0" + CRLF + ;
"id_part_casa_restaurant = 232" + CRLF + ;
"id_part_card_restaurant = 230" + CRLF + ;
"id_part_tichete_restaurant = 230" + CRLF + ;
"id_part_casa_hotel = 232" + CRLF + ;
"id_part_card_hotel = 230" + CRLF + ;
"id_part_tichete_hotel = 231" + CRLF + ;
"id_part_virament_hotel = 226" + CRLF + ;
"id_part_viramentint_hotel = " + CRLF + ;
"id_part_clienti_hotel = 233" + CRLF + ;
"id_part_clienti_restaurant = 234" + CRLF + ;
"cont_casa_restaurant = 5311" + CRLF + ;
"acont_casa_restaurant = " + CRLF + ;
"cont_card_restaurant = 5125" + CRLF + ;
"acont_card_restaurant = 01" + CRLF + ;
"cont_tichete_restaurant = 472" + CRLF + ;
"acont_tichete_restaurant = 03" + CRLF + ;
"cont_casa_hotel = 5311" + CRLF + ;
"acont_casa_hotel = " + CRLF + ;
"cont_card_hotel = 5125" + CRLF + ;
"acont_card_hotel = 01" + CRLF + ;
"cont_tichete_hotel = 5125" + CRLF + ;
"acont_tichete_hotel = 01" + CRLF + ;
"cont_virament_hotel = 5121" + CRLF + ;
"acont_virament_hotel = " + CRLF + ;
"cont_viramentint_hotel = 581" + CRLF + ;
"acont_viramentint_hotel = " + CRLF + ;
"cont_clienti_restaurant = 418" + CRLF + ;
"acont_clienti_restaurant = 02" + CRLF + ;
"cont_clienti_hotel = 418" + CRLF + ;
"acont_clienti_hotel = 01" + CRLF + ;
"cont_factura_casa_hotel = 4111" + CRLF + ;
"cont_factura_card_hotel = 4111" + CRLF + ;
"cont_factura_tichete_hotel = 4111" + CRLF + ;
"cont_factura_viramentint_hotel = 4111" + CRLF + ;
"acont_factura_casa_hotel = 01" + CRLF + ;
"acont_factura_card_hotel = 02" + CRLF + ;
"acont_factura_tichete_hotel = 0Y" + CRLF + ;
"acont_factura_viramentint_hotel = 01" + CRLF + ;
"acont_marfa_bar = 01" + CRLF + ;
"acont_marfa_bucatarie = 08" + CRLF + ;
"acont_ach_4428 = TP" + CRLF + ;
"acont_ach_4426 = " + CRLF + ;
"acont_vz_4428 = TI" + CRLF + ;
"acont_vz_4427 = " + CRLF + ;
"acont_mf_4428 = M" + CRLF + ;
"[connection]" + CRLF + ;
"connection_timeout=60" + CRLF + ;
"response_timeout=60" + CRLF + ;
"[other]" + CRLF + ;
"write_log=0"
host = ''
user = ''
password = ''
password_crypt = ''
cContCasaRestaurant = '5311'
cAcontCasaRestaurant = ''
cContCardRestaurant = '5125'
cAcontCardRestaurant = '01'
cContTicheteRestaurant = '472'
cAcontTicheteRestaurant = '03'
cContCasaHotel = '5311'
cAcontCasaHotel = ''
cContCardHotel = '5125'
cAcontCardHotel = '01'
cContTicheteHotel = '5125'
cAcontTicheteHotel = '01' && pe extrasul de cont apar ca incasari cu cardul normale
cContViramentHotel = '5121'
cAcontViramentHotel = ''
cContViramentIntHotel = '5121'
cAcontViramentIntHotel = ''
cContClientiRestaurant = '418'
cAcontClientiRestaurant = '02'
cContClientiHotel = '4111'
cAcontClientiHotel = '01'
cContFacturaCasaHotel = '4111'
cContFacturaCardHotel = '4111'
cContFacturaTicheteHotel = '4111'
cContFacturaViramentIntHotel = '418'
cAContFacturaCasaHotel = '01'
cAContFacturaCardHotel = '02'
cAContFacturaTicheteHotel = '02'
cAContFacturaViramentIntHotel = '01'
cAcontMarfaBar = '01' && 371.01
cAcontMarfaBucatarie = '08' && 371.08
cAcontVenituriBar = '0201' && 707.0201
cAcontVenituriBucatarie = '0202' && 707.0202
nIdPartCasaRestaurant = 251 && Id Partener Casa Lei 5311 Restaurant
nIdPartCardRestaurant = 230 && Id Partener Card 5125 Restaurant
nIdPartTicheteRestaurant = 230 && Id Partener Tichete 472 Restaurant
nIdPartClientiRestaurant = 234 && Id Partener 418 vanzare Restaurant
nIdPartCasaHotel = 251 && Id Partener Casa Lei 5311 Hotel
nIdPartCardHotel = 230 && Id Partener Card 5125 Hotel
nIdPartTicheteHotel = 230 && Id Partener Card 5125 Hotel
nIdPartViramentHotel = 230 && Id Partener Card 5125 Hotel
nIdPartViramentIntHotel = 230 && Id Partener Card 5125 Hotel
nIdPartClientiHotel = 233 && Id Partener 418 vanzare Hotel
connect_timeout = 60 && ftpget default 60 secunde
response_timeout = 60
nTVAIncasare = 0 && sistem TVA Incasare pentru facturi achizitie 4426/4428
cAcontAch4428 = ''
cAcontAch4426 = ''
cAcontVz4428 = ''
cAcontVz4427 = ''
cAcontMf4428 = ''
cale_import_fidelio = ''
cale_import_biz = ''
cale_import = ''
last_data1 = {}
last_data2 = {}
lWriteLog = .F.
Procedure ReadSettings
DoDefault()
lcInifile = This.cIniFile
Dimension aFiles[4]
This.host = Alltrim(This.ReadVariable("general","host"))
This.user = This.ReadVariable("general","user")
This.password_crypt = This.ReadVariable("general","password")
This.password = This.DecryptPassword(This.password_crypt)
lcIdPart = Alltrim(This.ReadVariable("general","id_part_casa_restaurant"))
This.nIdPartCasaRestaurant = IIF(!EMPTY(m.lcIdPart), INT(VAL(m.lcIdPart)), 0)
lcIdPart = Alltrim(This.ReadVariable("general","id_part_card_restaurant"))
This.nIdPartCardRestaurant = IIF(!EMPTY(m.lcIdPart), INT(VAL(m.lcIdPart)), 0)
lcIdPart = Alltrim(This.ReadVariable("general","id_part_tichete_restaurant"))
This.nIdPartTicheteRestaurant = IIF(!EMPTY(m.lcIdPart), INT(VAL(m.lcIdPart)), 0)
lcIdPart = Alltrim(This.ReadVariable("general","id_part_clienti_restaurant"))
This.nIdPartClientiRestaurant = IIF(!EMPTY(m.lcIdPart), INT(VAL(m.lcIdPart)), 0)
lcTVAIncasare = Alltrim(This.ReadVariable("general","tva_incasare"))
This.nTVAIncasare = IIF(!EMPTY(m.lcTVAIncasare), INT(VAL(m.lcTVAIncasare)), 0)
This.cContCasaRestaurant = Alltrim(NVL(This.ReadVariable("general","cont_casa_restaurant"),''))
This.cAcontCasaRestaurant = Alltrim(NVL(This.ReadVariable("general","acont_casa_restaurant"),''))
This.cContCardRestaurant = Alltrim(NVL(This.ReadVariable("general","cont_card_restaurant"),''))
This.cAcontCardRestaurant = Alltrim(NVL(This.ReadVariable("general","acont_card_restaurant"),''))
This.cContTicheteRestaurant = Alltrim(NVL(This.ReadVariable("general","cont_tichete_restaurant"),''))
This.cAcontTicheteRestaurant = Alltrim(NVL(This.ReadVariable("general","acont_tichete_restaurant"),''))
This.cContCasaHotel = Alltrim(NVL(This.ReadVariable("general","cont_casa_hotel"),''))
This.cAcontCasaHotel = Alltrim(NVL(This.ReadVariable("general","acont_casa_hotel"),''))
This.cContCardHotel = Alltrim(NVL(This.ReadVariable("general","cont_card_hotel"),''))
This.cAcontCardHotel = Alltrim(NVL(This.ReadVariable("general","acont_card_hotel"),''))
This.cContTicheteHotel = Alltrim(NVL(This.ReadVariable("general","cont_tichete_hotel"),''))
This.cAcontTicheteHotel = Alltrim(NVL(This.ReadVariable("general","acont_tichete_hotel"),''))
This.cContViramentHotel = Alltrim(NVL(This.ReadVariable("general","cont_virament_hotel"),''))
This.cAcontViramentHotel = Alltrim(NVL(This.ReadVariable("general","acont_virament_hotel"),''))
This.cContViramentIntHotel = Alltrim(NVL(This.ReadVariable("general","cont_viramentint_hotel"),''))
This.cAcontViramentIntHotel = Alltrim(NVL(This.ReadVariable("general","acont_viramentint_hotel"),''))
This.cContClientiRestaurant = Alltrim(NVL(This.ReadVariable("general","cont_clienti_restaurant"),''))
This.cAcontClientiRestaurant = Alltrim(NVL(This.ReadVariable("general","acont_clienti_restaurant"),''))
This.cContClientiHotel = Alltrim(NVL(This.ReadVariable("general","cont_clienti_hotel"),''))
This.cAcontClientiHotel = Alltrim(NVL(This.ReadVariable("general","acont_clienti_hotel"),''))
This.cAcontMarfaBar = Alltrim(NVL(This.ReadVariable("general","acont_marfa_bar"),''))
This.cAcontMarfaBucatarie = Alltrim(NVL(This.ReadVariable("general","acont_marfa_bucatarie"),''))
This.cAcontVenituriBar = Alltrim(NVL(This.ReadVariable("general","acont_venituri_bar"),''))
This.cAcontVenituriBucatarie = Alltrim(NVL(This.ReadVariable("general","acont_venituri_bucatarie"),''))
This.cAcontAch4428 = Alltrim(NVL(This.ReadVariable("general","acont_ach_4428"),''))
This.cAcontAch4426 = Alltrim(NVL(This.ReadVariable("general","acont_ach_4426"),''))
This.cAcontVz4428 = Alltrim(NVL(This.ReadVariable("general","acont_vz_4428"),''))
This.cAcontVz4427 = Alltrim(NVL(This.ReadVariable("general","acont_vz_4427"),''))
This.cAcontMf4428 = Alltrim(NVL(This.ReadVariable("general","acont_mf_4428"),''))
This.cale_import_fidelio = Alltrim(This.ReadVariable("general","cale_import_fidelio"))
This.cale_import_biz = Alltrim(This.ReadVariable("general","cale_import_biz"))
This.cale_import = Alltrim(This.ReadVariable("general","cale_import"))
This.last_data1 = CTOD(This.ReadVariable("general","last_data1"))
This.last_data2 = CTOD(This.ReadVariable("general","last_data2"))
lcTimeOut = This.ReadVariable("connection","connect_timeout")
If Empty(Nvl(lcTimeOut,''))
This.connect_timeout = 60
Else
This.connect_timeout = Round(Val(lcTimeOut),0)
Endif
lcTimeOut = This.ReadVariable("connection","response_timeout")
If Empty(Nvl(lcTimeOut,''))
This.response_timeout = 60
Else
This.response_timeout = Round(Val(lcTimeOut),0)
ENDIF
lcLog = This.ReadVariable("other","write_log")
This.lWriteLog = (VAL(m.lcLog) = 1)
Endproc && ReadSettings
Enddefine