Index: zSTOCK.mac.rou =================================================================== diff -u -r948 -r1014 --- zSTOCK.mac.rou (.../zSTOCK.mac.rou) (revision 948) +++ zSTOCK.mac.rou (.../zSTOCK.mac.rou) (revision 1014) @@ -1,15 +1,49 @@ +zSTOCK + + do ClrScr("0101") + set FP=0101 W @F,@FMTI,"RAADPLEGEN STOCK",@FMTi + +10 New PRNr,Date + set PRNr = $$SELECT^PRODUKT6() + if PRNr="-" goto YZ +20 Set %INT="",%EXT="" + For Set Date=$$ASK^vhINP("Datum: ",8,$G(Date)) Quit:"-"[Date Do VALDATE^vhDTyp(Date,"DK",$H) If %TC Set Date=%EXT Quit + If Date="-" goto 10 + do DisplayResult(PRNr,$G(%INT)) goto 10 +YZ Quit +ClrScr(Pos) + set FP=Pos W @F,@F1 + quit - - DisplayResult(PRNr,Datum) + set Datum = $get(Datum) - new StockService, dtoStock - set StockService = ##class(APPS.common.StockNiveauService).GeefService(PRNr,Datum) + new StockService, StockServiceObj + new Tijd , TijdObj + new dtoStock + + do StartTimer^vhLib + set StockService = ##class(APPS.common.impl.StockNiveauService).%New(PRNr,Datum) set dtoStock = StockService.GeefAlleStockTypeNiveaus() + do StopTimer^vhLib + set Tijd = $$GetInterval^vhLib() + + do StartTimer^vhLib + set Product = ##class(DOM.DomeinContext).Instance().GeefProductAPI().GeefProduct(PRNr) + set StockServiceObj = ##class(APPS.common.impl.StockNiveauServiceObj).%New(Product,Datum) + set dtoStock = StockServiceObj.GeefAlleStockTypeNiveaus() + do StopTimer^vhLib + set TijdObj = $$GetInterval^vhLib() + + do ClrScr("0501") + + do Display("0602","Product : ",Product.GeefKorttekst()_" "_Product.GeefOmschrijving()) + if $length(Datum) Do Display("0702","Gewenste Datum : ",$$EXTDATE^vhDTyp(Datum)) + do Display("0905","Fysische Stock : ",dtoStock.Fysisch) do Display("1005","Praktische Stock : ",dtoStock.Praktisch) do Display("1105","Theoretische Stock : ",dtoStock.Theoretisch) @@ -18,12 +52,14 @@ do Display("1405","In Reservatie : ",dtoStock.InReservatie) do Display("1505","In Receptie : ",dtoStock.InReceptie) do Display("1605","Gestockeerd : ",dtoStock.Gestockeerd) + do Display("1705","Tijd obj : ",TijdObj) + do Display("1805","Tijd : ",$$GetInterval^vhLib()) quit Display(Pos,String,Value) set FP=Pos write @F,@F2,String_Value + quit - \ No newline at end of file