Inventory
Form Forms.Inventory
- Unit name: Forms.Inventory
- Form name: InventoryForm
- Old form name: form7.
Synopsis
Form to do inventory.
Functionalities
- Label to display inventory number.
- Dropdown to display stockcodes (filled from stockcode)
- Edits are colored when they have focus.
- 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.
- Edit to enter location. On enter key, execute Checklocation action.
- Edit to enter article barcode. On enter key, execute CheckArticle action.
- 2 labels to show article code and name.
- Edit to enter quantity. On enter key, execute InsertQuantity action.
- Grid to display current stock. (view InventoryStock)
- Button to execute Close action.
- Button to execute DeleteScan action.
Actions
Close
- Always Enabled
- When executed, close form.
CheckLocation.
- Enabled when the location edit is non-empty.
- Check that location exists and is part of the inventory (InventoryLocations).
- Check that location matches inventory parameters:
- chars 7-8 are the place. Must be in interval [Iplace1..IPlace2]
- chars 4-5 are the row. Must be in interval [IRow1..IRow2]
- Last char is the level. Must be in interval [ILevel..ILevel2]
CheckArticle.
- Only enabled when article code edit is non-empty.
- On execute, check article barcode existence using ArticleFromBarCode
- If it does not exist, show an error:
Unknown barcode :barcode.
- If it exists,
- show article code and name in 2 labels.
- refresh Inventorystock view.
InsertQuantity
- Enabled when stockcode,location, article, and quantity are filled.
- When quantity is larger than 100000, display a warning.
Quantity must be confirmed with OK button (cancel cancels)
Quantity :Qty is seems not correct. Is this the correct quantity ?
- When quantity is small enough or confirmed, push it to the server using service call StockControl.AddInventoryScan.
- Refresh InventoryStock.
DeleteScan
-
Enabled when there is an article and a selected row in the grid.
-
When executed, Asks for confirmation:
Delete this article from the inventory?
- When confirmed, executes service call DeleteInventoryScan with current article, stockcode, location and inventory id.
- 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