NettingDetailAddCacheEntry

Maintain Account Netting Detail Cache

Major Business Rule

Object Name: B03B0178

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to add a cache entry for the account netting detail and it is part of the 
Maintain Account Netting Detail Cache function (B03B0178). The Account Netting MBFN (N03B0176), which 

maintains and updates cache records for the account netting process, primarily uses this function. However, 

this function is a standalone function and it can be called from other applications to directly 

access the cache.  


Setup Notes and Prerequisites

A valid job number is required in order to call this function. A valid document key is also required, 

consisting of document number, document type, document company, and document pay item.


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

JOBSmnJobNumberIY
DOCmnSourceDocumentNumberIY

DCTszSourceDocumentTypeIY

KCOszSourceDocumentCompanyIY

SFXszSourceDocumentPayItemIY

ACTNcLineActionIN

DGJjdSourceGLDateIN

DIVJjdSourceDocumentDateIN

DSVJjdSourceTaxServiceDateIN

AGmnGrossAmountIN

AAPmnOpenAmountIN

ADSCmnDiscountAvailableIN

ADSAmnDiscountTakenIN

PAAPmnAppliedAmountIN

BCRCszSourceBaseCurrencyIN

CRRMcSourceCurrencyModeIN

CRCDszSourceTransactionCurreIN

CRRmnSourceExchangeRateIN

ACRmnForeignGrossAmountIN

FAPmnForeignOpenAmountIN

CDSmnForeignDiscountAvailabIN

CDSAmnForeignDiscountTakenIN

PFAPmnForeignAppliedAmountIN

VR01szSourceReferenceNumberIN

AN8mnSourceAddressNumberIN

MCUszSourceBusinessUnitIN

RMKszSourceRemarkIN


Related Tables

None.


Related Functions

None.

Processing

Validate required fields.

If validation fails,

   Set error.

Else,

   Set the account netting detail cache key structure.

   Initialize the account netting detail cache.

If initialization failed,

      Set error.

Else,

      Load the cache fields to the cache data structure.

  Add the record to the account netting detail cache.

If add failed,

Set error.

Endif.

Destroy the account netting detail cache.

Endif.

Endif.

Perform function clean-up.


Data Structure

D03B0178A - Account Netting Detail Add Cache Entry

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICREQINPUT

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

mnSourceDocumentNumberDOCMATH_NUMERICREQINPUT

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szSourceDocumentTypeDCTcharREQINPUT

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szSourceDocumentCompanyKCOcharREQINPUT

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szSourceDocumentPayItemSFXcharREQINPUT

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.

cLineActionACTNcharOPTINPUT

A code that specifies the action that is performed. Valid values are: A Add C Change

jdSourceGLDateDGJJDEDATEOPTINPUT

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.

jdSourceDocumentDateDIVJJDEDATEOPTINPUT

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 
date of your invoice to the customer.

jdSourceTaxServiceDateDSVJJDEDATEOPTINPUT

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

mnGrossAmountAGMATH_NUMERICOPTINPUT

A value that specifies the total amount of the invoice or voucher pay item. The gross amount might include the tax amount, depending on 
the tax explanation code. The system does not decrease the gross amount when payments are applied. When you void a transaction, the 
system clears the gross amount field.

mnOpenAmountAAPMATH_NUMERICOPTINPUT

The amount of an invoice or voucher pay item that is unpaid.

mnDiscountAvailableADSCMATH_NUMERICOPTINPUT

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.

mnDiscountTakenADSAMATH_NUMERICOPTINPUT

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 
discount available.

mnAppliedAmountPAAPMATH_NUMERICOPTINPUT

In the Accounts Payable system, the amount of the payment. In the Accounts Receivable system, the amount of the receipt. This amount 
must balance to the total amount applied to the invoice pay items.

szSourceBaseCurrencyBCRCcharOPTINPUT

A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the 
domestic side of the transaction.

cSourceCurrencyModeCRRMcharOPTINPUT

An option that specifies whether the system displays amounts in the domestic or foreign currency. On  The system displays amounts in the 
foreign currency of the transaction. Off  The system displays amounts in the domestic currency of the transaction.

szSourceTransactionCurrencyCRCDcharOPTINPUT

A code that identifies the currency of a transaction. 

mnSourceExchangeRateCRRMATH_NUMERICOPTINPUT

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

mnForeignGrossAmountACRMATH_NUMERICOPTINPUT

The foreign currency amount entered on the transaction. If the Multi-Currency Conversion option on the General Accounting constants is set 
to Y, the foreign amount is multiplied by the exchange rate to arrive at the domestic amount. If the Multi-Currency Conversion option is set to Z, 
the foreign amount is divided by the exchange rate.

mnForeignOpenAmountFAPMATH_NUMERICOPTINPUT

The unpaid foreign amount of a transaction.

mnForeignDiscountAvailableCDSMATH_NUMERICOPTINPUT

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

mnForeignDiscountTakenCDSAMATH_NUMERICOPTINPUT

The amount of the discount, expressed in the foreign currency of the transaction, that was taken or granted during the application of a 
payment to an open invoice or voucher.

mnForeignAppliedAmountPFAPMATH_NUMERICOPTINPUT

The foreign amount to be paid on an A/P Payment run.

szSourceReferenceNumberVR01charOPTINPUT

An alphanumeric value used as a cross-reference or secondary reference number. Typically, this is the customer number, supplier 
number, or job number.

mnSourceAddressNumberAN8MATH_NUMERICOPTINPUT

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szSourceBusinessUnitMCUcharOPTINPUT

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.

szSourceRemarkRMKcharOPTINPUT

A generic field that you use for a remark, description, name, or address.

jdSourceExchangeRateDateERDJJDEDATEOPTNONE

The date that the system uses to retrieve the exchange rate from the Currency Exchange Rates table (F0015). 

szPaymentTermsCodePTCcharOPTNONE

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.

Related Functions

None

Related Tables

None
NettingDetailCreateCache

NettingDetailCreateCache

Maintain Account Netting Detail Cache

Major Business Rule

Object Name: B03B0178

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to create the cache for the account netting detail and it is part of the 

Maintain Account Netting Detail Cache function (B03B0178). The Account Netting MBFN (N03B0176), which 

maintains and updates cache records for the account netting process, primarily uses this function. However, 

this function is a standalone function and it can be called from other applications to directly access 

the cache. Use this function without passing any parameters to or from the function. 


Setup Notes and Prerequisites

None.


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes
JOBSmnJobNumberNoneNNot used.

DOCmnSourceDocumentNumberNoneNNot used.

DCTszSourceDocumentTypeNoneNNot used.

KCOszSourceDocumentCompanyNoneNNot used.

SFXszSourceDocumentPayItemNoneNNot used.


Related Tables

None.


Related Functions

None.


Processing

Set the account netting detail cache key structure.

Initialize the account netting detail cache.

If initialization failed,

   Set error.

Endif.

Perform function clean-up.



Data Structure

D03B0178B - Account Netting Detail Create Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICOPTNONE

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

mnSourceDocumentNumberDOCMATH_NUMERICOPTNONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szSourceDocumentTypeDCTcharOPTNONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szSourceDocumentCompanyKCOcharOPTNONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szSourceDocumentPayItemSFXcharOPTNONE

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.

Related Functions

None

Related Tables

None
NettingDetailDeleteCacheEntry

NettingDetailDeleteCacheEntry

Maintain Account Netting Detail Cache

Major Business Rule

Object Name: B03B0178

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to delete a cache entry for the account netting detail and it is part of the 
Maintain Account Netting Detail Cache function (B03B0178). The Account Netting MBFN (N03B0176), which 

maintains and updates cache records for the account netting process, primarily uses this function. 

However, this function is a standalone function and it can be called from other applications to directly 

access the cache.  


Setup Notes and Prerequisites

A valid job number is required in order to call this function. A valid document key is also required, 

consisting of document number, document type, document company, and document pay item.


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

JOBSmnJobNumberIY
DOCmnSourceDocumentNumberIY

DCTszSourceDocumentTypeIY

KCOszSourceDocumentCompanyIY

SFXszSourceDocumentPayItemIY


Related Tables

None.


Related Functions

None.

Processing

Validate required fields.

If validation fails,

   Set error.

Else,

   Set the account netting detail cache key structure.

   Initialize the account netting detail cache.

If initialization failed,

      Set error.

Else,

      Open the cursor for retrieval.

  If open cursor failed,

         Set error.

      Endif.

Endif.

   If open cursor succeeded,

      Retrieve the account netting detail cache record.

      If retrieval failed,

         Set error.

      Else,

         Delete the netting detail cache record.

         If delete failed,

            Set error.

         Endif.

      Endif.

   Endif.

   Destroy the account netting header cache.

Endif.

Perform function clean-up.


Data Structure

D03B0178C - Account Netting Detail Delete Cache Entry

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICREQINPUT

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

mnSourceDocumentNumberDOCMATH_NUMERICREQINPUT

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szSourceDocumentTypeDCTcharREQINPUT

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szSourceDocumentCompanyKCOcharREQINPUT

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szSourceDocumentPayItemSFXcharREQINPUT

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.

Related Functions

None

Related Tables

None
NettingDetailDestroyCache

NettingDetailDestroyCache

Maintain Account Netting Detail Cache

Major Business Rule

Object Name: B03B0178

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to destroy the cache for the account netting detail and it is part of the 
Maintain Account Netting Detail Cache function (B03B0178). The Account Netting MBFN (N03B0176), which 

maintains and updates cache records for the account netting process, primarily uses this function. However, 

this function is a standalone function and it can be called from other applications to directly 

access the cache. 


Setup Notes and Prerequisites

If sequential access was performed to the cache, pass  the Cache Cursor ID to the function for 

additional clean-up.


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

JOBSmnJobNumberNoneNNot used.
DOCmnSourceDocumentNumberNoneNNot used.

DCTszSourceDocumentTypeNoneNNot used.

KCOszSourceDocumentCompanyNoneNot used.

SFXszSourceDocumentPayItemNoneNot used.

GENLNGidCacheCursorIDIN


Related Tables

None.


Related Functions

None.

Processing

Set the account detail cache key structure.

Initialize the account netting detail cache.

If initialization failed,

   Set error.

Else,

If sequential access was performed,

Retrieve the cursor handle.

Free the cursor and cursor handle.

Endif.

   Destroy the account netting header cache.

Endif.

Perform function clean-up.



^

Data Structure

D03B0178D - Account Netting Detail Destroy Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICOPTNONE

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

mnSourceDocumentNumberDOCMATH_NUMERICOPTNONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szSourceDocumentTypeDCTcharOPTNONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szSourceDocumentCompanyKCOcharOPTNONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szSourceDocumentPayItemSFXcharOPTNONE

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.

idCacheCursorIDGENLNGIDOPTINPUT

General purpose ID variable.

Related Functions

None

Related Tables

None
NettingDetailReadCacheEntry

NettingDetailReadCacheEntry

Maintain Account Netting Detail Cache

Major Business Rule

Object Name: B03B0178

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to read a cache entry for the account netting detail and it is part of the 
Maintain Account Netting Detail Cache function (B03B0178). The Account Netting MBFN (N03B0176), which 

maintains and updates cache records for the account netting process, primarily uses this function. 

However, this function is a standalone function and it can be called from other applications to directly 

access the cache.  


Setup Notes and Prerequisites

A valid job number is required in order to call this function. 


Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

JOBSmnJobNumberIY
DOCmnSourceDocumentNumberI/ON

DCTszSourceDocumentTypeI/ON

KCOszSourceDocumentCompanyI/ON

SFXszSourceDocumentPayItemI/ON

GENLNGidCacheCursorIDI/ON

ACTNcLineActionON

DGJjdSourceGLDateON

DIVJjdSourceDocumentDateON

DSVJjdSourceTaxServiceDateON

AGmnGrossAmountON

AAPmnOpenAmountON

ADSCmnDiscountAvailableON

ADSAmnDiscountTakenON

PAAPmnAppliedAmountON

BCRCszSourceBaseCurrencyON

CRRMcSourceCurrencyModeON

CRCDszSourceTransactionCurreON

CRRmnSourceExchangeRateON

ACRmnForeignGrossAmountON

FAPmnForeignOpenAmountON

CDSmnForeignDiscountAvailabON

CDSAmnForeignDiscountTakenON

PFAPmnForeignAppliedAmountON

VR01szSourceReferenceNumberON

AN8mnSourceAddressNumberON

MCUszSourceBusinessUnitON

RMKszSourceRemarkON


Related Tables

None.


Related Functions

None.

Processing

Validate required fields.

If validation fails,

   Set error.

Else,

Determine the cache retrieval mode ('keyed' or 'sequential').

   Set the account netting detail cache key structure.

   Initialize the account netting detail cache.

If initialization failed,

      Set error.

Else,

If 'keyed' retrieval was determined,

      Open cursor for keyed retrieval.

  If open cursor failed,

         Set error.

      Endif.

Else,

If 'sequential' retrieval was determined,

Open cursor for sequential retrieval.

If open cursor failed,

   Set error.

Else,

   Store the cursor handle.

Endif.

Else,

Retrieve the cursor handle.

Endif.

Endif.

Endif.

   If open cursor succeeded,

If 'keyed' retrieval was determined,

      Retrieve the cache record using the specified key.

Else,

Retrieve the next sequential cache record.

Endif.

      If retrieval failed,

         Set error.

      Else,

Load the output data structure.

Endif.

Close the cache cursor if performing keyed retrieval.

Destroy the account detail netting cache.

Endif.

Endif.

Perform function clean-up.



Data Structure

D03B0178E - Account Netting Detail Read Cache Entry

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICREQINPUT

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

mnSourceDocumentNumberDOCMATH_NUMERICOPTBOTH

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szSourceDocumentTypeDCTcharOPTBOTH

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szSourceDocumentCompanyKCOcharOPTBOTH

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szSourceDocumentPayItemSFXcharOPTBOTH

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.

idCacheCursorIDGENLNGIDOPTBOTH

General purpose ID variable.

cLineActionACTNcharOPTOUTPUT

A code that specifies the action that is performed. Valid values are: A Add C Change

jdSourceGLDateDGJJDEDATEOPTOUTPUT

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.

jdSourceDocumentDateDIVJJDEDATEOPTOUTPUT

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 
date of your invoice to the customer.

jdSourceTaxServiceDateDSVJJDEDATEOPTOUTPUT

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

mnGrossAmountAGMATH_NUMERICOPTOUTPUT

A value that specifies the total amount of the invoice or voucher pay item. The gross amount might include the tax amount, depending on 
the tax explanation code. The system does not decrease the gross amount when payments are applied. When you void a transaction, the 
system clears the gross amount field.

mnOpenAmountAAPMATH_NUMERICOPTOUTPUT

The amount of an invoice or voucher pay item that is unpaid.

mnDiscountAvailableADSCMATH_NUMERICOPTOUTPUT

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.

mnDiscountTakenADSAMATH_NUMERICOPTOUTPUT

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 
discount available.

mnAppliedAmountPAAPMATH_NUMERICOPTOUTPUT

In the Accounts Payable system, the amount of the payment. In the Accounts Receivable system, the amount of the receipt. This amount 
must balance to the total amount applied to the invoice pay items.

szSourceBaseCurrencyBCRCcharOPTOUTPUT

A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the 
domestic side of the transaction.

cSourceCurrencyModeCRRMcharOPTOUTPUT

An option that specifies whether the system displays amounts in the domestic or foreign currency. On  The system displays amounts in the 
foreign currency of the transaction. Off  The system displays amounts in the domestic currency of the transaction.

szSourceTransactionCurrencyCRCDcharOPTOUTPUT

A code that identifies the currency of a transaction. 

mnSourceExchangeRateCRRMATH_NUMERICOPTOUTPUT

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

mnForeignGrossAmountACRMATH_NUMERICOPTOUTPUT

The foreign currency amount entered on the transaction. If the Multi-Currency Conversion option on the General Accounting constants is set 
to Y, the foreign amount is multiplied by the exchange rate to arrive at the domestic amount. If the Multi-Currency Conversion option is set to Z, 
the foreign amount is divided by the exchange rate.

mnForeignOpenAmountFAPMATH_NUMERICOPTOUTPUT

The unpaid foreign amount of a transaction.

mnForeignDiscountAvailableCDSMATH_NUMERICOPTOUTPUT

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

mnForeignDiscountTakenCDSAMATH_NUMERICOPTOUTPUT

The amount of the discount, expressed in the foreign currency of the transaction, that was taken or granted during the application of a 
payment to an open invoice or voucher.

mnForeignAppliedAmountPFAPMATH_NUMERICOPTOUTPUT

The foreign amount to be paid on an A/P Payment run.

szSourceReferenceNumberVR01charOPTOUTPUT

An alphanumeric value used as a cross-reference or secondary reference number. Typically, this is the customer number, supplier 
number, or job number.

mnSourceAddressNumberAN8MATH_NUMERICOPTOUTPUT

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szSourceBusinessUnitMCUcharOPTOUTPUT

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.

szSourceRemarkRMKcharOPTOUTPUT

A generic field that you use for a remark, description, name, or address.

jdSourceExchangeRateDateERDJJDEDATEOPTNONE

The date that the system uses to retrieve the exchange rate from the Currency Exchange Rates table (F0015). 

szPaymentTermsCodePTCcharOPTNONE

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.

Related Functions

None

Related Tables

None
NettingDetailUpdateCacheEntry

NettingDetailUpdateCacheEntry

Maintain Account Netting Detail Cache

Major Business Rule

Object Name: B03B0178

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function is used to update a cache entry for the account netting detail and it is part of the 
Maintain Account Netting Detail Cache function (B03B0178). The Account Netting MBFN (N03B0176), which 

maintains and updates cache records for the account netting process, primarily uses this function. 

However, this function is a standalone function and it can be called from other applications to directly 

access the cache.  


Setup Notes and Prerequisites

A valid job number is required in order to call this function. A valid document key is also required, 

consisting of document number, document type, document company, and document pay item.



Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

JOBSmnJobNumberIY
DOCmnSourceDocumentNumberIY

DCTszSourceDocumentTypeIY

KCOszSourceDocumentCompanyIY

SFXszSourceDocumentPayItemIY

ACTNcLineActionIN

DGJjdSourceGLDateIN

DIVJjdSourceDocumentDateIN

DSVJjdSourceTaxServiceDateIN

AGmnGrossAmountIN

AAPmnOpenAmountIN

ADSCmnDiscountAvailableIN

ADSAmnDiscountTakenIN

PAAPmnAppliedAmountIN

BCRCszSourceBaseCurrencyIN

CRRMcSourceCurrencyModeIN

CRCDszSourceTransactionCurreIN

CRRmnSourceExchangeRateIN

ACRmnForeignGrossAmountIN

FAPmnForeignOpenAmountIN

CDSmnForeignDiscountAvailabIN

CDSAmnForeignDiscountTakenIN

PFAPmnForeignAppliedAmountIN

VR01szSourceReferenceNumberIN

AN8mnSourceAddressNumberIN

MCUszSourceBusinessUnitIN

RMKszSourceRemarkIN


Related Tables

None.


Related Functions

None.

Processing

Validate required fields.

If validation fails,

   Set error.

Else,

   Set the account detail cache key structure.

   Initialize the account netting detail cache.

If initialization failed,

      Set error.

Else,

      Open cursor for retrieval.

If open cursor failed,

Set error.

Endif.

Endif.

If open cursor succeeded,

Retrieve the account netting detail cache record.

If retrieval failed,

Set error.

Else,

Update the cache fields.

If update failed,

Set error.

Endif.

Endif.

Destroy the account netting detail cache.

Endif.

Endif.

Perform function clean-up.



^

Data Structure

D03B0178F - Account Netting Detail Update Cache Entry

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICREQINPUT

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

mnSourceDocumentNumberDOCMATH_NUMERICREQINPUT

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szSourceDocumentTypeDCTcharREQINPUT

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szSourceDocumentCompanyKCOcharREQINPUT

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szSourceDocumentPayItemSFXcharREQINPUT

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.

cLineActionACTNcharOPTINPUT

A code that specifies the action that is performed. Valid values are: A Add C Change

jdSourceGLDateDGJJDEDATEOPTINPUT

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.

jdSourceDocumentDateDIVJJDEDATEOPTINPUT

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 
date of your invoice to the customer.

jdSourceTaxServiceDateDSVJJDEDATEOPTINPUT

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

mnGrossAmountAGMATH_NUMERICOPTINPUT

A value that specifies the total amount of the invoice or voucher pay item. The gross amount might include the tax amount, depending on 
the tax explanation code. The system does not decrease the gross amount when payments are applied. When you void a transaction, the 
system clears the gross amount field.

mnOpenAmountAAPMATH_NUMERICOPTINPUT

The amount of an invoice or voucher pay item that is unpaid.

mnDiscountAvailableADSCMATH_NUMERICOPTINPUT

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.

mnDiscountTakenADSAMATH_NUMERICOPTINPUT

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 
discount available.

mnAppliedAmountPAAPMATH_NUMERICOPTINPUT

In the Accounts Payable system, the amount of the payment. In the Accounts Receivable system, the amount of the receipt. This amount 
must balance to the total amount applied to the invoice pay items.

szSourceBaseCurrencyBCRCcharOPTINPUT

A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the 
domestic side of the transaction.

cSourceCurrencyModeCRRMcharOPTINPUT

An option that specifies whether the system displays amounts in the domestic or foreign currency. On  The system displays amounts in the 
foreign currency of the transaction. Off  The system displays amounts in the domestic currency of the transaction.

szSourceTransactionCurrencyCRCDcharOPTINPUT

A code that identifies the currency of a transaction. 

mnSourceExchangeRateCRRMATH_NUMERICOPTINPUT

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

mnForeignGrossAmountACRMATH_NUMERICOPTINPUT

The foreign currency amount entered on the transaction. If the Multi-Currency Conversion option on the General Accounting constants is set 
to Y, the foreign amount is multiplied by the exchange rate to arrive at the domestic amount. If the Multi-Currency Conversion option is set to Z, 
the foreign amount is divided by the exchange rate.

mnForeignOpenAmountFAPMATH_NUMERICOPTINPUT

The unpaid foreign amount of a transaction.

mnForeignDiscountAvailableCDSMATH_NUMERICOPTINPUT

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

mnForeignDiscountTakenCDSAMATH_NUMERICOPTINPUT

The amount of the discount, expressed in the foreign currency of the transaction, that was taken or granted during the application of a 
payment to an open invoice or voucher.

mnForeignAppliedAmountPFAPMATH_NUMERICOPTINPUT

The foreign amount to be paid on an A/P Payment run.

szSourceReferenceNumberVR01charOPTINPUT

An alphanumeric value used as a cross-reference or secondary reference number. Typically, this is the customer number, supplier 
number, or job number.

mnSourceAddressNumberAN8MATH_NUMERICOPTINPUT

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szSourceBusinessUnitMCUcharOPTINPUT

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.

szSourceRemarkRMKcharOPTINPUT

A generic field that you use for a remark, description, name, or address.

jdSourceExchangeRateDateERDJJDEDATEOPTNONE

The date that the system uses to retrieve the exchange rate from the Currency Exchange Rates table (F0015). 

szPaymentTermsCodePTCcharOPTNONE

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.

Related Functions

None

Related Tables

None
em, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szSourceDocumentTypeDCTcharOPTNONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szSourceDocumentCompanyKCOcharOPTNONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szSourceDocumentPayItemSFXcharOPTNONE

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.

idCacheCursorIDGENLNGIDOPTINPUT

General purpose ID variable.

Related Functions

None

Related Tables

None
NettingDetailReadCacheEntry

NettingDetailReadCacheEntry

Maintain Account Netting Detail Cache

Major Business Rule

Object Name: B03B0178

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description