Create Default F4812 Invoice Workfile Record
Source Name:N5200200
Data Structure: D5200200
Function Name:CreateCBDefaultInvoiceRecord
System Code:52
Function Category:BAT
Function Use:UPD
Designer:Ira Frosch
Programmer:Ira Frosch
Revisions Log
Date Modified bySAR NumberDescription
28 Sep, 1999Ira Frosch3303189Create
1.Functional Description
1.1Purpose
In the Contract Billing Invoice Generation Program, for every billing line type, except Time and
Material and Components, the system creates a Default Billing Line if it is initialized to zero or any
other billing type. This routine assists in the automation of that creation.
1.2Setup Notes and Prerequisites
All of the basic information from the Billing Line Detail File (F5202) and Contract Master (F5201)
that is required for writing the record should be retrieved and passed in. If not, the system will
retrieve the information. The taxable amount should be passed into the system.
1.3Special Logic
This business function handles all currency and tax issues. It will also create the BCI number for
the record.
1.4Open Issues
1.What about the 3 category codes on the F4812 record, if they are not sent in?
2.Technical Specifications
2.1Parameters:
See attachment of D5200200.
2.2Related Tables
Table Table Description
F5201Contract Master
F5202Billing Line Details
F0901Account Master
F0006Business Unit Master
F4812Detail Workfile
2.3Related Business Functions
Source NameFunction Name
N48S0120Get Business Unit Information
N48S0200Calculate Billing Amounts
XX0901Check For Account Existence
X0010X0010 Get Next Number
2.4Processing
//
// This adds a record to the F4812 Cache
//
BF cErrorCode = ' '
//
// If retrieve values flag is on, retrieve information from F5201/F5202
//
If cRetrieveContractValues = '1'
F5201.Fetch (DOCO,DCTO,KCOO)
F5202.Fetch (DOCO,DCTO,KCOO)
// If either does not exist, send error
If EOF
evt_cErrorStatus = '1'
Endif
Endif
//
// Continue only if no errors
//
If evt_cErrorStatus = ''
//
// Derive BCI Number
//
//
// Derive Account Information
//
szSubsidiary)
If evt_cErrorCode = ' '
set MCU, OBJ,SUB,AID
// Get RP12 category code from Host Business Unit
//
// Get RP11 category code from Project No
//
// If Vertex, Get Values
//
If BF VertexActive = '1'
Endif
// Perform Tax Calculations
//
// Write the Default Invoice Workfile Record with all numbers
//
Endif
//
// Return Error Status
//
BF cErrorCode = evt_cErrorStatus
D5200200 - Create Default Invoice Workfile Record
D5200200
Create Default Invoice Workfile Record
Parameters:
Data
ItemData Structure DescriptionI/ORequiredNotes
DOCOmnContractNoIY
DCTOszContractDocumentTypeIY
KCOOszContractKeyCoIY
COCHszContractChangeOrderIY
LNIDmnContractLineNoIY
ICUmnBatchNoIY
DOCZmnInvoiceNoIY
DCTIszInvoiceDocumentTypeIY
KCOIszInvoiceKeyCo IY
SFXszPayItemIYThis is the pay item of
the billing line on the
invoice.
EV01cRetrieveContractValuesINIf '1', the associated
F5201/F5202 values will
be retrieved.
ERRCcErrorCodeIN
APDTjdApplicationDateIY
DGJjdWorkfileGLDateIY
CTRYmnGLCenturyINIf zeros, rederived
FYmnFiscalYearINIf zeros, rederived
PNmnPeriodNoINIf zeros, rederived
DSVJjdServiceDateIY
TBDTjdTableBasisDateIY
ERDBcExchangeRateDateBasisIYUsed for currency
calculations
CRCDszBaseCurrencyINIf multicurrency is on,
this field is required.
CRCFszForeignCurrencyINIf multicurrency is on,
this field is required.
CRRMcCurrencyModeINIf multicurrency is on,
this field is required.
This is the mode from
the contract.
CRRDmnCurrencyRateINIf multicurrency is on,
this field is required.
This is the rate calculated
for this date.
AN8OmnCustomerNumberIN
COCompanyIN
PCTNszParentContractNoIN
PCTTszParentContractTypeIN
PCKOszParentContractKeyCoIN
JMCUszHostBusinessUnitIYUsed to determine the RP12
from the Business Unit
Master.(From F5201)
DL01szBillingLineDescriptionIN
OPIMszBillingLineIN
PRTPcBillingLineTypeIN
MCUSszProjectNoINUsed to determine the RP11.
Should be from F5202 table.
EXR1szTaxExplanationCodeIN
TXA1szTaxRateAreaIN
ACCOcAccountOverINDetermines whether to set
override revenue account
MCUszBusinessUnitIYBusiness Unit from F5202
OBJszObjectINNeeded only for override
revenue account
SUBszSubsidiary INNeeded only for override
revenue account
SBLszSubledgerIN
SBLTszSubledgerTypeIN
DL01szMPEventDescriptionINRequired for Milestone/Progress
R001szCategoryCode1INFrom Lump Sum
R002szCategoryCode2INFrom Lump Sum
R003szCategoryCode3INFrom Lump Sum
VVTXcVertexActiveINRequired for Vertex
JOBSmnVertexJobNumberINRequired for Vertex
ITOLmnInvTotalAmtON
ITXAmnTaxableAmountI/ONThis is the amount taxes
should be based on.
ITAMmnInvTaxAmtON
IDSCmnInvDiscountAmtON
JTAXmnJrnlTaxAmtON
CITLmnForInvTotalAmtON
CTXAmnForInvTaxableAmtI/ON
CTAMmnForInvTaxAmtON
CDSmnForDiscountAmtON
JTXFmnForJrnlTaxAmtON
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnContractNo | DOCO | MATH_NUMERIC | OPT | INPUT |
A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry,
| ||||
szContractDocumentType | DCTO | char | OPT | INPUT |
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
| ||||
szContractKeyCo | KCOO | char | OPT | INPUT |
A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a
| ||||
szContractChangeOrder | COCH | char | OPT | INPUT |
The change number of the contract. The change order number of the base contract is always initialized to 000. Each time you enter a
| ||||
mnContractLineNo | LNID | MATH_NUMERIC | OPT | INPUT |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
mnBatchNo | ICU | MATH_NUMERIC | OPT | INPUT |
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
| ||||
mnInvoiceNo | DOCZ | MATH_NUMERIC | OPT | INPUT |
The original document number. This can be a voucher, an invoice, unapplied cash, a journal entry number, etc. Matching document
| ||||
szInvoiceDocumentType | DCTI | char | OPT | INPUT |
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
| ||||
szInvoiceKeyCo | KCOI | char | OPT | INPUT |
Invoice Document Company. | ||||
szPayItem | SFX | char | OPT | INPUT |
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
| ||||
cRetrieveContractValues | EV01 | char | OPT | INPUT |
An option that specifies the type of processing for an event. | ||||
cErrorCode | ERRC | char | OPT | OUTPUT |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
jdApplicationDate | APDT | JDEDATE | OPT | INPUT |
The date of the last or current application. (An application is assigned each time an invoice is issued for the contract.) | ||||
jdWorkfileGLDate | DGJ | JDEDATE | OPT | INPUT |
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
| ||||
mnCentury | CTRY | MATH_NUMERIC | OPT | NONE |
The calendar century associated with the year. Enter is the first two digits of
the year. For example, 19 indicates any year beginning with 19
| ||||
mnFiscalYear | FY | MATH_NUMERIC | OPT | NONE |
A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal
| ||||
mnPeriodNo | PN | MATH_NUMERIC | OPT | NONE |
A number indicating the current accounting period. This number, used in conjunction with the Company Constants table (F0010) and the
| ||||
jdServiceDate | DSVJ | JDEDATE | OPT | INPUT |
A date that indicates when you purchased goods or services, or when you incurred a tax liability. | ||||
jdTableBasisDate | TBDT | JDEDATE | OPT | INPUT |
This date is used as the basis for comparison to the effective dates of the various tables used by the Service Billing system. This date is
| ||||
cExchangeRateDateBasis | ERDB | char | OPT | INPUT |
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
| ||||
szBaseCurrency | CRCD | char | OPT | INPUT |
A code that identifies the currency of a transaction. | ||||
szForeignCurrency | CRCF | char | OPT | INPUT |
The currency code of the insured amount. | ||||
cCurrencyMode | CRRM | char | OPT | INPUT |
An option that specifies whether the system displays amounts in the domestic or foreign currency.
On
The system displays amounts in the
| ||||
mnCurrencyRate | CRRD | MATH_NUMERIC | OPT | INPUT |
A number (exchange rate) that a foreign currency amount is divided by to calculate a domestic currency amount. The number you enter in
| ||||
mnCustomerNo | AN8O | MATH_NUMERIC | OPT | INPUT |
The address book number to which the system posts billing and accounts receivable transactions. | ||||
mnParentContractNo | PCTN | MATH_NUMERIC | OPT | INPUT |
The parent contract number to which this particular contract is attached. | ||||
szParentContractType | PCTT | char | OPT | INPUT |
The parent contract type to which this particular contract is attached. | ||||
szParentContractKeyCo | PCKO | char | OPT | INPUT |
Parent Contract Document Company. | ||||
szHostBusinessUnit | JMCU | char | OPT | INPUT |
The Business Unit responsible for the job. This is particularly useful during transfer pricing. | ||||
szBillingLineDescription | DL01 | char | OPT | INPUT |
A user defined name or remark. | ||||
szBillingLine | OPIM | char | OPT | INPUT |
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
| ||||
cBillingLineType | PRTP | char | OPT | INPUT |
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
| ||||
szProjectNo | MCUS | char | OPT | INPUT |
Either a subsequent business unit or a project number.
A subsequent business unit specifies where to charge costs (or revenues) when the
| ||||
szTaxExplanationCode | EXR1 | char | OPT | INPUT |
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
| ||||
szTaxRateArea | TXA1 | char | OPT | INPUT |
A code that identifies a tax or geographic area that has common tax rates and tax authorities. The system validates the code you enter
| ||||
mnInvTaxableAmt | ITXA | MATH_NUMERIC | OPT | BOTH |
The portion of the invoice amount that is subject to tax. | ||||
cAccountOverrideFlag | ACCO | char | OPT | INPUT |
An option that specifies whether the account information for a billing line identifies a revenue or cost (source) account. The system
| ||||
szBusinessUnit | MCU | char | OPT | INPUT |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
szObject | OBJ | char | OPT | INPUT |
The portion of a general ledger account that refers to the division of the Cost Code (for example, labor, materials, and equipment) into
| ||||
szSubsidiary | SUB | char | OPT | INPUT |
A subset of an object account. Subsidiary accounts include detailed records of the accounting activity for an object account. | ||||
szSubledger | SBL | char | OPT | INPUT |
A code that identifies a detailed, auxiliary account within a general ledger account. A subledger can be an equipment item number or an
| ||||
cSubledgerType | SBLT | char | OPT | INPUT |
A user defined code (00/ST) that is used with the Subledger field to identify the subledger type and how the system performs subledger
| ||||
szCategoryCode1 | R001 | char | OPT | NONE |
Category code 1 associated with the Account Master table (F0901). This is a user defined code (09/01) for use in flex account mapping and
| ||||
szCategoryCode2 | R002 | char | OPT | NONE |
Category code 2 associated with the Account Master table (F0901). This is a user defined code (09/02) for use in flex account mapping and
| ||||
szCategoryCode3 | R003 | char | OPT | NONE |
Category code 3 associated with the Account Master table (F0901). The system uses this user defined code (09/03) in mapping flexible
| ||||
cActivateVertexTaxComplia | VVTX | char | OPT | INPUT |
This flag determines whether to use the Vertex Tax Compliance system for tax calculations. Values are:
Y
Use Vertex system to calculate
| ||||
mnVertexJobNumber | JOBS | MATH_NUMERIC | OPT | BOTH |
The job number (work station ID) which executed the particular job. | ||||
mnInvTotalAmt | ITOL | MATH_NUMERIC | OPT | OUTPUT |
The invoice amount for a billing detail transaction. | ||||
mnInvTaxAmount | ITAM | MATH_NUMERIC | OPT | OUTPUT |
The tax amount in the invoice. This can be either the sales, use or VAT tax. | ||||
mnInvoiceDiscountAmt | IDSC | MATH_NUMERIC | OPT | OUTPUT |
The amount of the discount available, as opposed to the amount of the discount actually taken. The discount calculated is based on the
| ||||
mnJrnlTaxAmt | JTAX | MATH_NUMERIC | OPT | OUTPUT |
The portion of the tax amount calculated for this entry that is not automatically generated by the post program. | ||||
mnForInvTotalAmt | CITL | MATH_NUMERIC | OPT | OUTPUT |
The total amount of the invoice in foreign currency. | ||||
mnForInvTaxableAmt | CTXA | MATH_NUMERIC | OPT | OUTPUT |
That portion of the sale that is subject to tax in foreign currency. | ||||
mnForTaxAmt | CTAM | MATH_NUMERIC | OPT | OUTPUT |
The tax amount in foreign currency. This can be the sales, use, or VAT tax. | ||||
mnForDiscountAmt | CDS | MATH_NUMERIC | OPT | OUTPUT |
The foreign amount of the discount available as opposed to the amount of the discount actually taken. | ||||
mnForJrnlTaxAmt | JTXF | MATH_NUMERIC | OPT | OUTPUT |
The portion of the tax amount calculated for this entry that is not automatically generated by the post program. | ||||
mnInvoiceUnits | U | MATH_NUMERIC | OPT | NONE |
The quantity of something that is identified by a unit of measure. For example, it can be the number of barrels, boxes, cubic yards, gallons,
| ||||
szPaymentTerms | PTC | char | OPT | INPUT |
A code that specifies the terms of payment, including the percentage of discount available if the invoice is paid by the discount due date.
| ||||
szVendorInvoiceNumber | VINV | char | OPT | INPUT |
The supplier's invoice number that is used for voucher entry. Voucher entry allows only one invoice per voucher number. If multiple invoice
| ||||
szComponentCostRate | CCR | char | OPT | INPUT |
A code that identifies a component cost rate table to use for this entry in the Billing Rate / Mark up Table (F48096). The component table
| ||||
szCallingProgramId | PID | char | OPT | INPUT |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
szUnitOfMeasure | UM | char | OPT | INPUT |
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,
| ||||
szCompany | CO | char | OPT | INPUT |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
szGlClass | GLC | char | OPT | INPUT |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
szGlOffsetRetention | RGLC | char | OPT | INPUT |
A code that designates the offset accounts for retainage, for example RETN or 1225. You set up the code as an automatic accounting
| ||||
cFeeBasis | FBAS | char | OPT | INPUT |
The fee basis the system will use when it derives the billing amount for the fee line.
Valid values:
1 Use Invoice Amount.
2 Use Cost
| ||||
mnMarkUpPercent | MKRP | MATH_NUMERIC | OPT | INPUT |
Percent of markup you want the system to use when it calculates the billing amounts for fee lines for owner pay items. You enter either a
| ||||
szVertexTransactionType | VVTY | char | OPT | INPUT |
Vertex Sales and Use Tax transaction type. | ||||
szVertexProductCategory | VVTC | char | OPT | INPUT |
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. | ||||
mnCostAmount | AA | MATH_NUMERIC | OPT | OUTPUT |
A number that identifies the amount that the system will add to the account balance of the associated account number. Enter credits with a
| ||||
mnBillingControlId | BCI | MATH_NUMERIC | OPT | OUTPUT |
A unique number that the system assigns to each billing record. The system assigns the number from the Next Numbers - Automatic table
| ||||
cGenerationTypeService | GTYP | char | OPT | INPUT |
A code that determines the batch types and markup rules for invoice, revenue, and component amounts. The system assigns the batch
| ||||
mnNTECacheJobNo | JOBS | MATH_NUMERIC | OPT | BOTH |
The job number (work station ID) which executed the particular job. | ||||
cNTEAmtExceedFlag | EV01 | char | OPT | OUTPUT |
An option that specifies the type of processing for an event. | ||||
cNTELevelExceedFlag | EV01 | char | OPT | OUTPUT |
An option that specifies the type of processing for an event. |
None |
None |