CreateRERecVoids

Create 'RE' Record - Voids

Major Business Rule

Object Name: B0300004

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This will create an 'RE' record in the F0311 when voiding an invoice.


Setup Notes and Prerequisites

Call this function when voiding a posted invoice to create the necessary 'RE' record.   Therefore, 

the invoice specified by the key values Document Number, Document Type, Key Company, Pay Item and 

Matching Document Number should exist in the F0311 and it should be posted.


Special Logic

None.


Technical Specification



Parameters

ItemDescriptionI/OReq?Notes

DOCmnDocumentNumberIYesInvoice Document Number

DCTszDocumentTypeIYesInvoice Document Type

KCOszDocumentCompanyIYesInvoice Document Company

SFXszPayItemIYesInvoice Pay Item Number

DGJjdGLDateIYesGL Date

EV01cUpdateInvoiceFlagI/OYesUpdate invoice transaction flag. 1 = 

update the transaction line as                                  

being voided. (TRTC = V) 0 = Do not update the original 

transaction line.

DOCMmnMatchingDocNoIYesMatching Document Number

DCTMszMatchingDocTypeIYesMatching Document Type

TRTCcReceiptTranCodeIYesReceipt Transaction Code (voids).


Related Tables

F0311 A/R Account Ledger

F0010Company Master


Related Functions

X0903F0008 Get Fiscal Year Period Number

B9800100Get Audit Info


Processing

Fetch F0311 record based on key values.

Fetch company information for Company 00000.

Get period number, fiscal year and century based upon company field in F0311 and G/L Date passed to 

function.

Set the following fields in the F0311 data structure:

G/L Date = G/L Date Parameter

Period Number = returned period number 

Fiscal Year = retured fiscal year

Century = returned century

Post Code = blank

Matching Doc Type = "RE"

Pay Status Code = "P"

Remark Field = "Change in Gross Amount"

Units = Units * (-1)


Get Audit Information to return workstation id, update time, etc.

If currency is off, invoice is domestic or Mode 3 processing used

Reverse domestic amount fields

Else

Reverse foreign amount fields

End if


If Gross Amount, Foreign Amount, Taxable Amount or Tax Amount are not equal to 0

Insert new record into database based upon F0311 data structure values

End if


If cUpdateFlag equals 1

Update originally fetched F0311 record with the following values:

Pay Status Code = "P"

Cash Receipt Transaction Code = "V"

Closed Item - As of Processing = blank

End if


^

Data Structure

D0300004 - Create 'RE' Record - Void

Parameter NameData ItemData TypeReq/OptI/O/Both
mnDocumentNumberDOCMATH_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 

szDocumentCompanyKCOcharNONENONE

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.

szPayItemSFXcharNONENONE

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.

jdGLDateDGJJDEDATENONENONE

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.

cUpdateInvoiceFlagEV01charNONENONE

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

mnMatchingDocNoDOCMMATH_NUMERICNONENONE

The number of the matching document, such as a receipt, payment, adjustment,or credit. You apply a matching document (DOCM) against 
an original document (DOC), such as an invoice or voucher.

szMatchingDocTypeDCTMcharNONENONE

Within Auto Bank Statement process, a document type is needed for the following:       1) Document Type is needed for creating Variance 
Journal Entries for payments, receipts, and journal entries when running the Auto Bank Statement Process (R09616).  If Document Type on the 
Payment Clear tab is left blank, it will default to PN.  If Document Type on the Receipt Clear tab is left blank, it will default to RC.  If Document 
Type on the Journal Entry Reconcile tab is left blank, it will default to JE.      2) Document Type is needed for creating Journal Entries on the 
Journal Entry Create tab, and the Draft Paid tab.  For both of these, it will default to JE if left blank. 

cReceiptTranCodeTRTCcharNONENONE

A code for specific transaction processing in Cash Receipts. A blank TI code will cause the transaction to be bypassed. The following is a 
summarized list of valid TI codes. For more detailed information, please see the system help text for Cash Receipts w/Action Code program 
(P03103).  Codes and their uses are:    1   Invoice Match Net with Discount    2   Inv Match Open without Discount    A  Adjustment    B  Balance 
Forward    C  Chargeback (Unapplied Debit)    D  Inv Match w/ Chgbck for Discount    F  Automatic Gain/Loss Record (foreign currency only - 
machine generated)    G  General Ledger    I   Invoice Match    R  Begin or End Range of Invoices    S  Spread    U  Unapplied Cash (Credit)    W  
Automatic Write-off    X  Skip Invoice within Range    Z  Automatic Gain/Loss on Spreads (foreign currency only-machine generated)

Related Functions

B9800100 Get Audit Information
X0903 Fiscal Date Edits +

Related Tables

F0010 Company Constants
F0311 Accounts Receivable Ledger