TRTDIV processing: TRTDIV
ESC_AGIO
The ESC_AGIO entry point is used to intervene to recalculate an early discount or late charge amount.
Context and operating mode
The following tables are on line :
Table |
Significant content |
Table description |
---|---|---|
COMPANY [CPY] |
No |
|
FACILITY [FCY] |
No |
|
TABCUR [TCU] |
No |
There is usually one transaction in progress.
There may or may not be a log file according to the calling program.
Different call cases
This entry point is called in:
- payment entry: SUBPAY2
- Payment proposal: PAYPROPAL2
- Open item management: MODECHE and SUBDDM2
- Printing of customer reminders: RELANCE1
- Management of sales invoices: TRTVENFACP
- The dialog box to check and modify the early discount/late charge calculation (right click in payment entry): PAYDEP
Available variables
Variables |
Definition |
Value Char DEP |
Early discount/Late charge code |
Decimal value AMT |
Base amount |
Value Date DATREF |
Reference date |
Value Date DATPCE |
Date of the initial document |
Variable Integer DELAI |
Lead-time |
Variable decimal TAUX |
Early discount or late charge rate |
Variable decimal AMTDEP |
Early discount and late charge amount |
Value Integer ACCNUM |
These two parameters are used to identify the open item (possibility to track the invoice back). |
Value Integer DUDLIG |
Open tables
The open tables are dependent on the calling program.
In all the call cases, GACCDUDATE (open item table) is on line.
Important notes
- - In all the call cases, the base amount is that of the open item EXCEPT for the GESPAY function (payment entry) where the amount already contains the early discount or late charge. Warning, for this call case, the amount on exiting the processing for the entry point (AMTDEP) must always contain the base amount +/- the early discount/late charge amount.
- The amount needs to be corrected but the rate and the lead-time must also be adjusted. These variable are used for new calculations or for information purposes.
- It is the sign of the rate that differentiates an early discount amount from a late charge amount.
* The late charge (+) has a positive rate.
* The early discount (-) has a negative rate.
- To calculate the early discounts/late charges, see the Early discount/late charge documentation.
COURS
The COURS entry point is used to modify the standard rate initialized on document entry (entries and invoices).
Context and operating mode
There is usually no transaction in progress.
There is usually no open log file.
Variables |
Definition |
Value Char DEVORG |
Original currency |
Value Char SITE |
Site |
Value Title TYPCUR |
Exchange rate type |
Value Date DAT |
Exchange rate date |
Variable decimal COURS |
Exchange rate |
Variable Integer SPSTAT |
Return status |
The following tables remain open:
- COMPANY [CPY] (companies)
- FACILITY [FCY] (sites)
- TABCUR [TCU] (currencies)
The other open tables are dependent on the calling programme.