Ga naar inhoud

Form AddInvArticleForm

  • Unit name: Dialogs.AddInvArticle
  • Form name: TAddInvArticleForm

Synopsis

This form is meant as a stay-on-top form. It can be used to add an article to an invoice.

Functionalities

Global

The user can enter the following data: * Article code. When an article is entered/selected, a check is performed. * Quantity. * Location (a dropdown with LOCATION.LOCATION values) * StockCode (a dropdown with STOCKCODE.Name values)
Stock codes 25/99 are changed into 75. * Type of article : "N/A" / "duty cleared" / "duty free" * Lot no * Expiry Date * Comments

Pressing 'Return' on any of the fields checks the field values, and attempts to add the record (see below).

On checking an article.

When an article is entered, the existence of the article is verified in the database. If it exists and has a popup message, the popup message must be displayed in a modal message dialog. The name of the article must be shown.

Checks before adding a record

The following checks are performed: 1. Quantity must be nonzero 2. A valid article code must be entered. 3. A Valid stock code must be entered. 3. If the article requires a lot number, a lot number must be entered. 4. If the article requires an expiry date, an expiry date must be entered. 5. For stock code 75, type of goods may not be empty:
one of duty free/duty cleared must be chosen. 6. If a lot number was entered, an expiry date must be entered.

The form has a checkbox to remember the values of in the fields. If the checkbox is unchecked, then the values are cleared when a record is added.

Adding a record

Adding the record is performed using an event handler: a structure/class with the entered values is passed on.

Tables/Views

  • Colour for entering color codes (global lookup)
  • Stockcode for entering stock codes (global lookup)
  • Article for entering article codes (global lookup)
  • AMBALAJ for entering package type (global lookup)
  • LOCATION for entering a location (global lookup)

Needed Service Calls

None.