MAC-PAC Homecontact ussupport login 
Documentation > MAC-PAC Technical Library > Financial > Inventory Accounting > Programs > Purchase Receipts and Purchase Price Variance Report - Purpose > Purchase Receipts and Purchase Price Variance Report - Calculations

Purchase Receipts and Purchase Price Variance Report - Calculations

IA530E

A.   Housekeeping

1.   See the Common Processing Routines - Housekeeping section of this manual for a general discussion of this subroutine.  Processing specific to this program is described below.

2.   Key lists are defined for each file retrieved by the program.

3.   Work fields are defined and program constants are initialized.

4.   The system time is saved for printing on reports.

5.   The Company Name is retrieved from the System Control file (CT100M).  If this record is not found, a message is sent to the system operator, a default message is used, and processing continues.

6.   The following information is retrieved from the Reference file (REFERP).

a.   The default Company Name is retrieved from the entity name record (category 002).  If this record is not found, a default message is used, and processing continues.

b.   The overall purchase price variance option is retrieved from the Inventory Accounting system defaults record (category 421).  This record can be defined at several levels.  The program looks for a record for the company/location first, then the company, and finally a global record.  If no record is found, a message is sent to the system operator, and processing terminates.

7.   A priming read is performed on the Report Requests file (IA320AP).  If no records are found, an error message is printed on the Purchase Receipts and Purchase Price Variance Report Request Exceptions report (IA530B), and processing is terminated.

B.   Mainline

1.   The Report Requests file (IA320AP) is read sequentially for all Purchase Receipts and Purchase Price Variance Report Requests (Transaction Code = R53).  Each request is processed as follows:

a.   The request is checked to determine whether a range of companies or all companies has been requested.

b.   If the request is for a range of companies, the request is validated for correct company range values: "to" value not less than "from" value.  If the request is not valid, an error code and message are written to the Purchase Receipts and Purchase Price Variance Report Request Exceptions report (IA530B).

2.   The Inventory Journal Entry file (IA530AL) is read sequentially until end of file (if all companies were requested) or until all requested companies have been processed (if a range was requested).

3.   For each company processed:

a.   The Company Name is retrieved from the entity name record (category 002) on the Reference file (REFERP).

b.   The Company Variance Option is retrieved from the overall purchase price variance option record (category 421) on the Reference file.

(1)  If the Company Variance Option is not specified, the Overall Variance Option is used.

(2)  If the Overall Variance Option is not specified, the Variance Option defaults to Y (yes).

c.   All locations within the company are processed (see step 4 below).

d.   Company totals are accumulated into the grand total and printed on the report.

4.   For each location processed:

a.   The Location Name is retrieved from the entity name record (category 002) on the Reference file.

b.   The Location Variance Option is retrieved from the overall purchase price variance option record (category 421) on the Reference file.

(1)  If the Location Variance Option is not specified, the Company Variance Option is used.

(2)  If the Company Variance Option is not specified, the Overall Variance Option is used.

(3)  If the Overall Variance Option is not specified, the Variance Option defaults to Y (yes).

c.   Each part within the location is processed (see step 5 below).

d.   The location totals are accumulated into the company total and printed on the report.

5.   For each part processed:

a.   The Part Description is retrieved from the Part Master file (DE100M).

b.   The Part Type is determined.  If Part Type = 7, the part is nonstandard.  If Part Type = 5, the part is referenced.  If Part Type = C, the part is non-stocked.

c.   All warehouses for the part are processed (see step 6 below).

d.   The part total is accumulated into the location total and printed on the report.

6.   For each warehouse processed:

a.   The Warehouse Costing Option is retrieved from the Warehouse Description file (IC170M).

b.   All orders for the warehouse are processed (see step 7 below).

c.   Warehouse totals are accumulated into the part total and printed on the report.

7.   For each order processed:

a.   Each journal entry for the order is processed (see step 8 below).

b.   The order total is accumulated in the warehouse total and printed on the report.

8.   For each journal entry processed:

a.   For a standard part in a standard or manufacturing warehouse, the following calculations are performed:

Moving Average Receipt is set to zero

Purchase Order Extended Price

equals

Purchase Order Price

times

Journal Entry Quantity (quantity received)

Extended Price Standard at Receipt

equals

Standard at Receipt

times

Journal Entry Quantity

Extended Price Standard at Period End

equals

Standard at Period End

times

Journal Entry Quantity

 

If Price Variance Option = Y (yes),

Price
Variance

equals

Extended Purchase Order
Price

minus

Extended
Price
Standard
at
Receipt

plus

Extended
Purchase
Order
Price
Rounding
Error

minus

Extended
Price
Standard
at
Receipt
Rounding
Error

If Price Variance Option = N (no),

Price Variance equals zero.

Cost
Change
Variance

equals

Extended
Price
Standard
at
Receipt

minus

Extended
Price
Standard
at
Period
End

plus

Extended
Price
Standard
at
Receipt
Rounding
Error

minus

Extended
Price
Standard
at
Period
End
Rounding
Error

 

b.   For nonstandard parts, non-stocked parts, referenced parts, or parts in a moving average warehouse, the following calculations are performed:

Purchase
Order
Extended
Price

equals

Purchase
Order
Price

times

Journal
Entry
Quantity

 

Moving Average Receipts is set to Purchase Order Extended Price.

Price Variance is set to zero.

Cost Change Variance is set to zero.

Extended Price Standard at Receipt is set to zero

Extended Price Standard at Period End is set to zero.

c.   The calculation results are accumulated in the order total and printed as detail lines on the report.

      The value of moving average receipts is not included in total lines for Standard at Period End or Standard at Receipt, since standards do not exist in a moving average environment.  The Moving Average Receipt total is added to the Standard at Period End total and printed on the report with the description "Total Accrued."  This way, the user can see the total value that was accrued to payables.

9.   The next record on the Inventory Journal Entry file (IA530AL) is read and checked for the following breaks:

¾   Company number

¾   Location number

¾   Part number

¾   Warehouse number

¾   Order number

Processing continues from the lowest-level break.

10.  When no more journal entry records are read, the following processing is performed:

a.   The grand total is printed on the report.

b.   The previous record from the Report Requests file (IA320AP) is deleted, and the next record is read and processed.

11.  Any exceptions that occur during processing are captured and printed on the Purchase Receipts and Purchase Price Variance Exceptions reports.

IA530E Program Menu