Wayfinder / Case study / Topic detail

Source-derived document; reported behaviour, inference and evidence gaps are identified in the text.

Return to: 02 — Business Capability Map — topic detail

Order entry and item entry

In this document

Capability: Order entry and item entry

ordmenu.4gl.main opens the order form and provides Add, Query, Modify, Delete, and Exit commands. Add repeatedly calls enter_order() while the user answers y to enter another order, then sets chosen to 1. enter_order() clears the menu and form, obtains a customer, accepts order and ship dates, accepts an item array, inserts the order and its items, and reports Order added. E0009

Item entry retrieves the description and unit price from stock after stock and manufacturer values are entered. It calculates each item total as quantity multiplied by unit price and assigns item numbers. renum_items() assigns sequential item numbers from the current array position through arr_count(), updating visible item-number fields while screen rows remain available. The order-entry form supports up to ten item records in program state, while the displayed form definitions contain four repeated item-entry rows. E0009

get_cust() repeatedly prompts for a customer number and continues until the lookup returns status zero, then displays the customer record. The source shows no explicit error message or user-directed exit path for an invalid number. This may produce repeated prompting without useful feedback unless the 4GL runtime supplies implicit status handling or interruption behavior; the supplied evidence does not establish the exact runtime result. E0010

get_item() selects description and unit price using a stock-number/manufacturer-code pair and immediately displays the result without a visible status or NOTFOUND test. If the pair is absent, null or stale values could be displayed and then used by total calculation. This is a plausible data-integrity and user-feedback issue, not a confirmed runtime outcome, because constraints and initialization semantics were not supplied. E0010