Only invoice types DI (Direct Invoice) and OI (Order Invoice), for the customer selected, in the date range specified, are consolidated into the summary invoice. Only the open balance is summarized.
In order to provide optimal system performance the program checks for the first and last invoice numbers to check based on the starting and ending dates of the range by using the <INV_DATE><INV_NO> index. Once these have been established the system uses the <COMPANY><INV_NO> index to scan for invoices to summarize.
The first thing the system does is to create the summary invoice with 0 amounts to consume the invoice number.
As each of the detail invoices is "paid off" and the balance moved to the "summary invoice" the system updates the detail invoice by:
1. Adding the CBAL amount to the ADJUST field
2. Zeroing the CBAL amount
3. Writing the invoice number of the summary invoice to the APPLY_TO field in the detail invoice.
4. Creating a Journal Entry line pointing to the summary invoice and the detail invoice. These JE lines have a source of SB.
As each detail invoice is cleared the system updates the summary invoice. Once the process has been completed the system creates a journal entry line for the total amount. Until this point the summary invoice type is type "I" to indicate that the invoice is in process.
Both sides of the journal entry will post to the Division 1, Department 1 AR account defined by the 120 Autopost Number. The net effect on the general ledger of the consolidation is 0. The standard posting program is run to assure that the journal entry is in balance and to update the general ledger.
The summary invoice has the invoice type of "SI" and the total amount being summarized is applied to the ADJUST field.
The invoice inquiry programs will show that the detail invoices have been paid off using type "SB" journal entries.
The invoice inquiry programs will display the invoices that were consolidated into the summary invoice as there will be a single JE line for each invoice that was consolidated into the summary invoice.
The SUM_BILLING field (F54:169) in the customer master is used to suppress the printing of invoices by the standard invoice printing process (FV056R07) which will automatically skip invoices to customers with a "Y" in the SUM_BILLING field unless the invoice type is SB.