Program Description
This program can be found on the Contracts Reports menu (CN-4-21) and the Service Reports Service History Reports menu (SD-4-4-16). It provides the total revenue and cost associated with a contract or a specific machine or item. The report gathers the revenue and cost from the Service Dispatch (DISP.DT) File and the Sales History (SHHIST.DT) File. The contract base charge revenue is taken from the contract. The report can be run for a specified time period in detail or summary format.
Input Screen 1:
Input Screen 2:
The Sales History Files are used to gather the data for cost and revenue of parts and supplies. This includes items that are linked to a machine during the entry of an invoice or order, such as supplies included with the service contract. Also included are the parts entered during the clearing of a service call. The meter revenue on a contract is also taken from the Sales History Files. The base revenue is a calculation made from the Contract File. Service History is searched and used to calculate labor cost, which is travel, mechanical, and mileage cost. An option is also available to charge depreciation on rental contracts.
The report allows profit analysis of non-contract machines also. The following five sorts are available: item number, customer number, contract number, group bill number, and technician. Within the selected sort, specific populations can be selected. This includes contract number range, group bill number range, contract expiration date range, customer number range, item and serial number range, primary technician range, and service plan range.
When the report is run using the customer number, contract number, group bill number, or technician sort, the system finds sales history records that are assigned to the customer at which the machine is currently placed. Therefore, the analysis for the machine or contract reflects its current owner.
When the report is run using the item number sort, all Sales History records are gathered based on the serial number stored in the record. If a Sales History record is found with a serial number that matches a serial number found in the Serial File, the amounts are included on the report. Therefore, the analysis is for the life of the machine regardless of the customer at which the machine is currently placed. The Sales History records must also match the other report parameters, such as item types and dates. Any contract revenue only uses the current contract's base charge.
Since the item number sort does not check the current customer placement with the Sales History records, the program cannot distinguish between records assigned to duplicate serial numbers. The Sales History File does not store the item number of the machine. If you have two or more different item numbers assigned to the same serial number, any sales records that match the report input parameters are added to both machines. The data for these machines is not correct when using the item number sort on the Contract Profit/Loss Analysis report. This only happens the same serial number is assigned to more than one item when using the item number sort.
The burden rate used in the report calculations is stored in field 10. Cost/Hour of Service Call Control File Maintenance. A burden rate can be assigned to an individual service technician/sales rep within the Sales Rep/Service Technician (SLMD) File. The sales rep/technician burden rate takes priority over the the number in field 10. Cost/Hour.
The field Calc. Copies Produced Based on I'nclusive Service History, E'stimated Service History Or C'ontract Meter File allows the user to determine the calculation of the COPIES PRODUCED, COPIES/CALLS, COST/COPY, and REVENUE/COPY fields. The field Calc. Cost Per Copy Using A'ctual Or E'stimated Cost allows the user to determine the cost figures used in the calculation of the COST/COPY field.
Machines that do not have any service calls in the date range of the report are indicated. A pound sign (#) prints to the left of the serial number of these machines. Also, the message **NOTE: A '#' NEXT TO THE SERIAL NUMBER INDICATES THAT THE MACHINE HAD NO SERVICE WITHIN DATE RANGE prints on the bottom of the page if the report is printed in detail. The COST/COPY and REVENUE/COPY fields have been enlarged to four decimal positions to allow for a more specific number.
Regardless of the method selected to calculate the number of copies produced, the system adds the number of copies produced for all machines. This figure is divided by the number of service calls, which includes calls with any call type. Before Revision 12, the value in this field was calculated by adding each machine's copies per calls, which was not an accurate picture of the number of copies per calls.
Results
Following is a sample of the results sorted by contract. It includes all contracts, serial numbers, item numbers, group bill numbers, ship-to customers, technicians, service plans, contract expiration dates, and contract types:
Rev 15 Changes
Changes were made to the Contract Profit And Loss Report when it is searching for Sales History records. If the contract number of the machine matches the Sales History record linked to the machine, the report will not compare the customer number to make sure it is the current customer number that is stored in the Contract Header File. It will however make sure that the customer number in the Sales History file is within the range of customer numbers entered by the operator. This change was due to the fact that there is a System Manager report that will change the ship-to customer number of the contract. Prior to Revision 15, the Sales History records from the old ship-to customer number would not be included on the report.
An option was added to the Contract Profit and Loss report to show the actually Base Revenue billed versus using the current contract Base Rate to calculate a Base Revenue. This option is not available if sorting by Item Number or by Technician.
There are two new prompts to accomplish this. They are 1) “Use A’ctual Or C’urrent Base Revenue” and 2) “Enter Up To 3 Item Types For Base Revenue”. At the Use A’ctual Or C’urrent Base Revenue prompt, enter “A” to have the program search the Sales History file (SHHIST.DT) to find all of the revenue from base billings. Enter “C” to have the program work the way it did prior to Revision 15. This method was to take the current Base Rate from the contract divided by the Base Billing Period and multiplied by the number of months the report was being run for.
If an “A” for actual is chosen, the program will ask the operator to enter up to three Item Types for Base Revenue”. This is similar to the other Item Type questions. The Item Type for the Multiple SA Item Numbers used on Base lines in the contract should be entered at this prompt. The operator can enter up to three Item Types.

Rev 14 Changes
An option to print the report for a range of branch numbers was added to the report. If the machine is on a contract, it uses the branch number from the Contract Header File (CNHDR.DT). If the machine is not on a contract, the report uses the branch number from the Serial File (SERIALD).

The report used to include cost and revenue on a machine even it the cost or revenue was incurred when the machine was not on the current contract. The report will now have an option to only include cost and revenue incurred while the machine is on the current contract number. The prompt “Exclude Cost & Rev, If Incurred When Machine Was Not On Curr Contract (Y/N)” was added. The question regarding the number of months to depreciate rental contracts was moved up one line. This question will not be prompted if you run the report for only Non-Contract Machines.

There was a problem with the Copies Produced and Copies Per Day calculations on the report if you ran the report for one month and used the Contract Meter File for meter readings. The report would add usage for 13 months instead of only one month. This has been corrected.
Rev 13 Changes
An option was added to the second screen to Exclude Non-Product Time Within Calls. If Y is entered in this prompt, the Labor History File (LABOR) is checked for Non-Product time that is linked to the call number. This time will be added, then subtracted from the mechanical time before doing any other calculations. This is useful if a technician goes to lunch during a long service call and that time needs to be excluded from mechanical time. When non-product time is subtracted from maintenance time (entering Y in the Exclude Non-Product Time Within Calls field), the following will happen: If non-product time is greater than maintenance time, it will not be subtracted from the total. For example: if there is 25 minutes maintenance time, with 1 hour non-product time for lunch, the report will keep maintenance time at 25 minutes, since 1 hour is greater than 25 minutes. Also, if there is 30 minute maintenance time, and a 30 minute lunch is taken along with a 15 minute meeting assigned to the call, the maintenance time will be 0, not negative 15 minutes.
Another option was added to this report to enter a Burden Rate or use the default burden rate. An additional prompt will display on the second screen Enter Burden Rate, Or Use D'efault. When the default burden rate is chosen, it will be taken from the Sales Rep/Technician File (SLMD) if it is greater than 0. Otherwise, it will be taken from field 10. Cost/Hour in Service Call Control File Maintenance.
Prior to Revision 13, the formula for Labor Cost calculation was as follows: (Mechanical Minutes + Travel Minutes ) X (Burden Rate / 60). Labor Cost is now calculated as follows: ((Mechanical Minutes + Travel Minutes) X Burden Rate / 60). The purpose of this change is to make it consistant with other reports.
Prior to Revision 13, the calculation for Copies Per Day during the Estimated Copies did not round off the figure. Program logic was added to round off the figure. This calculation is as follows: Total Copies divided by Number of Days Between Meter Readings.
Prior to Revision 13, when searching for the lowest meter reading from the entered date range, and two calls were found with the same lowest meter reading but with different dates, the more recent date was used. This has now been changed to use the date of the oldest service call.
There was customized code in this program for a particular dealership to use LIFO (Last In First Out) Cost from the Item (ITEM) file for the Parts Cost. This is no longer used. Therefore, this program code was taken out.
Internal program changes were made to prevent an Invalid Subscript stop at 1226 if there were messages lines on a contract.
Program changes were made to correct the date display at the Beginning and Ending Sales/Service History Date prompts. If the year was between 2000 and 2009, the year would be displayed with one character without the leading 0. For example: 5/00 would display as 5/ 0. 4/01 would display 4/ 1. This has been corrected.