Tutorial Chapter 11: Master/Detail / The Orders Program orders.4gl |
This function calculates the value of line_total for any new rows that are inserted into the arr_items array.
01 FUNCTION items_line_total(curr_pa) 02 DEFINE curr_pa SMALLINT 03 LET arr_items[curr_pa].line_total = 04 arr_items[curr_pa].quantity * arr_items[curr_pa].price 05 END FUNCTION