Files
roacontracte/Programe/rapbal97.prg
Marius Mutu 7cc3bff358 Initial: flux text FoxBin2Prg (git urmareste .??2 in-arbore, binarele VFP git-ignored)
Inrolare ROACONTRACTE conform COMUN\docs\inrolare-proiect-git-text.md:
- .gitignore/.gitattributes dupa modelul ROACONT (COMUN/ exclus, are repo propriu)
- 439 texte FoxBin2Prg generate in arbore (vc2/sc2/fr2/mn2/pj2/db2)
- Clase\registry.vcx ramane binar: memo .vct corupt (Error 41), nu se poate converti
- Clase\ferestre_contracte.vcx: text generat, roundtrip scutit (fara write-back)
- CLAUDE.md, docs/README.md, roa_sync.bat

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RYbiinqXxdEqXi53x4Ro7K
2026-08-03 01:51:36 +03:00

104 lines
1.8 KiB
Plaintext

public wbal
dirfirm=loc+'\'+nfscurt
WBAL=0
sele bal
set filter to SUBS(CONT,1,1)='7'
TOTAL ON subs(cont,5,1) TO &dirfirm\tempo\TOTTOT7
SELE BAL
set filter to SUBS(CONT,1,1)='6'
TOTAL ON SUBS(CONT,5,1) TO &dirfirm\tempo\TOTTOT6
SELE 0
USE &dirfirm\tempo\TOTTOT7
REPL DENUMIRE WITH 'TOTAL VENITURI';
CONT WITH '7998'
SELE 0
USE &dirfirm\tempo\TOTTOT6
REPL DENUMIRE WITH 'TOTAL CHELTUIELI';
CONT WITH '6998'
SELE BAL
SET FILTER TO
SELE BAL
TOTAL ON SUBSTR(CONT,1,3) TO &dirfirm\tempo\TOTBAL
SELE 0
*USE DATEAN\TOTBAL
USE &dirfirm\tempo\totbal.dbf exclusive
SELE BAL
COPY TO &dirfirm\tempo\RAPBAL
SELE 0
USE &dirfirm\tempo\RAPBAL
TOTAL ON SUBS(CONT,5,1) TO &dirfirm\tempo\TOTTOT
SELE TOTBAL
REPL ALL DENUMIRE WITH 'TOTAL '+SUBSTR(CONT,1,3);
cont WITH substr(cont,1,3)+'A'
SELE 190
USE &dirfirm\tempo\TOTTOT
REPL DENUMIRE WITH 'TOTAL GENERAL';
CONT WITH '9999'
SELE TOTBAL
USE
SELE TOTTOT
USE
SELE TOTTOT7
USE
SELE TOTTOT6
USE
SELE RAPBAL
APPE FROM &dirfirm\tempo\TOTBAL
APPE FROM &dirfirm\tempo\TOTTOT
APPE FROM &dirfirm\tempo\TOTTOT7
APPE FROM &dirfirm\tempo\TOTTOT6
INDEX ON CONT TO &dirfirm\tempo\BALRAP.CDX
GO TOP
GCONT=CONT
kg=0
SCAN
SCATTER MEMVAR
if subs(m.cont,1,3)=subs(gcont,1,3)
kg=kg+1
else
kg=1
endif
IF SUBS(M.CONT,4,1)='A' and kg=2
DELETE
kg=0
ENDIF
GCONT=M.CONT
ENDSCAN
m.titlu=''
if a4
REPORT FORMAT RAPBALa4.FRX TO PRINTER PROMPT preview
else
REPORT FORMAT RAPBALa3.FRX TO PRINTER PROMPT preview
endif
SELE RAPBAL
USE
ERASE &dirfirm\tempo\RAPBAL.DBF
ERASE &dirfirm\tempo\BALrap.cdx
ERASE &dirfirm\tempo\TOTTOT.DBF
ERASE &dirfirm\tempo\TOTTOT7.DBF
ERASE &dirfirm\tempo\TOTTOT6.DBF
ERASE &dirfirm\tempo\totBAL.DBF
RETURN