Partialmove
Form PartialMove
- Unit name: Forms.PartialMove
- Form name: TPartialMoveForm
- Old form name: form6 (unit6)
Synopsis
Form to register article move operations.
Functionalities
- Source group
- Edit box for entering article bar code. On enter key, execute SearchArticle action.
- Button to execute the SearchArticle action.
- Label to display article code.
- Grid to show locations, view ScannerArticleStock. When current row changes, execute SelectArticleLine action.
- Label to show picking/quantity of selected article. (LAmounts)
- Labels display current stock code, location, max quantity.
- Dest group
- Edit to display/current quantity. Max value is equal to max. quantity.
- Edit to enter new location. On enter key, execute Move action.
- Edit to enter comment.
- Button to execute Move action.
Actions
SearchArticle
- Enabled when there is an article bar code.
- On execute, check article barcode existence using ArticleFromBarCode.
- If the article does not exist, show an error message:
set focus to bar code edit, and select all.
Unknown barcode: :BarCode.
- If the article exists, and a move popup message exists, the message is shown.
- Get the article pick count and picked quantity count (ArticleRecentPickList) from the last 30 days and display in label as
:Quantity pieces, :Picks picks in 30 days.
- Show article code in appropriate label.
- Show view ScannerArticleStock.
- Focus grid.
SelectArticleLine
- Enabled when a record is selected in the grid.
- Updates Labels to display current stock code, location, max quantity. Update edit for display/current quantity.
Move
- Enabled when there is a selected article, location, new location, positive quantity.
- Asks for confirmation.
- Executes server call StockControl.PartialMove with parameters:
- OldStock old location. From selection.
- NewStock new location. From edits.
- Operation ttMove
- Comments (String) Comment to be logged in scan history.
- ExpiryDate From selection.
- Quantity (integer) From edits.
- AdaptOutCC (Boolean) False
- AdaptINVCC (Boolean) False
- Supplier (integer) 0
- InvoiceNo: Generated number, see code in TForm.PartialMove
- Reload ArticleRecentPickList view and view ScannerArticleStock.
- Display confirmation of move operation..
- Clear all move parameters.
- Focus barcode edit, select all.
- See also code in Form1.PartialMove.
Tables/Views
-
ArticleFromBarCode See StockArticle form.
-
ArticleRecentPickList
SELECT sum(QTY) as Quantity, count(DISTINCT ID) AS Pickings FROM OUTDETAILS WHERE (ARTCODE = :ArticleID) AND (FILLDATE >= :CreatedSince) AND (TRANSACTIONTYPE='ORD')
- ScannerArticleStock
SELECT
LOCATION,
STOCKCODE,
SUM(QTYIN - QTYOUT) AS QTY,
sum(QTYReserved) AS QTYReserved,
LOTNO,
EXPIRYDATE,
Artcode,
Supplier
FROM
FSTOCTOTAL(:ArticleID)
WHERE
QTYIN - QTYOUT <> 0
GROUP BY
LOCATION,
STOCKCODE,
LOTNO,
EXPIRYDATE,
Artcode,
Supplier
HAVING
SUM(QTYIN - QTYOUT) > 0
ORDER BY
Location