Discount calculation function windows

Windows used for managing directory contents:

Entry window

The entry window is used to enter a discount calculation function.

The New discount calculation function is opened by the Add command from the directory context menu.

The window contains the Properties, Query, Filter, Filter settings, Information and Comment panels.

New discount calculation function entry window

Properties panel fields:

Selecting OK will add the item to the directory and close the entry window. Selecting Cancel will close the window without saving the item. Selecting Apply will add the item to the directory without closing the window.

The editor window allows one or more discount calculation functions to be edited.

The editor window is opened by the Edit command in the context menu when one or more discount calculation functions are selected.

Editor window

If one discount calculation function is selected, the Discount calculation function editor window will open:

Discount calculation function editor window

The fields and panels are the same as in the New discount calculation function window.

Multiple editor window

When two or more discount calculation functions are selected for editing, the multiple editor window will open. It has a panel displaying a list of the selected discount calculation functions and displays only the Properties, Information and Comment panels. The title in the window header is Discount calculation functions.

Multiple discount calculation functions editor window

When multiple discount functions are selected for editing, any changes that are saved will be applied to all of the selected discount functions.

Query panel in the Discount calculation function window

The Query panel contains the SQL query used to select data for calculating a discount:

Query panel in the discount calculation function entry window

The panel contains a multiline text field for entering an SQL query.

This SQL query is used to select data from the database to calculate a discount. The query is written using Transact SQL.

Example SQL query used for discount calculation

Query panel with SQL query entered

The context menu for the text field in the Query panel contains standard commands for working with text (highlight, copy, paste, etc.) and an additional Test query command. This command is only available when a query has been entered in the field. On execution it tests the query for errors and opens an alert window informing of the outcome.

When testing the query, specify filter setting at each filter step. If the query is completed successfully, the success message will appear.

Success message

If an error occurs, the error message will appear.

Error message

Filter panel in the Discount calculation function window

The Filter panel is used to add filter steps to the discount calculation function. Filtering is used to select the data used to calculate discounts:

Filter panel in the Discount calculation function entry window

Each filter step in the Filter settings panel is displayed as a filter parameter in the Filter panel.

Filter panel with filter parameters

Filter settings panel in the Discount calculation function window

The Filter settings panel is used to add filter steps to the discount calculation function. Filtering is used to select the data used to calculate discounts:

Filter settings panel in the Discount calculation function entry window

Columns in the Filter settings panel data grid:

The Filter settings panel context menu contains the following commands:

Each filter step in the Filter settings panel is displayed as a filter parameter in the Filter panel.

In the discount calculation function entry window, the filter has not been applied, so all filter setting panes display Not initialised.

Filter panel with filter parameters

The New filter step entry window is used to add a new filter step to the Filter settings panel. The Filter step window is used for editing.

The permanent delete confirmation prompt is used when deleting filter steps from the Filter settings panel.

Information panel in the Discount calculation function window

The Information panel contains a multiline text field for entering arbitrary information about the discount calculation function.

Information panel in the New discount calculation function window