RetrieveEquipmentBillingRate

F1301 Retrieve Equipment Billing Rate

Minor Business Rule

Object Name: N1300220

Parent DLL: CMFG

Location: Client/Server

Language: NER

Functional Description

Purpose

To retrieve the Equipment Billing Rate from the Equipment Rates Table (F1301).

Setup Notes and Prerequisites


Special Logic


Technical Specification




//    Retrieve Company for Input Business Unit
//

Call B0000130 passing Input MCU and returning CO


//    Retrieve Rate Group from Equipment Master

//

Fetch Single on F1201 for Input NUMB

Return:FAACL0 to Variable RTGR


//    Read Rental Rules to determine how to calculate the Billing Amount

//

Fetch Single on F1302 for Input MCU and B0000130 CO

Return:Equipment Rate Code (ERC)

Default Table 01 (DT01)

Default Table 02 (DT02)

Default Table 03 (DT03)

Default Table 04 (DT04)

Default Table 05 (DT05)

If Fetch unsuccessful

Fetch Single on F1302 for blank MCU and B0000130 CO

Return:Equipment Rate Code (ERC)

Default Table 01 (DT01)

Default Table 02 (DT02)

Default Table 03 (DT03)

Default Table 04 (DT04)

Default Table 05 (DT05)

If Fetch unsuccessful and B0000130 CO != "00000"

Fetch Single on F1302 for blank MCU and CO = "00000"

Return:Equipment Rate Code (ERC)

Default Table 01 (DT01)

Default Table 02 (DT02)

Default Table 03 (DT03)

Default Table 04 (DT04)

Default Table 05 (DT05)

End if

End if


//    Continue if record found in F1302

//

If Fetch successful


//    If Input ERC = blank, default from Rental Rules
//

If Input ERC = blank

Assign Output ERC = F1302 ERC

End if

//-----------------------------------------------------------------------------

//    Determine Rate Table to use for Billing

//

//    Rate Table 01

//

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT01

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = Input NUMB

Return PO01 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT01

Assign Variable NUMB = Input NUMB

Else

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT01

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = blank

Return PO01 to Variable PRCNT


//    Rate Table 02

//

If Fetch successful

Assign Variable RTTB = F1302 DT01

Assign Variable NUMB = blank

Else

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT02

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = Input NUMB

Return PO02 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT02

Assign Variable NUMB = Input NUMB

Else

Fetch Single on F1301

Rate Table (RTTB) = B1302 DT02

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = blank

Return PO02 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT02

Assign Variable NUMB = blank

Else


//    Rate Table 03

//

Fetch Single on F1301

Rate Table (RTTB) = B1302 DT03

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = Input NUMB

Return PO03 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT03

Assign Variable NUMB = Input NUMB

Else

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT03

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = blank

Return PO03 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT03

Assign Variable NUMB = blank

Else


//    Rate Table 04

//

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT04

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = Input NUMB

Return PO04 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT04

Assign Variable NUMB = Input NUMB

Else

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT04

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = blank

Return PO04 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT04

Assign Variable NUMB = blank

Else


//    Rate Table 05

//

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT05

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = Input NUMB

Return PO05 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT05

Assign Variable NUMB = Input NUMB

Else

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT05

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = blank

Return PO05 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT05

Assign Variable NUMB = blank

End if

End if

End if

End if

End if

End if

End if

End if

End if

End if


//-----------------------------------------------------------------------------

//    Read Equipment Rates to determine Billing Rate

//

Select F1301 

RTTB = Variable RTTB

RTGR = Variable RTGR

NUMB = Variable NUMB

ERC = Input ERC


Assign Flag = blank

Fetch Next on F1301

Return:Effective Date (EFTB)

End Date (EFTE)

Billing Rate (EBRT)

Rate Component 01 (RK01)

Rate Component 02 (RK02)

Rate Component 03 (RK03)

Rate Component 04 (RK04)

Rate Component 05 (RK05)

Rate Component 06 (RK06)

Rate Component 07 (RK07)

Rate Component 08 (RK08)

Rate Component 09 (RK09)

Rate Component 10 (RK10)

While Fetch successful and Flag = blank

If F1301 EFTB <= Input Date and F1301 EFTE >= Input Date

Assign Flag = 1

Else

Fetch Next on F1301

Return:Effective Date (EFTB)

End Date (EFTE)

Billing Rate (EBRT)

Rate Component 01 (RK01)

Rate Component 02 (RK02)

Rate Component 03 (RK03)

Rate Component 04 (RK04)

Rate Component 05 (RK05)

Rate Component 06 (RK06)

Rate Component 07 (RK07)

Rate Component 08 (RK08)

Rate Component 09 (RK09)

Rate Component 10 (RK10)

End if

End While


If Flag = blank

Select F1301 
RTTB = Variable RTTB

RTGR = Variable RTGR

NUMB = Variable NUMB

ERC = Input ERC

Fetch Next on F1301

Return:Effective Date (EFTB)

End Date (EFTE)

Billing Rate (EBRT)

Rate Component 01 (RK01)

Rate Component 02 (RK02)

Rate Component 03 (RK03)

Rate Component 04 (RK04)

Rate Component 05 (RK05)

Rate Component 06 (RK06)

Rate Component 07 (RK07)

Rate Component 08 (RK08)

Rate Component 09 (RK09)

Rate Component 10 (RK10)

While Fetch successful and Flag = blank

If F1301 EFTB <= Input Date and F1301 EFTE = blank

Assign Flag = 1

Else

Fetch Next on F1301

Return:Effective Date (EFTB)

End Date (EFTE)

Billing Rate (EBRT)

Rate Component 01 (RK01)

Rate Component 02 (RK02)

Rate Component 03 (RK03)

Rate Component 04 (RK04)

Rate Component 05 (RK05)

Rate Component 06 (RK06)

Rate Component 07 (RK07)

Rate Component 08 (RK08)

Rate Component 09 (RK09)

Rate Component 10 (RK10)

End if

End While


If Flag = blank

Select F1301 
RTTB = Variable RTTB

RTGR = Variable RTGR

NUMB = Variable NUMB

ERC = Input ERC

Fetch Next on F1301

Return:Effective Date (EFTB)

End Date (EFTE)

Data Structure

D1300220 - F1302 Retrieve Equipment Billing Rate

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAssetNumberNUMBMATH_NUMERICOPTNONE

An 8-digit number that uniquely identifies an asset.

szBillingRateCodeERCcharOPTNONE

A user defined code (00/RC) that indicates a billing rate, such as DY for daily, MO for monthly, and WK for weekly. You can set up multiple 
billing rates for a piece of equipment. If you leave this field blank, the system searches for a valid billing rate in the following sequence: 1.  
Account Ledger Master (F0901) This table contains the most detailed rate information. You can assign multiple rates for a job. For example, you 
can set up separate rates for different equipment working conditions. 2.  Job or Business Unit Master (F0006) This table contains less detailed 
rate information than the Account Ledger Master. You can only set up a single rate for a job based on this table. 3.  Rental Rules (F1302) This 
table contains the least detailed rate code information. The system searches this table according to the criteria you establish when setting up 
the table.

szBusinessUnitMCUcharOPTNONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

jdBillingDateEFTBJDEDATEOPTNONE

The date that an address, item, transaction, or table record becomes active.  The meaning of this field differs, depending on the program.  
For example, the effective date could represent the following:    o When a change of address becomes effective.   o When a lease becomes 
effective.   o When a price becomes effective.   o When the currency exchange rate becomes effective.   o When a tax rate becomes effective. 

mnBillingRateEBRTMATH_NUMERICOPTNONE

A code that represents the amount that you want to charge the job. Each piece of equipment can have numerous billing rates based on the 
rate code. The equipment billing rate can be composed of up to ten different rates. For example: Billing Rate = 200        100 Rate 1 (Ownership 
Component)         25 Rate 2 (Operating Component)         50 Rate 3 (Maintenance Component)         25 Rate 4 (Other Costs Component) When 
you post time entries to the general ledger, the system recognizes credits in revenue accounts for each of the rate components. This allows 
you to separate portions of the equipment billing by type of cost. Note: You are not required to use rate components.

mnBillingRateComponent01RK01MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type. The rate component allows you to document the breakdown of the rate 
into as many as ten individual components. For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 25 (Ownership 
Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate Component 4 
(RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. through Rate 
Component        10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent02RK02MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type. The rate component allows you to document the breakdown of the rate 
into as many as ten individual components. For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 25 
(Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate Component 4 
(RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. through Rate 
Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent03RK03MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type. The rate component allows you to document the breakdown of the rate 
into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 25 
(Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate Component 4 
(RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. through Rate 
Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent04RK04MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type. The rate component allows you to document the breakdown of the rate 
into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 25 
(Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate Component 4 
(RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. through Rate 
Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent05RK05MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type (see EBRT).  The rate component allows you to document the 
breakdown of the rate into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 
25 (Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate 
Component 4 (RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. 
through Rate Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent06RK06MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type (see EBRT).  The rate component allows you to document the 
breakdown of the rate into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 
25 (Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate 
Component 4 (RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. 
through Rate Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent07RK07MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type (see EBRT).  The rate component allows you to document the 
breakdown of the rate into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 
25 (Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate 
Component 4 (RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. 
through Rate Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent08RK08MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type (see EBRT).  The rate component allows you to document the 
breakdown of the rate into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate = 100        Rate Component 1 (RK01) = 
25 (Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate 
Component 4 (RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)         Rate Component 6 (RK06) = 10 (Other Costs), etc. 
through Rate Component        10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent09RK09MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type (see EBRT).  The rate component allows you to document the 
breakdown of the rate into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate  =  100        Rate Component 1 (RK01) 
= 25 (Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate 
Component 4 (RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. 
through Rate Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

mnBillingRateComponent10RK10MATH_NUMERICOPTNONE

Each equipment item has a specific billing rate for each rate type (see EBRT).  The rate component allows you to document the 
breakdown of the rate into as many as ten individual components.  For example: Tandem Axle Truck: Hourly Rate = 00        Rate Component 1 (RK01) = 
25 (Ownership Costs)        Rate Component 2 (RK02) = 50 (Operating Costs)        Rate Component 3 (RK03) = 15 (Maintenance Costs)        Rate 
Component 4 (RK04) =  0 (Other Costs)        Rate Component 5 (RK05) =  0 (Other Costs)        Rate Component 6 (RK06) = 10 (Other Costs), etc. 
through Rate Component 10 (RK10) NOTE: Rate component totals must equal the billing rate amount.

cErrorCodeERRCcharOPTNONE

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).

Related Functions

None

Related Tables

None
50000in"> Rate Table (RTTB) = F1302 DT04

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = blank

Return PO04 to Variable PRCNT

If Fetch successful

Assign Variable RTTB = F1302 DT04

Assign Variable NUMB = blank

Else


//    Rate Table 05

//

Fetch Single on F1301

Rate Table (RTTB) = F1302 DT05

Rate Group (RTGR) = Variable RTGR

Equipment Number (NUMB) = Input NUMB

Return PO05 to Variable PRCNT

If Fetch successful