Index: APPS/MAG/UglyPickingService.cls.xml
===================================================================
diff -u -r1779 -r1780
--- APPS/MAG/UglyPickingService.cls.xml (.../UglyPickingService.cls.xml) (revision 1779)
+++ APPS/MAG/UglyPickingService.cls.xml (.../UglyPickingService.cls.xml) (revision 1780)
@@ -91,10 +91,10 @@
-
-ProductLijn:APPS.MAG.UGLYPicking.dto.ProductLijn,NieuwReservatieAantal:%Integer
-%Status
-
+
+BonNr:%Integer,ProductLijn:APPS.MAG.UGLYPicking.dto.ProductLijn,NieuwReservatieAantal:%Integer
+
Index: vhUnitTest/APPS/MAG/UGLYPicking/TestUglyPickingService.cls.xml
===================================================================
diff -u -r1759 -r1780
--- vhUnitTest/APPS/MAG/UGLYPicking/TestUglyPickingService.cls.xml (.../TestUglyPickingService.cls.xml) (revision 1759)
+++ vhUnitTest/APPS/MAG/UGLYPicking/TestUglyPickingService.cls.xml (.../TestUglyPickingService.cls.xml) (revision 1780)
@@ -184,6 +184,35 @@
]]>
+
+
+
+
+
+
+BonNr:%Integer,ProductLijn:APPS.MAG.UGLYPicking.dto.ProductLijn,NieuwReservatieAantal:%Integer
+1
+
+
Index: APPS/MAG/UGLYPicking/impl/UglyPickingService.cls.xml
===================================================================
diff -u -r1779 -r1780
--- APPS/MAG/UGLYPicking/impl/UglyPickingService.cls.xml (.../UglyPickingService.cls.xml) (revision 1779)
+++ APPS/MAG/UGLYPicking/impl/UglyPickingService.cls.xml (.../UglyPickingService.cls.xml) (revision 1780)
@@ -382,13 +382,27 @@
Do ProductLijnen.KennisAnkers.Insert(Kennis.Msg)
}
- Set Status = ##class(BL.MB.UGLYPicking.OrderReservatie).CreateUnFinishedZeroPalletIDs(BonNr,Magazijn,##class(TECH.Context.RuntimeContext).Instance().GeefGebruikerInitialen())
+ Set ResultSet = ##class(%ResultSet).%New()
+ Do ResultSet.Prepare("SELECT Count(1) As AantalReservaties FROM Flow_OrderWMS.PalletReservatie WHERE ConsolidatieNr = ? AND Magazijn = ?")
+ Do ResultSet.Execute(BonNr,Magazijn)
- If ($$$ISERR(Status))
+ If (ResultSet.Next())
{
- Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.StatusException).%New(##class(TECH.enu.ExceptionCode).GeneralError(),"Pallet reservaties konden niet uitgevoerd worden",Status))
+ If (ResultSet.Data("AantalReservaties") = 0)
+ {
+ Set Status = ##class(BL.MB.UGLYPicking.OrderReservatie).CreateUnFinishedZeroPalletIDs(BonNr,Magazijn,##class(TECH.Context.RuntimeContext).Instance().GeefGebruikerInitialen())
+
+ If ($$$ISERR(Status))
+ {
+ Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.StatusException).%New(##class(TECH.enu.ExceptionCode).GeneralError(),"Pallet reservaties konden niet uitgevoerd worden",Status))
+ }
+ }
}
-
+ Else
+ {
+ Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Kon niet achterhalen of de palletreservaties zijn uitgevoerd voor deze bon!"))
+ }
+
Set Status = ##class(BL.MB.UGLYPicking.OrderReservatie).ProcessUnFinishedZeroPalletIDs(BonNr,Magazijn)
Set ProductAPI = ##class(DOM.DomeinContext).Instance().GeefProductAPI()
@@ -521,9 +535,48 @@
%Status
-
-ProductLijn:APPS.MAG.UGLYPicking.dto.ProductLijn,NieuwReservatieAantal:%Integer
-%Status
+
+BonNr:%Integer,ProductLijn:APPS.MAG.UGLYPicking.dto.ProductLijn,NieuwReservatieAantal:%Integer
+