cTN1322 ;Boekingsreeksen: modules; cTN1322 ; T1 ;Het teken van alle bedragen omdraaien?; ; T1F ;Inverser le signe de chaque montant?; ; T1E ;Inverse the sign of all amounts?; ; YZ Q ; IMPORT(Q,DB,GRIDID) ; Importeren registraties uit document ; Input: Q; Vennootschap ; DB: UI1 document ; GRIDID: GridId van ^mtemp99 waarin registraties worden geïmporteerd ; ; Output: 0\Foutboodschap ; of ; 1 ; S $ZT="^dmERROR" N @$$INITVAR^cAFVBA01("DB,GRIDID") ; ; Controle parameters IMPORT1 F i="DB","GRIDID" S @i=$G(@i) S OK=1 I '$L(DB) G IMPORTZ ; ; Variabelen opzetten IMPORT2 S REF=$$REF^cAFA10(Q,"REG","M1"),UREF=$P(REF,D),IREF=$P(REF,D,3) I '$L(IREF)!'$L(UREF) G IMPORTZ S MTEMP="^mtemp99(GRIDID,""BR.DET"",TUI1)" S I1="",Q49DB=$$SIG^cAFA1("DB",DB,149),TYPE=$P($G(^(0)),D),DB=$TR(DB," ") ; ; Registraties opzetten IMPORT3 S I1=$O(@IREF@(Q49DB,TYPE,DB,I1)) I '$L(I1) G IMPORTZ S UI1=$P(^(I1),D),N=$G(@UREF@(0)) I '$L(N)!($P(N,D,30)=2) G IMPORT3 ; Verwijderd ; ; Nodes opzetten S (TN0,TN1)="" S TUI1=$$BRUI1^cTN1321(GRIDID) S $P(TN0,D)=$P(TUI1," ") ; 1. UI1 boekingsreeks S $P(TN0,D,2)=$P(TUI1," ",2) ; 2. Volgnummer S $P(TN0,D,3)=$$VLNR^cTN1321(GRIDID) ; 3. Lijnnummer S $P(TN0,D,8)=$P(N,D,8) ; 8. Grootboekrekening S $P(TN0,D,9)=$P(N,D,9) ; 9. Analytische rekening S $P(TN0,D,10)=$P(N,D,10) ; 10. EC1-rekening S $P(TN0,D,11)=$P(N,D,11) ; 11. EC2-rekening S $P(TN0,D,12)=$P(N,D,12) ; 12. EC3-rekening S $P(TN0,D,19)=$P(N,D,19) ; 19. Omschrijving S $P(TN0,D,34)=$P(N,D,34) ; 34. Referte ; S $P(TN1,D)=$P(N,D,15)-$P(N,D,16) ; 1. Saldo ; ; Nodes wegschrijven S @MTEMP@(0)=TN0,^(1)=TN1 ; IMPORT39 G IMPORT3 ; IMPORTZ Q OK ; TEKEN(GRIDID) ; Teken omdraaien in detaillijnen boekingsreeks ; Input: GRIDID: GridId van ^mtemp99 met detaillijnen ; ; Output: 0\Foutboodschap ; of ; 1\GRIDID S $ZT="^dmERROR" N @$$INITVAR^cAFVBA01("GRIDID") ; ; Controle parameters TEKEN1 S OK=1 I '$L($G(GRIDID)) G TEKENZ S MTEMP="^mtemp99(GRIDID,""BR.DET"",TUI1)" ; ; Teken omdraaien TEKEN2 S TUI1="" TEKEN21 S TUI1=$O(@MTEMP) I '$L(TUI1) G TEKENZ S N=^(TUI1,0),N1=$G(^(1)) I '$L(N)!($P(N,D,30)=2) G TEKEN21 S $P(@MTEMP@(1),D)=$P(N1,D)*-1 TEKEN29 G TEKEN21 ; TEKENZ Q OK ; ; Vraagstelling ivm teken omdraaien TEKENV(QT) Q $P($T(@("T1"_QT)),";",2) ; ZZ ; 29.08.07 - 10 u 22 * V8.09