ValidateInvoiceRecordsToDelete

Validate Invoice Records to Delete

Minor Business Rule

Object Name: B03B0014

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose
The purpose of this business function is to validate invoice records the user wants to void or 
delete.  This function will let the user know if the invoice can be voided or deleted.


This business function will edit invoice records to be deleted.  It should be called for each record 

processed.  Void date and void reason code must contain the void date and void reason code to be used 

for the void.


Setup Notes and Prerequisites

In order to validate a transaction the key to the transaction needs to be acquired and passed over in 

the parameters.  These keys include: Document Company(KCO), Document Number(DOC),  Document 

Type(DCT), and Document Pay Item(SFX).


Special Logic

None.


Technical Specification




Parameters
ItemDescriptionI/OReq?Notes

DOCmnDocVoucherInvoiceeINPart of Primary Key to F03B11 Record
DCT szDocumentTypeINPart of Primary Key to F03B11 Record

KCOszCompanyKeyINPart of Primary Key to F03B11 Record

POSTcGlPostedCodeING/L Posted Code

VDGJjdVoidDateForGLINVoid Date

CRRMcCurrencyModeIY'D' for Domestic or  Mode 3

'F' for Foreign

AGmnAmountGrossIYDomestic Gross Amount

Required if voiding Domestic or Mode 3

invoice

APmnAmountOpenIYDomestic Open Amount

Required if voiding Domestic or Mode 3

invoice

ACRmnAmountForeignIYForeign Gross Amount

Required if voiding Foreign invoice

FAPmnAmountForeignOpenIYForeign Open Amount

Required if voiding Foreign invoice

RFszFrequencyRecurringIYRecurring Frequency Code

DRFmnRecurFrequencyIYNumber of times to recycle

PSTcPayStatusCodeINPayment Status Code

EV04  cErrorFlagOYReturns 1 if paid or partially paid

Returns 2 if recurring frequency code

and Number of times to recycle are not

blank and zero, respectively.

COszCompanyINCompany

EV07cFirstFlagIY'1' if no errors have occurred due to

recycled invoice validation

ISTRcPostStatusReceivablesIN


Related Tables

None.


Related Functions

None. 


Processing 
1.  Open file.

2.  Determine if record has already been voided, if so, move '1' to error flag.

3.  Check to see if invoice has been paid or partially paid, if so, move '1' to error flag.

4.  If a recurring invoice, make sure frequency recurring and recurring frequency # of payments are 

not blank, if so move '2' to error flag.

5.  Close file. 


^

Data Structure

D03B0014 - ValidateInvoiceRecordsToDelete

Parameter NameData ItemData TypeReq/OptI/O/Both
mnDocVoucherInvoiceeDOCMATH_NUMERICNONENONE

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.

szDocumentTypeDCTcharNONENONE

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 

szCompanyKeyKCOcharNONENONE

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.

szDocumentPayItemSFXcharNONENONE

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.

cGlPostedCodePOSTcharNONENONE

A code the system uses to determine whether a transaction is available for the post process. Valid codes 
are: Blank Unposted. D Posted. P Posted or posting. Depending on the type of transaction, this code has different meanings. If the code is assigned to an Account Ledger 
record (F0911), it indicates a posted status. If the code is assigned to any other transaction, it indicates that the system attempted to post the 
record but failed, due to an error it encountered.    M Model. The transaciton is a model journal entry.     

jdVoidDateForGLVDGJJDEDATENONENONE

The date that specifies the financial period to which the voided transaction is to be posted. Financial periods are set up in the Company 
Constants table (F0010).

cCurrencyModeCRRMcharNONENONE

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.

mnAmountGrossAGMATH_NUMERICNONENONE

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.

mnAmountOpenAAPMATH_NUMERICNONENONE

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

mnAmountForeignACRMATH_NUMERICNONENONE

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.

mnAmountForeignOpenFAPMATH_NUMERICNONENONE

The unpaid foreign amount of a transaction.

szFrequencyRecurringRFcharNONENONE

A code to specify the time interval between transactions that the system creates. Valid recurring frequency values 
are: MO Monthly AN Annually WK Weekly QT Quarterly SA Semiannually BW Biweekly

mnRecurFrequencyDRFMATH_NUMERICNONENONE

The number of recurring invoices or vouchers that you want the system to process. This number includes the original transaction that you 
enter. For example, if you enter 12, the system will process the transaction 11 additional times, reducing the value of the number of payments 
by 1 each time it creates a new transaction. When this field contains 1, the system does not create a new transaction, it clears the field.

cPayStatusCodePSTcharNONENONE

A user defined code (00/PS) that indicates the current payment status for a voucher or an invoice. Examples of codes include: A Approved 
for payment but not yet paid   H Held pending approval   P Paid   Note: Some of the payment status codes are hard coded; the system assigns 
the code.

cErrorFlagEV04charNONENONE

PeopleSoft event point processing flag 04.

szCompanyCOcharNONENONE

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.

cFirstFlagEV07charNONENONE

An option that specifies the type of processing for an event.

cPostStatusReceivablesISTRcharNONENONE

In the Customer Ledger table (F03B11), a code that specifies whether revision records exist for an invoice. Valid values are: Blank No 
revision records exist for the invoice. 1 One or more records exist for the invoice in the Invoice Revisions table (F03B112). In the Receipts Header 
(F03B13) and Draft Remittance (F03B672) tables, a code that specifies whether the system creates one journal entry for each batch of 
transactions that is posted or one journal entry for each transaction that is posted. Valid values are: Blank The system creates one Account Ledger 
record (F0911) for each batch of receipt and draft records that is posted. 1 The system creates one Account Ledger record for each receipt and 
draft record that is posted.  Note: Although the field exists, the system does not update it in the A/R Notifcation History Detail table (F03B21) or 
the Auto Debit Invoice Select and Build table (F03B575). 

Related Functions

None

Related Tables

F03B11 Customer Ledger