FishEye: Tag 49398 refers to a dead (removed) revision in file `vhTest/Fake/AXimpl/Admin/VKP/SalesPriceService.cls.xml'. FishEye: No comparison available. Pass `N' to diff? FishEye: Tag 49398 refers to a dead (removed) revision in file `vhTest/Mock/AXimpl/Admin/VKP/SalesPriceService.cls.xml'. FishEye: No comparison available. Pass `N' to diff? Index: AXimpl/Admin/VKP/SalesPriceService/ProductDataFactory.cls.xml =================================================================== diff -u --- AXimpl/Admin/VKP/SalesPriceService/ProductDataFactory.cls.xml (revision 0) +++ AXimpl/Admin/VKP/SalesPriceService/ProductDataFactory.cls.xml (revision 49398) @@ -0,0 +1,22 @@ + + + +TECH.RegisteredObject + + +1 +ProductNummer:%String,CifPpl:%String +AXimpl.Admin.VKP.SalesPriceService.ProductData + + + + + + Index: BL/Legacy/KPRIJS.cls.xml =================================================================== diff -u --- BL/Legacy/KPRIJS.cls.xml (revision 0) +++ BL/Legacy/KPRIJS.cls.xml (revision 49398) @@ -0,0 +1,22 @@ + + + +TECH.RegisteredObject + + +Horolog:%String=$Horolog +%Integer + + + + +Waarde:%String,Default:%String="" +%String + + + + + + Index: vhUnitTest/AXimpl/Admin/VKP/SalesPriceService/Test.cls.xml =================================================================== diff -u --- vhUnitTest/AXimpl/Admin/VKP/SalesPriceService/Test.cls.xml (revision 0) +++ vhUnitTest/AXimpl/Admin/VKP/SalesPriceService/Test.cls.xml (revision 49398) @@ -0,0 +1,54 @@ + + + +vhUnitTest.TestCase + + + + + + +Price:%Integer +1 +AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceHeaderOutputDC + + + + +Price:%Integer +1 +AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceLineOutputDC + + + + + + Index: BL/Legacy/KPRIJS/AxPrijsCacheRepository.cls.xml =================================================================== diff -u --- BL/Legacy/KPRIJS/AxPrijsCacheRepository.cls.xml (revision 0) +++ BL/Legacy/KPRIJS/AxPrijsCacheRepository.cls.xml (revision 49398) @@ -0,0 +1,52 @@ + + + +TECH.RegisteredObject + + +%String +^AXPrijsCache + + + +KlantNummer:%String,ProductNummer:%String,SimPpl:%Integer,Aantal:%Integer +BL.Legacy.KPRIJS.AxPrijsCache + + + + +AxPrijsCache:BL.Legacy.KPRIJS.AxPrijsCache,Minuten:%Integer + + + + +%Boolean + + + + + Index: vhUnitTest/BL/Legacy/KPRIJS/Test.cls.xml =================================================================== diff -u --- vhUnitTest/BL/Legacy/KPRIJS/Test.cls.xml (revision 0) +++ vhUnitTest/BL/Legacy/KPRIJS/Test.cls.xml (revision 49398) @@ -0,0 +1,50 @@ + + + +vhUnitTest.TestCase + + + + + + +Horolog:%String,VerwachteMinuten:%Integer,Message:%String="" +1 + + + + + + + + +Waarde:%String,VerwachteWaarde:%String +1 + + + + + + Index: KPRIJS.mac.rou =================================================================== diff -u -r49060 -r49398 --- KPRIJS.mac.rou (.../KPRIJS.mac.rou) (revision 49060) +++ KPRIJS.mac.rou (.../KPRIJS.mac.rou) (revision 49398) @@ -92,56 +92,65 @@ Set BusinessType = Klant.GeefBusinessType() Do KKORTING, CALC - // VHIP907: Verkoopprijzen - // VHIP907->MVI: voorlopig laat ik alles invullen in fase 2a en overschrijf ik enkel de waarden die ax teruggeeft - - If $$IsAX(KLNr,PRNr) { - Set CacheMinuten = $ListGet($Get(^AXPrijsCache(KLNr,PRNr,$S($G(SimPPL):SimPPL,1:"*"),$S($G(Aantal):Aantal,1:"*"))),1) - - If (($$GeefMinuten($Horolog)-600) < CacheMinuten) { - Set lb=^AXPrijsCache(KLNr,PRNr,$S($G(SimPPL):SimPPL,1:"*"),$S($G(Aantal):Aantal,1:"*")) - Set VkpEURAX=$LIST(lb,2) - Set LijstEURAX=$LI(lb,3) - Set PriceUnit=$LI(lb,4) - Set InclBTW=$LI(lb,5) - } Else { - Try - { - New SalesPriceService, Result - Set SalesPriceService = ##class(AXimpl.Admin.VKP.SalesPriceService).%New() - #Dim Result as AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceLineOutputDC - Set Result = SalesPriceService.GeefPrijs(KLNr, PRNr, $S($G(SimPPL):SimPPL,1:""),.Aantal) - Set VkpEURAX = Result.Price - Set LijstEURAX = Result.GrossPrice - Set PriceUnit=+Result.PriceUnit - Set InclBTW=SalesPriceService.PrijzenInclBTW() - Set ^AXPrijsCache(KLNr,PRNr,$S($G(SimPPL):SimPPL,1:"*"),$S($G(Aantal):Aantal,1:"*"))=$LB($$GeefMinuten($H),VkpEURAX,LijstEURAX,PriceUnit,InclBTW) - } Catch { - Set (VkpEURAX,LijstEURAX)=99999 - Set PriceUnit=1 - Set InclBTW=0 - #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() - do ##class(vhLib.Logger).LogExceptie(Exception) + If $$IsAX(KLNr, PRNr) { + new LegacyKPRIJS, SimPplVoorAxPrijsCache, AantalVoorAxPrijsCache, Minuten + new AxPrijsCache, AxPrijsCacheRepository, AxKlantId, SalesPriceService, Result + + #dim LegacyKPRIJS As BL.Legacy.KPRIJS = ##class(BL.Legacy.KPRIJS).%New() + #dim SimPplVoorAxPrijsCache As %String = LegacyKPRIJS.GeefWaardeVoorAxPrijsCache(.SimPPL, "*") + #dim AantalVoorAxPrijsCache As %String = LegacyKPRIJS.GeefWaardeVoorAxPrijsCache(.Aantal, "*") + #dim Minuten As %Integer = LegacyKPRIJS.GeefMinuten() + + #dim AxPrijsCacheRepository As BL.Legacy.KPRIJS.AxPrijsCacheRepository = ##class(BL.Legacy.KPRIJS.AxPrijsCacheRepository).%New() + #dim AxPrijsCache As BL.Legacy.KPRIJS.AxPrijsCache = AxPrijsCacheRepository.GeefAxPrijsCache(KLNr, PRNr, SimPplVoorAxPrijsCache, AantalVoorAxPrijsCache) + #dim AxKlantId As %String = ##class(AXimpl.Utils.KlantIdConverter).%New().ConvertToAx(KlantID, ##class(DOM.common.enu.Personality).VanHoecke()) + #dim SalesPriceService As AXimpl.Admin.VKP.SalesPriceService = ##class(AXimpl.Admin.VKP.SalesPriceService).%New() + #dim Result As AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceHeaderOutputDC = SalesPriceService.GeefPrijs(AxKlantId, PRNr, LegacyKPRIJS.GeefWaardeVoorAxPrijsCache(.SimPPL)) + + If ((Minuten - 600) > AxPrijsCache.Minuten) { + Try { + new ResultLine + + #dim ResultLine As AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceLineOutputDC = Result.Lines.GetAt(1) + + Set AxPrijsCache.AxVerkoopPrijsEuro = ResultLine.Price + Set AxPrijsCache.AxLijstPrijsEuro = ResultLine.GrossPrice + Set AxPrijsCache.PrijsEenheid = +ResultLine.PriceUnit + Set AxPrijsCache.InclusiefBtw = Result.InclVAT + + Do AxPrijsCacheRepository.BewaarAxPrijsCache(AxPrijsCache, Minuten) + } Catch { + New Exception + + Set AxPrijsCache.AxVerkoopPrijsEuro = 99999 + Set AxPrijsCache.AxLijstPrijsEuro = 99999 + Set AxPrijsCache.PrijsEenheid = 1 + Set AxPrijsCache.InclusiefBtw = $$$False + + #dim Exception As TECH.Exceptions.Exception = ##class(TECH.ExceptionHandler).Catch() + + Do ##class(vhLib.Logger).LogExceptie(Exception) + } + } + + If ((AxPrijsCache.AxVerkoopPrijsEuro > 0) && $$$Not(AxPrijsCache.AxVerkoopPrijsEuro = 99999)) { + Set VkpEUR = AxPrijsCache.AxVerkoopPrijsEuro + Set LijstEUR = AxPrijsCache.AxLijstPrijsEuro + + If (AxPrijsCache.InclusiefBtw) { + Set VkpEUR = +$Justify(VkpEUR / 1.21, 0, 10) } - } - - If (VkpEURAX>0)&&(VkpEURAX'=99999) - { - Set VkpEUR=VkpEURAX - Set LijstEUR=LijstEURAX - If InclBTW - { - Set VkpEUR=+$J(VkpEUR/1.21,0,10) - } + Set VkpPr = VkpEUR Set LijstPr = LijstEUR - If PriceUnit>1 - { - Set VkpEUR=VkpEUR/PriceUnit - Set LijstEUR=LijstEUR/PriceUnit + + If (AxPrijsCache.PrijsEenheid > 1) { + Set VkpEUR = VkpEUR / AxPrijsCache.PrijsEenheid + Set LijstEUR = LijstEUR / AxPrijsCache.PrijsEenheid } - Set GrOrde=$Case(PriceUnit,100:"H",:"E") - Set GrOrdNum=$Case(GrOrde,"H":100,:1) + + Set GrOrde = $Case(AxPrijsCache.PrijsEenheid, 100:"H", :"E") + Set GrOrdNum = $Case(GrOrde, "H":100, :1) Set Korting2=0 If +LijstEUR=0 { Index: AXimpl/Admin/VKP/SalesPriceService/ProductData.cls.xml =================================================================== diff -u --- AXimpl/Admin/VKP/SalesPriceService/ProductData.cls.xml (revision 0) +++ AXimpl/Admin/VKP/SalesPriceService/ProductData.cls.xml (revision 49398) @@ -0,0 +1,16 @@ + + + +TECH.DataTransferObject + + +%String + + + +%String + + + + + Index: BL/Legacy/KPRIJS/AxPrijsCache.cls.xml =================================================================== diff -u --- BL/Legacy/KPRIJS/AxPrijsCache.cls.xml (revision 0) +++ BL/Legacy/KPRIJS/AxPrijsCache.cls.xml (revision 49398) @@ -0,0 +1,44 @@ + + + +TECH.DataTransferObject + + +%String + + + +%String + + + +%Integer + + + +%Integer + + + +%String + + + +%String + + + +%String + + + +%Boolean + + + +%Integer + + + + + Index: AXimpl/Admin/VKP/SalesPriceService.cls.xml =================================================================== diff -u -r48147 -r49398 --- AXimpl/Admin/VKP/SalesPriceService.cls.xml (.../SalesPriceService.cls.xml) (revision 48147) +++ AXimpl/Admin/VKP/SalesPriceService.cls.xml (.../SalesPriceService.cls.xml) (revision 49398) @@ -2,200 +2,136 @@ Voor 1 product: -
Set Result = SalesPriceService.GeefPrice(KLNr, PRNr, optionele CifPPL) -
Voor meerdere producten via iterator: -
Do SalesPriceService.Initialisatie(KLNr) -
Do SalesPriceService.VoegToe(PRNr1, optionele CifPPL) -
Do SalesPriceService.VoegToe(PRNr2, optionele CifPPL) -
Do SalesPriceService.VoerUit() -
Set iterator=SalesPriceService.GeefResultaatIterator -
-
Voor meerdere producten via het onthouden van een reference: -
Do SalesPriceService.Initialisatie(KLNr) -
Set Reference1=SalesPriceService.VoegToe(PRNr1, optionele CifPPL) -
Set Reference2=SalesPriceService.VoegToe(PRNr2, optionele CifPPL) -
Do SalesPriceService.VoerUit() -
Do SalesPriceService.GeefResultaat(Reference1) -
Do SalesPriceService.GeefResultaat(Reference2)]]>
+SalesPrice voor één product: +
Set Result = SalesPriceService.GeefPrijs(KlantNummer, ProductNummer, CifPpl (optioneel)) +
+SalesPrice voor meerdere producten: +
Set ProductData1 = ProductDataFactory.MaakProductData(ProductNummer, CifPpl (optioneel)) +
Set ProductData2 = ProductDataFactory.MaakProductData(ProductNummer, CifPpl (optioneel)) +
Set Result = SalesPriceService.GeefPrijsVoorProducten(KlantNummer, ProductData1, ProductData2)]]> Prod.Product,BL.Derde.LevSpecifiek TECH.Mockable - - 1 -d rc.ZetApplicatie("AX_FASE") -w ci.GeefString("AX_FASE") -> 2A - -*/ -]]> - - - -AXimpl.MessageManager -1 - - AXimpl.Dynamics.SalesPriceOut.SalesPriceService 1 - -AX.Uitgaand.PM.impl.Convertor.Sopr.ProductConvertor + +AXimpl.MessageManager 1 - -AXif.Dynamics.SalesPriceOut.MessageParts.ADUSalesPriceHeaderInputDC + +AXimpl.Admin.VKP.SalesPriceService.AxItemIdBepaler 1 - -AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceHeaderOutputDC -1 - - - -KlantNummer:%String,ProductNummer:%String,PrijsRec:%String - - - -SalesPriceService:AXimpl.Dynamics.SalesPriceOut.SalesPriceService="",MessageManager:AXimpl.MessageManager="",ProductApi:DOM.PM.ProductAPI +SalesPriceService:AXimpl.Dynamics.SalesPriceOut.SalesPriceService="",MessageManager:AXimpl.MessageManager="",AxItemIdBepaler:AXimpl.Admin.VKP.SalesPriceService.AxItemIdBepaler="" 1 1 %Status 1 - -KlantNummer:%String + +KlantNummer:%String,ProductNummer:%String,CifPpl:%String +AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceHeaderOutputDC - -ProductNummer:%String,CifPPL:%String="" -%String + +KlantNummer:%String,ProductDataLijst...:AXimpl.Admin.VKP.SalesPriceService.ProductData +AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceHeaderOutputDC - -Reference:%String -AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceLineOutputDC + +KlantNummer:%String,Lines:%ListOfDataTypes +1 +AXif.Dynamics.SalesPriceOut.MessageParts.ADUSalesPriceHeaderInputDC - - - - - - - -AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceHeaderOutputDC - - - - -KlantNummer:%String,ProductNummer:%String,CifPPL:%String -AXif.Dynamics.SalesPriceIn.MessageParts.ADUSalesPriceHeaderOutputDC - - -PRNr:%String + +ProductNummer:%String,CifPpl:%String 1 -%String +AXif.Dynamics.SalesPriceOut.MessageParts.ADUSalesPriceLineInputDC -KLNr:%String +KlantNummer:%String 1 %String - - - -KLNr:%String -%String - -