CalculateContractDuration

Calculate Contract Start/End Date

Minor Business Rule

Object Name: N1701380

Parent DLL: CCRIN

Location: Client/Server

Language: NER

1.Functional Description


1.1Purpose

This business function is used to calculate the contract duration based on the dates passed in via 

the data structure.


1.2Setup Notes and Prerequisites

The Unit of Measures need to be set up in the Standard Units of Measure.  Use menu G4141 (P41003) to 

set up the conversions for years/days, years/months, and years/weeks.



Data Structure

D1701380A - Calculate Contract Duration

Parameter NameData ItemData TypeReq/OptI/O/Both
mnTotalContractDuration_DAYSCDAYSCMATH_NUMERICREQBOTH

The number of days in the contract based on the contract start date and the contract end date.

szDurationUnitofMeasure_BUMBUMcharREQINPUT

A user defined code (system 00/type UM) that identifies the unit of measurement for an amount or quantity as it was billed.  For example, it 
can represent a barrel, box, cubic year, gallon, an hour, and so on.

szUnitOfMeasureForDays_UMUMcharREQINPUT

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

jdContractDetailStartDate_CSDTCSDTJDEDATEREQINPUT

The date you actually start work on the contract.

jdContractDetailEndDate_CDTECDTEJDEDATEREQINPUT

The date you actually completed work on the contract.

cSuppressErrorMessages_EV01EV01charOPTNONE

An option that specifies the type of processing for an event.

cErrorCode_ERRCERRCcharOPTNONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageID_DTAIDTAIcharOPTNONE

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
CalculateContractStartEndDate

CalculateContractStartEndDate

Calculate Contract Start/End Date

Minor Business Rule

Object Name: N1701380

Parent DLL: CCRIN

Location: Client/Server

Language: NER

1.Functional Description


1.1Purpose

This business function is used to calculate the contract detail start and end dates based on line 

type rules.


1.2Setup Notes and Prerequisites

The line type rules need to be established for the line type entered on the contract detail line.  

The line type rules are in the CSMS attributes row exit for the line type.  Go to line type revisions 

and take the row exit to CSMS Attributes and set up the line type rules.


The Unit of Measures need to be set up in the Standard Units of Measure.  Use menu G4141 (P41003) to 

set up the conversions for years/days, years/months, and years/weeks.



Data Structure

D1701380 - Calculate Contract Start/End Date

Parameter NameData ItemData TypeReq/OptI/O/Both
szLineType_LNTYLNTYcharREQINPUT

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

mnAssetItemNumber_NUMBNUMBMATH_NUMERICREQINPUT

An 8-digit number that uniquely identifies an asset.

jdContractHeaderStartDate_CSDTCSDTJDEDATEREQINPUT

The date you actually start work on the contract.

jdContractHeaderEndDate_CDTECDTEJDEDATEREQINPUT

The date you actually completed work on the contract.

mnContractDuration_DAYSCDAYSCMATH_NUMERICREQBOTH

The number of days in the contract based on the contract start date and the contract end date.

szDurationUnitOfMeasure_BUMBUMcharREQINPUT

A user defined code (system 00/type UM) that identifies the unit of measurement for an amount or quantity as it was billed.  For example, it 
can represent a barrel, box, cubic year, gallon, an hour, and so on.

szUnitOfMeasureForDays_UMUMcharREQINPUT

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

cSuppressErrorMessages_EV01EV01charOPTNONE

An option that specifies the type of processing for an event.

cErrorCode_ERRCERRCcharOPTNONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageID_DTAIDTAIcharOPTNONE

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.

jdContractDetailStartDate_CSDTCSDTJDEDATEREQBOTH

The date you actually start work on the contract.

jdContractDetailEndDate_CDTECDTEJDEDATEREQBOTH

The date you actually completed work on the contract.

cModifyStartDate_BTF01BTF01charREQINPUT

Use this line type flag to indicate that the contract detail line Start Date can be modified once it has been entered.

cModifyEndDate_BTF02BTF02charREQINPUT

Use this line type flag to indicate that the contract detail line End Date can be modified once it has been entered.

cStartDateDefault_BHV01BHV01charREQINPUT

A hard-coded, user defined code (17/L1) that indicates from where the system retrieves the default value for the Contract Line Start Date 
field. Valid values are:    1   Last contracted end date (for equipment) + 1         The system finds the newest contract for this piece of equipment, 
adds one day to the detail end date to calculate the new start date. If the system does not find a contract for the piece of equipment (serial, unit) 
number, the system produces an error if the user cannot modify the start date.    2   Contract header start date          The system enters the 
contract header start date as the default value.    3   Base Warranty Start Date          The system enters the detail start date from the first active base 
warranty (line type) contract for this equipment as the default. If the system does not find an active base warranty contract for the piece of 
equipment (serial, unit) number, the system produces an error if the user cannot modify the start date.    4   System date The system enters the 
system date as the default value.    5   None          The system does not enter a default value. The user is required to enter the detail start date.

cEndDateDefault_BHV02BHV02charREQINPUT

A hard-coded, user defined code (17/L2) that indicates from where the system retrieves the default value for the Contract Line End Date 
field. Valid values are:    1   Contract Line Start Date field value + total duration (billable + nonbillable duration)        Add the value from the Contract 
Line Start Date field to billable and nonbillable duration.    2   Contract header end date The system enters the contract header end date as 
the default value.    3   Base Warranty End Date          The system enters the detail end date from the most recent active base warranty (line type) 
contract for this equipment as the default. If the system does not find an active base warranty contract for the piece of equipment (serial, unit) 
number, the system produces an error if the user cannot modify the end date.    4   System date The system enters the system date as the 
default value.    5   None          The system does not enter a default value. The user is required to enter the detail end date.

szAssetNumberInput_ASIIASIIcharOPTNONE

An identification code that represents an asset. You enter the identification code in one of the following formats: 1 Asset number (a 
computer-assigned, 8-digit, numeric control number)   2 Unit number (a 12-character alphanumeric field)   3 Serial number (a 25-character alphanumeric 
field) Every asset has an asset number. You can use unit number and serial number to further identify assets. If this is a data entry field, the first 
character you enter indicates whether you are entering the primary (default) format that is defined for your system, or one of the other two 
formats. A special character (such as / or *) in the first position of this field indicates which asset number format you are using. You assign special 
characters to asset number formats on the fixed assets system constants form.

jdOldStartDate_CSDTCSDTJDEDATEOPTNONE

The date you actually start work on the contract.

jdOldEndDate_CDTECDTEJDEDATEOPTNONE

The date you actually completed work on the contract.

Related Functions

None

Related Tables

None