Ga naar inhoud

Inventory

Form Forms.Inventory

  • Unit name: Forms.Inventory
  • Form name: InventoryForm
  • Old form name: form7.

Synopsis

Form to do inventory.

Functionalities

  1. Label to display inventory number.
  2. Dropdown to display stockcodes (filled from stockcode)
  3. Edits are colored when they have focus.
  4. Panel to show the Start/end row, place, level of the inventory. Shown in start of form, save inventoryy parameters so they can be used in CheckLocation.
  5. Edit to enter location. On enter key, execute Checklocation action.
  6. Edit to enter article barcode. On enter key, execute CheckArticle action.
  7. 2 labels to show article code and name.
  8. Edit to enter quantity. On enter key, execute InsertQuantity action.
  9. Grid to display current stock. (view InventoryStock)
  10. Button to execute Close action.
  11. Button to execute DeleteScan action.

Actions

Close

  1. Always Enabled
  2. When executed, close form.

CheckLocation.

  1. Enabled when the location edit is non-empty.
  2. Check that location exists and is part of the inventory (InventoryLocations).
  3. Check that location matches inventory parameters:
  4. chars 7-8 are the place. Must be in interval [Iplace1..IPlace2]
  5. chars 4-5 are the row. Must be in interval [IRow1..IRow2]
  6. Last char is the level. Must be in interval [ILevel..ILevel2]

CheckArticle.

  1. Only enabled when article code edit is non-empty.
  2. On execute, check article barcode existence using ArticleFromBarCode
  3. If it does not exist, show an error:
    Unknown barcode :barcode.
    
  4. If it exists,
  5. show article code and name in 2 labels.
  6. refresh Inventorystock view.

InsertQuantity

  1. Enabled when stockcode,location, article, and quantity are filled.
  2. When quantity is larger than 100000, display a warning.
    Quantity :Qty is seems not correct.
    Is this  the correct quantity ?
    
    Quantity must be confirmed with OK button (cancel cancels)
  3. When quantity is small enough or confirmed, push it to the server using service call StockControl.AddInventoryScan.
  4. Refresh InventoryStock.

DeleteScan

  1. Enabled when there is an article and a selected row in the grid.

  2. When executed, Asks for confirmation:

    Delete this article from the inventory?
    

  3. When confirmed, executes service call DeleteInventoryScan with current article, stockcode, location and inventory id.
  4. Refresh InventoryStock.

Tables/Views

  • InventoryStock
    select
      sum(qty) as qty, location, stockcode as SC from inventorydet
    where
      (artcode=:ArticleID)
      and (IDNO=:InventoryID)
    group by
      location, stockcode
    order by
      location
    
  • StockCode

  • ArticleFromBarCode See StockArticle form.

  • InventoryLocations

    SELECT
      ID, LOCATION, SQWPK  
    FROM
      LOCATION
    WHERE
      INVENTORYID=:InventoryID
    ORDER BY
      SQWPK
    

Needed Service Calls

Call 1

Call 2

Reports