Index: EWBON.mac.rou =================================================================== diff -u -r61744 -r66221 --- EWBON.mac.rou (.../EWBON.mac.rou) (revision 61744) +++ EWBON.mac.rou (.../EWBON.mac.rou) (revision 66221) @@ -411,9 +411,14 @@ ..Else Set:$P($P(R,D),"#",2) AantBo=$P(R,D) ..Set OLNr=^ORD("IU",ORDNr,OLUNr) ..Set AantalInOrder = $P(^KOD(KLNr,"F",ORDNr,OLNr),D,3) - ..If 'AantBo,'NP,AantWMS,AantWMS'=AantalInOrder Do MODAANT^FLOWORD6(KLNr,ORDNr,OLNr,AantWMS) - ..Do:AantBo<0 MODAANT^FLOWORD6(KLNr,ORDNr,OLNr,AantWMS,$S(OLevWk'=NLevWk:NLevWk,1:"")) + ..If 'AantBo,'NP,AantWMS,AantWMS'=AantalInOrder Do + ... Do MODAANT^FLOWORD6(KLNr,ORDNr,OLNr,AantWMS) + ... Do ##class(vhLib.Logger).%New("EWMS").Info("Backorder","Aantal gewijzigd zonder backorder, BONNr: "_CONSNr_" ORDNr: "_ORDNr_" OLNr: "_OLNr_" Aantal WMS <-> Order: "_$G(AantWMS)_" <-> "_$G(AantalInOrder)) + ..If AantBo<0 Do + ... Do MODAANT^FLOWORD6(KLNr,ORDNr,OLNr,AantWMS,$S(OLevWk'=NLevWk:NLevWk,1:"")) + ... Do ##class(vhLib.Logger).%New("EWMS").Info("Backorder","Aantal gewijzigd met NEGATIEF backorder, BONNr: "_CONSNr_" ORDNr: "_ORDNr_" OLNr: "_OLNr_" Aantal WMS <-> Order: "_$G(AantWMS)_" <-> "_$G(AantalInOrder)_" met BO aantal: "_$G(AantBo)) ..If (AantBo>0) Do + ...Do ##class(vhLib.Logger).%New("EWMS").Info("Backorder","Aantal gewijzigd met backorder, BONNr: "_CONSNr_" ORDNr: "_ORDNr_" OLNr: "_OLNr_" Aantal WMS <-> Order: "_$G(AantWMS)_" <-> "_$G(AantalInOrder)_" met BO aantal: "_$G(AantBo)) ...Set Order = ##class(DOM.DomeinContext).Instance().GeefOrderAPI().GeefOrder(ORDNr) ...Set BackorderLijnen = Order.GeefBijhorendeBackorderLijnCodes(OLUNr) ...If (BackorderLijnen.Count()=0) Do BACKORD^FLOWORD6(KLNr,ORDNr,OLNr,+AantBo,,$S(OLevWk'=NLevWk:NLevWk,1:""))