DefaultDueDate

Default Due Dates

Minor Business Rule

Object Name: B0400037

Parent DLL: CALLBSFN

Location: Client/Server

Language: C

Functional Description

Purpose

This function computes and loads the default due date for vouchers.


Setup Notes and Prerequisites

None


Special Logic

None



Technical Specification



Parameters

ItemDescriptionI/OReq?Notes

DGJjdDateForGLAndVoucherJulianIN

DIVJjdDateInvoiceJIN

PTCszPaymentTermsCodeIY

AGmnAmountGrossIY

ADSAmnAmountDiscountTakenIN

DDJjdDueDateI/ON

DDNJjdDiscountDueDateI/ON


Related Tables

None


Related Functions

B0400290 - Compute Due Date


Processing

If jdDueDate = null or jdDiscountDueDate = null

If invoice date is not null or G/L date is not null

If the mnAmountGross is < 0 (debit/credit memo)

Set the transaction date = G/L Date

Else

If the invoice date is not null

Set the transaction date = Invoice date

Else

Set the transaction date = G/L Date

If the transaction date is null

IdReturnCode = ER_ERROR

Else

If it is a debit memo

JdDueDate = jdTransactionDate

JdDiscountDueDate = jdTransactionDate

Else

Call ComputeDueDate (B0400290) to compute Due Date and Discount Due Date
If the jdDiscountDueDate is null (load discount date)

If no discount is taken

Use the net days to pay
Else

Use discount days
If the jdDueDate is null (load the due date)

Use net days to pay

If jdDueDate is null

IdReturnCode = ER_ERROR





Data Structure

D0400494 - Default Due Dates

Parameter NameData ItemData TypeReq/OptI/O/Both
jdDateForGLAndVoucherJuliaDGJJDEDATENONENONE

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.

jdDateInvoiceJDIVJJDEDATENONENONE

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.

szPaymentTermsCodePTCcharNONENONE

A code that specifies the terms of payment, including the percentage of discount available if the invoice is paid by the discount due date. 
Use a blank code to indicate the most frequently-used payment term. You define each type of payment term on the Payment Terms Revisions 
form. Examples of payment terms include: Blank Net 15 001      1/10 net 30 002      2/10 net 30 003      Due on the 10th day of every month 006     
Due upon receipt  This code prints on customer invoices.

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.

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.

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.

jdDiscountDueDateDDNJJDEDATENONENONE

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.

cDebitCreditMemoDueDateEV01charOPTNONE

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

Related Functions

X0302 Compute Due Date

Related Tables

None