Program Description
The Stack Ranking Report is found on the Billing Reports Sales Reports II menu (BI-4-8-2). The purpose of the report is to show total revenue, cost, and gross profit of customers within a designated time period. The report provides various sorts to categorize the gross profit. The ability to select the sorts by a defined gross profit dollar amount or percentage is available. Records with a gross profit that are lower or higher than the defined gross profit amount or percentage are included. Within the defined gross profit range, you can enter how many of the population you want included. These records are the top range of the entered gross profit. As an example, you could include 50 customers that have a gross profit of $5000 or more or of $5000 or less. These 50 customers would have a gross profit nearest to the $5000 amount. Or all gross profit or percent can be included, but just the top 50 records. Customers by gross profit are being ranked.
The report calculates revenue and cost from the SHHIST.DT (Sales History) data file. All invoices, credits, voids, chargeable and no charge service tickets with parts are included. The Service Dispatch (DISP.DT) data file is also accessed. All completed service calls, within the designated time period, have the mechanical time multiplied by the defined burden rate and added as cost. Options to include travel time and travel miles into the cost are available. If travel time is included, the travel time is multiplied by the defined burden rate. If travel miles are included, the miles are multiplied by the defined mileage rate. The time period can be defined for one date range or two different date ranges (i.e., the last quarter or the last quarter and the corresponding quarter from the previous year).
Rev 15 Changes
There was a problem with the report if the operator chose to print those records with gross profit or gross profit percentage less than a certain number. It would occasionally include records with a gross profit or gross profit percentage above the number entered. This has been corrected.
Rev 14 Changes
An option has been added to print the machines on each contract or group bill contract. This option will only be available if the Contract History feature is activated.
An additional question will be prompted when the report is sorted by Contract Number or Group Bill Number, and Summary option is chosen. Depending on how the report is sorted, the question will either be “Print Item #, Serial #, And Svc Plan Of Machines On Contract (Y/N)” or “Print Item #, Serial #, And Svc Plan Of Machines On Grp Bill (Y/N)”. If this question is answered Y for yes, the report will check the Contract History file (CNHIST.DT) and find the last time the contract was billed or, if the contract is cancelled, the records relating to the cancellation will be found. The report will then print the Item number, Serial Number and Service Plans of those records. The Service Plan is from the Serial File (SERIALD). If the contract has not yet been billed, or has not been canceled, no machines will be printed.
The summary totals have been changed to be rounded to the nearest dollar. This was to prevent an arithmetic stop when the numbers became too large for Business Basic. The Revenue $, Cost $, and GP $ no longer have decimal positions in the summary. This would be no matter how the report is sorted.
Example:


Results:


Rev 13 Changes
Internal program changes were made to correct the Divide by Zero or Other Arithmetic Error. A quad math section was added in lines 2351-2354.
Internal changes were also made to correct the File Not Found stop at statement 5190 if the customer did not have Contract History.
The gross profit can be sorted or categorized six different ways:
Contract number
Group bill contract number
Ship-to customer number
Bill-to customer number
Buying group number
Branch number.
Within each sort the population of sales history records and service calls can be selected by a range of contract numbers, a range of group bill contract numbers, ship to customer numbers, bill to customer numbers, Customer File buying group number, and branch number. When calculating the mechanical time from service history, non-product time performed during the time frame of the service call can be excluded.
The fastest way to run the report is to select a range of ship-to customer numbers. This isolates the search through the Sales History (SHHIST.DT) and Service History Files (DISP.DT) to one customer. Any other method requires the program to search through the entire Sales History File and Service History File.
Results
The Stack Ranking Report can be printed in detail or summary. The detail version provides every service call and Sales History record.
The summary version provides the revenue, cost, and gross profit dollars and percent defined by the selected sort.