Documentation >
MAC-PAC Technical Library >
Financial >
Inventory Accounting >
Programs >
Inventory Accounting Period End Close - Purpose >
Inventory Accounting Period End Close - Calculations
Inventory Accounting Period End Close - Calculations
IA050E
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. Parameter lists are set up to pass formatted parameters to subsequent programs.
3. Key lists are defined for each file retrieved by the program.
4. Work fields are defined and program constants are initialized.
5. The date format record (category 049) is retrieved from the Reference file (REFERP). If this record is not found, a message is sent to the system operator, the date format defaults to MMDDYY, and processing continues.
B. Mainline
1. The Inventory Accounting period-end parameters record (category 460) is retrieved from the Reference file (REFERP).
2. The period-end parameters are validated. Either the Trial Run Request Flag must equal Y (yes) or the Post Run Request Flag must equal D (demand) or F (final) if both equal Y (yes) or both equal N (no) or trial equals Y and post equals D or F, a message is sent to the system operator and processing is terminated.
a. For a demand post run request (Post Run Request Flag = D):
(1) The Run Type parameter (REQOPT) is set to D (demand).
(2) The Year-End LIFO Request parameter (LIFORQ) and Requestor parameter (REQSTR) are formatted.
b. For a final post run request (Post Run Request = F):
(1) The run type parm (REQOPT) is set to F (final).
(2) LIFORQ, REQSTR, and RCVPGM are formatted.
For a trial run request (Trial Run Request Flag = Y):
(1) The Run Type parameter (REQOPT) is set to T (trial).
(2) The Year-End LIFO Request parameter (LIFORQ),Requestor parameter (REQSTR) and the recovery program parm RCVPGM are formatted.
c. Any other request causes the program to abort.
3. The dates are validated to ensure that the cutoff date is not beyond the current date, and the current date is not beyond the accounting cost effectivity date.
a. If the cutoff date is not blank and is greater than the system date, the program aborts.
b. The accounting cost effectivity date record (category 454) is retrieved from the Reference file (REFERP).
c. If the System Date (YRSDAT) is greater than the Accounting Cost Effectivity Date (YREDAT), the job is terminated and the System Error report (CT010) is printed.
d. If the System Date (YRSDAT) is less than or equal to the Accounting Cost Effectivity Date (YREDAT), processing continues.
4. The applications installed record (category 012) is retrieved from the Reference file to determine if the Shop Floor Control application has been installed. The Shop Floor Installed parameter (SFID) is set to Y (yes) if installed or N (no) if not installed. The General Ledger Identification parameter (GLID) is set to Y (yes) if installed or N (no) if not installed.
5. If the period end parameters are valid, the IA period end reports category (N24) is retrieved from the Reference file. If the record is not found, none of the reports are requested and the reports requested parm (RPTREQ) is formatted with all N's. Otherwise, the RPTREQ parm is formatted with the IA period end reports requested.
C. Windup
1. The recovery requested flag is reset.
a. The Inventory Accounting period-end parameters record (category 460) is retrieved from the Reference file (REFERP).
b. The recovery requested flag is set to blanks.
c. The Inventory Accounting period-end parameters record (category 460) is updated on the Reference file.
2. If the data audit is requested, the data audit program IA060E is called.
a. If the data audit program returns an error flag equal to Y, the program aborts.