Searcharticleonlocation
Form SearchArticleOnLocation
- Unit name: Dialogs.SearchArticleOnLocation
- Form name: SearchArticleOnLocationDialog
- Old form name: Form5 (unit5)
Synopsis
Form to select article, based on location.
Functionalities
- Edit to enter location. on Enter key, execute Search action.
- Button to execute Search action.
- Grid with result of * ArticleFromLocation view.
- Button to execute OK action.
- Button to execute Cancel action.
- Property to set search location ShowLocation .
- Display the location if set.
- When set and nonempty, execute search if set.
- Property to get selected article: SelectedArticle
Actions
OK
- Enabled if there is a selected article.
- Set value for SelectedArticle property.
- Close form with mrOK modal result.
Cancel
- Always enabled.
- Close form with mrCancel modal result.
Action2
Tables/Views
- ArticleFromLocation
SELECT DISTINCT A.ARTCODE, B.NAME2 FROM STOCTOTAL A LEFT OUTER JOIN ARTICLE B ON (B.NAME = A.ARTCODE) WHERE (A.LOCATION = :Location) GROUP BY ARTCODE, NAME2 HAVING SUM(QTYIN - ISNULL(QTYOUT, 0)) > 0 UNION SELECT DISTINCT a.artcode, C.NAME2 FROM OUTDETAILS a INNER JOIN INVDETAILS b ON (b.ID = a.INVOICENO) AND (b.STOCKCODE = a.STOCKCODE) AND (b.ARTCODE = a.ARTCODE) INNER JOIN ARTICLE c ON (a.artcode = c.name) WHERE (B.LOCATION = :Location) AND (a.pickedby = '') ORDER BY A.ARTCODE
Needed Service Calls
None.
Reports
None.