Index: vhUnitTest/AXimpl/Dynamics/SalesOrderOut/Converter/OrderlijnConverteerder/Test.cls.xml
===================================================================
diff -u -r48085 -r48183
--- vhUnitTest/AXimpl/Dynamics/SalesOrderOut/Converter/OrderlijnConverteerder/Test.cls.xml (.../Test.cls.xml) (revision 48085)
+++ vhUnitTest/AXimpl/Dynamics/SalesOrderOut/Converter/OrderlijnConverteerder/Test.cls.xml (.../Test.cls.xml) (revision 48183)
@@ -239,6 +239,79 @@
]]>
+
+
+
+
+
+
+
+
1
DOM.VKP.ProductOrderlijn
@@ -256,8 +329,9 @@
Do ProductOrderlijn.IndienMethodCall("GeefTextVoorAfdrukDocumentType",##class(DOM.VKP.enu.TekstAfdrukDocumentType).LeverBon()).DanReturn("LeverBonTekst Lijn")
Do ProductOrderlijn.IndienMethodCall("GeefTextVoorAfdrukDocumentType",##class(DOM.VKP.enu.TekstAfdrukDocumentType).OrderBevestiging()).DanReturn("OrderBevestigingTekst Lijn")
Do ProductOrderlijn.IndienMethodCall("GeefOrder").DanReturn(..GeefOrder())
- Do ProductOrderlijn.IndienMethodCall("GeefTotaalVerkoopPrijs").DanReturn(123)
+ Do ProductOrderlijn.IndienMethodCall("GeefBedrag").DanReturn(123)
Do ProductOrderlijn.IndienMethodCall("GeefToeleveringLijnNr").DanReturn("LijnNr")
+ Do ProductOrderlijn.IndienMethodCall("GeefBTWCode").DanReturn(8)
Quit ProductOrderlijn
]]>
@@ -270,6 +344,7 @@
Do Order.IndienMethodCall("GeefOorsprong").DanReturn("")
Do Order.IndienMethodCall("GeefStatus").DanReturn("")
DO Order.IndienMethodCall("GeefID").DanReturn("OrderId")
+ DO Order.IndienMethodCall("GeefKlantID").DanReturn("K||1234")
Quit Order
]]>
Index: AXimpl/Dynamics/SalesOrderOut/Converter/OrderlijnConverteerder.cls.xml
===================================================================
diff -u -r48085 -r48183
--- AXimpl/Dynamics/SalesOrderOut/Converter/OrderlijnConverteerder.cls.xml (.../OrderlijnConverteerder.cls.xml) (revision 48085)
+++ AXimpl/Dynamics/SalesOrderOut/Converter/OrderlijnConverteerder.cls.xml (.../OrderlijnConverteerder.cls.xml) (revision 48183)
@@ -27,8 +27,13 @@
1
+
+DOM.VKP.VerkoopAPI
+1
+
+
-ProductRolAPI:DOM.PM.ProductRolAPI,ProductTypeAPI:DOM.PM.ProductTypeAPI,ProductAPI:DOM.PM.ProductAPI,ProductConverter:AX.Uitgaand.PM.impl.Convertor.Sopr.ProductConvertor
+ProductRolAPI:DOM.PM.ProductRolAPI,ProductTypeAPI:DOM.PM.ProductTypeAPI,ProductAPI:DOM.PM.ProductAPI,ProductConverter:AX.Uitgaand.PM.impl.Convertor.Sopr.ProductConvertor,VerkoopAPI:DOM.VKP.VerkoopAPI
1
1
%Status
@@ -38,6 +43,7 @@
Set ..ProductTypeAPI = $$$Inject(ProductTypeAPI,##class(DOM.DomeinContext).Instance().GeefProductTypeAPI())
Set ..ProductAPI = $$$Inject(ProductAPI, ##class(DOM.DomeinContext).Instance().GeefProductAPI())
Set ..ProductConverter = $$$Inject(ProductConverter,##class(AX.Uitgaand.PM.impl.Convertor.Sopr.ProductConvertor).%New())
+ Set ..VerkoopAPI = $$$Inject(VerkoopAPI, ##class(DOM.DomeinContext).Instance().GeefVerkoopAPI())
Quit $$$OK
]]>
@@ -104,7 +110,11 @@
Set AxOrderLine.ItemId = ..GeefIdentNummerVoorProductID(ProductOrderlijn.GeefProductID())
}
Set AxOrderLine.PriceUnit = 1
- Set AxOrderLine.LineAmount = ProductOrderlijn.GeefTotaalVerkoopPrijs()
+ If ..VerkoopAPI.GeefKlant(ProductOrderlijn.GeefOrder().GeefKlantID()).GeefFacturatieWijze() = ##class(DOM.VKP.enu.FacturatieWijze).Incl() {
+ Set AxOrderLine.LineAmount = ProductOrderlijn.GeefBedrag()*(1+(##class(DOM.common.enu.BTWCode).LogicalToDisplay(ProductOrderlijn.GeefBTWCode())/100))
+ } Else {
+ Set AxOrderLine.LineAmount = ProductOrderlijn.GeefBedrag()
+ }
Quit AxOrderLine
]]>
Index: vhTest/Utils/DOM/VKP/VanHoeckeKlant.cls.xml
===================================================================
diff -u -r47178 -r48183
--- vhTest/Utils/DOM/VKP/VanHoeckeKlant.cls.xml (.../VanHoeckeKlant.cls.xml) (revision 47178)
+++ vhTest/Utils/DOM/VKP/VanHoeckeKlant.cls.xml (.../VanHoeckeKlant.cls.xml) (revision 48183)
@@ -24,6 +24,7 @@
Do Klant.IndienMethodCall("GeefEmail").DanReturn("someone@example.com")
Do Klant.IndienMethodCall("GeefKredietlimiet").DanReturn("2000")
Do Klant.IndienMethodCall("GeefAdres").DanReturn(##class(vhTest.Utils.DOM.common.Adres).StandaardAdres())
+ Do Klant.IndienMethodCall("GeefFacturatieWijze").DanReturn(##class(DOM.VKP.enu.FacturatieWijze).Incl())
Quit Klant
]]>