#13: formular de facturare unificat - etapa curenta
Squash al branch-ului de lucru plan13-s2. Clase: ofacturare (nucleul formularului unificat), ofacturare_comun, ferestre_cere_date, ocomenzi, caut_ora (lista de preturi in combo-urile de cautare), omodificari. Programe: ofacturare impartit - ofacturare_antet, ofacturare_rutare_scriere si ogrid_latimi sunt fisiere noi; oproceduri_facturare primeste discountul pe linie si cota standard de TVA cand articolul nu are cota pe politica. Documentatie: capcana SQLExec no_data_found, conventia de encoding, depanarea testelor VFP si regulile de lucru - conflictele cu modificarile venite din alte proiecte sunt rezolvate pastrand ambele parti. Loguri de rulare a testelor scoase din versionare; testele raman. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkyjGyrV2S7932om4kfSiK
This commit is contained in:
66
utile/Teste/editare_factura/probe_s9_4_documente.prg
Normal file
66
utile/Teste/editare_factura/probe_s9_4_documente.prg
Normal file
@@ -0,0 +1,66 @@
|
||||
* probe_s9_4_documente.prg - READ-ONLY: de ce atarna "select count(*) from documente where id_fact = ?"
|
||||
SET SAFETY OFF
|
||||
SET TALK OFF
|
||||
PUBLIC gcErrLog
|
||||
gcErrLog = 'D:\ROA\ROAFACTURARE\COMUN\utile\Teste\editare_factura\probe_s9_4_documente_log.txt'
|
||||
STRTOFILE('start ' + TRANSFORM(DATETIME()) + CHR(13) + CHR(10), gcErrLog)
|
||||
ON ERROR DO test_error_handler WITH ERROR(), MESSAGE(), PROGRAM(), LINENO()
|
||||
|
||||
DO ('D:\ROA\ROAFACTURARE\COMUN\utile\Teste\test_init_env_auto_roafacturare.prg') WITH 'CENTRAL', 'MARIUSM_AUTO', 'ROMFASTSOFT'
|
||||
IF gnHandle <= 0
|
||||
STRTOFILE('EROARE conectare' + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
QUIT
|
||||
ENDIF
|
||||
gnIdUtil = 8
|
||||
|
||||
*!* sesiuni blocante inainte de orice altceva
|
||||
DO Lista WITH 'sesiuni care blocheaza', ;
|
||||
[select s.sid, s.status, s.osuser, s.machine, s.last_call_et, s.blocking_session, s.event ] + ;
|
||||
[from v$session s where s.username = 'MARIUSM_AUTO' order by s.sid]
|
||||
|
||||
DO Lista WITH 'lacate pe obiecte', ;
|
||||
[select l.session_id, o.object_name, l.locked_mode from v$locked_object l, all_objects o ] + ;
|
||||
[where l.object_id = o.object_id]
|
||||
|
||||
DO Lista WITH 'cate randuri are DOCUMENTE (cu timeout implicit)', [select count(*) as nr from documente]
|
||||
|
||||
DO Lista WITH 'indecsi pe DOCUMENTE', ;
|
||||
[select index_name, column_name, column_position from all_ind_columns ] + ;
|
||||
[where table_name = 'DOCUMENTE' and table_owner = 'MARIUSM_AUTO' order by index_name, column_position]
|
||||
|
||||
DO Lista WITH 'DOCUMENTE - ce fel de obiect e', ;
|
||||
[select owner, object_type from all_objects where object_name = 'DOCUMENTE']
|
||||
|
||||
STRTOFILE('end ' + TRANSFORM(DATETIME()) + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
QUIT
|
||||
|
||||
PROCEDURE Lista
|
||||
LPARAMETERS tcTitlu, tcSql
|
||||
LOCAL lnOk, lnI, lcL, ltT
|
||||
ltT = DATETIME()
|
||||
STRTOFILE('--> pornesc: ' + tcTitlu + ' ' + TTOC(ltT) + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
IF USED('v_dg')
|
||||
USE IN v_dg
|
||||
ENDIF
|
||||
lnOk = goExecutor.oExecuta(tcSql, 'v_dg')
|
||||
IF !lnOk
|
||||
STRTOFILE(' EROARE ' + goExecutor.cEroare + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
RETURN
|
||||
ENDIF
|
||||
SELECT v_dg
|
||||
STRTOFILE(' ' + TRANSFORM(RECCOUNT('v_dg')) + ' randuri in ' + ;
|
||||
TRANSFORM(DATETIME() - ltT) + ' sec' + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
SCAN WHILE RECNO() <= 15
|
||||
lcL = ''
|
||||
FOR lnI = 1 TO FCOUNT('v_dg')
|
||||
lcL = lcL + ALLTRIM(FIELD(lnI, 'v_dg')) + '=' + ALLTRIM(TRANSFORM(EVALUATE(FIELD(lnI, 'v_dg')))) + ' '
|
||||
ENDFOR
|
||||
STRTOFILE(' ' + lcL + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
ENDSCAN
|
||||
USE IN v_dg
|
||||
ENDPROC
|
||||
|
||||
PROCEDURE test_error_handler
|
||||
LPARAMETERS tnError, tcMessage, tcProgram, tnLineNo
|
||||
STRTOFILE('EROARE ' + TRANSFORM(tnError) + ' [' + tcProgram + ':' + TRANSFORM(tnLineNo) + '] ' + tcMessage + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
ENDPROC
|
||||
Reference in New Issue
Block a user