Form ReturnsToStockForm
- Unit name: Forms.ReturnsToStock
- Form name: ReturnsToStockForm
- Old form name: Form45 (unit45, scanner app)
Synopsis
Form to enter returned goods into the stock.
Functionalities
- Edit for return number.
- On change, clear grid and detail display.
- On enter key, execute Search action.
- Button to execute Search action.
- Edit for quantity.
- On enter, move to location edit.
- Combobox for return type (filled from view ReturnTypes)
- Edit for location. On enter key, execute Move action.
- Button to execute Move action.
Actions
Search
- Enabled when there is a return invoice no.
- When executed, refreshes the ReturnContents view.
Move
- Enabled when
- there is a return invoice
- there are detail records
- return type
- A positive quantity, smaller than the quantity of the selected article line.
- There is a destination location.
- When executed, executes the Returns.MoveArticleToStock service call with all parameters as entered.
- When the service call returns, the display of articles (returncontents) is refreshed, quantity, location are cleared, and quantity is focused.
Tables/Views
ReturnTypes
SELECT RTYPE FROM RETURNTYPE ORDER BY SQ ASC
SELECT
A.artcode, A.qty, A.LOTNO, B.NAME2, A.LOCATION, A.ID, A.STOCKCODE,
isnull( A.SugestedLocationRet , ''x'') AS XLOCATION,
isnull(Y.sqwpk, ''X'') as MySQ
FROM
INVDETAILS A
LEFT OUTER JOIN Location Y on A.SugestedLocationRet=Y.LOCATION
INNER JOIN ARTICLE B A.ARTCODE=B.NAME
WHERE
(A.INVOICE = 'RET'+:ReturnInvoice)
AND (A.location='R.00.00.A')
ORDER BY
MySQ ASC, A.ARTCODE ASC