DeleteInvoice

Delete Invoice from F03B11

Major Business Rule

Object Name: B03B0013

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This business function deletes all invoice records, that have not been paid or posted, when called 
from a browse screen.  Actions performed are: 1) Delete all G/L transactions 2) Delete all A/R 

transactions.


The purpose of this business function is to allow the user to void a posted A/R transaction or delete 

an unposted transaction on the same date as the transaction or on a different date.  This function 

calls the external business functions to validate records to be deleted, void journal entry and void 

invoice.


Setup Notes and Prerequisites

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

 parameters.  These keys include: Document Number(DOC), Document Type(DCT),  and Document 

Company(KCO).


Special Logic

None.



Technical Specification



Parameters

ItemDescriptionI/OReq?Notes

DOCmnDocVoucherInvoiceeIYPart of key to document being 

voided.

DCTszDocumentTypeIYPart of key to document being 

voided.

KCOszCompanyKeyIYpart of key to document being 

voided.

DGJjdDateForGLAndVoucherIYPart of key being passed to void journal 

entry function.

VDGJjdVoidDateForGLIYDate transaction is being voided.

VREszVoidReasonCodeIYReason invoice is being voided.

EV03cValidateOrDeleteY1 = bypass call to void journal entry 

and void invoice functions

2 = only bypass call to void journal 

entry function

VC01AcUpdateBatchINif '1' = update batch header file.

EV04cErrorFlagONif '1' stop business function.

EV07cFirstFlagINUsed in function call B03B0014 

(Validate Invoices Records to 

Delete) when checking invoices to 

be recycled

SFXszDocumentPayItemIYPart of key to document being voided.

AREszAdjustmentReasonCodeINReason code to be used by B03B0015

(Void Invoice).


Related Tables 

F03B11Customer Ledger File
F0911G/L Ledger File


Related Business Functions

B0000007Batch - revise on trans commit.

B03B0014Validate Invoice Records to be deleted.

B03B0015Void Invoice.

B0900026Void journal entry.

N7000520Plug & Play NER Delete F03B11 Records


Processing 

1.  Open file.
2.  Determine that record exists in F03B11 Table.

3.  Call "Validate Invoice Records to be Deleted" function.

4.  If  error stop business function.

5.  If no errors and "ValidateOrDelete" is blank, call "Void Journal Entry" function.

6.  Call "Void Invoice" function if transaction has been posted or if transaction has not been marked 

as posted but has been revised.  If transaction has not been posted, delete it.

7.  Update batch header if "UpdateBatch" is equal to '1'.

8.  Close file.


Data Structure

D03B0013 - DeleteInvoiceFromF03B11

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.

jdDateForGLAndVoucherDGJJDEDATENONENONE

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.

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).

cValidateOrDeleteEV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

cUpdateBatchVC01AcharNONENONE

This is a generic field used for video constants display.

cErrorFlagEV04charNONENONE

PeopleSoft event point processing flag 04.

cFirstFlagEV07charNONENONE

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

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.

szAdjustmentReasonCodeAREcharNONENONE

A code that identifies the reason that an invoice pay item was voided.

Related Functions

B0000004 Batch - Open On Initialization
B0000007 Batch - Revise On Transaction Commitment
B0000008 Batch - Revise On Exit
B03B0014 Validate Invoice Records to Delete
B03B0015 Void Invoice
B0900026 Void Journal Entry
N7000520 B03B0013 - Plug & Play - 03B

Related Tables

F03B11 Customer Ledger
F0911 Account Ledger