Determine Prior F4822 Amounts for Billing Line
Source Name:N5200090
Data Structure:D5200090
Function Name:DetermineF4822PriorAmts
System Code:52
Function Category:BAT
Function Use:INQ
Designer:Ira Frosch
Programmer:Ira Frosch
Revisions Log
Date Modified bySAR NumberDescription
5 Aug 1999Ira Frosch3231605Creation
1.Functional Description
1.1Purpose
This business function retrieves the last application/adjustment created for a specified invoice line
and returns the previous billed values.
1.2Setup Notes and Prerequisites
The current application and adjustment numbers can be entered if necessary.
1.3Special Logic
The program will find the last application number / adjustment number that has not been voided.
However, if the Billing Type is Lump Sum, the prior billed amount for this period needs to be calculated
by checking all records to determine if they are in the same period.
If the fiscal year is left blank, the system will determine the fiscal year, period number and
century from the DGL parameter. This is only performed if the billing line type is lump sum.
2.Technical Specifications
2.1Parameters:
See attachment for D5200090
2.2Related Tables
TableTable Description
F4822Invoice Summary Work File (New Index Added (B))
2.3Related Business Functions
Source NameFunction Name
X0903ReturnFYPN
2.4Processing
//
// Determine previous billing amount by checking the last application for this line
//
F4822.Open
//
// Select all records in table for this Billing Line (Application/Adjustment Descending)
//
F4822.Select (DOCO, DCTO, KCOO, COCH, LNID)
//
// Fetch while not EOF and not Voided
//
While not EOF and cRecordFound = ' '
If Application Number < BF App No
OR Application Number = BF App No and Adjustment Number < BF Adj No
cRecordFound = '1'
// The previous amounts fetched do NOT include the current application amounts. Add them together.
//
Endif
//
If cF4822Status = cOK
//
// Previous amounts have been set by the Fetch Next
//
// However, if a LumpSum line, find all in the current period.
//
// Clear LS Values
//
If BF PN = 0
ReturnFYPN(BF DGL)
Endif
ReturnFYPN(evt_jdF4822DGL)
If szCurrentTaxArea <> ' '
mnLSPriorThisPeriodAmt = mnLSPriorThisPeriodAmt + ATXA
Else
Endif
End While
//
// Set all previous amounts = 0
//
Endif
//
F4822.Close
D5200090 - Determine Prior F4822 Amounts for Billing Line
D5200090
Determine Prior F4822 Amounts for Billing Line
2.1Parameters:
Data
Item Data Structure DescriptionI/OReq.Notes
DOCOmnContractNoIN
DCTOszContractDocumentTypeIN
KCOOszContractKeyCoIN
COCHszContractChangeOrderIN
LNIDszBillingLineIN
APPLmnApplicationNoIN
ADJNmnAdjustmentNoIN
PRTPcBillingTypeINIf 'L' or '3', calculate
mnPriorThisPeriodAmt and
mnForPriorThisPeriodAmt
DGLjdGLDateINFor Lump Sum calculation
CTRYmnCenturyI/ONFor Lump Sum calculation
FYmnFiscalYearI/ONFor Lump Sum calculation
PNmnPeriodNoI/ONFor Lump Sum calculation
PUHPmnPriorUnitsON
PTHPmnPriorInvTotalAmtON
PATXmnPriorInvTaxableAmtON
PTAMmnPriorTaxAmtON
PSMAmnPriorMiscInvAmtON
RTNPmnPriorRetAmtON
SMRPmnPriorMiscRetAmtON
ATXNmnPriorNonTaxableAmtON
FTHPmnForPriorInvTotalAmtON
FATXmnForPriorInvTaxableAmtON
FPTAmnForPriorTaxAmtON
FSMAmnForPriorMiscInvAmtON
FTNPmnForPriorRetAmtON
SMRFmnForPriorMiscRetAmtON
CTXNmnForPriorNotTaxableAmtON
THPDmnLSPriorThisPeriodAmtONFor Lump Sum calculation
FHPDmnLSForPriorThisPeriodAmtONFor Lump Sum calculation
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnContractNo | DOCO | MATH_NUMERIC | OPT | NONE |
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 | NONE |
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 | NONE |
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 | NONE |
The change number of the contract. The change order number of the base contract is always initialized to 000. Each time you enter a
| ||||
mnBillingLineNo | LNID | MATH_NUMERIC | OPT | NONE |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
mnApplicationNo | APPL | MATH_NUMERIC | OPT | NONE |
The last or current application number for the specified contract. (The system assigns a new application number each time an invoice is
| ||||
mnAdjustmentNo | ADJN | MATH_NUMERIC | OPT | NONE |
A number used to control changes to closed applications. Closed applications represent invoices that have been sent. This number is
| ||||
cBillingType | PRTP | char | OPT | NONE |
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
| ||||
jdGLDate | DGL | JDEDATE | OPT | NONE |
A date that identifies the financial period to which the transaction is to be posted.
The company constants specify the date range for each
| ||||
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
| ||||
mnPriorUnits | PUHP | MATH_NUMERIC | OPT | NONE |
The units previously billed this period for the line item on the contract. | ||||
mnPriorInvTotalAmt | PTHP | MATH_NUMERIC | OPT | NONE |
The amount previously billed this period for the line item on the contract. | ||||
mnPriorInvTaxableAmt | PATX | MATH_NUMERIC | OPT | NONE |
| ||||
mnPriorTaxAmt | PTAM | MATH_NUMERIC | OPT | NONE |
The tax amount previously billed for the billing line on the contract. | ||||
mnPriorStoredMatInvAmt | PSMA | MATH_NUMERIC | OPT | NONE |
The amount previously billed for Stored Material for the line item on the contract. | ||||
mnPriorRetAmt | RTNP | MATH_NUMERIC | OPT | NONE |
Retainage Amount through the last application or adjustment for a specific contract. | ||||
mnPriorStoredMatRetAmt | SMRP | MATH_NUMERIC | OPT | NONE |
The prior retained amount for the stored materials. | ||||
mnPriorNonTaxableAmt | ATXN | MATH_NUMERIC | OPT | NONE |
| ||||
mnForPriorInvTotalAmt | FTHP | MATH_NUMERIC | OPT | NONE |
The amount previously billed this period for the line item on the contract. | ||||
mnForPriorInvTaxableAmt | FATX | MATH_NUMERIC | OPT | NONE |
| ||||
mnForPriorTaxAmt | FPTA | MATH_NUMERIC | OPT | NONE |
The foreign tax amount previously billed for the billing line on the contract. | ||||
mnForPriorStoredMatInvAmt | FSMA | MATH_NUMERIC | OPT | NONE |
The amount previously billed for Stored Material for the line item on the contract. | ||||
mnForPriorRetAmt | FTNP | MATH_NUMERIC | OPT | NONE |
Retainage Amount through the last application or adjustment for a specific contract. | ||||
mnForPriorNonTaxableAmt | CTXN | MATH_NUMERIC | OPT | NONE |
| ||||
mnLumpSumPriorThisPeriodAmt | THPD | MATH_NUMERIC | OPT | NONE |
The amount that is being billed for this contract pay item. | ||||
mnLumpSumForPriorThisPeriodAmt | FHPD | MATH_NUMERIC | OPT | NONE |
The amount that is being billed for this contract pay item. On entry screens,you can enter this amount one of three ways:
o A Dollar
| ||||
mnForPriorStoredMatRetAmt | SMPF | MATH_NUMERIC | OPT | NONE |
None |
None |