Routines for c_cfg_db.kb


DeleteContractStatus

File Name

c_cfg_db.kb

Syntax

DeleteContractStatus( VAL inTran: BOOLEAN, REF DeleteRec: ContractStatus )

Parameters

inTran - in transaction or not

DeleteRec - contract status record to be deleted

Returns

SQL return value

Side Effects

None

Description

Deletes a record from the CONTRACT_STATUS table.

Dialog Forms Called

None


DeleteContractTypes

File Name

c_cfg_db.kb

Syntax

DeleteContractTypes ( VAL inTran: BOOLEAN, REF DeleteRec: ContractTypes )

Parameters

inTran - in transaction or not

DeleteRec - contract type record

Returns

SQL return value

Side Effects

None

Description

Deletes a contract type record from the CONTRACT_TYPES table.

Dialog Forms Called

None


DeleteCurrencyRec

File Name

c_cfg_db.kb

Syntax

DeleteCurrencyRec ( VAL InTran: BOOLEAN, REF DeleteRec: CurrencyRec )

Parameters

InTran - in a transaction or not

DeleteRec - currency record

Returns

SQL return value

Side Effects

None

Description

Deletes a specific currency record from the CURRENCY table.

Dialog Forms Called

None


DeleteTimeZone

File Name

c_cfg_db.kb

Syntax

DeleteTimeZone ( VAL InTran: BOOLEAN, REF DeleteRec: TimeZonesRecord )

Parameters

InTran - in a transaction or not

DeleteRec - time zone record

Returns

SQL return value

Side Effects

None

Description

Deletes a time zone record from the database.

Dialog Forms Called

None


DeltaTimeExtractMinutes

File Name

c_cfg_db.kb

Syntax

DeltaTimeExtractMinutes (VAL InDeltaTime: INTEGER, REF Mins: INTEGER)

Parameters

InDeltaTime - original time

Mins - minutes

Returns

None

Side Effects

None

Description

Extracts minutes from a delta time.

Dialog Forms Called

None


DeltaTimeToInt

File Name

c_cfg_db.kb

Syntax

DeltaTimeToInt (VAL InDeltaTime: STRING, REF DeltaTime: INTEGER)

Parameters

InDeltaTime - original time

DeltaTime - new delta time

Returns

None

Side Effects

None

Description

Converts delta time to an integer value.

Dialog Forms Called

None


GetContractStatusID

File Name

c_cfg_db.kb

Syntax

GetContractStatusID( REF Contract_Status_ID: INTEGER, REF Contract_Status: STRING )

Parameters

Contract_Status_ID - ID of a contract status

Contract_Status - contract status value

Returns

None

Side Effects

None

Description

Identifies a contract status ID based on the contract status.

Dialog Forms Called

None


GetContractStatusList

File Name

c_cfg_db.kb

Syntax

GetContractStatusList( REF KStatusList: LIST OF ContractStatus )

Parameters

KStatusList - a list of contract statuses

Returns

List of String ( contract statuses )

Side Effects

None

Description

Creates a Contract Status list.

Dialog Forms Called

None


GetContractType

File Name

c_cfg_db.kb

Syntax

GetContractType( REF type_id: INTEGER, REF contract_type: STRING)

Parameters

type_id - ID of a contract type

contract_type - name of a contract type

Returns

None

Side Effects

None

Description

Retrieves a specific contract type based on its ID.

Dialog Forms Called

None


GetContractTypeID

File Name

c_cfg_db.kb

Syntax

GetContractTypeID ( REF contract_type_id: INTEGER, REF contract_type: STRING)

Parameters

contract_type_id - contract type ID

contract_type - contract type

Returns

None

Side Effects

None

Description

Retrieves the ID of a specific contract type.

Dialog Forms Called

None


GetContractTypeList

File Name

c_cfg_db.kb

Syntax

GetContractTypeList(REF ktypeList: LIST OF ContractTypes)

Parameters

ktypeList - list of contract types

Returns

List of contract types

Side Effects

None

Description

Retrieves a list of contract types from the database.

Dialog Forms Called

None


GetCurrencyCode

File Name

c_cfg_db.kb

Syntax

GetCurrencyCode (VAL CURRENCY_ID: INTEGER)

Parameters

CURRENCY_ID - currency ID

Returns

Currency code

Side Effects

None

Description

Retrieves the currency code for a specific currency ID.

Dialog Forms Called

None


GetCurrencyFromCountry

File Name

c_cfg_db.kb

Syntax

GetCurrencyFromCountry (VAL country_code: INTEGER)

Parameters

country_code - country code

Returns

currency code

Side Effects

None

Description

Retrieves the currency code for the specific country.

Dialog Forms Called

None


GetCurrencyID

File Name

c_cfg_db.kb

Syntax

GetCurrencyID (VAL currency_code: STRING)

Parameters

currency_code - currency code used

Returns

Currency ID

Side Effects

None

Description

Retrieves the currency ID for a specific currency code.

Dialog Forms Called

None


GetCurrencyList

File Name

c_cfg_db.kb

Syntax

GetCurrencyList (REF currencyList: LIST OF CurrencyRec)

Parameters

currencyList - list of currency records

Returns

SQL return value

Side Effects

None

Description

Retrieves a list of currency records.

Dialog Forms Called

None


GetDaylightSavings

File Name

c_cfg_db.kb

Syntax

GetDaylightSavings(REF Daylight_Active: INTEGER)

Parameters

Daylight_Active - flag that indicates daylight savings time

Returns

SQL return value

Side Effects

None

Description

Retrieves the daylight active flag from the database.

Dialog Forms Called

None


GetEventID

File Name

c_cfg_db.kb

Syntax

GetEventID(VAL Event_name: STRING)

Parameters

Event_name - name of event

Returns

Event ID

Side Effects

None

Description

Retrieves an event ID from the database.

Dialog Forms Called

None


GetEventName

File Name

c_cfg_db.kb

Syntax

GetEventName( VAL Event_id: STRING )

Parameters

Event_id - ID of event

Returns

Event name

Side Effects

None

Description

Retrieves an event name from the database.

Dialog Forms Called

None


GetPrefParamValue

File Name

c_cfg_db.kb

Syntax

GetPrefParamValue( VAL paramname: STRING, VAL preference_id: INTEGER )

Parameters

paramname - value used in a where condition

preference_id - ID for the preference requested

Returns

Paramvalue, string found in SQL Select.

Side Effects

None

Description

Returns a paramvalue for a specific preference.

Dialog Forms Called

None


InsertContractStatus

File Name

c_cfg_db.kb

Syntax

InsertContractStatus( VAL inTran: BOOLEAN, REF InsertRec: ContractStatus )

Parameters

inTran - in transaction or not

InsertRec - contract status record to be inserted

Returns

SQL return value

Side Effects

None

Description

Inserts a contract status into the CONTRACT_STATUS table.

Dialog Forms Called

None


InsertContractTypes

File Name

c_cfg_db.kb

Syntax

InsertContractTypes ( VAL inTran: BOOLEAN, REF InsertRec: ContractTypes )

Parameters

inTran - in transaction or not

InsertRec - contract type record

Returns

SQL return value

Side Effects

None

Description

Inserts a new contract type record into the CONTRACT_TYPES table.

Dialog Forms Called

None


InsertCurrencyRec

File Name

c_cfg_db.kb

Syntax

InsertCurrencyRec ( VAL InTran: BOOLEAN, REF InsertRec: CurrencyRec )

Parameters

InTran - in transaction or not

InsertRec - currency record

Returns

SQL return value

Side Effects

None

Description

Inserts a new currency record into the CURRENCY table.

Dialog Forms Called

None


InsertTimeZone

File Name

c_cfg_db.kb

Syntax

InsertTimeZone ( VAL InTran: BOOLEAN, REF InsertRec: TimeZonesRecord )

Parameters

InTran - in transaction or not

InsertRec - time zone record

Returns

SQL return value

Side Effects

None

Description

Inserts a new time zone record into the database.

Dialog Forms Called

None


IntToDeltaTime

File Name

c_cfg_db.kb

Syntax

IntToDeltaTime (VAL InDeltaTime: INTEGER, REF DeltaTime: STRING)

Parameters

InDeltaTime - original time

DeltaTime - new delta time

Returns

None

Side Effects

None

Description

Converts an integer to delta time.

Dialog Forms Called

None


TimezoneAdd

File Name

c_cfg_db.kb

Syntax

TimezoneAdd ( tz );

Parameters

TimeZonesRecord - a time zone record to add to the database

Returns

SQL Rc

Side Effects

None

Description

This function attempts to add the given time zone record. If successful, it updates the local cache.

Dialog Forms Called

None


TimezoneDel

File Name

c_cfg_db.kb

Syntax

TimezoneDel ( tz );

Parameters

TimeZonesRecord - the time zone record to delete from the database

Returns

SQL return value

Side Effects

None

Description

This function attempts to delete the given time zone record. If successful, it updates the local cache.

Dialog Forms Called

None


TimezoneGet

File Name

c_cfg_db.kb

Syntax

TimezoneGet ( tz );

Parameters

TimeZonesRecord - the time zone record to delete from the database

Returns

SQL Rc

Side Effects

None

Description

This function returns detailed information about the time zone specified by the tz.Timezone_Id. If no timezone is found it returns a -100.

Dialog Forms Called

None


TimezoneGetDefaultOrder

File Name

c_cfg_db.kb

Syntax

TimezoneGetDefaultOrder: INTEGER;

Parameters

DefaultOrder - a constant specifying the default order.

TZ_ORDER_BY_NAME - time zone ID

TZ_ORDER_BY_GMT - hour difference

TIMEZONE_ID - time zone ID

Returns

SQL return value

Side Effects

None

Description

This function attempts to return the default time zone list order. If not currently set (for instance, migrating) it defaults to TZ_ORDER_BY_NAME.

Dialog Forms Called

None


TimezoneGetList

File Name

c_cfg_db.kb

Syntax

TimezoneGetList ( timeZoneList );

Parameters

LIST OF TimeZonesRecord - a list of available time zones selected

from the database

Returns

Nothing

Side Effects

None

Description

This function loads the list of available time zones into the reference parameter tz. This list is loaded directly from the TIMEZONES table. After it is loaded, it is cached on the client.

Dialog Forms Called

None


TimezonePut

File Name

c_cfg_db.kb

Syntax

TimezonePut ( OldTz, NewTz );

Parameters

OldTz TimeZonesRecord - the original time zone record

NewTz TimeZonesRecord - the modified time zone record

Returns

SQL return value

Side Effects

None

Description

This function attempts to update the given time zone record. If successful, it updates the local cache.

Dialog Forms Called

None


TimezoneSetDefaultOrder

File Name

c_cfg_db.kb

Syntax

TimezoneSetDefaultOrder ( VAL DefaultOrder: INTEGER );

Parameters

DefaultOrder - a constant specifying the default order

TZ_ORDER_BY_NAME - time zone ID

TZ_ORDER_BY_GMT - hour difference

TIMEZONE_ID - time zone ID

Returns

SQL return value

Side Effects

None

Description

This function attempts to set the default time zone list order. It updates the setting in the SAI_APP_PARAMS table then refresh the cache.

Dialog Forms Called

None


UpdateContractStatus

File Name

c_cfg_db.kb

Syntax

UpdateContractStatus( VAL inTran: BOOLEAN, REF BeforeRec: ContractStatus, REF AfterRec: ContractStatus )

Parameters

inTran - Boolean

BeforeRec - contract status record

AfterRec - contract status record

Returns

SQL return value

Side Effects

None

Description

Updates a contract status record.

Dialog Forms Called

None


UpdateContractTypes

File Name

c_cfg_db.kb

Syntax

UpdateContractTypes ( VAL inTran: BOOLEAN, REF BeforeRec: ContractTypes, REF AfterRec: ContractTypes )

Parameters

inTran - in transaction or not

BeforeRec - contract type record

AfterRec - contract type record

Returns

SQL return value

Side Effects

None

Description

Updates a contract type record from the CONTRACT_TYPES table.

Dialog Forms Called

None


UpdateCurrencyRec

File Name

c_cfg_db.kb

Syntax

UpdateCurrencyRec ( VAL InTran: BOOLEAN, REF BeforeRec: CurrencyRec, REF AfterRec: CurrencyRec )

Parameters

InTran - in transaction or not

BeforeRec - currency record

AfterRec - currency record

Returns

SQL return value

Side Effects

None

Description

Updates a currency record in the CURRENCY table.

Dialog Forms Called

None


UpdateDaylightSavings

File Name

c_cfg_db.kb

Syntax

UpdateDaylightSavings(VAL Daylight_Active: INTEGER)

Parameters

Daylight_Active - flag indicating daylight savings time

Returns

None

Side Effects

None

Description

Updates the daylight active flag in the database.

Dialog Forms Called

None


UpdateEventRec

File Name

c_cfg_db.kb

Syntax

UpdateEventRec( REF updatedEvent: EventRec )

Parameters

updatedEvent - event record

Returns

SQL return value

Side Effects

None

Description

Updates the Events table with the event record passed in.

Dialog Forms Called

None


UpdateListOfContractStatus

File Name

c_cfg_db.kb

Syntax

UpdateListOfContractStatus( VAL inTran: BOOLEAN, REF BeforeList: LIST OF ContractStatus, REF AfterList: LIST OF ContractStatus )

Parameters

inTran - in transaction or not

BeforeList - original list of contract statuses

AfterList - updated list of contract statuses

Returns

SQL return value

Side Effects

None

Description

Updates an entire list of contract status records.

Dialog Forms Called

None


UpdateListOfContractTypes

File Name

c_cfg_db.kb

Syntax

UpdateListOfContractTypes ( VAL inTran: BOOLEAN, REF BeforeList: LIST OF ContractTypes, REF AfterList: LIST OF ContractTypes )

Parameters

inTran - in transaction or not

BeforeList - original list of contract types

AfterList - updated list of contract types

Returns

SQL return value

Side Effects

None

Description

Updates a list of contract types.

Dialog Forms Called

None


UpdateListOfCurrencyRec

File Name

c_cfg_db.kb

Syntax

UpdateListOfCurrencyRec ( VAL InTran: BOOLEAN, REF BeforeList: LIST OF CurrencyRec, REF AfterList: LIST OF CurrencyRec )

Parameters

InTran - in transaction or not

BeforeList - original list of currency records

AfterList - updated list of currency records

Returns

SQL return value

Side Effects

None

Description

Updates a list of currency records in the CURRENCY table.

Dialog Forms Called

None


UpdateListOfTimeZones

File Name

c_cfg_db.kb

Syntax

UpdateListOfTimeZones ( VAL InTran: BOOLEAN, REF BeforeList: LIST OF TimeZonesRecord, REF AfterList: LIST OF TimeZonesRecord )

Parameters

InTran - in transaction or not

BeforeList - original list of time zone records

AfterList - updated list of time zone records

Returns

SQL return value

Side Effects

None

Description

Updates a list of time zone records in the database.

Dialog Forms Called

None


UpdateTimeZone

File Name

c_cfg_db.kb

Syntax

UpdateTimeZone ( VAL InTran: BOOLEAN, REF BeforeRec: TimeZonesRecord, REF AfterRec: TimeZonesRecord )

Parameters

InTran - in transaction or not

BeforeRec - original time zone record

AfterRec - updated time zone record

Returns

SQL return value

Side Effects

None

Description

Updates a time zone record in the database.

Dialog Forms Called

None