F03B08UpdatePreviousYear

F03B08 Update Previous Year

Minor Business Rule

Object Name: B03B0125

Parent DLL: CFIN

Location: Client/Server

Language: C

B03B0125
F03B08 Update Previous Year


Functional Description


Purpose

This function is called when the current year box is checked in the P03B08 after all grid records are 
updated or added to the database.  Based on company, it will then make sure that Current Year (CURY) 

in the F03B08 is set to a "1" for the current year, a "2" for the year immediately preceding the 

current year, and a "0" for all other years.


Setup Notes and Prerequisites


Special Logic


Technical Specifications


Parameters

Data ItemDescriptionI/OReqNotes
COCompanyIYes
FYFiscal YearIYes

CTRYCenturyIYes


Related Tables

F03B08Credit/Collection Date Pattern

Related Business Functions

None

Processing


Open F03B08;

Update F03B08 Set F03B08.cury = '0' Where F03B08.co = lpDS->szCompany;


Update F03B08 Set F03B08.cury = '1' Where F03B08.co = lpDS->szCompany,  F03B08.rdfy = &lpDS->mnFiscalYear1, and F03B08.rdctry = 

&lpDS->mnCentury;


Select F03B08.co, F03B08.ctry, F03B08.ctry  From F03B08 Where F03B08.co = lpDS->szCompany,  F03B08.rdfy < &lpDS->mnFiscalYear1, and 

F03B08.rdctry = &lpDS->mnCentury  OR  F03B08.co = lpDS->szCompany and  F03B08.rdctry  < &lpDS->mnCentury;


Fetch first record selected;

Copy fields from this fetch into a structure to update F03B08.

Update F03B08 Set F03B08.cury = '2' Where F03B08.co = fetched szCompany,  F03B08.rdfy = fetched mnFiscalYear1, and F03B08.rdctry = fetched 

mnCentury;






^

Data Structure

D03B0125 - F03B08 Update Previous Year

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.

mnFiscalYear1FYMATH_NUMERICNONENONE

A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal 
year (as defined on the Company Setup form). Specify the year at the end of the first period rather than the year at the end of the fiscal period. 
For example, a fiscal year begins October 1, 1998 and ends September 30, 1999. The end of the first period is October 31, 1998. Specify the 
year 98 rather than 99.

mnCenturyCTRYMATH_NUMERICNONENONE

The calendar century associated with the year. Enter is the first two digits of the year. For example, 19 indicates any year beginning with 19 
(1998, 1999), 20 indicates any year beginning with 20 (2000, 2001), and so on.

Related Functions

None

Related Tables

F03B08 Credit/Collection Date Pattern