serial UglyPickingCNTs,KeyCodesCNTs Default %Library.TMFormClass 0 %Library.List %Library.Boolean 0 %Library.String %Library.TMForm %Library.Boolean 0 %TMLabel %Boolean 0 %Library.Boolean 0 %Library.Boolean 0 %Library.Boolean 0 %Library.String -1 %Library.String -1 %Library.Integer -1 %Library.String %Library.Boolean 0 %Library.String "(onbekend)" %Library.String -1 %Library.String 1 %TMButton %TMButton %TMButton %TMButton %TMLabel %TMLabel %TMListView %TMPanel %TMEdit %TMEdit %TMEdit Destructor for SMWrap forms. cache 0 %Library.Status document literal initvalue:%String cache 0 %Status document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Value:%Library.Boolean cache 0 %Library.Status document literal cache 0 document literal ; Ctl3D = False ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [] ; GridLines = True ; HideSelection = False ; HotTrackStyles = [] ; ReadOnly = True ; RowSelect = True ; ParentFont = False ; TabOrder = 0 ; ViewStyle = vsReport ; OnKeyDown = lvProductsKeyDown ; OnSelectItem = lvProductsSelectItem ; end ; object pnlInput: CPanel ; Left = 4 ; Top = 108 ; Width = 223 ; Height = 90 ; BevelInner = bvLowered ; BevelOuter = bvLowered ; TabOrder = 1 ; TabStop = True ; OnClick = dCOMPEVENTControle ; object Label1: CLabel ; Left = 11 ; Top = 13 ; Width = 58 ; Height = 16 ; Caption = 'Product:' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clBlue ; Font.Height = -13 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; OnClick = dCOMPEVENTControle ; end ; object lblLocatie: CLabel ; Left = 11 ; Top = 37 ; Width = 56 ; Height = 16 ; Caption = 'Locatie:' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clBlue ; Font.Height = -13 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; OnClick = dCOMPEVENTControle ; end ; object lblPalletID: CLabel ; Left = 11 ; Top = 61 ; Width = 45 ; Height = 16 ; Caption = 'Pallet:' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clBlue ; Font.Height = -13 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; OnClick = dCOMPEVENTControle ; end ; object txtDossier: CEdit ; Left = 83 ; Top = 9 ; Width = 129 ; Height = 24 ; CharCase = ecUpperCase ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -13 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 0 ; OnKeyDown = txtProductKeyDown ; end ; object txtLocatie: CEdit ; Left = 83 ; Top = 33 ; Width = 129 ; Height = 24 ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -13 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; ParentShowHint = False ; ShowHint = True ; TabOrder = 1 ; OnKeyDown = txtLocatieKeyDown ; end ; object txtPalletID: CEdit ; Left = 83 ; Top = 57 ; Width = 129 ; Height = 24 ; CharCase = ecUpperCase ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -13 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 2 ; OnKeyDown = txtPalletIDKeyDown ; OnKeyPress = txtPalletIDKeyPress ; end ; end ; object btnClose: CButton ; Left = 2 ; Top = 198 ; Width = 43 ; Height = 40 ; Anchors = [akLeft, akBottom] ; Caption = '&CLOSE' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -8 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 2 ; OnClick = btnCloseClick ; end ; object btnDecBufferQty: CButton ; Left = 44 ; Top = 198 ; Width = 35 ; Height = 40 ; Anchors = [akLeft, akBottom] ; Caption = '-1' ; Enabled = False ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 3 ; OnClick = btnDecBufferQtyClick ; end ; object btnToelevering: CButton ; Left = 78 ; Top = 198 ; Width = 80 ; Height = 40 ; Anchors = [akLeft, akBottom] ; Caption = '&Toelevering' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 5 ; OnClick = btnToeleveringClick ; end ; object btnWijzig: CButton ; Left = 157 ; Top = 198 ; Width = 75 ; Height = 40 ; Anchors = [akLeft, akBottom] ; Caption = '&WIJZIG' ; Enabled = False ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 4 ; OnClick = btnWijzigClick ; OnMouseDown = btnWijzigMouseDown ; end ;end ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal cache 0 document literal cache 0 document literal 2 Do ;Besteld aantal volledig ingescand->toon bericht . Do pdaMsgBox^vhVisual(..Form.Caption,$LI(tmpStatus,2),$$$MBICONINFORMATION) ;------------------------------------------------------------------------------ ;If ProdIsInKOM Do ;. Do pdaMsgBox^vhVisual(..Form.Caption,"Het opgegeven product komt voor in een KOM toelevering.",$$$MBICONINFORMATION) ;--- ChargeIDs ---------------------------------------------------------------- ;LijnNr van toegevoegde bufferlijn achterhalen New LijnNr Set LijnNr=$$$cmReceptie.IsProdWithLocAndPalInBuffer(..RGID,..VolgNr,..ProductNr,..txtLocatie.Text,..txtPalletID.Text) Do:(LijnNr'=0) ..HandleCharge(LijnNr) ;--- Interface ---------------------------------------------------------------- Quit:('..dCOMPWRITElvProducts()) 0 Set:('..PalletVast) ..txtPalletID.Text="" Set:('(..LocatieVast || ..LocatieScanNadien)) ..txtLocatie.Text="" Set ..txtDossier.Text="" Do ..txtDossier.SetFocus() ;If ..AutoPopupAantal Do ;. Do ..EXEWijzig(1) ;1=Show aantal box voor directe wijziging Quit 1 ]]> ShowAantalBox:%Library.Boolean=0 cache 0 document literal verwerking wanneer button -1 wordt gedrukt, charges uit buffer halen: . ;Do ..HandleCharge(LijnNr) Do RWForm.%Close() Quit ]]> Value:%String cache 0 %Library.Status document literal GetAllAsLB:%Boolean=0 cache 0 %Library.String document literal LijnNr:%String cache 0 document literal 0 Do . ;Composite toevoegen aan buffer . New frmChargeInput . Set frmChargeInput=##class(UI.MB.UGLYPicking.dlgReceptieChargeInput).%New($LB(%this.Form.Address,0)) . Quit:('frmChargeInput.PrepareForCompositeInput(ProductNr,Dossier,1,..UserID)) ;1 vervangen naar QtyCompositesToScan en wijzigbaar maken in ChargeInput form + cyclen tot volledig aantal! . If frmChargeInput.Form.ShowModal()=$$$mrOk Do .. Do $$$cmReceptie.AddCompositeIDToBuffer(..RGID,..VolgNr,LijnNr,frmChargeInput.outCompositeID) Else If QtyCompositesToScan<0 Do . ;Composite verwijderen uit buffer, code niet geïmplementeerd om compositeids gekoppeld aan de buffer te verwijderen . ;huidige workaround: buffer volledig legen (-1 button), deze afsluiten, verwijderen en opnieuw beginnen! . Do MApplication.MessageBox("Er zijn nog compositeIDs gekoppeld aan de lijn: "_$$LCVT^vhLib($$$cmReceptie.GetLBBufferCompositeID(..RGID,..VolgNr,LijnNr))) Quit ]]> initvalue:%String cache 0 MApplication document literal RGID,UserID:%String cache 0 %Library.Boolean document literal TB) If '##class(Res.PI.ReceptieGroep).%ExistsId(RGID) Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Receptiegroep '"_RGID_"' bestaat niet.",$$$MBICONERROR) ;Receptie object openen, caption weergeven Set ReceptieGroep=##class(Res.PI.ReceptieGroep).%OpenId(RGID) Set ..Form.Caption="Receptie - "_ReceptieGroep.Caption_" (nieuw)" Do ReceptieGroep.%Close() Set ..IsNewBuffer=1 Set ..RGID=RGID ;Nieuwe buffer init Set ..VolgNr=$$$cmReceptie.CreateNewBuffer(RGID,UserID) Set ..UserID=UserID ;Buffer locken - single use If '(##class(UI.MB.UGLYPicking.UserInteractionUtils).GaVerderMetBuffer(..Form,..RGID,..VolgNr)){ Quit 0 } ;Interface settings voor buffer (default) New DefaultLocatie,DefaultPallet,LocatieVast,PalletVast If ..LocatieVast { Set DefaultLocatie="V" } ElseIf ..LocatieScanNadien { Set DefaultLocatie="ScanNadien" Set ..txtLocatie.Text = "04020101" }Else{ Set DefaultLocatie="ITS" } Set DefaultPallet=$S(..PalletVast:"V",..PalletViaProduct:"VP",1:"ITS") Set LocatieVast=$S(..LocatieVast:..txtLocatie.Text,1:"") Set PalletVast=$S(..PalletVast:..txtPalletID.Text,1:"") Do $$$cmReceptie.SetBufferInterface(..RGID,..VolgNr,DefaultLocatie,DefaultPallet,LocatieVast,PalletVast,..AutoPopupAantal) Quit 1 ]]> RGID:%String,VolgNr:%Integer,UserID:%String cache 0 %Library.Boolean document literal TB) If '##class(Res.PI.ReceptieGroep).%ExistsId(RGID) Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Receptiegroep '"_RGID_"' bestaat niet.",$$$MBICONERROR) ;Receptie object openen, caption weergeven Set ReceptieGroep=##class(Res.PI.ReceptieGroep).%OpenId(RGID) Set ..Form.Caption="Receptie - "_ReceptieGroep.Caption_" (open)" Do ReceptieGroep.%Close() Set ..IsNewBuffer=0 Set ..RGID=RGID Set ..VolgNr=VolgNr Set ..UserID=UserID ;Buffer locken - single use If '(##class(UI.MB.UGLYPicking.UserInteractionUtils).GaVerderMetBuffer(..Form,..RGID,..VolgNr)){ Quit 0 } ;Interface settings voor buffer (default) New DefaultLocatie,DefaultPallet,LocatieVast,PalletVast If ..LocatieVast { Set DefaultLocatie="V" } ElseIf ..LocatieScanNadien { Set DefaultLocatie="ScanNadien" Set ..txtLocatie.Text = "04020101" }Else{ Set DefaultLocatie="ITS" } Set DefaultPallet=$S(..PalletVast:"V",..PalletViaProduct:"VP",1:"ITS") Set LocatieVast=$S(..LocatieVast:..txtLocatie.Text,1:"") Set PalletVast=$S(..PalletVast:..txtPalletID.Text,1:"") Do $$$cmReceptie.SetBufferInterface(..RGID,..VolgNr,DefaultLocatie,DefaultPallet,LocatieVast,PalletVast,..AutoPopupAantal) Quit:('..dCOMPWRITElvProducts()) 0 Quit 1 ]]> Value:%Boolean cache 0 %Library.Status document literal Value:%Boolean cache 0 %Library.Status document literal %Status initvalue:%String cache 0 %Library.Status document literal Value:%Boolean cache 0 %Library.Status document literal Value:%Boolean cache 0 %Library.Status document literal cache 0 document literal 0 Do . Set ..lvProducts.Selected=..lvProducts.Items.GetItems(..lvProducts.Items.Count-1) . Do ..lvProducts.Selected.MakeVisible("False") Quit ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal verwerking wanneer button -1 wordt gedrukt, charges uit buffer halen: . ;Do ..HandleCharge(LijnNr) Set Sender.Enabled="True" Set MApplication.ScreenCursor=$$$crDefault ;End of user code s Args=$lb(Sender) q ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal cache 0 %Library.Boolean document literal PRODUCT }=--- If ..txtDossier.Text="" Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Er is geen product opgegeven.",$$$MBICONWARNING) . Do ..txtDossier.SetFocus() ; 1) Convert Dossier->DottedDossier New DottedDossier,Groep,DossierNr Set DottedDossier=##class(Prod.Product).ConvertToDottedDossier(..txtDossier.Text,.Groep,.DossierNr) If DottedDossier="" Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Het opgegeven dossier '"_..txtDossier.Text_"' is structureel niet geldig.",$$$MBICONWARNING) . Do ..txtDossier.SetFocus() . Do ..txtDossier.SelectAll() Else Do . Set ..txtDossier.Text=DottedDossier ; 2) Check of Dossier bestaat, zoja geef PRodNr terug New ProdNr Set ProdNr=##class(Prod.Product).GetProdNrViaGroepEnDossierNr(Groep,DossierNr) If ProdNr="" Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Het opgegeven dossier '"_..txtDossier.Text_"' bestaat niet.",$$$MBICONWARNING) . Do ..txtDossier.SetFocus() . Do ..txtDossier.SelectAll() ; 3) Is er aan het ProdNr een geldig product gekoppeld? If '##class(Prod.Product).%ExistsId(ProdNr) Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Het opgegeven dossier '"_..txtDossier.Text_"' is gekoppeld aan het product '"_..txtDossier.Text_"', maar dit bestaat niet.",$$$MBICONWARNING) . Do ..txtDossier.SetFocus() . Do ..txtDossier.SelectAll() ; 4) Is het product aanwezig in toelevering? If '$$$cmReceptie.IsProductInToelevering(ProdNr) Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Het opgegeven dossier '"_..txtDossier.Text_"' (product "_ProdNr_") komt niet voor in een toelevering.",$$$MBICONWARNING) . Do ..txtDossier.SetFocus() . Do ..txtDossier.SelectAll() Set ..ProductNr=ProdNr ; ---={ LOCATIE }=--- ; 1) Check Emptyness If ..txtLocatie.Text="" Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Er is geen locatie opgegeven.",$$$MBICONWARNING) . Do ..txtLocatie.SetFocus() ; 2) Check of Klant niet reeds een plaats is toegewezen (enkel indien 'InTeScannen') If ('..LocatieVast && '..LocatieScanNadien) Do . ;Mogelijk zijn er verschillende toeleveringen die behoren tot het product. Wij zoeken . ;of deze een gemeenschappelijke klant hebben . New JointKlantNr . Set JointKlantNr=$$$cmReceptie.GetJointKlantNrViaProdNr(..ProductNr) . Quit:(JointKlantNr="") ;Which means 'no' . ;Zo ja, checken of deze in buffer te vinden is, deze kan ons dan een locatie geven . ;die reeds eerder in gebruik is genomen voor die ene klant (indien leeg, nog niet in buffer) . New PrevLocation . Set PrevLocation=$$$cmReceptie.GetLocViaKlantNr(..RGID,JointKlantNr) . ;Indien NIET leeg en VERSCHILLEND van huidige ingave, dan geven we de gebruiker de kans . ;te wijzigen in de reeds ingenomen locatie van de klant . If (PrevLocation'="") && (PrevLocation'=..txtLocatie.Text) Do .. New Answer,Msg .. Set Msg="Andere producten van de klant '"_##class(Derde.Klant.Klant).GetFullName(JointKlantNr)_"' zijn reeds gestockeerd op locatie '"_PrevLocation_"'. " .. Set Msg=Msg_"Deze locatie behouden (zoniet, stockage op '"_..txtLocatie.Text_"')?" .. Set Answer=$$pdaMsgBox^vhVisual(..Form.Caption,Msg,$$$MBICONQUESTION,1) .. Set:(Answer=$$$mrOk) ..txtLocatie.Text=PrevLocation . ;Aangezien er een JointKlant is, moet deze worden toegevoegd aan de buffer, ongeacht . ;de inhoud vd var 'Answer'. We willen steeds up-to-date blijven... . Do $$$cmReceptie.SetLocViaKlantNr(..RGID,JointKlantNr,..txtLocatie.Text) ; ---={ PALLET ID }=--- If ..PalletViaProduct Do . Set ..txtPalletID.Text=$$$cmReceptie.GetPalletFromDossier(..txtDossier.Text) Else If (..txtPalletID.Text="") Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Er is geen pallet opgegeven.",$$$MBICONWARNING) . Do ..txtPalletID.SetFocus() Else Do ;Alles ok->extra nullen toevoegen indien nodig . Set ..txtPalletID.Text=$$AddLeadingChar^vhLib(..txtPalletID.Text,"0",8) Quit 1 ]]> cache 0 %Library.Boolean document literal extra nullen toevoegen indien nodig . Set ..txtPalletID.Text=$$AddLeadingChar^vhLib(..txtPalletID.Text,"0",8) Quit 1 ]]> cache 0 %Library.Boolean document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal %Library.CacheSerialState list "%Library.TMFormClass" Address Form Label1 LocatieVast PalletVast btnClose btnDecQty btnWijzig lblLocatie lblPalletID lvProducts pnlInput txtLocatie txtPalletID txtProduct txtDossier ProductNr IsNewBuffer RGID VolgNr UserID PalletViaProduct AllowedLeverancierNrs btnIncBufferQty ReselectBufferLijn btnDecBufferQty SEP AutoPopupAantal PalletScanPreamble btnToelevering FilterToelevNr ShowUnfinishedOnly LocatieScanNadien