Functional Description
Purpose
This function is used to retrieve an invoice from the invoice selection cache. When this function is
called, the next available cache record is read. The invoice detail is returned to the calling
program.
Setup Notes and Prerequisites
The Invoice Selection Create Cache (B03B0172) function must be called first to create the temporary
cache used to hold any invoice pay items found. Then a function to select invoice pay items and add
them to the cache should be called. Any of the following functions can be used to add records to the
cache: F03B11 Receipts Entry Load Invoices (B03B0143), F03B11 Load by Statement Number (B03B0152), F03B11
Invoice Match Process (B03B0169), or Invoice Selection Write Cache (B03B0172). Once completed, call
the Invoice Selection Destroy Cache (B03B0172) function to free the memory used by the cache. Other
functions in the B03B0172 family may be used to delete records from the cache or check for records in the
cache.
This function should be called once for each record in the cache using a loop structure. Before this
function is called for the first time, set mnRecordsRemaining equal to the total number of records in
the cache. Also, set idCacheCursorID equal to zero. Do not modify the value of these two parameters
between executions of this function or unpredictable results will occur.
Special Logic
In order for this function to keep track of the next record to be read from the Invoice Selection
cache, idCacheCursorID is used to store the cache cursor handle in memory between calls.
Technical Specification
Parameters
Item DescriptionI/OReq?Notes
MATH01mnRecordsRemainingI/OYNumber of records left to be read from the cache.
DOCmnDocumentNumberO
DCTszDocumentTypeO
KCOszDocumentCompanyO
SFXszDocumentPayItemO
AN8mnCustomerNumberO
COszCompanyO
GLCszReceivablesGLOffsetO
AIDszReceivablesAccountIDO
PYRmnPayorNumberO
AGmnAmountGrossO
AAPmnAmountOpenO
ADSCmnAmountDiscountAvailO
ADSAmnAmountDiscountTakenO
BCRCszBaseCurrencyO
CRRMcCurrencyModeO
CRCDszTransactionCurrencyO
CRRmnExchangeRateO
ACRmnAmountForeignGrossO
FAPmnAmountForeignOpenO
CDSmnAmountForeignDiscountAvailO
CDSAmnAmountForeignDiscountTakenO
MCUszBusinessUnitO
DDJjdDateDueO
DDNJjdDateDiscountDueO
SDOCmnSalesDocumentNumberO
SDCTszSalesDocumentTypeO
SKCOszSalesDocumentCompanyO
SFXOszSalesDocumentPayItemO
VR01szCustomerReferenceNumberO
RMKszRemarkO
GENLNGidCacheCursorIDI/OYA unique identifier used by this function to
retrieve records from the cache.
UTICszUserTypeInputCodeO
PAAPmnCustomerAmountAppliedO
ADSAmnCustomerDiscountTakenO
DIVJjdDateInvoiceO
DGJjdDateGLO
Related Tables
F03B11Customer Ledger File
Related Functions
None.
Processing
If mnRecordsRemaining is less than or equal to zero,
Set error.
Else,
If idCacheCursorID is equal to zero,
Open Invoice Selection cache cursor.
Store cursor handle in memory.
Set idCacheCursorID.
Else,
Retrieve cursor handle from memory using idCacheCursorID.
Retrieve next record from the Invoice Selection cache.
Add record to the Receipts Entry cache.
Reduce mnRecordsRemaining by one.
Load invoice output parameters.
If mnRecordsRemaining is equal to zero,
Close the Invoice Selection cache cursor.
Free the cursor handle from memory.
^
D03B0142 - Receipts Entry Read Cache
Item DescriptionI/OReq?Notes
MATH01mnRecordsRemainingI/OYNumber of records left to be read from the cache.
DOCmnDocumentNumberO
DCTszDocumentTypeO
KCOszDocumentCompanyO
SFXszDocumentPayItemO
AN8mnCustomerNumberO
COszCompanyO
GLCszReceivablesGLOffsetO
AIDszReceivablesAccountIDO
PYRmnPayorNumberO
AGmnAmountGrossO
AAPmnAmountOpenO
ADSCmnAmountDiscountAvailO
ADSAmnAmountDiscountTakenO
BCRCszBaseCurrencyO
CRRMcCurrencyModeO
CRCDszTransactionCurrencyO
CRRmnExchangeRateO
ACRmnAmountForeignGrossO
FAPmnAmountForeignOpenO
CDSmnAmountForeignDiscountAvailO
CDSAmnAmountForeignDiscountTakenO
MCUszBusinessUnitO
DDJjdDateDueO
DDNJjdDateDiscountDueO
SDOCmnSalesDocumentNumberO
SDCTszSalesDocumentTypeO
SKCOszSalesDocumentCompanyO
SFXOszSalesDocumentPayItemO
VR01szCustomerReferenceNumberO
RMKszRemarkO
GENLNGidCacheCursorIDI/OYA unique identifier used by this function to
retrieve records from the cache.
UTICszUserTypeInputCodeO
PAAPmnCustomerAmountAppliedO
ADSAmnCustomerDiscountTakenO
DIVJjdDateInvoiceO
DGJjdDateGLO
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnRecordsRemaining | MATH01 | MATH_NUMERIC | NONE | NONE |
Item ab Descriptionab I/Oab Req?ab Notes
| ||||
mnDocumentNumber | DOC | MATH_NUMERIC | NONE | NONE |
A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document
| ||||
szDocumentType | DCT | char | NONE | NONE |
A user defined code (00/DT) that identifies the origin and purpose of the transaction. PeopleSoft reserves several prefixes for document
| ||||
szDocumentCompany | KCO | char | NONE | NONE |
A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher,
| ||||
szDocumentPayItem | SFX | char | NONE | NONE |
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
| ||||
mnCustomerNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
szCompany | CO | char | NONE | NONE |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
| ||||
szReceivablesGLOffset | GLC | char | NONE | NONE |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
szReceivablesAccountID | AID | char | NONE | NONE |
A number that the system assigns to each general ledger account in the Account Master table (F0901) to uniquely identify it. | ||||
mnPayorNumber | PYR | MATH_NUMERIC | NONE | NONE |
The address book number of the person or company that sends the payment. | ||||
mnAmountGross | AG | MATH_NUMERIC | NONE | NONE |
A value that specifies the total amount of the invoice or voucher pay item. The gross amount might include the tax amount, depending on
| ||||
mnAmountOpen | AAP | MATH_NUMERIC | NONE | NONE |
The amount of an invoice or voucher pay item that is unpaid. | ||||
mnAmountDiscountAvail | ADSC | MATH_NUMERIC | NONE | NONE |
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
| ||||
mnAmountDiscountTaken | ADSA | MATH_NUMERIC | NONE | NONE |
The amount by which an invoice or voucher is reduced if paid by a specific date. The discount taken does not have to be the same as the
| ||||
szBaseCurrency | BCRC | char | NONE | NONE |
A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the
| ||||
cCurrencyMode | CRRM | char | NONE | NONE |
An option that specifies whether the system displays amounts in the domestic or foreign currency.
On
The system displays amounts in the
| ||||
szTransactionCurrency | CRCD | char | NONE | NONE |
A code that identifies the currency of a transaction. | ||||
mnExchangeRate | CRR | MATH_NUMERIC | NONE | NONE |
A number (exchange rate) that a foreign currency amount is multiplied by to calculate a domestic currency amount.
The number in this field
| ||||
mnAmountForeignGross | ACR | MATH_NUMERIC | NONE | NONE |
The foreign currency amount entered on the transaction. If the Multi-Currency Conversion option on the General Accounting constants is set
| ||||
mnAmountForeignOpen | FAP | MATH_NUMERIC | NONE | NONE |
The unpaid foreign amount of a transaction. | ||||
mnAmountForeignDiscountAvail | CDS | MATH_NUMERIC | NONE | NONE |
The foreign amount of the discount available as opposed to the amount of the discount actually taken. | ||||
mnAmountForeignDiscountTaken | CDSA | MATH_NUMERIC | NONE | NONE |
The amount of the discount, expressed in the foreign currency of the transaction, that was taken or granted during the application of a
| ||||
szBusinessUnit | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
jdDateDue | DDJ | JDEDATE | NONE | NONE |
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
| ||||
jdDateDiscountDue | DDNJ | JDEDATE | NONE | NONE |
In the Accounts Receivable system, the date that the invoice must be paid to receive the discount. The system calculates the discount due
| ||||
mnSalesDocumentNumber | SDOC | MATH_NUMERIC | NONE | NONE |
The number of the sales document | ||||
szSalesDocumentType | SDCT | char | NONE | NONE |
Sales Document Type | ||||
szSalesDocumentCompany | SKCO | char | NONE | NONE |
Document Company (Sales Order) | ||||
szSalesDocumentPayItem | SFXO | char | NONE | NONE |
In the A/R and A/P systems, a code that corresponds to the pay item. In the Sales Order and Procurement systems, this code identifies
| ||||
szCustomerReferenceNumber | VR01 | char | NONE | NONE |
An alphanumeric value used as a cross-reference or secondary reference number. Typically, this is the customer number, supplier
| ||||
szRemark | RMK | char | NONE | NONE |
A generic field that you use for a remark, description, name, or address. | ||||
idCacheCursorID | GENLNG | ID | NONE | NONE |
Item ab Descriptionab I/Oab Req?ab Notes
| ||||
szUserTypeInputCode | UTIC | char | NONE | NONE |
A code that specifies how the system processes a transaction during receipts entry. The system will not process transactions with a blank
| ||||
mnCustomerAmountApplied | PAAP | MATH_NUMERIC | NONE | NONE |
In the Accounts Payable system, the amount of the payment.
In the Accounts Receivable system, the amount of the receipt. This amount
| ||||
mnCustomerDiscountTaken | ADSA | MATH_NUMERIC | NONE | NONE |
The amount by which an invoice or voucher is reduced if paid by a specific date. The discount taken does not have to be the same as the
| ||||
jdDateInvoice | DIVJ | JDEDATE | OPT | NONE |
The date that either you or the system assigns to an invoice or voucher. This can be either the date of the supplier's invoice to you or the
| ||||
jdDateGL | DGJ | JDEDATE | OPT | NONE |
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
| ||||
jdInvoiceExchangeRateDate | ERDJ | JDEDATE | OPT | NONE |
The date that the system uses to retrieve the exchange rate from the Currency Exchange Rates table (F0015). | ||||
szTaxArea | TXA1 | char | OPT | NONE |
A code that identifies a tax or geographic area that has common tax rates and tax authorities. The system validates the code you enter
| ||||
szTaxExplanationCode | EXR1 | char | OPT | NONE |
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
| ||||
mnItemNumber | ITM | MATH_NUMERIC | OPT | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
mnShipmentNumber | SHPN | MATH_NUMERIC | OPT | NONE |
A "next number" that uniquely identifies a shipment. |
None |
F03B11 Customer Ledger |