Documentation >
MAC-PAC Technical Library >
Financial >
Inventory Accounting >
Programs >
Inventory Account Summary/Detail by Part Report - Purpose >
Inventory Account Summary/Detail by Part Report - Calculations
Inventory Account Summary/Detail by Part Report - Calculations
IA510E
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 following information is retrieved from the Reference file (REFERP).
a. The date format record (category 049) is retrieved. If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.
b. 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.
c. The Inventory Accounting period-end information record (category 460) is retrieved to determine whether the previous execution of period-end processing was a trial or post run. If this record is not found, a message is sent to the system operator, and processing terminates.
d. The journal entry description table (category 459) is retrieved and journal entry numbers and descriptions are loaded into arrays.
6. The Company/Warehouse combinations and corresponding Costing Options are retrieved from the Warehouse Description file (IC170M) and loaded into arrays.
B. Mainline
1. The Report Requests file (IA320AP) is read sequentially for all Inventory Account Summary/Detail by Part Report Requests (Transaction Code = R51). 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 a range of companies is requested, the request is validated for correct company range values: "to" value is not less than "from" value. If the request is not valid, an error code and message are written to the Inventory Account Summary by Part Report Request Exceptions report (IA510C).
2. The Warehouse Balance file (IC170M) is read until all requested companies are processed.
a. If the request is for all companies, the Warehouse Balance file is read until end of file.
b. If the request is for a range of companies, the file is read only until all the requested companies have been processed.
3. If the part is not configuration costed, the Inventory Journal Entry file (IA510AL) is read sequentially with a key of company/part/warehouse until all journal entries for the warehouse balance record are summarized.
If the part is configuration costed the Inventory Journal Entry file (IA510AL2) is read sequentially with a key of company/part/warehouse/configuration code until all journal entries for the warehouse balance record are summarized.
4. When all journal entries have been processed, totals are calculated, formatted and printed.
a. If a Detail report has been requested, a detail line is printed for each Inventory journal entry.
b. The type of journal entry determines whether the amount is an inventory journal entry or a standard cost change.
c. The Costing Option is determined for non configuration costed parts from the Costing Option Flag retrieved from the Warehouse Description file (IC170M). For a nonstandard part, the Costing Option is moving average, regardless of the Costing Option of the warehouse. If no Costing Option is found, it defaults to moving average.
d. If the previous period-end run was a trial run, the following calculations are used:
(1) For moving average costing:
Beginning Balance Units
|
equals
|
Warehouse Balance Units
|
|
Beginning Balance Amount
|
equals
|
Warehouse Balance Amount
|
|
Ending Balance Units
|
equals
|
Beginning Balance Units
|
plus
|
Warehouse Debit Units
|
minus
|
Warehouse Credit Units
|
|
Ending Balance Amount
|
equals
|
Beginning Balance Amount
|
plus
|
Warehouse Debit Amount
|
minus
|
Warehouse Credit Amount
|
plus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(2) For standard costing at the Manufacturing Company/Warehouse:
Beginning Balance Units
|
equals
|
Warehouse Balance Units
|
|
Beginning Balance Amount
|
equals
|
Warehouse Balance Units
|
times
|
Part Master Accounting Standard Unit Cost
|
|
Ending
Balance
Units
|
equals
|
Beginning Balance Units
|
plus
|
Warehouse Debit Units
|
minus
|
Warehouse Credit Units
|
|
Ending Balance Amount
|
equals
|
Beginning Balance Amount
|
plus
|
Warehouse Debit Amount
|
minus
|
Warehouse Credit Amount
|
plus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(3) For standard costing at a distribution Company/Warehouse:
Beginning Balance Units
|
equals
|
Warehouse Balance Units
|
|
Beginning Balance Amount
|
equals
|
Warehouse Balance Units
|
times
|
Warehouse Balance Accounting Standard Unit Cost
|
|
Ending
Balance
Units
|
equals
|
Beginning Balance Units
|
plus
|
Warehouse Debit Units
|
minus
|
Warehouse Credit Units
|
|
Ending Balance Amount
|
equals
|
Beginning Balance Amount
|
plus
|
Warehouse Debit Amount
|
minus
|
Warehouse Credit Amount
|
plus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(4) For configuration costing:
Beginning Balance Units
|
equals
|
Configuration Code Paid On-Hand Balance Units
|
|
Beginning Balance Amount
|
equals
|
Configuration Code Previous Paid On-Hand Balance Units
|
times
|
Configuration Code Accounting Standard Unit Cost
|
|
Ending
Balance
Units
|
equals
|
Beginning Balance Units
|
plus
|
Configuration Code Debit Units
|
minus
|
Configuration Code Credit Units
|
|
Ending Balance Amount
|
equals
|
Beginning Balance Amount
|
plus
|
Configuration code Debit Amount
|
minus
|
Configuration Code Credit Amount
|
plus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
e. If the previous period-end run was a post run (demand or final), the following calculations are used:
(1) For moving average costing:
Ending Balance Units
|
equals
|
Warehouse Balance Units
|
|
Ending Balance Amount
|
equals
|
Warehouse Balance Amount
|
|
Beginning
Balance
Units
|
equals
|
Ending Balance Units
|
minus
|
Warehouse Debit Units
|
minus
|
Warehouse Credit Units
|
|
Beginning Balance Amount
|
equals
|
Ending Balance Amount
|
plus
|
Warehouse Debit Amount
|
plus
|
Warehouse Credit Amount
|
minus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(2) For standard costing at the Manufacturing Company/Warehouse:
Ending Balance Units
|
equals
|
Warehouse Balance Units
|
|
Ending Balance Amount
|
equals
|
Warehouse Balance Units
|
times
|
Part Master Accounting Standard Cost
|
|
Beginning
Balance
Units
|
equals
|
Ending Balance Units
|
minus
|
Warehouse Debit Units
|
plus
|
Warehouse Credit Units
|
|
Beginning Balance Amount
|
equals
|
Ending Balance Amount
|
minus
|
Warehouse Debit Amount
|
plus
|
Warehouse Credit Amount
|
minus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(3) For standard costing at a distribution Company/Warehouse:
Ending Balance Units
|
equals
|
Warehouse Balance Units
|
|
Ending Balance Amount
|
equals
|
Warehouse Balance Units
|
times
|
Warehouse Balance Accounting Standard Unit Cost
|
|
Beginning
Balance
Units
|
equals
|
Ending Balance Units
|
minus
|
Warehouse Debit Units
|
plus
|
Warehouse Credit Units
|
|
Beginning Balance Amount
|
equals
|
Ending Balance Amount
|
minus
|
Warehouse Debit Amount
|
plus
|
Warehouse Credit Amount
|
minus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(4) For configuration costing:
Ending Balance Units
|
equals
|
Configuration Code Previous Period Balance Units
|
|
Ending Balance Amount
|
equals
|
Configuration Code Previous Period Balance Units
|
times
|
Configuration Code Accounting Standard Unit Cost
|
|
Beginning
Balance
Units
|
equals
|
Ending Balance Units
|
minus
|
Configuration Code Debit Units
|
plus
|
Configuration Code Credit Units
|
|
Beginning Balance Amount
|
equals
|
Ending Balance Amount
|
minus
|
Configuration Code Debit Amount
|
plus
|
Configuration Code Credit Amount
|
minus
|
Standard Cost Change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5. When the current company processing is completed, company totals are printed.
6. When all companies for a request have been processed, grand totals are printed on the report. The request record is deleted from the Report Requests file (IA320AP). The next request is read and processed as above. This process continues until no more requests are found.
If overflow occurred when computing grand totals, a warning message is printed in the report. This will indicate that amounts printed in the report might have been truncated due to overflow.
7. Any exceptions that occur during processing are captured and printed on the Inventory Account Summary by Part Report Request Exceptions report (IA510C).