#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:
51
utile/Teste/editare_factura/probe_s9_4_stare.prg
Normal file
51
utile/Teste/editare_factura/probe_s9_4_stare.prg
Normal file
@@ -0,0 +1,51 @@
|
||||
* probe_s9_4_stare.prg - READ-ONLY: starea documentului 1051 si a eventualelor documente noi.
|
||||
SET SAFETY OFF
|
||||
SET TALK OFF
|
||||
PUBLIC gcErrLog
|
||||
gcErrLog = 'D:\ROA\ROAFACTURARE\COMUN\utile\Teste\editare_factura\probe_s9_4_stare_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
|
||||
|
||||
DO Lista WITH 'doc 1051', [select id_vanzare, cod, tip, sters, id_fact, serie_act, numar_act, dataoras from vanzari where id_vanzare = 1051]
|
||||
DO Lista WITH 'orice vanzare cu id_vanzare > 1140 (documente noi)', [select id_vanzare, cod, tip, sters, id_fact, numar_act from vanzari where id_vanzare > 1140 order by id_vanzare]
|
||||
DO Lista WITH 'ultimele 8 vanzari dupa id', [select * from (select id_vanzare, cod, tip, sters, id_fact, numar_act, dataoras from vanzari order by id_vanzare desc) where rownum <= 8]
|
||||
DO Lista WITH 'rul nesters pe cod 1140907', [select count(*) as nr from rul where sters = 0 and an = 2026 and luna = 8 and cod = 1140907]
|
||||
DO Lista WITH 'vact_tot nesters pe cod 1140907', [select count(*) as nr from ] + gcs + [.vact_tot where sters = 0 and an = 2026 and luna = 8 and cod = 1140907]
|
||||
|
||||
STRTOFILE('end' + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
QUIT
|
||||
|
||||
PROCEDURE Lista
|
||||
LPARAMETERS tcTitlu, tcSql
|
||||
LOCAL lnOk, lnI, lcL
|
||||
IF USED('v_st')
|
||||
USE IN v_st
|
||||
ENDIF
|
||||
lnOk = goExecutor.oExecuta(tcSql, 'v_st')
|
||||
IF !lnOk
|
||||
STRTOFILE('--- ' + tcTitlu + ': EROARE ' + goExecutor.cEroare + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
RETURN
|
||||
ENDIF
|
||||
SELECT v_st
|
||||
STRTOFILE('--- ' + tcTitlu + ': ' + TRANSFORM(RECCOUNT('v_st')) + ' randuri' + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
SCAN
|
||||
lcL = ''
|
||||
FOR lnI = 1 TO FCOUNT('v_st')
|
||||
lcL = lcL + ALLTRIM(FIELD(lnI, 'v_st')) + '=' + ALLTRIM(TRANSFORM(EVALUATE(FIELD(lnI, 'v_st')))) + ' '
|
||||
ENDFOR
|
||||
STRTOFILE(' ' + lcL + CHR(13) + CHR(10), gcErrLog, 1)
|
||||
ENDSCAN
|
||||
USE IN v_st
|
||||
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