Functional Description
Purpose
This function is used to calculate the Due Date and Discount Due Date of a document when advanced
payment terms are used. If advanced payment terms are not used the function returns a flag
(cIsAdvancedPT) that is set equal to '0'; in this case call Default Due Dates (B0400037) to get due dates from
"regular" payment terms. If advanced payment terms are used, the function returns the same flag as above
set equal to '1' and also returns the calculated Due Date and Discount Due Date.
Setup Notes and Prerequisites
If advanced payment terms are not used then call the Default Due Dates (B0400037) function instead.
In the monetary parameters of this function, use foreign amounts only if currency is ON and Mode =
'F' (i.e. document was entered in foreign mode); otherwise use domestic amounts.
Special Logic
None.
Technical Specification
Parameters
Item DescriptionI/OReq?Notes
EV01cIsAdvancedPTOYFlag specifying if advanced PT are used. '1' means
advanced PT are used; '0' means advanced PT are not used.
PTCszPaymentTermsCode01IYPayment terms code.
DIVJjdDateInvoiceJIYDocument date.
DGJjdDateForGLandVoucherJULIIYDocument GL date.
DSVJjdDateServiceTaxDateIYDocument service tax date.
DATE01jdTransactionDateINTransaction date.
DCPmnDiscountTakenIYForeign or domestic discount taken or available.
MATH01mnAmountGrossIYForeign or domestic document gross amount.
DDJjdDueDateI/0YRecalculated due date.
DDNJjdDiscountDueDateI/OYRecalculated discount due date.
Related Tables
F00141Advanced Payment Terms
Related Functions
N0000192Get Installment Payment Info
X03021New Due Date Calculation
Processing
Initialize return values.
Open F00141 table.
If open table failed,
Set error.
Set cIsAdvancedPT = '0'.
Else,
Move selected information to F00141 data structure fields.
Fetch payment terms from F00141 table.
If fetch failed,
Set cIsAdvancedPT = '0'.
Else,
Set up dates to pass to X03021.
If installments are set up,
Call N0000192.
Endif.
Call X03021 to get new dates.
Set up return values depending on results.
Endif.
Endif.
Close table F00141.
Perform function clean up.
D0000163 - Calculate Adv. Pymnt. Terms Due Date
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
cIsAdvancedPT | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szPaymentTermsCode01 | PTC | char | NONE | NONE |
A code that specifies the terms of payment, including the percentage of discount available if the invoice is paid by the discount due date.
| ||||
jdDateInvoiceJ | DIVJ | JDEDATE | NONE | NONE |
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
| ||||
jdDateForGLandVoucherJULIA | DGJ | JDEDATE | NONE | NONE |
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
| ||||
jdDateServiceTaxDate | DSVJ | JDEDATE | NONE | NONE |
A date that indicates when you purchased goods or services, or when you incurred a tax liability. | ||||
mnDiscountTaken | DCP | MATH_NUMERIC | NONE | NONE |
The percent of the total invoice or voucher that you will discount if it is paid within the discount period. You enter the discount percent as a
| ||||
jdTransactionDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
mnAmountGross | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
jdDateDueJulian | DDJ | JDEDATE | OPT | NONE |
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
| ||||
jdDateDiscountDueJulian | DDNJ | JDEDATE | OPT | NONE |
In the Accounts Receivable system, the date that the invoice must be paid to receive the discount. The system calculates the discount due
| ||||
cDebitCreditMemoDueDate | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. |
X03021 New Due Date Calculation |
F00141 Advanced Payment Terms | ||||
F00142 Due Date Rules |