Index: FCINK.mac.rou =================================================================== diff -u -r29059 -r34761 --- FCINK.mac.rou (.../FCINK.mac.rou) (revision 29059) +++ FCINK.mac.rou (.../FCINK.mac.rou) (revision 34761) @@ -1,6 +1,7 @@ FCINK ;INKOMENDE FAKT/CREDITN [ 04/10/2001 1:45 PM ] ; VERWERK(LEVNr,LevFANr,FaktDat,VervDat,Bedrag,MaatStaf,Btw,KontKort,Munt,Pariteit,BH,BJ,BM,BP,BX) + New B,R,BF,CE,FC,FNR,I1,KC,KN,OM1,COM,FDT,VVD,VM,MPAR,OK,SWAN,BPE,BPEC,BR,AFBTW,HIS,QD New LREF,BTWOH,BTWIC,BTWMC,BTWVL,NABTW,NETD,NETI,NETA,KKB,EXBA,HIS,MST,NETG,TTB,SRT,SWX,DVO,SWTOL New MPAR,MSTA,MSTD,MSTG,MSTI @@ -10,6 +11,32 @@ .If R?.N,R>0,R<13 Do ^cT163 Set BR=$S(LEVNr=5005:"604100 ",1:""),R=$$MNTC^cAFE1(Q,BJ),BF=$P(R,D),QD=$P(R,D,2) Quit:BR="" 0 + + if LEVNr=5005 { + new Repo,AankoopFactuur,AifGenerator + set Repo = ##class(DOM.AKP.AankoopFactuur.impl.AankoopFactuurRepository).%New() + #dim AankoopFactuur As DOM.AKP.AankoopFactuur.data.AankoopFactuur = Repo.Maak() + set AankoopFactuur.LeverancierID = "L||5005" + set AankoopFactuur.FactuurIdLeverancier = LevFANr + set AankoopFactuur.Datum = FaktDat + set AankoopFactuur.VervalDatum = VervDat + set AankoopFactuur.Totaal = Bedrag + set AankoopFactuur.MaatstafVanHeffing = MaatStaf + set AankoopFactuur.BTW = Btw + set AankoopFactuur.KortingKontant = KontKort + set AankoopFactuur.Munt = Munt + set AankoopFactuur.BoekingPeriode = BP + set Boeking = ##class(DOM.AKP.AankoopFactuur.data.BoekhoudBoeking).%New(MaatStaf,604100) + do AankoopFactuur.Boekingen.Insert(Boeking) + do Repo.Bewaar(AankoopFactuur) + + ;set AifGenerator = ##class(AX.Uitgaand.common.impl.AifGenerator).%New() + ;do AifGenerator.Generate("PurchaseInvoice/Create",AankoopFactuur.GeefID()) + } + + + + Set KC=LEVNr,FC="F",OM1="",COM=LevFANr,VM=Munt,MPAR=$J(Pariteit,0,4),SWTOL=0 Set (LREF,BTWOH,BTWMC,BTWVL,NABTW,NETD,NETI,NETA,SRT,SWX,DVO)="" If Bedrag<0 Set FC="C",Bedrag=-Bedrag,MaatStaf=-MaatStaf,Btw=-Btw,KontKort=-KontKort @@ -32,3 +59,4 @@ ; +