InvoicePost

Invoice Post

Major Business Rule

Object Name: B03B0025

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function will complete all pre-post edits by batch for invoice post processing.  It is called 
from the GL Post UBE (R09801) and will create the automatic journal entry in the F0911 table.  If taxes 

are on the original document, it will create any necessary tax record entries in the F0911 and it will 

write a tax record to the tax table workfile.


Setup Notes and Prerequisites

None.


Special Logic

Adjustment processing:


If  an invoice pay item has had an adjustment made, that will be indicated by the ISTR field on 
the invoice record marked as a '1'.  Invoice entry only allows the user to create a new F0911 record, 

so the post will only process the adjustment record and WILL NOT repost the original invoice pay item 

line.  After the adjustment record has been successfully written to the General Ledger table and the 

Tax Workfile (if taxes were present), then the POST flag on the adjustment record will be updated to a 

'P' and the POST flag on the associated invoice pay item line will be updated with a 'P'.


After the GL Post UBE writes all of the records to the Account Balances and Tax tables, it will 

then call the Update A/R Post Flag business function.  This will mark the adjustment record POST flag 

as 'D' and it will update the Invoice pay item line POST flag as a 'D' and the ISTR flag as a '2'.


Tax Processing:


Due to database inconsistencies between OneWorld and the AS/400, all tax records will be 

written to a tax workfile (F09UI006) in this business function.  The GL Post UBE will then read this 

workfile, and will create the live records in the Sales/Use/VAT Tax table (F0018).



Technical Specification




Related Functions
B0000023Intercompany Settlements

B0000068Delete F09UI005 records

B0000073Delete F09UI006 records

B0400009Get Account Company

DELF0911Delete F0911 records

ISCOLABValidate Address Book Number

X0903Edit Dates

B0000009Get Next JE Line Number

B0000055Validate AAI Completely

B9800100Get Audit Information

XX0901Validate Account Number

B0000019Calculate Tax Authority Amounts


Processing 

Delete any partial records that match the entered batch number and type in the F0911, F09UI005, 
F09UI006 tables.


Load the data structure for the business function Write HUB Company (which is executed during the 

F09UI005 flush routine when the F0911 'AE' records are written.


Open the following tables: F0911, F09UI005, F09UI006, F03B11.


Load the key to the Batch Number, Type, B+ index on the F03B11 table.


Select all F03B11 records with the matching batch number and type and a blank post code.


For each record (this is a while loop):


If adjustment records exist (ISTR = 1 on the F03B11) then open the A/R Adjustments table and 

retrieve the record with the same key information.  Load the amount fields on that record into the 

Amounts data structure for post processing.


Otherwise, load the amounts fields on the F03B11 record to the Amounts data structure for post 

processing.


If the offset mode is by document ('Y')  and the document number has changed, then clear the 

F09UI005 work table and write a record(s) in the F0911 table.


If the RP2 field on the F03B11 table is blank, then calculate taxes for the record.  (NOTE: if 

adjustments exist, then we will calculate taxes and write taxes for the adjustments record and NOT for 

the original invoice document pay item.)


If taxes exist, then write the record to the tax workfile (F09UI006).


Write the offsetting entry to the general ledger workfile (F09UI005).

If the offset mode is by summary ('S'), then clear the F09UI005 work table and write the record 

to the F0911 table.


If this is an adjustment record, then update the POST field on the F03B112 table as a 'P'.


Update the POST field on the F03B11 table as a 'P'.


If the offset method is not by summary


Read the next F03B11 record.


(  end of the while loop )


If the offset method is not equal to summary ('S'), then clear the F09UI005 work table and write the 

record to the F0911 table.


^

Data Structure

D03B0025 - Invoice Post

Parameter NameData ItemData TypeReq/OptI/O/Both
mnBatchNumberICUMATH_NUMERICNONENONE

A number that identifies a group of transactions that the system processes and balances as a unit. When you enter a batch, you can either 
assign a batch number or let the system assign it using the Next Numbers program.

szBatchTypeICUTcharNONENONE

A code that specifies the system and type of transactions entered in a batch. The system assigns the value when you enter a transaction. 
Valid values are set up in user defined code table 98/IT. You cannot assign new values. All batch types are hard coded.

cAROffsetMethodOFFRcharNONENONE

A code that specifies how the system generates the offset entry (document type AE) in the Account Ledger table (F0911) when invoices, 
receipts, and drafts are posted to the general ledger. Valid values are: B The system creates one offset for each batch of transactions by 
account.     Y The system creates one offset per transaction by account.    S The system creates one offset for each pay item by account.  The system 
creates offsets for the actual amount (AA) and foreign currency (CA) ledger types only. 

cErrorFlagEV01charNONENONE

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

cInterCompanySettlementsICOcharNONENONE

A code that specifies the method that the system uses to automatically create journal entries between companies within an organization 
(intercompany settlements).  Valid values are: 1 Hub Method. Create intercompany settlements using a hub company. 2 Detail Method. Create 
intercompany settlements without a hub company. Valid for multicurrency processing. 3 Configured Hub Method. Create intercompany 
settlements using a configured hub. Valid for multicurrency processing. N No, do not create intercompany settlements. The system does not post the 
batch if it contains intercompany settlements. *   No, do not create intercompany settlements. The system posts the batch even if it contains 
intercompany settlements.

jdBatchDateDICJJDEDATENONENONE

The date of the batch. If you leave this field blank, the system date is used.

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.

mnPayItemExtensionSFXEMATH_NUMERICNONENONE

A code to designate an adjusting entry to a pay item on a voucher or invoice. This field is required so that each record is unique.

cWhenUpdateTaxFldFlagEV01charNONENONE

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

cVertexActiveVVTXcharREQINPUT

This flag determines whether to use the Vertex Tax Compliance system for tax calculations.  Values are: Y  Use Vertex system to calculate 
taxes.  N Do not use Vertex system to calculate taxes.  Instead, use JDE tax calculations. 

mnJobNumberJOBSMATH_NUMERICOPTNONE

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

szOffsetByDocumentDL01charOPTNONE

A user defined name or remark.

szOffsetByBatchDL02charOPTNONE

Additional text that further describes or clarifies a field in the system.

szOffsetBySummaryDL03charOPTNONE

Additional text that further describes or clarifies an element.

szIntercompanyCacheNamePIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cMultiCurrencyIntercompanyJEDOT1charOPTNONE

An option that specifies whether to allow intercompany transactions between companies with different base currencies. If you turn on this 
option, you must create intercompany settlements in either the detail or configured hub mode. Valid settings are: On Allow intercompany 
transactions between companies with different base currencies. The post program creates adjusting entries for the intercompany accounts in the 
foreign currency of the transaction. Off Do not allow intercompany transactions between companies with different base currencies.

cCurrencyConverYNARCRYRcharOPTNONE

A code that specifies whether to use multi-currency accounting, and the method of multi-currency accounting to use: Codes are:    N Do not 
use multi-currency accounting. Use if you enter transactions in only one currency for all companies. The multi-currency fields will not appear 
on forms. The system supplies a value of N if you do not enter a value.    Y Activate multi-currency accounting and use multipliers to convert 
currency. The system multiplies the foreign amount by the exchange rate to calculate the domestic amount.    Z Activate multi-currency 
accounting and use divisors to convert currency. The system divides the foreign amount by the exchange rate to calculate the domestic amount.

Related Functions

B0000009 Get Next Journal Entry Line Number
B0000019 Calculate Tax Authority Tax Amts
B0000023 Intercompany Settlements +
B0000055 ValidateAAICompletely
B0000068 Delete F09UI005 Records
B0000073 Delete F09UI006 Records
B0100039 Is Address Number in Address Book Master Table
B0400009 Get Account Company
B0900143 Delete F0911 Records
B9800100 Get Audit Information
X0903 Fiscal Date Edits +
XX0901 Validate Account Number

Related Tables

F0012 Automatic Accounting Instructions Master
F03B11 Customer Ledger
F03B112 Invoice Revisions
F0911 Account Ledger
F09UI005 Tax Offsets User Index
F09UI006 Tax (F0018) Replica