List of Use Cases Implemented by the AP190/AP195 Program Suite¶
The AP190.ocl36, AP190.rpg36, and AP195.rpg36 programs collectively implement a single primary use case for Accounts Payable (A/P) check reconciliation:
- A/P Cancelled Check Reconciliation and Reporting:
- Description: This use case allows users to enter, validate, and store cancelled check reconciliation data (company number, bank G/L number, check number, clear date, and clear amount) and generate a printed report summarizing the reconciled checks, grouped by company and bank G/L account with totals.
- Components:
AP190.ocl36: Orchestrates file setup and program execution (callsAP190andAP195).AP190.rpg36: Handles interactive data entry and validation through two screens (AP190S1for company, bank G/L, and check number;AP190S2for clear date and amount), updating the reconciliation transaction file (APCRTR).AP195.rpg36: Generates a report listing cancelled checks with totals by bank G/L and company.
Function Requirement Document for A/P Cancelled Check Reconciliation¶
Function Requirement Document: A/P Cancelled Check Reconciliation¶
Overview¶
The A/P Cancelled Check Reconciliation function processes and validates cancelled check data, storing reconciliation records and generating a summary report grouped by company and bank G/L account.
Inputs¶
- Company Number (
CONO, 2 bytes): Identifies the company. - Bank G/L Number (
BKGL, 8 bytes): Specifies the bank general ledger account. - Check Number (
CHK#, 6 bytes): Unique identifier for the check. - Clear Date (
CLDT, 6 digits, MMDDYY): Date the check cleared. - Clear Amount (
CLAM, 11.2 numeric): Amount cleared for the check.
Outputs¶
- Reconciliation Records: Stored in
APCRTRfile with company, bank G/L, check number, clear date, and clear amount. - Printed Report: Lists cancelled checks with check number, clear date, clear amount, and totals by bank G/L and company, including company name, date, time, and page number.
Process Steps¶
- Validate Inputs:
- Verify
CONOexists inAPCONTand is not deleted (ACDEL ≠ 'D'). - Verify
CONO+BKGLexists inGLMASTand is not deleted (GLDEL ≠ 'D'). - Verify
CHK#exists inAPCHKR, is open (AMCODE = 'O'), and not deleted (D), reconciled (R), or voided (V). - Validate
CLDTas a valid date (MMDDYY, month 1–12, day 1–31 based on month/leap year). -
Ensure
CLAMmatches the check amount (AMCKAM) fromAPCHKR. -
Store Reconciliation Data:
- Write or update
APCRTRwithCONO,BKGL,CHK#,CLDT, andCLAM. -
Support deletion of existing
APCRTRrecords. -
Generate Report:
- Read
APCRTRrecords, group byCONOandBKGL. - Retrieve company name (
ACNAME) fromAPCONT. - Print headers (company name, bank G/L, date, time, page).
- List check details (
CHK#,CLDT,CLAM). - Calculate and print totals:
- Bank G/L total (
L1CLAM): Sum ofCLAMfor each bank G/L. - Company total (
L2CLAM): Sum ofL1CLAMfor each company.
- Bank G/L total (
- Output after 21 detail lines or at group breaks.
Business Rules¶
- Validation:
- Invalid
CONO,BKGL, orCHK#prevents processing. CLDTmust be a valid date, accounting for leap years (February 28/29, others 30/31 days).CLAMmust equalAMCKAMfromAPCHKR.- Data Integrity:
- Only open checks (
AMCODE = 'O') are processed. - Deleted records in
APCONTorGLMASTare invalid. - Reporting:
- Group by company and bank G/L, with subtotals and company totals.
- Include company name if available; otherwise, proceed without it.
- Format dates (MMDDYY) and amounts (11.2 decimal) for readability.
- Record Management:
- Allow updates or deletions in
APCRTR. - Ensure unique keys (
CONO+BKGL+CHK#) inAPCRTR.
Calculations¶
- Date Validation:
- Extract month, day, year from
CLDT(MMDDYY). - Validate month (1–12).
- Validate day: February (28 or 29 for leap years), April/June/September/November (30), others (31).
- Leap year: If year divisible by 4 (or by 400 for century years), allow 29 days for February; else, 28.
- Construct 8-digit date (
CLDT8, YYYYMMDD) using century (Y2KCEN) for Y2K compliance. - Totals:
L1CLAM= Sum ofCLAMfor each bank G/L group.L2CLAM= Sum ofL1CLAMfor each company.
Data Sources¶
- APCRTR: Stores reconciliation data (key:
CONO+BKGL+CHK#). - APCONT: Provides company name (
ACNAME) and deletion flag (ACDEL). - GLMAST: Validates bank G/L (
GLDEL,GLDESC). - APCHKR: Provides check details (
AMCODE,AMVEN#,AMCKAM,AMCKDT,AMVNNM).