Views:
Files opened: CUSTOMER, ORDER, A6ORDSL, SLSMAN, SLSOPN, PROGRAM (if FF special)

Flow of the Program
The program reads through the ORDER file. It uses the SLSMAN field (salesperson) to read & find the corresponding SLSOPN (open commission record). The A6ORDSL file is used if choosing to sort by salesperson.

 
The fields in the records are checked in the following sequence. If the record meets all the criteria listed, it will print on the report. (Please note: the System Date is the date used when the operator signs into ProfitMaker, this is not necessarily the machine date.)
 
1. ORDER file - First character in STATUS must be “I” (invoiced)
INVOICE (Invoice #) cannot be 0
INVDATE (invoice date) month & year must be equal to system date
        Day must then fall within Inv date range

 
2. SLSOPN file - ORIGCURR (original or current) must be “C” for current
INVDT (invoice date) month & year must be equal to system date
        Day must then fall within Inv date range
INVNO (Invoice #) must be greater than 0

 
3. ORDER file - UNIT must match unit selected
FF special, OOPRGSRC cannot be blank
        If printing FF orders, OOPRGSRC must not be empty (normally “F” but
        program doesn’t check actual code, just makes sure it’s not empty).
        If printing reg. orders, OOPRGSRC must be empty.

 
Note: If Company Information is checked to “Print ship date as invoice date”, it will have no affect on this report. Invoice date in both the ORDER file and SLSOPN file will still be updated with the system date at the time of invoicing.

Sort option field names
Name                                          Field name                                File name
Customer #                                 ACCT_NO                                  ORDER
Customer name                          ARMNAME                                  CUSTOMER
Salesperson                               SLSNO                                       A6ORDSL
Invoice #                                     INVOICE                                    ORDER
Invoice date                                INVDATE                                   ORDER
Order code                                 ORDERCODE                            ORDER
Program                                     OOPROGNO                             ORDER
Order type                                  ENTRTYPE                                   ORDER (must have ProfitPlus special,                will be FO (Factor Order) or AS (Ad Specialty).

Print primary salesperson only:
Y = uses SLSMAN from order file
N = uses SLSNO from a6ordsl files to get info for 2nd-4th salesperson


Files/Fields from which each invoices detail is printed
Name                            Field name                                                                File name
Cust #                                       ACCT_NO                                                                ORDER
Customer name                  ARMNAME                                                               CUSTOMER
Invoice #                                  INVNO                                                                      SLSOPN
Invoice date                           INVDATE                                                                  ORDER
**Sales                           SALAMT(comm sales/SH)                                       SLSOPN
                                          + NCSALAMT (non-comm sales/SH)
                                          - GLITEMAMT (G/L line items)
                                          - BDISCAMT (billed discount amt)
                                          - SCSLSAMT (total SH lines price)                  
ORDER
**GL/SH                         GLITEMAMT (G/L line items)                              SLSOPN
                                         + SCSLSAMT (total SH lines price)                  ORDER
Taxes                             TAXAMOUNT                                                      ORDER
Other                                        SHPCHG                                                             ORDER
                                          + INSURANCE(prior to 8.20)                            ORDER
**Inv amt                        Sales (from above calculation)
                                         + SCSLSAMT(total SH lines price)                   
ORDER
                                         + GLITEMAMT                                                  SLSOPN
                                         + TAXAMOUNT                                                 ORDER
                                         + SHPCHG                                                        ORDER
                                         + INSURANCE(prior to 8.20)                            ORDER
        Note: Will show actual invoice amt, not reflective of Billed Split %
**Inv cost                       SALCOST (comm. cost/SH lines)                       SLSOPN
                                     + NCSALCOST (non-comm. cost/SH lines)          SLSOPN
**GP%/GP amt              Sales (from above calculation)
                                       + GL/SH (from above)
                                        - Inv cost (from above)
SL # 1st                       SLSMAN                                                                 
ORDER
SL #2nd-4th                 SLSNO                                                                   A6ORDSL
Commission                 COMMBILL                                                            SLSOPN
Order #                         ORDNO                                                                 ORDER

 
 
** When sorting report by salesperson, these amounts will be based on the Sales/Cost Split%-BLSPLIT (Billed Split%) in the slsopn file for that salesperson.