RetrieveARConstantsByCompany

Retrieve A/R Constants by Company

Minor Business Rule

Object Name: B03B0093

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function Retrieves A/R Constants by Company from the F0010  Company Constants Table.

Setup Notes and Prerequisites

None


Special Logic

None



Technical Specification




Parameters

ItemDescriptionI/OReq?Notes

COSzCompanyIYCompany
AGEMCagingMethodONAging Method (1,2,3)

AGECtypeDateToAgeFromONAging  Date Based On (I/D/G)

DAGJdDateAgeAsOfONDate  Age as of

AGR1MnAgingDays1ONAging Days  A/R 1

AGR2MnAgingDays2ONAging Days  A/R 2

AGR3MnAgingDays3ONAging Days  A/R 3

AGR4MnAgingDays4ONAging Days  A/R 4

AGR5MnAgingDays5ONAging Days  A/R 5

AGR6MnAgingDays6ONAging Days  A/R 6

AGR7MnAgingDays7ONAging Days  A/R 7


Related Tables

F0010  Company Constants


Related Functions

None

Processing

Set the key to the F0010 table = szCompany

Open the F0010 Table

If the table is opened successfully

Fetch the record from the F0010 table

If the record is retrieved successfully

Load the cAgingMethod and the cTypeDateToAgeFrom

If the DatetoAgeAsOf in the retrieved record is null

Set jdDateAgeAsOf = today

Else

Set jdDateAgeAsOf = DatetoAgeAsOf from the retrieved record
Load the AgingDays variables from the retrieved record

Close the F0010 table

Else

Close the F0010 table

Else

IReturnCode = ER_ERROR


^

Data Structure

D03B0093 - Retrieve A/R Constants by Company

Parameter NameData ItemData TypeReq/OptI/O/Both
szCompanyCOcharNONENONE

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

cAgingMethodAGEMcharNONENONE

A code that designates which aging categories the system uses to assign invoices. The system uses the date specified in the Age as of 
Date field (DAG) and the value specified in the Date Aging Based On field (AGE) to calculate the aging for each invoice, and then assigns 
them to the aging category specified by this code. Valid codes are: 1 Aging days. The system assigns invoices to the aging categories 
specified in the Aging Days fields. The aging categories are user defined. 2 Fiscal periods. The system uses the fiscal periods defined by the date 
pattern assigned to the company record as the aging categories. 3 Calendar. The system uses each calendar month as an aging category.

cTypeDateToAgeFromAGEcharNONENONE

A code that specifies which date on the invoice record to use to calculate aging. The system compares the date specified on the invoice 
record to the date entered in the Age as of Date field (DAG) to determine the aging, and then updates the aging category based on the method 
specified in the Aging Method field (AGEM). Valid values are: I Invoice date   D Due date   G G/L date   S Statement date

jdDateAgeAsOfDAGJDEDATENONENONE

A date that the system uses to determine the aging category to which to assign an invoice. The system compares the aging date to the 
invoice date, statement date, due date, or G/L date, which is defined by the value in the Date Aging Based On field (AGE), and then uses the 
value in the Aging Method field (AGEM) to determine which aging category to update. If you use method 1, the aging categories are defined in 
the Aging Days fields (CRDY, AGR1, AGR2, AGR3, AGR4, AGR5, AGR6, and AGR7) in the Accounts Receivable constants.  If you leave this 
field blank, the system uses the current date.  Note: The Sales Order Management system also uses this date for credit checks. Leave this 
field blank to ensure that the credit checks are always current.

mnAgingDays1AGR1MATH_NUMERICNONENONE

A value used in conjunction with CRDY and AGR2 to define the current and first aging categories.

mnAgingDays2AGR2MATH_NUMERICNONENONE

A value used in conjunction with AGR1 and AGR3 to define the first and second aging categories.

mnAgingDays3AGR3MATH_NUMERICNONENONE

A value used in conjunction with AGR2 and AGR4 to define the second and third aging categories.

mnAgingDays4AGR4MATH_NUMERICNONENONE

A value used in conjunction with AGR3 and AGR5 to define the third and fourth aging categories.

mnAgingDays5AGR5MATH_NUMERICNONENONE

A value used in conjunction with AGR4 and AGR6 to define the fourth and fifth aging categories.

mnAgingDays6AGR6MATH_NUMERICNONENONE

A value used in conjunction with AGR5 and AGR7 to define the fifth and sixth aging categories.

mnAgingDays7AGR7MATH_NUMERICNONENONE

A value used in conjunction with AGR6 to define the sixth aging category.

Related Functions

None

Related Tables

F0010 Company Constants