Ga naar inhoud

Pickitems

Form PickItemsForm

  • Unit name: Forms.PickItems
  • Form name: PickItemsForm
  • Old form name: Form9 (unit9)

Synopsis

Form to control picking articles from the warehouse.

Functionalities

  1. Has a property to set Pickjob ID.
  2. Has a property to set TransitLocation
  3. Grid to show articles to be picked. When the user selects a line, reset form (clear all edits, set invisible where needed etc.).
  4. Active edit gets red color.
  5. On Show, the ShowArticles action is executed.
  6. A refresh button allows to call ShowArticles
  7. Edit allows to enter barcode. When enter is pressed, CheckArticle action is executed.
  8. Edit Allows to enter lotno. On enter key, execute CheckLotNo action.
  9. Edit allows to enter a trolley location. Only shown when picktype is ptTrolley. On enter, execute the ShowTrolleyLocationArticles action when that is enabled. On enter key, execute the CheckTrolleyLocation action.
  10. Edit allows to enter quantity. When enter is pressed, SaveScanData is executed.
  11. Button to execute RefreshData action.
  12. Button to execute ShowOrders action.

Actions

ShowOrders

  1. Always enabled.
  2. Show Form PickOrderList modally, passing it the current pick job id.

ShowArticles

  1. Always enabled.
  2. Saves bookmark if there is a current row in the view PickJobDetails. (use record ID)
  3. Shows view PickJobDetails with macros:
  4. Macro OrderNo is AVIZ when pickingtype differs from ptTrolley else it is '' as AVIZ
  5. Macro TLocation, for picktype ptTrolley equals
    (CASE WHEN count(distinct isnull(out.TLOCATION, ''''))>1
     then ''MP999''
     ELSE MAX(isnull(out.TLOCATION, '''')) END) as TLOCATION,
    
    For other picktypes it is
    '' as TLOCATION
    
  6. Sort order parameter is ASC or DESC depending on form sort order.
  7. pickjobid is the form pick job ID.
  8. Bookmark is restored.

CheckArticle

  1. Enabled if a barcode is present.
  2. if The current field pickedby is not empty, an error message is shown:
    Article already scanned: :Name2
    
  3. Execute DeliveryControl.PickCheckArticleScanned
  4. If the result has a display message, show it.
  5. Save the StartScanDate field.
  6. If HaveLotNo is true:
  7. Make the LotNo edit box visible and focus it.
  8. If HaveLotNo is false:
  9. if there is a trolley location edit: focus it
  10. if there is no trolley location: focus the quantity edit

CheckLotNo

  1. Only enabled when there is a lotno
  2. If the entered lotno equals the lotno in the current record, the focus is transferred to the tlocation edit if available, else the focus goes to the quantity edit.
  3. If the entered lotno is different from the lotno in the current record, an error message is shown:
    The lotno is wrong!
    Correct lotno is: :LotNo
    
    The lotno edit is focused, and all is selected.

ShowTrolleyLocationArticles

  1. Enabled if the current location is MP999 and the text in the trolley location is different from MP999.
  2. Show form TrolleyPickArticles with current Invoice, article, location, lotno and user.
  3. if the form closes with mrYes modal result then the trolley location text is set to MP999.

CheckTrolleyLocation

  1. Always enabled.
  2. Check if the current article has a trolley location:
  3. If yes, it is checked against the location in the trolley location edit. If they do not match, an exception is raised.
  4. If not, Call service call DeliveryControl.ScanTrolleyLocation with current PickJobID, invoice ID, Trolley Location name.

SaveScanData

  1. Is enabled if
  2. the current pickedby is empty.
  3. Article code is OK.
  4. LotNo is OK. (entered sme as expected)
  5. Quantity <= Requested quantity.
  6. Trolley location is correct.

  7. Execute DeliveryControl.SaveArticleScanData with the correct descriptor:

  8. PickJobID (int64)
  9. ArticleID (int64)
  10. LocationID (int64)
  11. OutDetailID (int64)
  12. TransitLocation from current transit location.
  13. StockCode from current record stockcode
  14. if result.LocationEmptyStock is true then the following message is shown:
    Stock for this article is zero now in this location.
    
  15. if result.PickJobDone is true then the following message is shown with yes/no buttons:
    This was the last job (order-line) from the order. Do you want to exit?
    
    if the user selected 'Yes', then the form is closed.

RefreshData action.

Tables/Views

  • PickJobDetails
SELECT
  -- {:OrderNo1 as} AVIZ,
  outdetails.artcode,
  isnull(invdetails.location, '0000') as LOCATION,
  -- {TLOCATION1}
  sum(outdetails.qty) as QTY,
  sum(outdetails.QtyCF) as QTYCF,
  count(distinct OutDetails.ID) as NoOfRows,
  outdetails.stockcode,
  isnull(PICKEDBY, '') as PICKEDBY,
  NAME2,
  (CASE
    WHEN ((isnull(WEIGHT, 0) > UWEIGHT)
          or (isnull(VOL, 0) > UVOLUME)
          or (sum(outdetails.qty) * VOL) > TVOLUME)
    THEN 1
    ELSE 0
  END) as SortField,
  isnull(Lotno, '') as lotno,
  LOCATION.SqWpk,
  max(OutDetails.id) as OID
FROM
  PickJob
  INNER JOIN out ON (pjInvoiceFK=out.id)
  inner join outdetails on (aviz = avizno)
  INNER JOIN ARTICLE ON (outdetails.artcode = article.name)
  left outer join invdetails on
    (INVDETAILS.ID = OUTDETAILS.INVOICENO)
    AND (INVDETAILS.STOCKCODE = OUTDETAILS.STOCKCODE)
    AND (INVDETAILS.ARTCODE =  OUTDETAILS.ARTCODE)
  left outer join LOCATION on (INVDETAILS.LOCATION = LOCATION.LOCATION),
  PICKINGPARAMS
where
  (Pickjob.pjJodbID=:PickJobID)

GROUP BY
  AVIZ,
  outdetails.artcode,
  isnull(invdetails.location, '0000'),
  outdetails.stockcode,
  isnull(PICKEDBY, ''),
  NAME2,
  isnull(Lotno, ''),
  LOCATION.SqWpk,
  WEIGHT,
  UWEIGHT,
  VOL,
  UVOLUME,
  TVOLUME
order by
  SortField DESC,
  LOCATION.sqwpk :sortorder,
  outdetails.artcode,
  TLOCATION

Needed Service Calls

DeliveryControl.ScanTrolleyLocation

To set the trolley location on an order in the pick job.

DeliveryControl.SaveArticleScanData

To save the results of the article scan.

Reports