CntrctBillingRetainCalcCache

Contract Billing Retainage Calculation Cache Function

Minor Business Rule

Object Name: B5200221

Parent DLL: CCRIN

Location: Client/Server

Language: C

This Function has 4 modes:
1 = Add record to cache

2 = Fetch record from cache

3 = Delete all records from cache

4 = Terminate cache

Data Structure

D5200221 - Contract Billing Retainage Calculation Cache Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
szComputerID_CTIDCTIDcharREQINPUT

mnJobnumberA_JOBSJOBSMATH_NUMERICREQINPUT

The job number (work station ID) which executed the particular job.

mnLineNumber_MATH01MATH01MATH_NUMERICREQINPUT

- - - Good Performance Low Value. 

cModeProcessing_MODEMODEcharREQINPUT

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

mnDocumentOrderAlt_DOCZDOCZMATH_NUMERICOPTBOTH

The original document number.  This can be a voucher, an invoice, unapplied cash, a journal entry number, etc.  Matching document 
numbers are also used to identify related documents in the Accounts Receivable and Accounts Payable systems.  See matching document 
(DOCM).  This document number (DOCO) is always the original document number, and the matching document number (DOCM) is the check, 
adjustment, or credit to be applied against the original document. For example: A/P Automated/Manual Payment: Original (DOCO) - Voucher; 
Matching Document (DOCM) - Payment  A/R Original Invoice: Original (DOCO) - Invoice  Receipt Application: Original (DOCO) - Invoice; Matching 
Document (DOCM) - Receipt Credit Memo/Adjustment: Original (DOCO) - Invoice; Matching Document (DOCM) -Credit Memo  Unapplied 
Case: Original (DOCO) - Receipt

szDocTypeInvoiceOnly_DCTIDCTIcharOPTBOTH

A user defined (00/DI) document type for invoice entry. Any document type set up for invoice-only entry should begin with the letter R 
(receivables). The default is RI, RR, or RM. Reserved document types have been defined for vouchers, invoices, receipts, and time sheets. The 
reserved document types are: P_ Accounts Payable Documents R_Accounts Receivable Documents T_ Payroll Documents I_Inventory 
Documents O_ Order Processing Documents  Note: Verify that the default document type for invoices is set up in both UDC 00/DT and UDC 00/DI.

szDocumentCompanyInvoice_KCOIKCOIcharOPTBOTH

Invoice Document Company.

szDocumentPayItem_SFXSFXcharOPTBOTH

A number that identifies the pay item for a voucher or an invoice. The system assigns the pay item number. If the voucher or invoice has 
multiple pay items, the numbers are sequential.

mnDocumentOrderInvoiceE_DOCODOCOMATH_NUMERICOPTBOTH

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

szOrderType_DCTODCTOcharOPTBOTH

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szCompanyKeyOrderNo_KCOOKCOOcharOPTBOTH

A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a 
sales order, and so on). If you use the Next Numbers by Company/Fiscal Year facility, the Automatic Next Numbers program (X0010) uses the 
order company to retrieve the correct next number for that company. If two or more order documents have the same order number and order 
type, the order company lets you locate the desired document. If you use the regular Next Numbers facility, the order company is not used to 
assign a next number. In this case, you probably would not use the order company to locate the document.

szContractChangeNum_COCHCOCHcharOPTBOTH

The change number of the contract. The change order number of the base contract is always initialized to 000. Each time you enter a 
change order for a contract, the system automatically increases the change order number by one. For example, the base contract is the change 
order number 000, the first change order is 001, the second is 002, and so on.

mnLineNumber_LNIDLNIDMATH_NUMERICOPTBOTH

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

szOwnerPayItem_OPIMOPIMcharOPTBOTH

The pay item number as defined by the owner. This field is alphanumeric and can be up to 15 characters in length. It is recommended that 
you use numeric information for this pay item number.

mnBatchNumber_ICUICUMATH_NUMERICOPTBOTH

A number that identifies a group of transactions that the system processes and balances as a unit. When you enter a batch, you can either 
assign a batch number or let the system assign it using the Next Numbers program.

jdApplicatnDate_APDTAPDTJDEDATEOPTBOTH

The date of the last or current application. (An application is assigned each time an invoice is issued for the contract.)

jdDateForGLandVoucherJULIA_DGJDGJJDEDATEOPTBOTH

A date that identifies the financial period to which the transaction will be posted. You define financial periods for a date pattern code that you 
assign to the company record. The system compares the date that you enter on the transaction to the fiscal date pattern assigned to the 
company to retrieve the appropriate fiscal period number, as well as to perform date validations.

jdDateServiceCurrency_DSVJDSVJJDEDATEOPTBOTH

A date that indicates when you purchased goods or services, or when you incurred a tax liability. 

cDateExchangeRateDateBasi_ERDBERDBcharOPTBOTH

A code that controls which date the system uses to retrieve the exchange rate for the invoice. Valid values are: 1 Use the invoice date 
(default). 2 Use the G/L date of the invoice.

szCurrencyCodeFrom_CRCDCRCDcharOPTBOTH

A code that identifies the currency of a transaction. 

szCurrencyCodeOrigin_CRCFCRCFcharOPTBOTH

The currency code of the insured amount.

mnCurrencyConverRateDiv_CRRDCRRDMATH_NUMERICOPTBOTH

A number (exchange rate) that a foreign currency amount is divided by to calculate a domestic currency amount. The number you enter in 
this field can have a maximum of seven decimal positions. If more are entered, the system adjusts to the nearest seven decimal positions. 

szCostCenter_MCUMCUcharOPTBOTH

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.

cRetainageControlFlag_RCTLRCTLcharOPTBOTH

An option that determines whether the retainage amount is stored in the Accounts Receivable or General Accounting system and whether 
tax is calculated on the whole amount, including the retainage, or on each amount as it is billed. Valid values are: Blank The retainage is 
stored in the Accounts Receivable system and the tax is computed from the total taxable amount. 1 The retainage is stored in the Accounts 
Receivable system and the tax on the retainage amount is calculated and then subtracted from the total tax amount. This tax on retainage is 
deferred until the retainage is released. 2 The retainage is stored in the General Accounting system and the tax is computed from the total taxable 
amount. 3 The retainage is stored in the General Accounting system and the tax on the retainage amount is calculated and then subtracted from 
the total tax amount. This tax on retainage is deferred until the retainage is released.

mnAddressNumberJobAr_AN8OAN8OMATH_NUMERICOPTBOTH

The address book number to which the system posts billing and accounts receivable transactions.

szCompany_COCOcharOPTBOTH

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.

mnParentContNumber_PCTNPCTNMATH_NUMERICOPTBOTH

The parent contract number to which this particular contract is attached.

szParentContractType_PCTTPCTTcharOPTBOTH

The parent contract type to which this particular contract is attached.

szParentCntrctDocumentCo_PCKOPCKOcharOPTBOTH

Parent Contract Document Company.

szCostCenterHost_JUCUJMCUcharOPTBOTH

The Business Unit responsible for the job.  This is particularly useful during transfer pricing.

szDescription001_DL01DL01charOPTBOTH

A user defined name or remark.

cPricingType_PRTPPRTPcharOPTBOTH

A code that specifies the billing terms that are defined by the billing line on the contract. The system uses the predefined codes for the 
pricing type to access formulas and other information related to the calculation of billing and revenue amounts for the billing line. Valid alphabetic 
codes are: B Burden T Time and Materials U Unit Price L Lump Sum F Fee Line C Component M Milestone P Progress D Direct Draw R Rated 
Draw Valid numeric codes are: 0 Burden 1 Time and Materials 2 Unit Price 3 Lump Sum 4 Fee Line 5 Component 6 Milestone 7 Progress 8 Direct 
Draw 9 Rated Draw

szCostCenterSubsequent_MCUSMCUScharOPTBOTH

Either a subsequent business unit or a project number. A subsequent business unit specifies where to charge costs (or revenues) when the 
original business unit has been closed or suspended. For example, the subsequent business unit can be used in corporate reorganizations 
when you close a business unit and direct all costs to the subsequent business unit. In this situation, you must enter journal entries to transfer 
existing balances. A project number is used to group business units within an overall business unit. For example, you can group jobs by 
project. In this case, the project business unit can also have accounts for tracking overhead costs that can be allocated to jobs.

szTaxExplanationCode1_EXR1EXR1charOPTBOTH

A hard-coded user defined code (00/EX) that controls the algorithm that the system uses to calculate tax and G/L distribution amounts. The 
system uses the tax explanation code in conjunction with the tax rate area and tax rules to determine how the tax is calculated. Each 
transaction pay item can be defined with a different tax explanation code.

szTaxArea1_TXA1TXA1charOPTBOTH

A code that identifies a tax or geographic area that has common tax rates and tax authorities. The system validates the code you enter 
against the Tax Areas table (F4008). The system uses the tax rate area in conjunction with the tax explanation code and tax rules to calculate tax 
and G/L distribution amounts when you create an invoice or voucher.

szGlOffsetRetention_RGLCRGLCcharOPTBOTH

A code that designates the offset accounts for retainage, for example RETN or 1225. You set up the code as an automatic accounting 
instruction. Note:  Do not use code 9999. This is reserved for the post program and indicates that offsets should not be created.

cActivateVertexTaxComplia_VVTXVVTXcharOPTBOTH

This flag determines whether to use the Vertex Tax Compliance system for tax calculations.  Values are: Y  Use Vertex system to calculate 
taxes.  N Do not use Vertex system to calculate taxes.  Instead, use JDE tax calculations. 

mnVertexJobNumber_JOBSJOBSMATH_NUMERICOPTBOTH

The job number (work station ID) which executed the particular job.

szVertexTransactionType_VVTYVVTYcharOPTBOTH

Vertex Sales and Use Tax transaction type.

szVertexProductCategory_VVTCVVTCcharOPTBOTH

User defined code used in the Vertex Tax Decision Maker for products or services that are non-taxable or are at a non-stanard rate.

szPaymentTermsCode01_PTCPTCcharOPTBOTH

A code that specifies the terms of payment, including the percentage of discount available if the invoice is paid by the discount due date. 
Use a blank code to indicate the most frequently-used payment term. You define each type of payment term on the Payment Terms Revisions 
form. Examples of payment terms include: Blank Net 15 001      1/10 net 30 002      2/10 net 30 003      Due on the 10th day of every month 006     
Due upon receipt  This code prints on customer invoices.

mnDomCurrTaxableAmt_ATXAATXAMATH_NUMERICOPTBOTH

The amount on which taxes are assessed.

mnForCurrTaxableAmt_CTXACTXAMATH_NUMERICOPTBOTH

That portion of the sale that is subject to tax in foreign currency.

idGenericLong_GENLNGGENLNGIDOPTBOTH

General purpose ID variable.

mnDeferredTaxDomestic_DDTRDDTRMATH_NUMERICOPTBOTH

The deferred tax associated with the retainage amount.

mnDeferredTaxForeign_FDTRFDTRMATH_NUMERICOPTBOTH

The deferred tax associated with the retainage stored in the foreign currency of the transaction.

mnAmtDiscountAvailable_ADSCADSCMATH_NUMERICOPTBOTH

The amount of the invoice or voucher pay item that is eligible to be subtracted from the gross amount when the transaction is paid. The 
system calculates discount amounts based on the payment term entered on the transaction.  Note: If the system calculates the discount, verify 
that it applies to the pay item specified. Usually, freight, sales tax, and labor charges that are included in the gross amount do not qualify for 
discounts.

mnForeignDiscountAvail_CDSCDSMATH_NUMERICOPTBOTH

The foreign amount of the discount available as opposed to the amount of the discount actually taken.

mnAmtTax2_STAMSTAMMATH_NUMERICOPTBOTH

The amount assessed and payable to tax authorities. It is the total of the VAT, use, and sales taxes (PST).

mnForeignTaxAmount_CTAMCTAMMATH_NUMERICOPTBOTH

The tax amount in foreign currency.  This can be the sales, use, or VAT tax. 

mnAmountTaxExempt_ATXNATXNMATH_NUMERICOPTBOTH

The amount upon which taxes are not assessed. This is the portion of the transaction not subject to sales, use, or VAT taxes because the 
products are tax-exempt or zero-rated.

mnForeignTaxExempt_CTXNCTXNMATH_NUMERICOPTBOTH

The foreign amount associated with this document which is not subject to sales, use or value-added tax due to the nature of the transaction 
and not due to the nature of the parties to the transaction (as in tax exemption).

szGlClass_GLCGLCcharOPTBOTH

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

jdDateDueJulian_DDJDDJJDEDATEOPTBOTH

In Accounts Receivable, the date that the net payment is due. In Accounts Payable, the date that the payment is due to receive a discount 
or, if no discount is offered, the net due date. The system calculates the due date based on the payment term entered, or you can enter it 
manually. If you enter a negative voucher or invoice (debit or credit memo), the system might use the G/L date as the due date regardless of the 
payment term entered. A processing option in the master business function (P0400047 for vouchers and P03B0011 for invoices) controls how 
the system calculates the due date for debit and credit memos.

jdDateBillFrom_BTFRBTFRJDEDATEOPTBOTH

The from date used to determine if a transaction is billed. The transaction is billed if the general ledger date falls between the from date and 
the through date.

jdBilledThroughDate_BTDTBTDTJDEDATEOPTBOTH

This field will be used in the Recurring Billing module as part of a date-oriented billing method, as opposed to period-oriented billing.  This 
field will contain the latest date for which billings have been generated for the associated billing line.

mnRetainage_RTNGRTNGMATH_NUMERICOPTBOTH

This field is the retained dollars for a contract line.

mnRetainageForeign_FTNGFTNGMATH_NUMERICOPTBOTH

xThis field is the retained dollars for a contract line.

Related Functions

None

Related Tables

None