Index: APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service.cls.xml
===================================================================
diff -u -r36809 -r36900
--- APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service.cls.xml (.../Service.cls.xml) (revision 36809)
+++ APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service.cls.xml (.../Service.cls.xml) (revision 36900)
@@ -77,17 +77,43 @@
-ToeleveringsNummer:%String,ToeleveringsLijnNummer:%String,Aantal:%String,LeverDatum:%String
+ToeleveringsNummer:%String,ToeleveringsUniekLijnNummer:%String,Aantal:%String,LeverDatum:%String
niet verwerkte lijn met oudste leverdatum YYMMDD aanpassen
+ set index = eersteindexvoortlnr
+ While index'=""{
+ if (..IsTeVerwerken(ToeleveringsNummer,ToeleveringsLijnNummer,index)){
+ set:(indexoudste=0) indexoudste = index ;eerste nog te verwerken
+ set:(..GeefLeverDatum(ToeleveringsNummer,ToeleveringsLijnNummer,index) < ..GeefLeverDatum(ToeleveringsNummer,ToeleveringsLijnNummer,indexoudste) ) indexoudste = index
+ }
+ set index = $Order(^BLOrdRsp(ToeleveringsNummer,ToeleveringsLijnNummer,index))
+ }
+ if (indexoudste){
+ Do ..ZetRecordAlsVerwerkt(ToeleveringsNummer,ToeleveringsLijnNummer,indexoudste)
+ } else {
+ ; is al up to date.
+ }
}
}
]]>
@@ -112,7 +138,7 @@
Set Toelevering=$Q(^BLOrdRsp(..#HeaderKey))
While Toelevering'=""{
If (..IsDetailLijn(@Toelevering)) && (..IsLijnVervallen(@Toelevering)){
- Do ..ZetRecordAlsVerwerkt(Toelevering)
+ set $Piece(@Toelevering,"\",2) = ..#IsReedsVerwerkt
}
Set Toelevering=$Q(@Toelevering)
}
@@ -138,28 +164,39 @@
-Toelevering:%CacheString
+ToeleveringNummer:%String,ToeleveringLijnNummer:%String,index:%Integer
1
-
-Record:%String,Aantal:%Integer,LeverDatum:%String
+ToeleveringNummer:%String,ToeleveringLijnNummer:%String,index:%Integer,Aantal:%Integer,LeverDatum:%String
1
%Boolean
+
+ToeleveringNummer:%String,ToeleveringLijnNummer:%String,index:%Integer
+%String
+
+
+
-Record:%String
+ToeleveringNummer:%String,ToeleveringLijnNummer:%String,index:%Integer
1
%Boolean
-
@@ -185,7 +222,7 @@
Index: APPS/AKP/AankoopControle/BLUM/impl/Bewaarder.cls.xml
===================================================================
diff -u -r36262 -r36900
--- APPS/AKP/AankoopControle/BLUM/impl/Bewaarder.cls.xml (.../Bewaarder.cls.xml) (revision 36262)
+++ APPS/AKP/AankoopControle/BLUM/impl/Bewaarder.cls.xml (.../Bewaarder.cls.xml) (revision 36900)
@@ -23,7 +23,6 @@
Do ..ZetMsgNr()
Kill ^BLImp(..MsgNr)
Do ..SchrijfHeader("")
-
#dim RecordCount As %Integer = 0
#dim CSBSO11Iterator As TECH.ListIterator = ##class(TECH.ListIterator).%New(CSBSO.CSBSO11List)
while CSBSO11Iterator.HasNext(){
@@ -68,7 +67,10 @@
1
-
Index: APPS/AKP/AankoopControle/BLUM/impl/DespatchBerichtOntvanger.cls.xml
===================================================================
diff -u -r36829 -r36900
--- APPS/AKP/AankoopControle/BLUM/impl/DespatchBerichtOntvanger.cls.xml (.../DespatchBerichtOntvanger.cls.xml) (revision 36829)
+++ APPS/AKP/AankoopControle/BLUM/impl/DespatchBerichtOntvanger.cls.xml (.../DespatchBerichtOntvanger.cls.xml) (revision 36900)
@@ -59,7 +59,7 @@
%ListOfObjects
APPS.EDIExport.AankoopOrderResponse.impl.BLUM.Kopieerder
-
+
Index: EWTOE.mac.rou
===================================================================
diff -u -r29059 -r36900
--- EWTOE.mac.rou (.../EWTOE.mac.rou) (revision 29059)
+++ EWTOE.mac.rou (.../EWTOE.mac.rou) (revision 36900)
@@ -65,6 +65,7 @@
New TLNr,PRNr,ORDNr,OLNr,OLUNr,KLNr,HistRef,WMS,BronPal,DoelPal,RCPSDate,MPRNr,MdrIsKnd,RCPPRNr,ZRRCP,ZRKTO
Set NoAsk=$G(NoAsk)
If $G(CheckBo) Quit:'$$BACKORD(RCPNr,TOENr,TLUNr)
+ Lock +(^RCP,^Verv):5
Set CheckDel=$G(CheckDel)
Set R=^RCP("D",RCPNr),LEVNr=$P(R,D,2),LevRef=$P(R,D,3),RCPODate=$P(R,D,4) Set:'RCPODate RCPODate=$H
Set R=^RCP("D",RCPNr,"D",TOENr,TLUNr),MPRNr=$P(R,D),WMSStat=$P(R,D,2)
@@ -110,6 +111,7 @@
Do ##class(BL.MB.UGLYPicking.ReceptieOpkuis).DeleteToeLijn(RCPNr, TOENr, TLUNr)
Do STOCKUPDKind^ORGALUX(MPRNr)
d WLIP^vhDBG(150,"STOCKUPDKind^ORGALUX "_MPRNr)
+ Lock -(^RCP,^Verv)
Quit
;
@@ -169,7 +171,7 @@
Set ^KSPW(PRNr,LevTW,R)=AantWMS_D_$J(CifPPL*AantWMS,0,Decimals)_D_LevTB_D_LevTA_D_$E(LevTW,3,4)_"/"_$E(LevTW,5,6)_D_''ORDNr_D
Do REMOVE^vhLock("^KSPW(PRNr)"),COPY(TOENr,TLNr,Rec,AantWMS)
Do ##class(Flow.Toelevering).RecuPak(PRNr,AantWMS,TOENr,TLUNr,HistRef,.BLKLNr,.BLFactuurNr,.BLFactuurDatum)
- If 'AantBo Do KILL(TOENr,TLNr)
+ If 'AantBo Do KILL(TOENr,TLNr,RCPODate)
If AantBo Do
.Set Rec=^KTO(LEVNr,TOENr,TLNr) Set:'$P(Rec,D,23) $P(Rec,D,23)=$P(Rec,D,3)
.Set $P(Rec,D,9)=$J(($P(Rec,D,9)/$P(Rec,D,3)*AantBo),0,##class(APPS.VKP.OrderlijnPrijsBepaler).GeefAantalDecimalen())
@@ -307,14 +309,16 @@
Quit
;
; Opkuis bestanden
-KILL(TOENr,TLNr)
+KILL(TOENr,TLNr,RCPODate)
New R,LEVNr,ABNr,ABLNr
Set LEVNr=$P($G(^KTO1(TOENr)),D) Quit:'LEVNr
Set R=^KTO(LEVNr,TOENr,TLNr),ABLNr=$P(R,D,13,14)
+ Do ##class(APPS.EDIExport.AankoopOrderResponse.impl.BLUM.Service).%New().UpdateVerwerkVlag(TOENr,$Piece(R,D,15),$Piece(R,D,3),RCPODate)
Kill ^KTOK(LEVNr,TOENr,TLNr),^KTO3(TOENr,ABLNr_D_TLNr),^KTO(LEVNr,TOENr,TLNr)
If $N(^KTO(LEVNr,TOENr,100))=-1 Do
.Set R=^KTO(LEVNr,TOENr,1),ABNr=$P(R,D,10)
.Do KILLAB^FLOWTOE3(LEVNr,TOENr,ABNr)
+ .Do ##class(APPS.EDIExport.AankoopOrderResponse.impl.BLUM.Service).%New().VerwijderToelevering(TOENr)
.Kill ^KTO1(TOENr),^KTO2(LEVNr,TOENr),^KTOB(TOENr),^KTO(LEVNr,TOENr),^BLBeri("Z",TOENr)
Quit
;
@@ -688,3 +692,4 @@
+
Index: APPS/AKP/AankoopControle/BLUM/impl/INVOIC02Verwerker.cls.xml
===================================================================
diff -u -r36789 -r36900
--- APPS/AKP/AankoopControle/BLUM/impl/INVOIC02Verwerker.cls.xml (.../INVOIC02Verwerker.cls.xml) (revision 36789)
+++ APPS/AKP/AankoopControle/BLUM/impl/INVOIC02Verwerker.cls.xml (.../INVOIC02Verwerker.cls.xml) (revision 36900)
@@ -104,17 +104,12 @@
#dim BerichtBehandelen as %Integer = 1
#dim BlumFaktuurAangemaakt as %Integer = 0
#dim exceptionbericht as %String = ""
- Do ##class(Tools.Wlip).%New(207).String("Verwerk")
if $$$Not(..MagBerichtVerwerktWorden(INVOIC02)) {
- Do ##class(Tools.Wlip).%New(207).String("Bericht mag niet verwerkt worden")
quit 0
} else {
; start van de transactie + locken van betrokken zendingen in Verv en RCP
- Do ##class(Tools.Wlip).%New(207).String("Voor zetzendingen")
do ..TransactionService.ZetZendingen(..GeefZendingNummers(INVOIC02))
- Do ##class(Tools.Wlip).%New(207).String("Voor tx")
if ..TransactionService.StartTransactie() {
- Do ##class(Tools.Wlip).%New(207).String("In Tx")
try {
while E1EDP01Iterator.HasNext(){ //per factuurlijn
set E1EDP01 = E1EDP01Iterator.Next()
@@ -158,13 +153,13 @@
}
do ..TransactionService.CommitTransactie()
} catch {
- Do ##class(Tools.Wlip).%New(207).String("in catch")
do ..TransactionService.RollBackTransactie()
#dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch()
Do ##class(TECH.ExceptionHandler).Rethrow(Exception)
}
} else {
- Do ##class(Tools.Wlip).%New(207).String("Tx not started")
+ ;kan tx niet starten : Locks op ^Verv of ^RCP -> zal volgende verwerking opnieuw geprobeerd worden.
+ quit 0
}
if $$$Not(..ZendingService.BestaatFaktuur(..#BlumLevNr,..GeefZendingID(E1EDP01),999999)){ ;vervoer volledig gefactureerd
do ..PrijsVerschillenMailer.PrijsVerschilMail(..#BlumLevNr,..GeefZendingID(E1EDP01))
Index: vhUnitTest/APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service/UpdateVerwerkVlag/Test.cls.xml
===================================================================
diff -u -r36809 -r36900
--- vhUnitTest/APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service/UpdateVerwerkVlag/Test.cls.xml (.../Test.cls.xml) (revision 36809)
+++ vhUnitTest/APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service/UpdateVerwerkVlag/Test.cls.xml (.../Test.cls.xml) (revision 36900)
@@ -17,6 +17,23 @@
]]>
+
+
+
+
-
+
-
+
@@ -94,7 +119,7 @@
Do $$$AssertEquals($Piece(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1),"\","2"),"")
- Do Service.UpdateVerwerkVlag(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,"0000200","160110")
+ Do Service.UpdateVerwerkVlag(Service.ToeleveringNummer,100 * Service.ToeleveringLijnNummer,"0000200","160110")
Do $$$AssertEquals($Piece(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1),"\","2"),"1")
Index: vhUnitTest/APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service/Bewaar/Test.cls.xml
===================================================================
diff -u -r36809 -r36900
--- vhUnitTest/APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service/Bewaar/Test.cls.xml (.../Test.cls.xml) (revision 36809)
+++ vhUnitTest/APPS/EDIExport/AankoopOrderResponse/impl/BLUM/Service/Bewaar/Test.cls.xml (.../Test.cls.xml) (revision 36900)
@@ -53,7 +53,7 @@
Do Service.Bewaar(COASODouble)
Do $$$AssertTrue($DATA(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1)))
- Do $$$AssertEquals(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1),"""22277788.01 0900225300005000000016.0122001062 V 0000000.00 """)
+ Do $$$AssertEquals($Piece(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1),"\",1),"""22277788.01 0900225300005000000016.0122001062 V 0000000.00 """)
Kill ^BLOrdRsp(Service.ToeleveringNummer)
]]>
@@ -67,10 +67,10 @@
Do Service.Bewaar(COASODouble)
Do $$$AssertTrue($DATA(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1)))
- Do $$$AssertEquals(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1),"""22277788.01 0900225300005000000016.0122001062 V 0000000.00 """)
+ Do $$$AssertEquals($Piece(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,1),"\",1),"""22277788.01 0900225300005000000016.0122001062 V 0000000.00 """)
Do $$$AssertTrue($DATA(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,2)))
- Do $$$AssertEquals(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,2),"""22277799.01 0900225300010000000216.0122001082 V 0000236.01 """)
+ Do $$$AssertEquals($Piece(^BLOrdRsp(Service.ToeleveringNummer,Service.ToeleveringLijnNummer,2),"\",1),"""22277799.01 0900225300010000000216.0122001082 V 0000236.01 """)
Kill ^BLOrdRsp(Service.ToeleveringNummer)
]]>
Index: APPS/AKP/Zending/impl/ZendingService.cls.xml
===================================================================
diff -u -r36654 -r36900
--- APPS/AKP/Zending/impl/ZendingService.cls.xml (.../ZendingService.cls.xml) (revision 36654)
+++ APPS/AKP/Zending/impl/ZendingService.cls.xml (.../ZendingService.cls.xml) (revision 36900)
@@ -108,8 +108,8 @@
set faktuurtype = $Select(BlumFaktuur.FactuurType="F":"01",BlumFaktuur.FactuurType="C":"03",BlumFaktuur.FactuurType="D":"04",BlumFaktuur.FactuurType="P":"05")
Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurType) = faktuurtype
- Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurDatum) = $$FormatDateTime^vhLib("YY.MM.DD",BlumFaktuur.FactuurDatum)
- Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurValutaDatum ) = $$FormatDateTime^vhLib("YY.MM.DD",BlumFaktuur.FactuurDatum)
+ Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurDatum) = $$FormatDateTime^vhLib("DD.MM.YY",BlumFaktuur.FactuurDatum)
+ Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurValutaDatum ) = $$FormatDateTime^vhLib("DD.MM.YY",BlumFaktuur.FactuurDatum)
Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurMunt) = "EUR"
Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurNetto) = BlumFaktuur.BedragGoederen
Set $Piece(VervFaktuurData,"\",##class(APPS.AKP.Zending.impl.ZendingService).#VervFaktuurBlumKlantnr) = BlumFaktuur.BlumKlantNr