InsertRecurringInvoiceRecord

Insert Recurring Invoice Record

Major Business Rule

Object Name: B03B0020

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function inserts a new recurring document in the F03B11 file as part of the process of recycling 
an existing document. If the function fails to write the new invoice to the F03B11 file it will set 

an error without passing any error flags back to the calling application. 


Setup Notes and Prerequisites

A valid existing document, that has recurring information set up (recurring frequency and number of 

remaining payments) must be used with this function.


The Calculate Recurring Date (B0000050) function must be called first to calculate all the dates 

associated with the new invoice (based on the recurring frequency and the processing options specified). 

The F0011 Write Batch Header (B0000004) must also be called for every batch of recurring documents 

being created to obtain batch information. The F0008 Get Fiscal Year Period Number (X0903) function must 

be called to obtain fiscal date information for the company that recycles the document in question. 

Finally, the X0010 Get Next Number (X0010) function must be called to obtain the document number for the 

new invoice being created.


The value of the cPayStatusCode field should be set equal to the existing document's pay status code 

unless that code is equal to "P". In that case the pay status code is left blank (i.e. if existing 

document's pay status code is equal to "P" then set cPayStatusCode equal to blank).


The jdDateStatementJulian field can be used for specifying a statement date; however it is 

recommended that this field be passed a blank value.


The mnRecurFrequencyOfPaym field should be set equal to the number of remaining payments of the 

recycled document decremented by 1.

 

Special Logic

None.



Technical Specification



Parameters

Item DescriptionI/OReq?Notes

KCOszCompanyKeyIYCompany number of recycled document.
DOCmnDocVoucherInvoiceeIYDocument number of recycled document.

DCTszDocumentTypeIYDocument type of recycled document.

SFXszDocumentPayItemIYDocument pay item of recycled document.

DRFmnRecurFrequencyOfPaymIYRemaining payments of recycled document  1 (see note 

above).

PSTcPayStatusCodeIYRecycled  document's pay code if not "P" otherwise 

.

DGJjdDateForGLAndVoucherIYAs determined by B0000050.

PNmnPeriodNumberIYAs determined by X0903.

ICUmnBatchNumberIYAs determined by B0000004.

ICUTszBatchTypeIYRecycled document's batch type.

DIVJjdInvoiceDateIYAs determined by B0000050.

DDJjdDueDateIYAs determined by B0000050.

DSVJjdServiceTaxDateIYAs determined by B0000050.

DOCmnDocumentNumberIYAs determined by X0010; new document's doc number.

RFszRecurringFrequencyIYRecycled document's recurring frequency.

ADSCmnDiscountAvailableIYRecycled document's discount available.

FAPmnForeignAmountIYForeign currency amount from recycled document.

POSTcPostStatusIYAlways .

FYmnFiscalYearIYAs determined by X0903.

CTRYmnCenturyIYAs determined by X0903.

AAPmnOpenAmountIYDomestic open amount of recycled document.

AGmnAmountGrossIYDomestic gross amount of recycled document.

DDNJjdDateDiscountDueIYAs determined by B0000050.

ADSAmnAmountDiscountTakenIYAlways .

CTLszStatementNumberIY recommended.

SMTJjdDateStatementJulianIY recommended.


Related Tables

F03B11Customer Ledger File


Related Functions

B9800100Get Audit Info

Processing

Open F03B11 file.

Determine if record exists in F03B11.

Move new information to F03B11 data structure fields.

Get Audit Info.

Write new ledger record (F03B11).

Close F03B11 file. 


^

Data Structure

D03B0020 - Insert Recurring Invoice Record

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

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 

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.

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

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.

mnPeriodNumberPNMATH_NUMERICNONENONE

A number indicating the current accounting period.  This number, used in conjunction with the Company Constants table (F0010) and the 
General Constants table (F0009), allows the user to define up to 14 accounting periods. See General Ledger Date.  The current period number 
is used to determine posted before and posted after cut off warning messages.  It is also used as the default accounting period in the 
preparation of financial reports.

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.

jdInvoiceDateDIVJJDEDATENONENONE

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.

jdDueDateDDJJDEDATENONENONE

In Accounts Receivable, the date that the net payment is due. In Accounts Payable, the date that the payment is due to receive a discount 
or, if no discount is offered, the net due date. The system calculates the due date based on the payment term entered, or you can enter it 
manually. If you enter a negative voucher or invoice (debit or credit memo), the system might use the G/L date as the due date regardless of the 
payment term entered. A processing option in the master business function (P0400047 for vouchers and P03B0011 for invoices) controls how 
the system calculates the due date for debit and credit memos.

jdServiceTaxDateDSVJJDEDATENONENONE

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

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.

szRecurringFrequencyRFcharNONENONE

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

mnDiscountAvailableADSCMATH_NUMERICNONENONE

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.

mnForeignAmountFAPMATH_NUMERICNONENONE

The unpaid foreign amount of a transaction.

cPostStatusPOSTcharNONENONE

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.     

mnFiscalYearFYMATH_NUMERICNONENONE

A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal 
year (as defined on the Company Setup form). Specify the year at the end of the first period rather than the year at the end of the fiscal period. 
For example, a fiscal year begins October 1, 1998 and ends September 30, 1999. The end of the first period is October 31, 1998. Specify the 
year 98 rather than 99.

mnCenturyCTRYMATH_NUMERICNONENONE

The calendar century associated with the year. Enter is the first two digits of the year. For example, 19 indicates any year beginning with 19 
(1998, 1999), 20 indicates any year beginning with 20 (2000, 2001), and so on.

mnOpenAmountAAPMATH_NUMERICNONENONE

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

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.

jdDateDiscountDueDDNJJDEDATENONENONE

In the Accounts Receivable system, the date that the invoice must be paid to receive the discount. The system calculates the discount due 
date based on the payment term. If the payment term does not specify a discount, the system completes this field with the net due date. In the 
Accounts Payable system, the date that the voucher is due.

mnAmountDiscountTakenADSAMATH_NUMERICNONENONE

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.

szStatementNumberCTLcharNONENONE

Accounts Payable - A code the system uses to determine the order in which A/P payments are printed. The value of the field differs 
depending on how you print checks. For example, if checks are printed by job, the field contains the job number. If checks are printed by contract 
number, the field contains the contract number.  Accounts Receivable - A number that identifies the statement on which the invoice appears.

jdDateStatementJulianSMTJJDEDATENONENONE

The most recent date on which the system generated a statement for the invoice pay item.

cErrorFlagFLAGcharREQNONE

Contains an indicator for the operation.

Related Functions

B9800100 Get Audit Information
N7000690 B03B0020 - Plug & Play - 03B
X0903 Fiscal Date Edits +

Related Tables

F03B11 Customer Ledger