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
001defines the database schema to be used by this module. - Lines
003thru010define theorder_t TYPEas aRECORDwith six members declared with aLIKEreference to the database column. This type will be used for theordersrecords. - Lines
011thru018define theitem_t TYPEas aRECORDto be used for theitemsrecords. - Line
020defines theorder_recvariable, to hold the data of the current order header. - Line
021defines thearr_ordnumsarray, 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
022defines theorders_indexvariable, defining the current order in thearr_ordnumsarray. - Line
023defines thearr_itemsarray with theitem_ttype, to hold the lines of the current order. - Line
024defines theorder_totalvariable, containing the order amount. - Lines
026thru047define string constants with text messages used by the orders.4gl module. - Lines
049thru052define numeric constants used for theorder_move()navigation function.