Index: APPS/MAG/UGLYPicking/impl/UglyPickingService.cls.xml
===================================================================
diff -u -r1748 -r1759
--- APPS/MAG/UGLYPicking/impl/UglyPickingService.cls.xml (.../UglyPickingService.cls.xml) (revision 1748)
+++ APPS/MAG/UGLYPicking/impl/UglyPickingService.cls.xml (.../UglyPickingService.cls.xml) (revision 1759)
@@ -69,19 +69,57 @@
]]>
-
+
+DeviceNaam:%String
+
+
+
+
MagazijnID:APPS.MAG.UGLYPicking.enu.Magazijn
APPS.MAG.UGLYPicking.dto.Bon
0)
+ Set BonIterator = ##class(TECH.ListIterator).%New(Bonnen.Lijst)
+ While (('$IsObject(VolgendeBon)) && BonIterator.HasNext())
{
- Set Bon = Bonnen.Lijst.GetAt(1)
+ Set Bon = BonIterator.Next()
+ If (Bon.Status '= ##class(APPS.MAG.UGLYPicking.enu.BonStatus).InGebruik())
+ {
+ Set $ZTRAP = "Locked"
+ Do ..StartBon(Bon.BonNr)
+ Set VolgendeBon = Bon
+ Set $ZTRAP = ""
+ Goto Finally
+Locked
+ Set $ZTRAP = ""
+ Set LockedException = ##class(TECH.ExceptionHandler).Catch("TECH.Exceptions.LockedException")
+Finally
+ }
}
- Quit Bon
+ If ('$IsObject(VolgendeBon))
+ {
+ Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.GeneralErrorException).%New("Er is geen volgende vrije bon voor magazijn "_##class(APPS.MAG.UGLYPicking.enu.Magazijn).LogicalToDisplay(MagazijnID)))
+ }
+
+ Quit VolgendeBon
]]>
@@ -96,7 +134,7 @@
{
Set BonNr = Iterator.Next()
Set Bon = ..GeefBonBasis(BonNr)
- If ((..IsBonInGebruik(BonNr) || ($$IsLocked^vhLib("^UGLYOrderPick("_BonNr_")"))) && (..GeefSessie().GeefGebruiktBon() '= BonNr))
+ If ((..IsBonInGebruik(BonNr) || ($$IsLocked^vhLib("^UGLYOrderPick("_BonNr_")"))) && (..GeefSessie().GeefGebruiktBonNr() '= BonNr))
{
Set Bon.Status = ##class(APPS.MAG.UGLYPicking.enu.BonStatus).InGebruik()
}
@@ -216,8 +254,24 @@
-APPS.MAG.UGLYPicking.impl.Sessie
-
+APPS.MAG.UGLYPicking.dto.Sessies
+
@@ -484,6 +538,12 @@
}
Set Sessie = ..GeefSessie()
+
+ If (..IsBonInGebruik(BonNr) && (Sessie.GeefGebruiktBonNr() '= BonNr))
+ {
+ Do ##class(TECH.ExceptionHandler).Throw(##class(TECH.Exceptions.LockedException).%New("Bon met nummer "_BonNr_" kan niet gestart worden omdat deze reeds in gebruik is."))
+ }
+
Do Sessie.ZetGebruiktBonNr(BonNr)
Set Status = Sessie.%Save()