Ga naar inhoud

Form ArticlesGrid

  • Unit name: Forms.Grids.Articles
  • Form name: TArticleGridForm
  • Old form name: unit5 (Form5)

Synopsis

Form with an overview of selectd articles.

Functionalities

  1. Selection of Supplier (Dropdown)
  2. Edit + Search button for article code. Search button or enter key executes Search action.
  3. Checkbox 'Only articles on stock'. When checked change, Re-executes the search if one is active.
  4. Checkbox 'Search description'. On check, 'Only articles on stock' is unchecked. When check changes, re-executes the search if one is active.
  5. DatePickers Van/tot 'Created between' (quick-set dropdown: today, this week, this and last week, this month, this year)
  6. Grid with search results.
  7. Button to execute ViewArticleStock action.
  8. Button to execute AddArticle action.
  9. Button to execute EditArticle action.
  10. Button to execute DeleteArticle action.
  11. Button to execute KitArticles action.

  12. Report ArticlesCreatedBetweenDates

  13. Report ArticleMoves
  14. Report ArticleCCTransactions

Actions

  1. Only active when there is a code of at least 2 characters.
  2. Constructs filter from the following parts:
  3. If a supplier was selected,
    (Supplier=:Supplier)
    
  4. If 'Search description' is unchecked
    1. if 'Only articles on stock' is checked
        (Artcode like '%'+searchterm+'%')
      
    2. if 'Only articles on stock' is unchecked
        (Name like '%'+searchterm+'%')
      
  5. If 'Search description' is checked
      (Name2 like '%'+searchterm+'%')
    
  6. If Date from is not empty
      (FillDate >= :FromDate)
    
  7. If Date to is not empty
      (FillDate <= :ToDate)
    
  8. 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

  1. Only enabled when an article is selected in the grid.
  2. On execute, shows the ArticleStock form, passing it the current article.

AddArticle

  1. Always enabled.
  2. When executed, adds a new record to the article list, shows ArticleDetails form.

EditArticle

  1. Enabled when there is a currently selected article.
  2. When executed, adds a new record to the article list, shows ArticleDetails form.

DeleteArticle

  1. Enabled when there is a currently selected article.
  2. When executed, asks the user for confirmation, and deletes the record if the user has confirmed.

KitArticles

  1. Enabled when an article is selected.
  2. When executed, shows the Kit Articles Grid form.
  3. 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

  1. ArticlesCreatedBetweenDates
  2. ArticleMoves When asked, the ArticleMovesParameters dialog is shown toget the parameters.
  3. ArticleCCTransactions
  4. DetailedArticleStock Before printing this report, use ArticleMovesParametersForm popup to get from and to dates. (AllowShowAllMoves must be False)
  5. ArticleLabel Before printing this, the number of copies is requested and passed on to the reporting engine.