MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Distribution > Order Processing > Programs > Control Total Update - Purpose

Control Total Update - Purpose

OP225E

The Control Total Update program (OP225E) is intended to update control totals on the Sales Order Header, Quote Order Header, Customer Master and Customer Name and Address.  It reads through all lines on the sales order or quote, calculating and accumulating totals for each line, then updates the header and customer files once all lines have been read.

The program can be invoked in two request modes, either asynchronous or online.  If called online, an order number and a maintenance mode (either quote or sales order) is passed to the program and only that order is processed.  If invoked online, a trigger file is read (with end of file delay).  Each trigger record carries an order/release number and a maintenance mode (quote or sales order).  Regardless of request mode, once the order number is known, the sales order header or quote order header record is retrieved and the routine PRCORD is called.

The processing for sales orders and quotes is almost identical, as the files are identical.  The I/O routines access either the quote files or the sales order files conditionally based on the maintenance mode.  For quotes, the customer master and customer name and address are not updated.

OP225E Program Menu