Functional Description
Purpose
This function retrieves the Sales History table (F4115) for an item to calculate the total and
average sales for the item.
Setup Notes and Prerequisites
The Item Number (ITM), Branch (MCU) and Fiscal Year (FY) are required input parameters.
Technical Specification
This function checks to see if the Current Period is blank or is greater than or equal to 12. If so,
The F4115 is retrieved with ITM, MCU and FY. The SQ01 - SQ14 fields are accumulated and returned in
the Total Sales Amount parameter. This number is then divided by 12 and returned in the Average Sales
Amount parameter.
If the current period is not blank or is less than 12, the previous year is retrieved. If this
record is found, the SQ01 - SQ14 fields are saved. The fiscal year is reduced by 1 and another fetch to
the F4115 is performed. Again, the SQ01 - SQ14 fields are retrieved. The 14 amounts corresponding to
the 12 periods prior to the Current period (SQ13 and SQ14 are always included) are accumulated. If the
previous year does not exist, add the values SQ01 - SQ14 that werew saved from earlier to obtain
total sales. Decrement the current period by 1 and divide the total sales by the current period.
For example,
FY9495
SQ0121010
SQ0222020
SQ0323030
SQ0424040
SQ0525050
SQ0626060
SQ0727070
SQ0828080
SQ0929090
SQ10300100
SQ11310110
SQ12320120
SQ13330130
SQ14340140
Totals Sales for period 7/95 are the addition of the bold cells = 2650. Average = 2650/12 = 220.83
DXF4115D - Calculate Average Sales
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szBranchPlant | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
mnFiscalYear | FY | MATH_NUMERIC | NONE | NONE |
A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal
| ||||
mnCurrentPeriod | PNC | MATH_NUMERIC | NONE | NONE |
A number (from 1 to 14) that identifies the current accounting period . The system uses this number to generate error messages, such as
| ||||
mnTotalSalesAmount | ASAT | MATH_NUMERIC | NONE | NONE |
The amount of expected sales to be entered for Batch Control purposes. | ||||
mnAverageSalesAmount | ASAT | MATH_NUMERIC | NONE | NONE |
The amount of expected sales to be entered for Batch Control purposes. | ||||
mnSalesQuantityPeriod01 | SQ01 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod02 | SQ02 | MATH_NUMERIC | NONE | NONE |
The quantity of an item, in primary units of measure, sold during a prior month. The units history is maintained for a period of 25 months. | ||||
mnSalesQuantityPeriod03 | SQ03 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod04 | SQ04 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod05 | SQ05 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod06 | SQ06 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod07 | SQ07 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod08 | SQ08 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod09 | SQ09 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod10 | SQ10 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod11 | SQ11 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod12 | SQ12 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod13 | SQ13 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnSalesQuantityPeriod14 | SQ14 | MATH_NUMERIC | NONE | NONE |
The number of units, in primary units of measure, sold during a prior month. The units history is maintained for a period of twenty-five months. | ||||
mnAverageSalesQty | ASAT | MATH_NUMERIC | NONE | NONE |
The amount of expected sales to be entered for Batch Control purposes. | ||||
jdLastInvoiceDate | DLIJ | JDEDATE | NONE | NONE |
The G/L date of the last invoice generated for the customer. | ||||
mnSalesYTD | CYS | MATH_NUMERIC | NONE | NONE |
The dollar amount of sales for the current year. Prints on the Buyer's Guide. | ||||
mnAmountCostofSales | CYC | MATH_NUMERIC | NONE | NONE |
The cost of goods sold for the year to date. This is a simple accumulation of all orders processed for that period of time. |
B0000130 Retrieve Company From Business Unit |
F0010 Company Constants | ||||
F4115 Item History |