Reguli de lucru agent + testare headless (test_init_env_auto, harness repro CNRCRT, doc depanare); flux editare: aprobare pe patch inainte de write-back
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
298
utile/Teste/test_init_env_auto.prg
Normal file
298
utile/Teste/test_init_env_auto.prg
Normal file
@@ -0,0 +1,298 @@
|
||||
* test_init_env_auto.prg
|
||||
* Varianta NEINTERACTIVA a COMUN\programe\test_init_env.prg, pentru rulare headless
|
||||
* (vfp9.exe -A -T "script.prg") din scripturi de depanare / teste automate.
|
||||
* Nu are INPUTBOX/xmenu: primeste conexiunea ca parametri si NU lanseaza nimic la final.
|
||||
*
|
||||
* Utilizare (dintr-un script apelant, vezi test_repro_cnrcrt_footer.prg):
|
||||
* DO test_init_env_auto WITH 'CENTRAL', 'MARIUSM_AUTO', 'parola'
|
||||
* IF gnHandle <= 0 ... eroare conectare
|
||||
* Mediu de test standard: server CENTRAL, schema MARIUSM_AUTO (parola schemei la MM);
|
||||
* utilizatorul de aplicatie corespunzator: "MARIUS M" / parola "123" (pentru fluxurile
|
||||
* care cer login de aplicatie; harness-ul nu trece prin frm_login).
|
||||
*
|
||||
* Dupa apel sunt disponibile: goConn/goExecutor/goApp/goLog/goApi, goFirma/goCalendar,
|
||||
* gnAn/gnLuna/gcS/gnIdFirma etc., SET PATH/CLASSLIB/PROCEDURE ca in roacont.prg,
|
||||
* pachetele Oracle de sesiune setate (pack_sesiune/pack_contafin).
|
||||
* ATENTIE: mentine lista de SET CLASSLIB/PROCEDURE sincronizata cu test_init_env.prg.
|
||||
|
||||
LPARAMETERS tcHost, tcSchema, tcPassword, tnAn, tnLuna
|
||||
|
||||
tcHost = IIF(EMPTY(tcHost), 'CENTRAL', tcHost)
|
||||
tcSchema = IIF(EMPTY(tcSchema), 'MARIUSM_AUTO', tcSchema)
|
||||
tcPassword = IIF(EMPTY(tcPassword), 'ROMFASTSOFT', tcPassword)
|
||||
|
||||
SET DELETED ON
|
||||
SET ANSI ON
|
||||
SET EXACT ON
|
||||
SET SAFETY OFF
|
||||
CLOSE DATABASES
|
||||
SET CENTURY ON
|
||||
SET DATE DMY
|
||||
SET NULLDISPLAY TO ''
|
||||
|
||||
PUBLIC CT_SUCCES, CT_INSUCCES, crlf, gnAn, gnLuna, gnIdUtil, glEMama, gnIdFirma, gcCondSucursala, ;
|
||||
gnIdSucursala, gcS, gcFirma, gcUserName, gcNumeProgram, gcAppName, glLunaInchisa, ;
|
||||
buton, gnButon, pnButon, gl406, gcAcces
|
||||
CT_SUCCES = 1
|
||||
CT_INSUCCES = -1
|
||||
crlf = CHR(13) + CHR(10)
|
||||
gnAn = IIF(EMPTY(tnAn), YEAR(DATE()), tnAn)
|
||||
gnLuna = IIF(EMPTY(tnLuna), MONTH(DATE()), tnLuna)
|
||||
gnIdUtil = -3
|
||||
gnIdFirma = 110
|
||||
gcCondSucursala = []
|
||||
gnIdSucursala = m.gnIdFirma
|
||||
gcS = UPPER(ALLTRIM(tcSchema))
|
||||
gcFirma = m.gcS
|
||||
gcUserName = m.gcS
|
||||
gcNumeProgram = [ROACONT]
|
||||
gcAppName = [ROACONT]
|
||||
glLunaInchisa = .F.
|
||||
glEMama = .F.
|
||||
gl406 = .F.
|
||||
* PUBLIC, nu Declare: acest program se termina cu RETURN, iar nrcrt() (oproceduri_comune.prg)
|
||||
* citeste NROR din ControlSource-uri de grid mult dupa aceea (in roacont.prg, Declare traieste
|
||||
* cat programul principal; aici ar muri la RETURN si gridurile si-ar pierde coloanele)
|
||||
PUBLIC nror(65000)
|
||||
buton = 1
|
||||
gnButon = 1
|
||||
pnButon = 1
|
||||
|
||||
LOCAL lcPath
|
||||
PUBLIC gcAppPath, DIRGEN, gcBasePath, gcTempPath, gcGeneralIniFile, gcSettingsFile
|
||||
gcAppPath = [D:\ROA\ROACONT\]
|
||||
Set Default To (gcAppPath)
|
||||
lcPath = gcAppPath + 'Date;' + ;
|
||||
gcAppPath + 'Include;' + ;
|
||||
gcAppPath + 'FERESTRE;' + ;
|
||||
gcAppPath + 'GRAFICE;' + ;
|
||||
gcAppPath + 'CLASE;' + ;
|
||||
gcAppPath + 'MENIURI;' + ;
|
||||
gcAppPath + 'PROGRAME;' + ;
|
||||
gcAppPath + 'RAPOARTE;' + ;
|
||||
gcAppPath + 'COMUN\CLASE;' + ;
|
||||
gcAppPath + 'COMUN\FERESTRE;' + ;
|
||||
gcAppPath + 'COMUN\PROGRAME;' + ;
|
||||
gcAppPath + 'COMUN\GRAFICE;' + ;
|
||||
gcAppPath + 'COMUN\RAPOARTE;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\CALENDAR;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\CTL32;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\HPDF;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\HPDF\REPORTOUTPUT;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\WEB;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\NFJSON;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\NFXML;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\EXCEL;' + ;
|
||||
gcAppPath + 'COMUN\UTILE\GRIDEXTRAS;' + ;
|
||||
Addbs(Substr(gcAppPath,1,Rat([\],gcAppPath,2)))+[COMUNROA\]
|
||||
SET PATH TO &lcPath ADDITIVE
|
||||
|
||||
Set Classlib To clase\cont2000 Additive
|
||||
Set Classlib To appwiz Additive
|
||||
Set Classlib To CAUT Additive
|
||||
Set Classlib To BAZA Additive
|
||||
Set Classlib To contab Additive
|
||||
Set Classlib To comun Additive
|
||||
Set Classlib To registry Additive
|
||||
Set Classlib To cauta_alfa_forms.vcx Additive
|
||||
Set Classlib To obalanta Additive
|
||||
Set Classlib To ocriterii.vcx Additive
|
||||
Set Classlib To ctl32_statusbar.vcx Additive
|
||||
Set Classlib To ctl32_common.vcx Additive
|
||||
Set Classlib To ctl32_structs.vcx Additive
|
||||
Set Classlib To ctl32_progressbar.vcx Additive
|
||||
|
||||
Set Procedure To PROCEDURI Additive
|
||||
Set Procedure To pmenu Additive
|
||||
Set Procedure To proceduri_comune Additive
|
||||
Set Procedure To mesaje Additive
|
||||
Set Procedure To acces_meniu Additive
|
||||
Set Procedure To quitapp Additive
|
||||
Set Procedure To init_program Additive
|
||||
Set Procedure To oproceduri_maintenance.PRG Additive
|
||||
Set Procedure To gridproc Additive
|
||||
Set Procedure To proceduri_excel Additive
|
||||
Set Procedure To oserii_numere.PRG Additive
|
||||
Set Procedure To cauta_alfa Additive
|
||||
Set Procedure To oproceduri_parteneri Additive
|
||||
Set Procedure To oproceduri_incasari Additive
|
||||
Set Procedure To wwconfig Additive
|
||||
Set Procedure To oexport Additive
|
||||
SET PROCEDURE TO ocasabanca ADDITIVE
|
||||
SET PROCEDURE TO importfromxlsx ADDITIVE
|
||||
SET PROCEDURE TO appendfromxlsx.prg ADDITIVE
|
||||
SET PROCEDURE TO overificari.prg ADDITIVE
|
||||
SET PROCEDURE TO onomenclatoare.prg ADDITIVE
|
||||
SET PROCEDURE TO excelxml.prg ADDITIVE
|
||||
SET PROCEDURE TO saft_d406.prg ADDITIVE
|
||||
|
||||
Set Classlib To DECABAZA Additive
|
||||
Set Classlib To onomenclatoare Additive
|
||||
Set Classlib To oparteneri Additive
|
||||
Set Classlib To OCASABANCA Additive
|
||||
Set Classlib To OVANZCUMP Additive
|
||||
Set Classlib To oCompensari Additive
|
||||
Set Classlib To oRapoarte_cont Additive
|
||||
Set Classlib To oSit_Op Additive
|
||||
Set Classlib To overificari Additive
|
||||
Set Classlib To oteste Additive
|
||||
Set Classlib To omodificari Additive
|
||||
Set Classlib To ooptiuni Additive
|
||||
Set Classlib To ointroduceri_cont Additive
|
||||
Set Classlib To onote_contabile Additive
|
||||
Set Classlib To odebcred Additive
|
||||
Set Classlib To ferestre_oracle Additive
|
||||
Set Classlib To caut_ora Additive
|
||||
Set Classlib To otoolbar Additive
|
||||
Set Classlib To inchideri_sal Additive
|
||||
Set Classlib To serii_numere Additive
|
||||
Set Classlib To contabilitate_rapoarte Additive
|
||||
Set Classlib To oconversii Additive
|
||||
Set Classlib To oactualizari Additive
|
||||
Set Classlib To anaf_efactura Additive
|
||||
|
||||
Set Classlib To Messagebox Additive
|
||||
SET CLASSLIB TO wwdialogs ADDITIVE
|
||||
SET CLASSLIB TO orapoarte.vcx additive
|
||||
SET CLASSLIB TO orapoarte_contabilitate.vcx additive
|
||||
SET CLASSLIB TO accessibility.vcx ADDITIVE
|
||||
SET CLASSLIB TO _calendar.vcx ADDITIVE
|
||||
SET CLASSLIB TO orapoarte_comun.vcx ADDITIVE
|
||||
SET CLASSLIB TO saft_d406.vcx ADDITIVE
|
||||
|
||||
Set Procedure To GENCURSOR.PRG Additive
|
||||
Set Procedure To OPROCEDURI_COMUNE.PRG Additive
|
||||
Set Procedure To OINIT_OPTIUNI.PRG Additive
|
||||
Set Procedure To updateserver.PRG Additive
|
||||
Set Procedure To oCompensari.PRG Additive
|
||||
Set Procedure To oSituatii_Operative.PRG Additive
|
||||
Set Procedure To oOperatii_comune.PRG Additive
|
||||
Set Procedure To OCONT2003.PRG Additive
|
||||
Set Procedure To OPROCEDURI_aMS.PRG Additive
|
||||
Set Procedure To oparteneri.PRG Additive
|
||||
Set Procedure To orapoarte.PRG Additive
|
||||
Set Procedure To orap_trezorerie Additive
|
||||
Set Procedure To ocautare Additive
|
||||
Set Procedure To omeniu_initializari Additive
|
||||
Set Procedure To osecurity Additive
|
||||
Set Procedure To oheader Additive
|
||||
Set Procedure To orefaceri Additive
|
||||
Set Procedure To oproceduri_casademarcat Additive
|
||||
Set Procedure To controllerecr Additive
|
||||
Set Procedure To oproceduri_comune_imob.PRG Additive
|
||||
Set Procedure To oproceduri_conversie.PRG Additive
|
||||
Set Procedure To odocumente.PRG Additive
|
||||
Set Procedure To oproceduri_actualizari.PRG Additive
|
||||
SET PROCEDURE TO orapoarte_dinamice.prg additive
|
||||
SET PROCEDURE TO update_imob.prg ADDITIVE
|
||||
SET PROCEDURE TO oproceduri_import.prg ADDITIVE
|
||||
Set Procedure To wwutils.PRG Additive
|
||||
Set Procedure To wwxmlhttp.PRG Additive
|
||||
Set Procedure To ini.PRG Additive
|
||||
Set Procedure To regex.PRG Additive
|
||||
Set Procedure To validare.PRG Additive
|
||||
Set Procedure To oproceduri_evolutie Additive
|
||||
Set Procedure To oproceduri_decont Additive
|
||||
Set Procedure To proceduri_rapoarte.PRG Additive
|
||||
SET PROCEDURE TO anaf_efactura.prg ADDITIVE
|
||||
SET PROCEDURE TO iniacces.prg ADDITIVE
|
||||
SET PROCEDURE TO oupdate.prg additive
|
||||
SET PROCEDURE TO procese.prg additive
|
||||
SET PROCEDURE TO version.prg additive
|
||||
SET PROCEDURE TO xmlaccess.prg additive
|
||||
SET PROCEDURE TO xmlparser.prg additive
|
||||
SET PROCEDURE TO filebringer.prg additive
|
||||
SET PROCEDURE TO wwcodeupdate.prg additive
|
||||
SET PROCEDURE TO wwhttp.prg ADDITIVE
|
||||
SET PROCEDURE TO wwapi.prg ADDITIVE
|
||||
|
||||
Declare Integer GetPrivateProfileString In WIN32API ;
|
||||
string, String, String, String @, Integer, String
|
||||
Declare Integer WritePrivateProfileString In Win32Api ;
|
||||
string, String, String, String
|
||||
Declare Integer CopyFile In WIN32API ;
|
||||
STRING lpExistingFileName, STRING lpNewFileName, INTEGER bFailIfExists
|
||||
Declare Integer PathFileExists In shlwapi STRING pszPath
|
||||
|
||||
If Type('goApi') = 'U'
|
||||
Public goApi
|
||||
goApi = Newobject("wwAPI", "wwAPI.prg")
|
||||
ENDIF
|
||||
|
||||
set procedure to oinit_optiuni.prg additive
|
||||
set procedure to oproceduri_comune.prg additive
|
||||
|
||||
PUBLIC gnHandle, goExecutor, goConn, goFirma, goCalendar, poLog, goLog, goApp
|
||||
DIRGEN = [D:\ROA\]
|
||||
gcBasePath = dirgen
|
||||
gcGeneralIniFile = DIRGEN + "settings.ini"
|
||||
gcSettingsFile = m.gcGeneralIniFile
|
||||
gcTempPath = Addbs(shortpath(goApi.GetTempPath())) + gcS + [\]
|
||||
If !Directory(gcTempPath)
|
||||
Md (gcTempPath)
|
||||
Endif
|
||||
gcAcces = [1;2;3;4;5;6;7;8;]
|
||||
|
||||
poLog = Newobject("Log_Mesaje","Log_Mesaje.prg")
|
||||
goLog = poLog
|
||||
goApp = Createobject("wzApplication")
|
||||
gnHandle = 0
|
||||
goExecutor = createobject("oExecutor")
|
||||
goConn = createobject("oConn")
|
||||
goConn.Connect(m.tcHost, m.tcSchema, m.tcPassword)
|
||||
IF m.gnHandle <= 0
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
LOCAL llSucces, lcSql
|
||||
goFirma = null
|
||||
llSucces = goExecutor.oExecuta("select * from syn_v_nom_firme where schema = ?gcS", "cFirma")
|
||||
IF m.llSucces
|
||||
SELECT cFirma
|
||||
gnIdFirma = id_firma
|
||||
gnIdSucursala = null
|
||||
gcFirma = ALLTRIM(firma)
|
||||
SCATTER NAME goFirma
|
||||
ELSE
|
||||
goFirma = CREATEOBJECT('custom')
|
||||
goFirma.addproperty('cod_fiscal', '')
|
||||
goFirma.addproperty('schema', m.gcS)
|
||||
goFirma.addproperty('firma', m.gcS)
|
||||
ENDIF
|
||||
USE IN (SELECT('cFirma'))
|
||||
|
||||
goCalendar = null
|
||||
llSucces = goExecutor.oExecuta('SELECT anul, luna, tva_incasare FROM calendar WHERE an*12+luna = (select MAX(an*12+luna) FROM calendar)', 'cCalendar')
|
||||
IF m.llSucces
|
||||
SELECT cCalendar
|
||||
GO TOP
|
||||
IF EMPTY(m.tnAn)
|
||||
gnAn = anul
|
||||
gnLuna = luna
|
||||
ENDIF
|
||||
SCATTER NAME goCalendar
|
||||
ENDIF
|
||||
USE IN (SELECT('cCalendar'))
|
||||
|
||||
CREATE CURSOR dual (dummy c(10))
|
||||
INSERT INTO dual (dummy) VALUES ("")
|
||||
|
||||
actualizeaza_optiuni()
|
||||
Do optiuni_firma IN oinit_optiuni.prg
|
||||
|
||||
lcSql = [begin pack_sesiune.set_Id_Util(?gnIdUtil); end;]
|
||||
llSucces = goExecutor.oExecuta(lcSql)
|
||||
lcSql = [begin pack_sesiune.setluna(?gnLuna); pack_sesiune.setan(?gnAn); end;]
|
||||
llSucces = goExecutor.oExecuta(lcSql)
|
||||
lcSql = [begin pack_sesiune.setlunabal(?gnLuna); pack_sesiune.setanbal(?gnAn); end;]
|
||||
llSucces = goExecutor.oExecuta(lcSql)
|
||||
lcSql = [begin pack_contafin.SET_DATA_RON(?gcS); end;]
|
||||
llSucces = goExecutor.oExecuta(lcSql)
|
||||
lcSql = [begin pack_sesiune.set_data_ron(?gcS); end;]
|
||||
llSucces = goExecutor.oExecuta(lcSql)
|
||||
lcSql = [begin pack_contafin.set_id_sucursala(?gnIdSucursala); end;]
|
||||
llSucces = goExecutor.oExecuta(lcSql)
|
||||
lcSql = [begin pack_contafin.set_id_firma(?gnIdFirma); end;]
|
||||
llSucces = goExecutor.oExecuta(lcSql)
|
||||
|
||||
RETURN .T.
|
||||
125
utile/Teste/test_repro_cnrcrt_footer.prg
Normal file
125
utile/Teste/test_repro_cnrcrt_footer.prg
Normal file
@@ -0,0 +1,125 @@
|
||||
* test_repro_cnrcrt_footer.prg
|
||||
* Repro/regresie pentru eroarea "Property CNRCRT is not found" din
|
||||
* FRM_MODIFIC2024.PGFARTICOLE.PAGE1._GRDFOOTER1.CALCTOTAL
|
||||
* (Import extrase bancare > Generare note, ROACONT 2.11.61, 15.07.2026).
|
||||
*
|
||||
* Cauza (dovedita prin bisectie, vezi COMUN\docs\depanare_testare_vfp.md):
|
||||
* - frm_import_extrase_banca.modificanote crea crsJTVATemp prin
|
||||
* SELECT * INTO CURSOR (copia pierde indexul TAG id_jtva creat de update_jtva_coloane);
|
||||
* - coloana cExplicatieTVA din frm_modific2024.grdRulaje face Seek pe acel tag in ControlSource;
|
||||
* - dupa repararea typo-ului oMinHeaderHeight->nMinHeaderHeight in cusfonthandler
|
||||
* (accessibility.vcx, r17869), ApplyFontToGrid atinge coloanele la Init;
|
||||
* evaluarea ControlSource-ului cu Seek pe tag inexistent face grid-ul sa-si piarda
|
||||
* TOATE coloanele => footer-ul se ataseaza la 0 coloane => calctotal crapa la
|
||||
* Getpem(This, cColWithLabel).
|
||||
*
|
||||
* Rulare headless (nu tine VFP IDE deschis; nu rula cu roacont.exe pornit):
|
||||
* & "C:\Program Files (x86)\Microsoft Visual FoxPro 9\vfp9.exe" -A -T ;
|
||||
* "D:\ROA\ROACONT\COMUN\utile\Teste\test_repro_cnrcrt_footer.prg" [MOD]
|
||||
* MOD:
|
||||
* CUINDEX (implicit) - fluxul corectat (index pe crsJTVATemp). Asteptat: 63 coloane, OK.
|
||||
* FARAINDEX - fluxul vechi, fara index. Asteptat: 0 coloane + eroarea CNRCRT
|
||||
* (reproduce bug-ul; util ca test de regresie al capcanei).
|
||||
* Rezultatul se scrie in %TEMP%\test_repro_cnrcrt_footer.txt, ultima linie REZULTAT: OK/BUG.
|
||||
|
||||
LPARAMETERS tcMode
|
||||
tcMode = IIF(EMPTY(tcMode), 'CUINDEX', UPPER(ALLTRIM(tcMode)))
|
||||
|
||||
PUBLIC gcLogFile, gnErrCNRCRT
|
||||
gcLogFile = ADDBS(SYS(2023)) + 'test_repro_cnrcrt_footer.txt'
|
||||
gnErrCNRCRT = 0
|
||||
STRTOFILE('START ' + tcMode + ' ' + TTOC(DATETIME()) + CHR(13)+CHR(10), gcLogFile)
|
||||
|
||||
ON ERROR DO ReproErr WITH ERROR(), MESSAGE(), PROGRAM(), LINENO()
|
||||
ON SHUTDOWN QUIT
|
||||
|
||||
DO D:\ROA\ROACONT\COMUN\utile\Teste\test_init_env_auto.prg WITH 'CENTRAL', 'MARIUSM_AUTO', 'ROMFASTSOFT'
|
||||
IF gnHandle <= 0
|
||||
DO ReproLog WITH 'EROARE: conectare Oracle esuata'
|
||||
DO ReproLog WITH 'REZULTAT: NEDETERMINAT'
|
||||
QUIT
|
||||
ENDIF
|
||||
DO ReproLog WITH 'mediu OK, gnAn=' + TRANSFORM(gnAn) + ' luna=' + TRANSFORM(gnLuna)
|
||||
|
||||
* ===== replicare modificanote din frm_import_extrase_banca (partea non-UI) =====
|
||||
IF !Used('saft_taxtable')
|
||||
update_saft_taxtable()
|
||||
ENDIF
|
||||
IF !Used('saft_mecanisme_plati')
|
||||
update_saft_mecanisme_plati()
|
||||
ENDIF
|
||||
update_jtva_coloane("JV", 'crsExplicatiiTVATemp', 1)
|
||||
SELECT * FROM crsExplicatiiTVATemp INTO CURSOR crsJTVATemp READWRITE
|
||||
IF tcMode == 'CUINDEX'
|
||||
* fix-ul din modificanote (15.07.2026): copia SELECT INTO pierde indexul
|
||||
SELECT crsJTVATemp
|
||||
INDEX ON id_jtva_coloana TAG id_jtva
|
||||
ENDIF
|
||||
|
||||
LOCAL llSucces, lcSql
|
||||
lcSql = [SELECT * FROM vact WHERE 1=2]
|
||||
llSucces = goExecutor.oExecuta(m.lcSql, 'actactan_temp')
|
||||
lcSql = [select * from vrul_tot where 1=2]
|
||||
llSucces = goExecutor.oExecuta(lcSql, 'v_rul')
|
||||
Select *, valoare + valtva As valoarectva, valoarev + valtvav As valoarevctva From v_rul Into Cursor trul READWRITE
|
||||
Use In (SELECT('v_rul'))
|
||||
lcSql = [select * from vrul_obinv_tot where 1=2]
|
||||
llSucces = goExecutor.oExecuta(lcSql, 'v_rul_obinv')
|
||||
Select *, valoare + valtva As valoarectva, valoarev + valtvav As valoarevctva From v_rul_obinv Into Cursor trul_obinv READWRITE
|
||||
Use In (SELECT('v_rul_obinv'))
|
||||
|
||||
Select actactan_temp
|
||||
Select .F. As ales, a.explicatia4 As iban, Iif(!Empty(Nvl(a.id_jtva_coloana, 0)), 1, 0) As Cu_tva, ;
|
||||
Cast(0 As N(2)) As tipnota, a.*, b.denumire As explicatie_tva_2 ;
|
||||
From actactan_temp a Left Join crsExplicatiiTVATemp b On a.id_jtva_coloana = b.id_jtva_coloana ;
|
||||
Into Cursor tact Readwrite
|
||||
gcAcces = "1;2;3;4;"
|
||||
Select tact
|
||||
Go Top
|
||||
|
||||
* ===== forma reala + secventa relevanta din Show =====
|
||||
LOCAL loForm, i, lcNames, lnColSrc, lnColFooter
|
||||
loForm = CREATEOBJECT([frm_modific2024], 90023, .T.)
|
||||
IF VARTYPE(loForm) <> 'O'
|
||||
DO ReproLog WITH 'EROARE: frm_modific2024 nu s-a instantiat'
|
||||
DO ReproLog WITH 'REZULTAT: NEDETERMINAT'
|
||||
QUIT
|
||||
ENDIF
|
||||
Select tact
|
||||
loForm.grid1.SetFocus
|
||||
loForm.gridextra1.setup()
|
||||
loForm.CalculeazaTotal()
|
||||
|
||||
lnColSrc = loForm.pgfArticole.Page1.grdRulaje.ColumnCount
|
||||
DO ReproLog WITH 'grdRulaje coloane: ' + TRANSFORM(lnColSrc)
|
||||
|
||||
loForm.pgfArticole.page1._grdfooter1.attachtogrid(loForm.pgfArticole.page1.grdRulaje)
|
||||
lnColFooter = loForm.pgfArticole.Page1._grdfooter1.ColumnCount
|
||||
DO ReproLog WITH 'footer coloane dupa attach: ' + TRANSFORM(lnColFooter)
|
||||
|
||||
loForm.pgfArticole.page1._grdfooter1.calcTotal()
|
||||
loForm.pgfArticole.page2._grdfooter1.attachtogrid(loForm.pgfArticole.page2.grdRulajeObinv)
|
||||
loForm.pgfArticole.page2._grdfooter1.calcTotal()
|
||||
loForm.Release()
|
||||
|
||||
IF m.lnColSrc > 0 AND m.gnErrCNRCRT = 0
|
||||
DO ReproLog WITH 'REZULTAT: OK'
|
||||
ELSE
|
||||
DO ReproLog WITH 'REZULTAT: BUG (coloane pierdute sau eroare CNRCRT)'
|
||||
ENDIF
|
||||
QUIT
|
||||
|
||||
PROCEDURE ReproErr
|
||||
LPARAMETERS tnErr, tcMsg, tcProg, tnLine
|
||||
IF 'CNRCRT' $ UPPER(tcMsg)
|
||||
gnErrCNRCRT = gnErrCNRCRT + 1
|
||||
ENDIF
|
||||
DO ReproLog WITH 'ERR ' + TRANSFORM(tnErr) + ' [' + tcProg + ':' + TRANSFORM(tnLine) + '] ' + tcMsg
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE ReproLog
|
||||
LPARAMETERS tcMsg
|
||||
LOCAL lcL
|
||||
lcL = FILETOSTR(gcLogFile)
|
||||
STRTOFILE(lcL + tcMsg + CHR(13)+CHR(10), gcLogFile)
|
||||
ENDPROC
|
||||
Reference in New Issue
Block a user