CalculatePeriodBeginOrEndDate

Calculate Period Begin Or End Date

Minor Business Rule

Object Name: N1700920

Parent DLL: CCRIN

Location: Client/Server

Language: NER

1.1Purpose
This NER will calculate a Period Begin Date or a Period End Date based on a date and company. 


1.2Setup Notes and Prerequisites


1.3Special Logic


2.4Processing 

//

//Check if Mode if valid

//

If Mode <> '1' and Mode <> '2' then

If SuppressErrorMessage = Blank OR SuppressErrorMessage = Null

Set error
Endif

ErrorMessageID = 4364

Else
//
        //    Retrieve Period Number, Fiscal Year, Century 

//of the Based On Date and Company
       //

Call F0008 Get Fiscal Year Period Number

Company -> szCompany

Based On Date -> jdTransactionDate

Period Number <- mnReturnPeriodNumber

Fiscal Year <- mnReturnFiscalYear

Century <- mnReturnCentury

//
        //    Retrieve the Period Begin/End Dates for the Fiscal Year

//
Call Calculate Begin Date of Period

Period Number -> mnPeriodNo

Yes -> cRetrieveF0008Records

Company -> szCompany

Century -> mnCentury

Fiscal Year -> mnFiscalYear

Date Begin <-  jdPeriodBeginDate

UNDEFINED X jdBeginDateofFiscalYear

UNDEFINED  X  jdPeriod1EndDate

UNDEFINED  X  jdPeriod2EndDate

UNDEFINED  X  jdPeriod3EndDate

UNDEFINED  X  jdPeriod4EndDate

UNDEFINED  X  jdPeriod5EndDate

UNDEFINED  X  jdPeriod6EndDate

UNDEFINED  X  jdPeriod7EndDate

UNDEFINED  X  jdPeriod8EndDate

UNDEFINED  X  jdPeriod9EndDate

UNDEFINED  X  jdPeriod10EndDate

UNDEFINED  X  jdPeriod11EndDate

UNDEFINED  X  jdPeriod12EndDate

UNDEFINED  X  jdPeriod13EndDate

UNDEFINED  X  jdPeriod14EndDate

"1" -> cSuppressErrorMesage

ErrorMsgID <- szErrorMessageID

Date End <- jdPeriodEndDate

If no errors then
If Mode = '1' then
Period Date = Date Begin
Else

Period Date = Date End

Endif

Else

If SuppressErrorMessage = Blank OR SuppressErrorMessage = Null

Set NER Error (ErrorMsgID)

Endif

Endif

Endif


Data Structure

D1700920 - Calculate Period Begin Or End Date

Parameter NameData ItemData TypeReq/OptI/O/Both
jdBasedOnDateDTEJJDEDATEREQINPUT

This is the date that is used to calculate the Period Begin Date or the Period End Date.
^

szCompanyCOcharREQINPUT

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.

jdPeriodDateDTEJJDEDATEOPTNONE

The Julian Date

mnPeriodNumberPNMATH_NUMERICOPTNONE

Period number of the Based on Date that is returned.
^

mnFiscalYearFYMATH_NUMERICOPTNONE

Fiscal Year of Based on Date that is returned.
^

mnCenturyCTRYMATH_NUMERICOPTNONE

Century of Based on Date that is returned.
^

cModeMODEcharREQINPUT

1 = Calculate Period Begin Date
2 = Calculate Period End Date

^

cSuppressErrorMessageSUPPScharOPTNONE

1 = Suppress Error Messages
Blank = Error Messages will be set inside NER

^

szErrorMessageIDDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

Related Functions

None

Related Tables

None