From 41d6c0c5fc3efb69bdf6034feefc25526e59c8b2 Mon Sep 17 00:00:00 2001 From: Marius Mutu Date: Tue, 15 Sep 2026 23:14:10 +0300 Subject: [PATCH] sync SVN r18108 --- Clase/ofundal_facturare.vc2 | 38 +++++--- Programe/roafacturare.prg | 2 + Utile/Teste/test_catalog_articole_s1.prg | 110 +++++++++++++++++++++++ changelog_roafacturare.txt | 15 ++++ versiune_db.txt | 2 +- 5 files changed, 155 insertions(+), 12 deletions(-) create mode 100644 Utile/Teste/test_catalog_articole_s1.prg diff --git a/Clase/ofundal_facturare.vc2 b/Clase/ofundal_facturare.vc2 index 520864b..7e71294 100644 --- a/Clase/ofundal_facturare.vc2 +++ b/Clase/ofundal_facturare.vc2 @@ -20,6 +20,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" *< OBJECTDATA: ObjPath="Page1.Cw7" UniqueID="" Timestamp="" /> *< OBJECTDATA: ObjPath="Page1.Cw9" UniqueID="" Timestamp="" /> *< OBJECTDATA: ObjPath="Page1.Cw10" UniqueID="" Timestamp="" /> + *< OBJECTDATA: ObjPath="Page1.Cw11" UniqueID="" Timestamp="" /> *< OBJECTDATA: ObjPath="Page1.Pict_liniuta1" UniqueID="" Timestamp="" /> *< OBJECTDATA: ObjPath="Page2.Pict_meniu1" UniqueID="" Timestamp="" /> *< OBJECTDATA: ObjPath="Page2.Cw1" UniqueID="" Timestamp="" /> @@ -119,18 +120,29 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" Name = "Cw10", ; nid_cw = 10, ; TabIndex = 8, ; - Top = 255, ; + Top = 277, ; Label_item1.Caption = "Opțiuni locale", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + ADD OBJECT 'Page1.Cw11' AS cw WITH ; + Left = 5, ; + Name = "Cw11", ; + nid_cw = 11, ; + ntip = 2, ; + TabIndex = 1, ; + Top = 40, ; + Label_item1.Caption = "Catalog articole", ; + Label_item1.Name = "Label_item1" + *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> + ADD OBJECT 'Page1.Cw2' AS cw WITH ; Left = 5, ; Name = "Cw2", ; nid_cw = 2, ; ntip = 2, ; TabIndex = 2, ; - Top = 40, ; + Top = 62, ; Label_item1.Caption = "Agenți", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -141,7 +153,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" nid_cw = 3, ; ntip = 2, ; TabIndex = 3, ; - Top = 62, ; + Top = 84, ; Label_item1.Caption = "Delegați", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -152,7 +164,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" nid_cw = 4, ; ntip = 2, ; TabIndex = 4, ; - Top = 84, ; + Top = 106, ; Label_item1.Caption = "Mașini", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -162,7 +174,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" Name = "Cw5", ; nid_cw = 5, ; TabIndex = 5, ; - Top = 147, ; + Top = 169, ; Label_item1.Caption = "Model factură / aviz", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -172,7 +184,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" Name = "Cw6", ; nid_cw = 6, ; TabIndex = 6, ; - Top = 169, ; + Top = 191, ; Label_item1.Caption = "Serii numere", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -183,7 +195,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" nid_cw = 7, ; ntip = 2, ; TabIndex = 7, ; - Top = 191, ; + Top = 213, ; Label_item1.Caption = "Curs valutar", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -193,7 +205,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" Name = "Cw8", ; nid_cw = 8, ; TabIndex = 8, ; - Top = 233, ; + Top = 255, ; Label_item1.Caption = "Opțiuni server", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -204,7 +216,7 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" nid_cw = 9, ; ntip = 2, ; TabIndex = 4, ; - Top = 106, ; + Top = 128, ; Label_item1.Caption = "Rute", ; Label_item1.Name = "Label_item1" *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="container" /> @@ -213,14 +225,14 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" Left = 6, ; Name = "Pict_liniuta1", ; Picture = ..\comun\grafice\f3.jpg, ; - Top = 219 + Top = 241 *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="image" /> ADD OBJECT 'Page1.Pict_liniuta2' AS pict_liniuta WITH ; Left = 6, ; Name = "Pict_liniuta2", ; Picture = ..\comun\grafice\f3.jpg, ; - Top = 134 + Top = 156 *< END OBJECT: ClassLib="..\comun\clase\ofundal.vcx" BaseClass="image" /> ADD OBJECT 'Page1.Pict_meniu1' AS pict_meniu WITH ; @@ -889,6 +901,10 @@ DEFINE CLASS pg_meniu_princ AS pg_meniu OF "..\comun\clase\ofundal.vcx" Do vizualizare_optiuni_facturare In oproceduri_facturare.prg With 2 ENDPROC + PROCEDURE Page1.Cw11.do_actiune + Do viz_catalog_articole In oproceduri_articole.prg + ENDPROC + PROCEDURE Page1.Cw2.do_actiune Do vizualizare_agenti In onomenclatoare.prg ENDPROC diff --git a/Programe/roafacturare.prg b/Programe/roafacturare.prg index 241e30b..412618f 100644 --- a/Programe/roafacturare.prg +++ b/Programe/roafacturare.prg @@ -147,6 +147,7 @@ Set Procedure To quitapp Additive Set Procedure To init_program Additive Set Procedure To onomenclatoare.prg Additive Set Procedure To onomenclatoare2.prg Additive +Set Procedure To oproceduri_articole.prg Additive SET PROCEDURE TO oproceduri_rapoarte_fact.prg ADDITIVE SET PROCEDURE TO email.prg ADDITIVE @@ -154,6 +155,7 @@ SET PROCEDURE TO email.prg ADDITIVE Set Classlib To DECABAZA Additive Set Classlib To onomenclatoare Additive Set Classlib To onomenclatoare2 Additive +Set Classlib To onom_articole Additive Set Classlib To ofacturare Additive Set Classlib To ofacturare_rapoarte Additive Set Classlib To orapoarte Additive diff --git a/Utile/Teste/test_catalog_articole_s1.prg b/Utile/Teste/test_catalog_articole_s1.prg new file mode 100644 index 0000000..bea9e96 --- /dev/null +++ b/Utile/Teste/test_catalog_articole_s1.prg @@ -0,0 +1,110 @@ +* test_catalog_articole_s1.prg +*!* 15.09.2026 +*!* marius.mutu +*!* Proba headless S1: verifica inregistrarea oproceduri_articole.prg si onom_articole +*!* in Programe\roafacturare.prg si instantiaza frm_catalog_articole fara eroare VFP. +*!* Rulare: vfp9.exe -A -T "\test_catalog_articole_s1.prg" +*!* Log: test_catalog_articole_s1.log, langa script. + +LPARAMETERS tcHost, tcSchema, tcPassword + +SET SAFETY OFF +SET TALK OFF +SET TABLEPROMPT OFF +SET ESCAPE OFF +SET CONSOLE OFF +SET NOTIFY OFF +SET EXCLUSIVE OFF +CLOSE DATABASES + +PUBLIC glLogFile +LOCAL lcDir, lcApp, lcHarness, lcPrg, lcProc, llProc, llCls, llConn, llForm, loForm + +lcDir = ADDBS(JUSTPATH(SYS(16,0))) +IF EMPTY(lcDir) + lcDir = 'D:\ROA\ROAFACTURARE\Utile\Teste\' +ENDIF +lcApp = 'D:\ROA\ROAFACTURARE\' +glLogFile = lcDir + 'test_catalog_articole_s1.log' + +STRTOFILE('', glLogFile, .F.) +s1log('== test_catalog_articole_s1 ==') +s1log('SAFETY=' + SET('SAFETY') + ' RESOURCE=' + SET('RESOURCE') + ' TABLEPROMPT=' + SET('TABLEPROMPT')) + +IF EMPTY(tcHost) + tcHost = 'CENTRAL' +ENDIF +IF EMPTY(tcSchema) + tcSchema = 'MARIUSM_AUTO' +ENDIF +IF EMPTY(tcPassword) + tcPassword = 'ROMFASTSOFT' +ENDIF + +ON ERROR DO s1err WITH ERROR(), MESSAGE(), PROGRAM(), LINENO() + +* 1) liniile de inregistrare exista in roafacturare.prg +lcPrg = FILETOSTR(lcApp + 'Programe\roafacturare.prg') +llProc = ('Set Procedure To oproceduri_articole.prg Additive' $ lcPrg) +llCls = ('Set Classlib To onom_articole Additive' $ lcPrg) +s1check('roafacturare.prg contine Set Procedure To oproceduri_articole.prg Additive', llProc) +s1check('roafacturare.prg contine Set Classlib To onom_articole Additive', llCls) + +* 2) mediu ROAFACTURARE + conexiune Oracle dev +lcHarness = lcApp + 'COMUN\utile\Teste\test_init_env_auto_roafacturare.prg' +DO (lcHarness) WITH tcHost, tcSchema, tcPassword +llConn = (gnHandle > 0) +s1check('conexiune Oracle ' + tcHost + '/' + tcSchema, llConn) + +* 3) inregistrarea efectiva, exact ca in roafacturare.prg +SET PROCEDURE TO oproceduri_articole.prg ADDITIVE +SET CLASSLIB TO onom_articole ADDITIVE +lcProc = FILETOSTR(lcApp + 'COMUN\programe\oproceduri_articole.prg') +s1check('oproceduri_articole.prg defineste PROCEDURE viz_catalog_articole', ('PROCEDURE viz_catalog_articole' $ lcProc)) + +* 4) clasa frm_catalog_articole se instantiaza +loForm = .NULL. +llForm = .F. +TRY + loForm = CREATEOBJECT('frm_catalog_articole') + llForm = (TYPE('loForm') = 'O' AND !ISNULL(loForm)) +CATCH TO loEroare + s1log('[ERR] CREATEOBJECT(frm_catalog_articole): ' + TRANSFORM(loEroare.Message) + ' linia ' + TRANSFORM(loEroare.LineNo)) +ENDTRY +s1check('CREATEOBJECT(frm_catalog_articole)', llForm) +IF llForm + TRY + s1log(' ColumnCount grila = ' + TRANSFORM(loForm.Ct_grid_search1._Grid1.ColumnCount) + ' (0 headless nu e esec)') + CATCH TO loEroare + s1log(' ColumnCount indisponibil: ' + TRANSFORM(loEroare.Message)) + ENDTRY + loForm.Release() + loForm = .NULL. +ENDIF + +* 5) verdict +IF llProc AND llCls AND llConn AND llForm + s1log('REZULTAT: PASS') +ELSE + s1log('REZULTAT: FAIL') +ENDIF + +CLOSE DATABASES +SET PROCEDURE TO +SET CLASSLIB TO +QUIT + +PROCEDURE s1log + LPARAMETERS tcText + STRTOFILE(TRANSFORM(tcText) + CHR(13) + CHR(10), glLogFile, .T.) +ENDPROC + +PROCEDURE s1check + LPARAMETERS tcDescriere, tlOk + s1log(IIF(tlOk, '[PASS] ', '[FAIL] ') + tcDescriere) +ENDPROC + +PROCEDURE s1err + LPARAMETERS tnEroare, tcMesaj, tcProgram, tnLinia + s1log('[ERR] ' + TRANSFORM(tnEroare) + ' ' + TRANSFORM(tcMesaj) + ' in ' + TRANSFORM(tcProgram) + ' linia ' + TRANSFORM(tnLinia)) +ENDPROC diff --git a/changelog_roafacturare.txt b/changelog_roafacturare.txt index fa11589..e9d7af9 100644 --- a/changelog_roafacturare.txt +++ b/changelog_roafacturare.txt @@ -1,4 +1,19 @@ + +