serial UglyPickingCNTs,KeyCodesCNTs Default %Library.TMFormClass 0 Args:%String cache 0 document literal %Library.String EH.Makova.EventCtrlr %Library.TMForm %Library.Boolean 0 %Library.String %Library.Boolean 0 %Library.Boolean 0 %TMShape %Library.List $LB(..#sortLowCostRoute,..#sortProduct) %Library.Integer %Library.String "(onbekend)" %TMButton %TMButton %TMButton %TMLabel %TMLabel %TMLabel %TMLabel %TMListView %TMEdit %TMEdit Destructor for SMWrap forms. cache 0 %Library.Status document literal initvalue:%String cache 0 %Status document literal cache 0 document literal ; Ctl3D = False ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -13 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; GridLines = True ; HideSelection = False ; HotTrackStyles = [] ; ReadOnly = True ; RowSelect = True ; ParentFont = False ; ShowColumnHeaders = False ; TabOrder = 0 ; ViewStyle = vsReport ; OnSelectItem = lvPickListSelectItem ; end ; object btnCancel: CButton ; Left = 4 ; Top = 198 ; Width = 75 ; Height = 40 ; Anchors = [akLeft, akBottom] ; Caption = '&ESC' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 3 ; OnClick = btnCancelClick ; end ; object btnTrans: CButton ; Left = 78 ; Top = 198 ; Width = 75 ; Height = 40 ; Anchors = [akLeft, akBottom] ; Caption = '&TRANSIT' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 4 ; OnClick = btnTransClick ; end ; object btnActie: CButton ; Left = 152 ; Top = 198 ; Width = 75 ; Height = 40 ; Anchors = [akLeft, akBottom] ; Caption = '&ACTIE' ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clWindowText ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentFont = False ; TabOrder = 5 ; OnClick = btnActieClick ; end ; object txtScanLocatie: CEdit ; Left = 4 ; Top = 174 ; Width = 92 ; Height = 19 ; Color = clSilver ; Ctl3D = False ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clGreen ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; ParentCtl3D = False ; ParentFont = False ; TabOrder = 1 ; OnClick = txtScanLocatieClick ; OnExit = txtScanLocatieExit ; OnKeyDown = txtScanLocatieKeyDown ; end ; object txtScanPallet: CEdit ; Left = 95 ; Top = 174 ; Width = 133 ; Height = 19 ; CharCase = ecUpperCase ; Color = clSilver ; Ctl3D = False ; Font.Charset = DEFAULT_CHARSET ; Font.Color = clGreen ; Font.Height = -11 ; Font.Name = 'MS Sans Serif' ; Font.Style = [fsBold] ; MaxLength = -1 ; ParentCtl3D = False ; ParentFont = False ; TabOrder = 2 ; OnClick = txtScanPalletClick ; OnKeyDown = txtScanPalletKeyDown ; OnKeyPress = txtScanPalletKeyPress ; end ;end ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal cache 0 document literal Args:%String cache 0 document literal Value:%Boolean cache 0 %Library.Status document literal initvalue:%String cache 0 MApplication document literal initvalue:%String cache 0 %Library.Status document literal cache 0 document literal EarlyQuit .. Else Do ;Error during init... ... Do pdaMsgBox^vhVisual(..Form.Caption,InitSuccess,$$$MBICONWARNING) ... Set EarlyQuit=1 .. Do OrderPickForm.%Close() . ;PICKING: Volledige pallet . Else If DeelPicking=0 Do .. New PalletPickForm .. Set PalletPickForm=##class(UI.MB.UGLYPicking.dlgPalletPick).%New($LB(%this.Form.Address,0)) .. Set PalletPickForm.UserId=..UserId .. Set PalletPickForm.ConsNr=..ConsNr .. Set PalletPickForm.Magazijn=..Magazijn .. Set PalletPickForm.PalletID=PalletID .. Set PalletPickForm.Locatie=..lvPickList.Selected.Caption .. Set PalletPickForm.IgnoreCCWhenFullPick=1 ;C/C niet uitvoeren indien full-pick van alle prods op pallet .. If PalletPickForm.dCOMPWRITElvProducts()>0 Do ... Do:('IsFirst) pdaMsgBox^vhVisual(..Form.Caption,"Nog producten te picken van zelfde pallet.",$$$MBICONINFORMATION) ... Set EarlyQuit=(PalletPickForm.Form.ShowModal()=$$$mrCancel) .. Else Do ... Set EarlyQuit=1 ... Do pdaMsgBox^vhVisual(..Form.Caption,"Interne fout: palletpicking vereist, echter geen producten op pallet gevonden.",$$$MBICONERROR) .. Do PalletPickForm.%Close() . Set IsFirst=0 . Set:(..InTransMode) ..InTransMode=0 ;Do:(DeelPicking=-1) pdaMsgBox^vhVisual(..Form.Caption,"Alle producten op pallet '"_PalletID_"' zijn afgehandeld.",$$$MBICONINFORMATION) ;Volgende 'clears' zorgen ervoor dat wanneer 'ESC' wo ingeduwd de form direct wo afgesloten ;zie btnCancelClick voor meer info Set ..txtScanLocatie.Text="" Set ..txtScanPallet.Text="" Do:('..dCOMPWRITElvPickList(0)) ..Form.Close() Do:('..PalletsAvailable) ..Form.Close() ;PalletsAvailable ingevuld door 'dCOMPWRITElvPickList'=vorige oproep!!! Quit ]]> Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Args:%String cache 0 document literal Locatie, bijv. 02030100 Locatie:%String cache 0 %Library.Boolean document literal 0 Do . Set ..lvPickList.Selected=..lvPickList.Items.GetItems(0) Quit (..lvPickList.Items.Count'=0) ]]> cache 0 document literal 0) Do . Set ..lvPickList.Selected=..lvPickList.Items.GetItems(0) Do ..lvPickList.SetFocus() Quit ]]> PalletID:%String,CheckIfInTrans:%Boolean=0 cache 0 %Library.Boolean document literal cache 0 document literal CreateZeroPallets:%Boolean=1,DoDataOnly:%Boolean=0,SelectFirstItem:%Boolean=1 cache 0 %Library.Boolean document literal dit geeft een unieke sleutel... . Else Do .. Do MApplication.MessageBox("Interne fout: Onbekende sortering!!!") Set RS=$$$NULLOREF ;============================================================================== ;Deze reservaties weergeven Do ..lvPickList.Items.BeginUpdate() Do ..lvPickList.Items.Clear() New tmpItem,SortLoop,LICaption,InvalidLocs Set SortLoop="" Set InvalidLocs="" Kill aPICKLIST ;Deze array wordt met dezelfde gegevens opgevuld (zie 'dCOMPREWRITElvPickList') For Set SortLoop=$O(aSORTEDReservaties(SortLoop)) Quit:(SortLoop="") Do . Set Line=aSORTEDReservaties(SortLoop) . Set tmpItem=..lvPickList.Items.Add() . ;Set tmpItem.Caption=$$$cmGeneral.GetLocStr($LI(Line,$$$palLocations)) . ;Set tmpItem.Caption=$LI(Line,$$$palTransLoc) ; Added by WimV on 04/08/2009 . Set tmpItem.Caption=$S($$$cmGeneral.LocMIsInTransit($LG(Line,$$$palLocM)):$$$cmGeneral.GetLocStr($LI(Line,$$$palLocations)), 1:##class(EWMS.TransLoc).FormatLocTrans($LI(Line,$$$palTransLoc))) ; Added by WimV on 10/08/2009 . If tmpItem.Caption="" Do Quit .. Set InvalidLocs=InvalidLocs_$LB("Pallet '"_$LI(Line,$$$palPalletID)_"' product '"_##class(Prod.Product).GetPropViaNr($LI(Line,$$$palProduct),"KortTekst")_"'") . If $LI(Line,$$$palNeedAll) Do .. If $LI(Line,$$$palIsFull) Do ... Set tmpItem.Caption=tmpItem.Caption_"*" ;FULL PALLET WAARVAN ALLES WO GEPICKED .. Else Do ... Set tmpItem.Caption=tmpItem.Caption_"+" ;NIET-FULL PALLET WAARVAN ALLES WO GEPICKED . ;DATA VELDEN . If $LI(Line,$$$palTransit) Do .. Do tmpItem.SubItems.Add($LI(Line,$$$palPalletID)) . Else Do ;Indien mag<>transit->loc_id nt belangrijk want er kan maar 1 pal per loc staan... .. Do tmpItem.SubItems.Add(##class(Prod.Product).GetPropViaNr($LI(Line,$$$palProduct),"KortTekst")) . Do tmpItem.SubItems.Add($LI(Line,$$$palProduct)) . Do tmpItem.SubItems.Add($LI(Line,$$$palAantalTePicken)) . Do tmpItem.SubItems.Add($$$cmGeneral.GetShortLocStr($LI(Line,$$$palLocations))) ; $$$palLocations --> $$$palTransLoc . Do tmpItem.SubItems.Add($LI(Line,$$$palPalletID)) . Do tmpItem.SubItems.Add($LI(Line,$$$palLocM)) . Do tmpItem.SubItems.Add($LI(Line,$$$palID)) . Do tmpItem.SubItems.Add($LI(Line,$$$palInventory)) . Do tmpItem.SubItems.Add($LI(Line,$$$palNeedAll)) . Do tmpItem.SubItems.Add($LI(Line,$$$palIsFull)) . Do tmpItem.SubItems.Add($LI(Line,$$$palTransLoc)) . ;ARRAY . Set aPICKLIST(tmpItem.Index)=$LB(tmpItem.Caption,tmpItem.SubItems.Text) Do ..lvPickList.Items.EndUpdate() If InvalidLocs'="" Do Quit 0 . Do pdaMsgBox^vhVisual(..Form.Caption,"Ongeldige locaties voor: "_$$ListToPieces^vhLib(InvalidLocs,", ")_".",$$$MBICONERROR) ;============================================================================== If ..lvPickList.Items.Count=0 Do ;Quit 0 . Set ..PalletsAvailable=0 . New tmpStatus . ;Bericht (U02) versturen dat order afgesloten is . Set tmpStatus=$$$cmPalletPick.ConfirmOrder(..ConsNr,..UserId,..Magazijn) . If $LI(tmpStatus)<0 Do .. Do pdaMsgBox^vhVisual(..Form.Caption,$LI(tmpStatus,2),$$$MBICONERROR) . Else Do .. New AskForPrint .. Set AskForPrint=##class(Flow.OrderWMS.Hoofding).AskForEtiketWhenOrderIsDone(..Magazijn) .. Do ##class(UI.MB.UGLYPicking.dlgOrderPick).PrintPalletEtiket(..ConsNr,AskForPrint,..Magazijn) .. Set ..OrderConfirmed=1 ;Message handling bovenaf opvangen (diegene die deze form aanmaakt) Else If ..lvPickList.Items.Count>0 Do . Set ..PalletsAvailable=1 . If SelectFirstItem Do .. Set ..lvPickList.Selected=..lvPickList.Items.GetItems(0) . Else Do .. Do ..dCOMPWRITESortering() ;Geen selectie? Sorteringsvelden updaten Quit 1 ]]> Args:%String cache 0 document literal 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 PalletID:%String 1 %String Args:%String cache 0 document literal Args:%String cache 0 document literal 1 2 %Library.CacheSerialState list "%Library.TMFormClass" Address Form Shape1 btnCancel btnPick btnPrint lblHeader lblKlant lblProductKT lblQty lvPickList Button1 Button2 LastSelected Shape btnScanLocatie ScanBuffer txtScanLocatie Edit1 txtScanPallet ConsNr Magazijn btnTrans InTransMode EventCtrlr Sortering SortOrder UserId OrderConfirmed PalletScanPreamble btnActie PalletsAvailable