Form ArticlesGrid
- Unit name: Forms.Grids.Articles
- Form name: TArticleGridForm
- Old form name: unit5 (Form5)
Synopsis
Form with an overview of selectd articles.
Functionalities
- Selection of Supplier (Dropdown)
- Edit + Search button for article code. Search button or enter key executes Search action.
- Checkbox 'Only articles on stock'. When checked change, Re-executes the search if one is active.
- Checkbox 'Search description'. On check, 'Only articles on stock' is unchecked. When check changes, re-executes the search if one is active.
- DatePickers Van/tot 'Created between' (quick-set dropdown: today, this week, this and last week, this month, this year)
- Grid with search results.
- Button to execute ViewArticleStock action.
- Button to execute AddArticle action.
- Button to execute EditArticle action.
- Button to execute DeleteArticle action.
-
Button to execute KitArticles action.
-
Report ArticlesCreatedBetweenDates
- Report ArticleMoves
- Report ArticleCCTransactions
Actions
Search
- Only active when there is a code of at least 2 characters.
- Constructs filter from the following parts:
- If a supplier was selected,
(Supplier=:Supplier)
- If 'Search description' is unchecked
- if 'Only articles on stock' is checked
(Artcode like '%'+searchterm+'%')
- if 'Only articles on stock' is unchecked
(Name like '%'+searchterm+'%')
- if 'Only articles on stock' is checked
- If 'Search description' is checked
(Name2 like '%'+searchterm+'%')
- If Date from is not empty
(FillDate >= :FromDate)
- If Date to is not empty
(FillDate <= :ToDate)
- The filter is applied on Article or ArticleFromStock. In ArticleFromStock, the filter can be split in 2 parts. One for the code (supplier), one for the description+dates.
ViewArticleStock
- Only enabled when an article is selected in the grid.
- On execute, shows the ArticleStock form, passing it the current article.
AddArticle
- Always enabled.
- When executed, adds a new record to the article list, shows ArticleDetails form.
EditArticle
- Enabled when there is a currently selected article.
- When executed, adds a new record to the article list, shows ArticleDetails form.
DeleteArticle
- Enabled when there is a currently selected article.
- When executed, asks the user for confirmation, and deletes the record if the user has confirmed.
KitArticles
- Enabled when an article is selected.
- When executed, shows the Kit Articles Grid form.
- The current article is passed on to the articles grid form.
Tables/Views
-
Article
-
ArticleFromStock
WITH Stock AS ( SELECT ARTCODE FROM STOCTOTAL WHERE -- {Codefilter} GROUP BY ARTCODE HAVING sum(qtyin-isnull(qtyout, 0))>0 ) SELECT Article.* FROM Stock LEFT JOIN article on ARTCODE=Article.name WHERE
Needed Service Calls
None.
Reports
- ArticlesCreatedBetweenDates
- ArticleMoves When asked, the ArticleMovesParameters dialog is shown toget the parameters.
- ArticleCCTransactions
- DetailedArticleStock Before printing this report, use ArticleMovesParametersForm popup to get from and to dates. (AllowShowAllMoves must be False)
- ArticleLabel Before printing this, the number of copies is requested and passed on to the reporting engine.