Module variables of orders.4gl
The module variables are used by the orders.4gl module.
Module variables of orders.4gl
001
SCHEMA
custdemo
002
003
TYPE
order_t RECORD
004
store_name LIKE
customer.store_name,
005
order_num LIKE
orders.order_num,
006
order_date LIKE
orders.order_date,
007
fac_code LIKE
orders.fac_code,
008
ship_instr LIKE
orders.ship_instr,
009
promo LIKE
orders.promo
010
END RECORD
,
011
item_t RECORD
012
stock_num LIKE
items.stock_num,
013
description LIKE
stock.description,
014
quantity LIKE
items.quantity,
015
unit LIKE
stock.unit,
016
price LIKE
items.price,
017
line_total DECIMAL
(9,2)
018
END RECORD
019
020
DEFINE
order_rec order_t,
021
arr_ordnums DYNAMIC ARRAY OF INTEGER
,
022
orders_index INTEGER
,
023
arr_items DYNAMIC ARRAY OF
item_t,
024
order_total DECIMAL
(9,2)
025
026
CONSTANT
title1 = "Orders"
027
CONSTANT
title2 = "Items"
028
029
CONSTANT
msg01 = "You must query first"
030
CONSTANT
msg02 = "Enter search criteria"
031
CONSTANT
msg03 = "Canceled by user"
032
CONSTANT
msg04 = "No rows found, enter new search criteria"
033
CONSTANT
msg05 = "End of list"
034
CONSTANT
msg06 = "Beginning of list"
035
CONSTANT
msg07 = "Invalid stock number"
036
CONSTANT
msg08 = "Row added to the database"
037
CONSTANT
msg09 = "Row updated in the database"
038
CONSTANT
msg10 = "Row deleted from the database"
039
CONSTANT
msg11 = "New order record created"
040
CONSTANT
msg12 = "This customer does not exist"
041
CONSTANT
msg13 = "Quantity must be greater than zero"
042
CONSTANT
msg14 = "%1 orders found in the database"
043
CONSTANT
msg15 = "There are no orders selected, exit program?"
044
CONSTANT
msg16 = "Item is not available in current factory %1"
045
CONSTANT
msg17 = "Order %1 saved in database"
046
CONSTANT
msg18 = "Order input program, version 1.01"
047
CONSTANT
msg19 = "To save changes, move focus to another row
or to the order header"
048
049
CONSTANT
move_first = -2
050
CONSTANT
move_prev = -1
051
CONSTANT
move_next = 1
052
CONSTANT
move_last = 2
Note:
- Line
001
defines the database schema to be used by this module. - Lines
003
thru010
define theorder_t TYPE
as aRECORD
with six members declared with aLIKE
reference to the database column. This type will be used for theorders
records. - Lines
011
thru018
define theitem_t TYPE
as aRECORD
to be used for theitems
records. - Line
020
defines theorder_rec
variable, to hold the data of the current order header. - Line
021
defines thearr_ordnums
array, to hold the list of order numbers fetched from the last query. This array will be used to navigate in the current list of orders. - Line
022
defines theorders_index
variable, defining the current order in thearr_ordnums
array. - Line
023
defines thearr_items
array with theitem_t
type, to hold the lines of the current order. - Line
024
defines theorder_total
variable, containing the order amount. - Lines
026
thru047
define string constants with text messages used by the orders.4gl module. - Lines
049
thru052
define numeric constants used for theorder_move()
navigation function.