Using VPLUS: An Introduction to Forms Design (32209-90004)
7-16
suppose the following three order lines have been entered on form
ORDER_LINE in Collect mode:
1ST QTY = 2 UPRICE = 10.50 TPRICE = 21.00 (STOTNET = 21.00)
2ND QTY = 4 UPRICE = 15.00 TPRICE = 60.00 (STOTNET = 81.00)
3RD QTY = 3 UPRICE = 14.00 TPRICE = 42.00 (STOTNET = 123.00)
If the user then terminates this order by pressing NEXT FORM in ENTRY,
the value of STOTNET is transferred to the TOTNET field of the
ORDER_TOTALS form. Now, suppose the user goes to Browse mode
before
pressing ENTER on ORDER_TOTALS, and changes the QTY value in the second
order line. The following values are recorded:
(STOTNET = 123.00)
QTY = 5 UPRICE = 15.00 TPRICE = 75.00 (STOTNET = 198.00)
As you can see, the value of STOTNET is now grossly incorrect. Instead
of adding a net change of $15.00 to the total order, $75.00 has been
added.
If you make a similar change to an order line
after
pressing ENTER on
the
ORDER_TOTALS form, the values of STOTNET and TOTNET are not easily
predicted. The value of STOTNET is reset for the next form, and is
either zero or contains some other value if new totals have been
calculated. The value of TOTNET remains set to the last value moved to
it from STOTNET.