BL.Derde.KlantSpecifiek,BL.Derde.LevSpecifiek,vhLib.Macro 1 %RegisteredObject 0 ;1000;5023;1213;3814;1390;1387;1966;4073;1949;4451;6780;3044;2523;4533;6261;11620;3670;3814; Night job to clean old batches Delete the old inactive batches from the Batch table and from the Sequence table Add a new Batch Batch:APPS.Halux.common.Batch %Status Add a production order to a batch Batch:APPS.Halux.common.Batch,Toelevering:DOM.LEV.Toelevering %Status Delete a production order from a batch Batch:APPS.Halux.common.Batch,Toelevering:DOM.LEV.Toelevering %Status Delete all production orders from a batch Batch:APPS.Halux.common.Batch %Status Search Info of the batches 0:"X",1:"") Set arBatch(i)=$J(BatchNr,6)_"`"_$J(TimeStamp,14)_"|"_$J(LineNr,3)_" |"_$J(ProductionType,2)_" |"_$$$FormatNbr(Drawers,6)_"|"_$$$FormatNbr(TipOn,6)_"|"_$$$FormatNbr(Sink,6)_"|"_$J(OnderdelenSpecial,3) Set i = i + 1 } ]]> Batch:APPS.Halux.common.Batch %TimeStamp Toelevering:DOM.LEV.Toelevering BL.PPS.TBX.ToeleveringProductInfo 0) || ($Piece($$GENTYP^HAD(Product.GeefPRNr()),"\",1,2) = "TBX\BBX") { Set ToeleveringProductInfo.AantalHangmappen = ToeleveringProductInfo.AantalHangmappen + Aantal } If (Product.%Extends("DOM.PM.TBXProduct.TBXLadeMetUitsparing")) { Set ToeleveringProductInfo.AantalLadenMetUitsparing = ToeleveringProductInfo.AantalLadenMetUitsparing + Aantal } If ($Length($LG(##class(Prod.Kenmerk.DataDefinitie).Get("TBX",Product.GeefPRNr(),"ODSP")))) { Set ToeleveringProductInfo.AantalOnderdelenSpeciaal = ToeleveringProductInfo.AantalOnderdelenSpeciaal + Aantal } Set Verpakking = Product.GeefVerpakking() If ((Verpakking '= ##class(DOM.PM.enu.TBXVerpakking).StukMetOnderdelen()) && (Verpakking '= ##class(DOM.PM.enu.TBXVerpakking).StukZonderOnderdelen()) && (ToeleveringProductInfo.VerpakkingsTypes '[ Verpakking)) { Set ToeleveringProductInfo.VerpakkingsTypes = ToeleveringProductInfo.VerpakkingsTypes_Verpakking } } } Quit ToeleveringProductInfo ]]> Convert timestamp to European format TimeStamp %String Print ProPlus Print Cabinet d ##class(BL.PPS.TBX.LeanBatch).%New().PrintV1(4001,$tr("Z;E;L;F;O;M;R;K",";")) ]]> 1 PRNr,KLNr