Index: AXimpl/Admin/DOM/PM/BouwsteenIterator.cls.xml
===================================================================
diff -u -r47983 -r54311
--- AXimpl/Admin/DOM/PM/BouwsteenIterator.cls.xml (.../BouwsteenIterator.cls.xml) (revision 47983)
+++ AXimpl/Admin/DOM/PM/BouwsteenIterator.cls.xml (.../BouwsteenIterator.cls.xml) (revision 54311)
@@ -75,14 +75,13 @@
#dim HalffabricaatBouwstenenIterator As TECH.ListIterator = Product.GeefHFBouwstenenIterator()
#dim KindBouwstenenIterator As TECH.ListIterator = Product.GeefKindBouwstenenIterator()
#dim Bouwsteen As AXimpl.Admin.DOM.PM.Bouwsteen = ""
+ #dim AantalBouwstenen As %Integer
While (HalffabricaatBouwstenenIterator.HasNext()) {
#dim HalffabricaatBouwsteen As DOM.PM.Bouwstenen.BouwsteenHalfFabr = HalffabricaatBouwstenenIterator.Next()
Set Bouwsteen = ..BouwsteenConverter.Convert(HalffabricaatBouwsteen, Id, ParentId)
-
Do Bouwstenen.Insert(Bouwsteen)
-
Set Id = Id + 1
}
@@ -93,15 +92,16 @@
Set Id = Id + 1
#dim KindProduct As DOM.PM.Product = ..ProductApi.GeefProduct(Bouwsteen.ProductId)
-
Set Bouwsteen.HeeftKindBouwstenen = ..HeeftBouwstenen(KindProduct)
- Do Bouwstenen.Insert(Bouwsteen)
+
+ For AantalBouwstenen=1:1:Bouwsteen.Aantal {
+ Do Bouwstenen.Insert(Bouwsteen)
- #dim KindBouwstenen AS %ListOfDataTypes = ..GeefBouwstenen(KindProduct, Id, Bouwsteen.Id)
+ #dim KindBouwstenen AS %ListOfDataTypes = ..GeefBouwstenen(KindProduct, Id, Bouwsteen.Id)
+ Do ##class(TECH.ListUtils).AppendList(Bouwstenen, KindBouwstenen)
- Do ##class(TECH.ListUtils).AppendList(Bouwstenen, KindBouwstenen)
-
- Set Id = Id + KindBouwstenen.Count()
+ Set Id = Id + KindBouwstenen.Count()
+ }
}
Quit Bouwstenen
Index: vhUnitTest/AXimpl/Admin/DOM/PM/BouwsteenIterator/Test.cls.xml
===================================================================
diff -u -r47983 -r54311
--- vhUnitTest/AXimpl/Admin/DOM/PM/BouwsteenIterator/Test.cls.xml (.../Test.cls.xml) (revision 47983)
+++ vhUnitTest/AXimpl/Admin/DOM/PM/BouwsteenIterator/Test.cls.xml (.../Test.cls.xml) (revision 54311)
@@ -173,6 +173,44 @@
]]>
+
+
+
+
KindProductKindBouwstenenIterator:TECH.Iterator,VerwachteWaarde:%Boolean
1
@@ -182,6 +220,7 @@
#dim KindBouwsteen As DOM.PM.Bouwstenen.BouwsteenKind = ##class(DOM.PM.Bouwstenen.BouwsteenKind).%New()
Set KindBouwsteen.KindProduct = ##class(Prod.Product).%New()
Set KindBouwsteen.KindProduct.ProductNr = RandomProductNummer
+ Set KindBouwsteen.Aantal = 1
#dim KindBouwstenen As %ListOfDataTypes = ##class(TECH.ListUtils).CreateListOfDataTypes(KindBouwsteen)
@@ -230,14 +269,15 @@
-Id:%String="",ProductId:%String=""
+Id:%String="",ProductId:%String="",Aantal:%Integer=1
1
AXimpl.Admin.DOM.PM.Bouwsteen