Ga naar inhoud

Searcharticleonlocation

Form SearchArticleOnLocation

  • Unit name: Dialogs.SearchArticleOnLocation
  • Form name: SearchArticleOnLocationDialog
  • Old form name: Form5 (unit5)

Synopsis

Form to select article, based on location.

Functionalities

  1. Edit to enter location. on Enter key, execute Search action.
  2. Button to execute Search action.
  3. Grid with result of * ArticleFromLocation view.
  4. Button to execute OK action.
  5. Button to execute Cancel action.
  6. Property to set search location ShowLocation .
  7. Display the location if set.
  8. When set and nonempty, execute search if set.
  9. Property to get selected article: SelectedArticle

Actions

OK

  1. Enabled if there is a selected article.
  2. Set value for SelectedArticle property.
  3. Close form with mrOK modal result.

Cancel

  1. Always enabled.
  2. 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.