Documentation >
MAC-PAC Technical Library >
Financial >
General Ledger >
Programs >
General Ledger Post - Purpose >
General Ledger Post - Calculations
General Ledger Post - Calculations
GL200P
A. Mainline
1. Input Parameters
The input parameters passed to the program from the General Ledger Post Selection conversation contain the report date to be printed on the reports, the location to be posted, and the posting option. The valid posting options are:
Final Post -- Each Account Master file record is processed and updated. Any valid journal transactions that exist are posted to the account, and the last period and last year posted are updated with current period and year. Final posting can be performed once during a period.
Demand Post -- Each Account Master file record is processed and updated. Any valid journal transactions that exist are posted to the account. Demand posting can be performed multiple times during a period.
Quick Post -- The program processes only accounts with unposted transactions. Any valid journal transactions that exist are posted to the account. Quick posting can be performed multiple times during a period. Before it can be performed the first time, a demand post must be performed.
List -- Each Account Master file record is processed but not updated. Any transactions for the account are listed on the posting report. No error listing is produced when the list option is selected.
Quick List -- Only accounts with unposted transactions are processed. These accounts are processed but not updated. Any transactions for the accounts are listed on the posting report. No error listing is produced when the list option is selected.
2. Account Master file record or Transaction file record
For a demand post or final post, the accounts to be processed are retrieved from the Account Master file (GLFILEL). For a quick post, the accounts are retrieved from the transaction file (GLTRNJL1). Journal transactions are posted against the fields in the Account Master file record for each account to be processed, and beginning and ending balances are shown on the posting report for each account. Depending on the option chosen on Reference File category P01, the report lists all accounts processed or it lists only those accounts where the balance is not equal to zero.
3. Multi-currency Master Record
If in a multi-currency environment, each financial journal is posted to the appropriate multi-currency master record, by currency, for each account processed. The sum of all multi-currency transactions posted to these records, for a single account, is posted to the account master (summary) record. The account master (summary) record and the multi-currency master records are always synchronized.
4. Valid Journal Transaction Record
If the account number on the journal transaction matches a valid account number on the Account Master file record and the transaction is for the current fiscal period, the debit or credit amount is added to the appropriate accumulators, the transaction is listed on the post, and for a demand, quick, or final post, the record is deleted from the Valid Transaction file.
5. Valid Journal Transaction Control Record
This record is updated for a demand, quick, or final post during end of location processing. Beginning balances are saved and printed, posted activity is accumulated and printed, and ending controls are calculated and printed. For financial controls, transaction counts and converted debit amounts are maintained. For statistical controls, transaction counts and converted quantities are maintained. Posted activity is subtracted from the beginning balance to obtain the ending balance.
6. Cumulative Journal Transaction Record
Each valid journal transaction processed during a demand, quick, or final post is used to format a record which is written to the Cumulative Journal Transaction file.
7. Cumulative Journal Transaction Control Record
This record is updated for a demand, quick, or final post during end of location processing. Processing for these records is the same as for the Valid Journal Control record, except that posted activity is added to the beginning balance to obtain the ending balance.
8. Date and Period Record
This Reference file record is used to determine whether or not a demand post has been performed for the current period, and whether the location uses a 12 or 13-period fiscal year. The record is updated during end of location processing depending upon the posting option. For a demand post, the demand post flag is set on. A quick post is not allowed unless the demand post flag is on. For a final post, the demand post flag is set off and the last period and year posted values are updated with the current period and year.
9. Version Records
To ensure file synchronization, eight version records exist. These records are on both the financial and statistical record formats for the Valid Journal Transaction and Control files (GLTRANL and GLCNTLL) and the Cumulative Journal Transaction and Control file (GLCMTRL and GLCMCTL). These numbers are compared in Housekeeping, and if they are not equal, a program message is printed and program processing terminates. If they are the same, each version number is incremented by one and the version records are updated.
10. Year-to-Date Retained Earnings
The current period profit or loss is posted to the year-to-date retained earnings account in the balance sheet. The current profit or loss is determined by accumulating the current period transactions for balance sheet accounts. A net debit balance for the balance sheet transactions indicates a profit for the current period; a net credit balance indicates a loss. The profit or loss amount is then posted to the year-to-date retained earnings account, after reversing the sign to maintain the equality of debits and credits within the balance sheet accounts.
If the Management Account Processing Option in category 133 is set to yes, the current period profit or loss resulting from fiscal and common accounting transactions is posted to the fiscal year-to-date retained earnings account. The current period profit or loss resulting from management and common accounting transactions is then posted to the management year-to-date retained earnings account.
A separate calculation of current period profit or loss is made when processing the income statement accounts. At the end of each location, a comparison is made between the current period change in year-to-date retained earnings, as calculated from the current period's balance sheet accounts, and the current period's profit or loss, as calculated from the income statement accounts. If the two are not equal, the location is out of balance.
During the first post of a new fiscal year, the program will automatically close the previous year's year-to-date retained earnings balance into the inception-to-date retained earnings account if the automatic close retained earnings flag on Reference File category P01 is set to Y (yes). If this flag is set to N (no), then a manual journal entry must be made to move the previous year's retained earnings balance.
11. Suspense Processing
An Account Master file suspense record exists only on the Financial Account Master file. For each transaction printed on the Financial Transaction Error List, a line is also printed under the suspense account on the posting report, and the suspense account balance is updated with the transaction amounts. These transactions are also written to the Cumulative Transaction file using the suspense account number. For statistical reporting, no suspense record exists on the Statistical Account Master file. Invalid transactions are listed on the Statistical Transaction Error List only, and the transactions are deleted from the Valid Journal Transaction file.
12. Controls
The following controls are accumulated and printed at the company-location level:
a. Beginning Balance -- Total debits and total credits from the Account Master file balance sheet accounts. If the location has not been posted previously for the current period, the beginning balance is the balance from the prior period for balance sheet accounts. If the location has already been posted this period, the beginning balance is the balance for the current period.
b. Transactions Posted -- The total debits, total credits, and difference, if any, for the journal entry line items posted during the current execution of the program.
c. Transactions Processed -- The total debits, total credits, and difference, if any, for the journal entry line items processed for each location but not posted. Journal entry line items are "processed" when the list option or do not process option is selected.
d. Ending Balance -- The total debits, total credits, and difference, if any, for the period identified as the last period posted.
e. Suspense -- The debit and credit amounts posted to the suspense account for financial processing, and the quantity listed on the Statistical Transaction Error Listing for statistical processing.
f. Current Profit/Loss -- The profit or loss amount posted to the retained earnings account for the current period.
g. Mismatches -- The number of journal transactions that did not have valid account records on the Account Master file.
h. Number of GL Accounts -- The number of active Accounts Master file accounts. If the Management Account Processing Option in category 133 is set to yes, separate control totals are accumulated for fiscal and management transactions. Common accounting transactions are accumulated into both fiscal and management totals.
13. Control Breaks
a. Account Number
When a company-location-account-center-period control break occurs on the Valid Journal Transaction file, the accumulated debits and credits or quantity are printed on the posting report, and the account is posted and the account record updated if the option was selected.
b. Location
This control break indicates the end of financial or statistical Account Master file records for the company-location. When a location break occurs, control file ending balances are calculated and both the Valid and Cumulative Transaction Control file balances are printed. For financial processing, the program checks to make sure that both suspense and retained earnings accounts exist. Updated Valid and Cumulative Control records are written, and location controls are printed.
c. LR -- End of Job
When end of job is reached, the Reference File Date and Period record is updated for a demand or final post.
14. Error Processing
Processing errors encountered during program execution that are not within the normal realm of processing are handled with the routines listed below.
a. *PSSR--Exception/Error
This common subroutine is executed whenever a program execution or program detected error occurs and causes control to pass to subroutine ABNEND.
b. FILERR--File Error
This common subroutine is executed whenever a file error occurs which is not otherwise trapped by an error indicator or an input, update or output operation. This subroutine causes control to be passed either to subroutine ABNEND or to the appropriate screen with an error message.
c. ABNEND--Abnormal Termination
This common subroutine is called by the mainline when the value of error severity is greater than 1. This module terminates the program by setting on indicator LR and executing a return statement.