Search Results get_discount
Overview
ARP_DISCOUNTS_API is a PL/SQL package in the Oracle Receivables (AR) module of Oracle E-Business Suite, delivered under the APPS schema. Its purpose is to calculate early payment discounts and the resulting remaining balances for invoices and receipts during the application process. The package encapsulates the business rules that determine how much discount a customer has earned when a payment is applied against an invoice, based on payment terms, grace days, and customer profile settings. As a public API, it exposes callable procedures so that Oracle Receivables forms, concurrent processes, and external or custom code can reuse the same discount logic rather than reimplementing it.
Key Procedures and Functions
- GET_DISCOUNT — The core procedure. It calculates the discount allowed on a payment and derives the remaining amount on the invoice after the applied amount and any earned discount are accounted for. It considers the payment schedule identifier, the application date, the amount being applied, and a grace-day flag that determines whether configured grace days are honored during the calculation. It returns the discount available and the remaining amounts. Its behavior is influenced by customer profile options and payment term definitions. This is the procedure users most commonly target when they search for get_discount.
- GET_MAX_DISCOUNT — Returns the maximum discount that could be earned for a given invoice or payment schedule, typically used to present the best available discount available to a user before application.
- GET_AVAILABLE_DISC_ON_INV — Reports the discount currently available on a specific invoice, supporting lookups and validation prior to applying receipts.
These three documented procedures share the package's internal discount-calculation logic and profile-driven configuration.
Tables Accessed
- AR_PAYMENT_SCHEDULES — Supplies the payment schedule record for the invoice or receipt, including amounts, terms, and related identifiers used in the discount computation.
- HZ_CUSTOMER_PROFILES — Provides customer and site-level profile settings, including grace day and cash application behavior flags used when site-level values are absent.
- RA_CUST_TRX_TYPES — Identifies the transaction type attributes relevant to the transaction being evaluated.
- RA_TERMS — Supplies payment term definitions that govern discount percentages, discount periods, and due dates.
Usage Notes
ARP_DISCOUNTS_API is an API-classified package intended for programmatic invocation rather than direct end-user interaction. It is referenced by three other packages within Oracle Receivables and is typically invoked from receipt application forms, the AutoCash and cash application workflows, and concurrent programs that post or distribute payments. Because the discount calculation depends on customer profile and term configuration, callers must pass a valid payment schedule identifier and an appropriate application date. The grace-days flag allows callers to control whether grace periods are applied. Custom extensions should call the documented procedures rather than query underlying tables directly, ensuring consistency with Oracle's shipped discount logic across EBS 12.1.1 and 12.2.2.
-
PACKAGE BODY: APPS.ARP_DISCOUNTS_API
12.2.2
-
PACKAGE BODY: APPS.ARP_DISCOUNTS_API
12.1.1
-
PACKAGE: APPS.ARP_DISCOUNTS_API
12.1.1
-
PACKAGE: APPS.ARP_DISCOUNTS_API
12.2.2
-
APPS.ARP_DISCOUNTS_API SQL Statements
12.1.1
-
PACKAGE BODY: APPS.OE_DEFAULT_CONTRACT
12.1.1
-
APPS.ARP_DISCOUNTS_API SQL Statements
12.2.2
-
PACKAGE BODY: APPS.OE_DEFAULT_CONTRACT
12.2.2
-
PACKAGE: APPS.OKS_ENT_UTIL_PVT
12.1.1
-
PACKAGE: APPS.OKS_ENT_UTIL_PVT
12.2.2
-
PACKAGE BODY: APPS.OE_OE_TOTALS_SUMMARY
12.2.2
-
PACKAGE BODY: APPS.OE_OE_TOTALS_SUMMARY
12.1.1
-
PACKAGE: APPS.PAY_GB_NICAR_06042002
12.1.1
-
PACKAGE: APPS.PAY_GB_NICAR_06042002
12.2.2
-
PACKAGE: APPS.OE_OE_TOTALS_SUMMARY
12.2.2
-
PACKAGE: APPS.OE_OE_TOTALS_SUMMARY
12.1.1
-
PACKAGE BODY: APPS.PAY_GB_NICAR_06042002
12.2.2
-
PACKAGE BODY: APPS.PAY_GB_NICAR_06042002
12.1.1
-
PACKAGE BODY: APPS.OKS_ENT_UTIL_PVT
12.2.2
-
PACKAGE BODY: APPS.OKS_ENT_UTIL_PVT
12.1.1
-
APPS.ARP_DISCOUNTS_API dependencies on STANDARD
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_STANDARD
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_STANDARD
12.1.1
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_DISCOUNTS_API
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on STANDARD
12.1.1
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_UTIL
12.2.2
-
APPS.OE_OE_TOTALS_SUMMARY dependencies on OE_MSG_PUB
12.1.1
-
APPS.OE_OE_TOTALS_SUMMARY dependencies on OE_MSG_PUB
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_DISCOUNTS_API
12.1.1
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_UTIL
12.1.1
-
APPS.PAY_GB_NICAR_06042002 dependencies on FF_GLOBALS_F
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on AR_PAYMENT_SCHEDULES
12.1.1
-
APPS.PAY_GB_NICAR_06042002 dependencies on FF_GLOBALS_F
12.1.1
-
APPS.ARP_DISCOUNTS_API dependencies on FND_PROFILE
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on FND_PROFILE
12.1.1
-
APPS.OE_DEFAULT_CONTRACT dependencies on OE_VALIDATE_ATTR
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on AR_PAYMENT_SCHEDULES
12.2.2
-
APPS.PAY_GB_NICAR_06042002 dependencies on PAY_GB_NICAR_06042002
12.1.1
-
APPS.PAY_GB_NICAR_06042002 dependencies on PAY_GB_NICAR_06042002
12.2.2
-
APPS.OE_DEFAULT_CONTRACT dependencies on OE_VALIDATE_ATTR
12.1.1
-
APPS.OE_OE_TOTALS_SUMMARY dependencies on OE_DEBUG_PUB
12.1.1
-
APPS.ARP_DISCOUNTS_API dependencies on AR_PAYMENT_SCHEDULES
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on AR_PAYMENT_SCHEDULES
12.1.1
-
APPS.OE_DEFAULT_CONTRACT dependencies on OE_DEBUG_PUB
12.1.1
-
APPS.OE_OE_TOTALS_SUMMARY dependencies on OE_DEBUG_PUB
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_CALCULATE_DISCOUNT
12.2.2
-
APPS.ARP_DISCOUNTS_API dependencies on ARP_CALCULATE_DISCOUNT
12.1.1
-
APPS.OE_DEFAULT_CONTRACT dependencies on OE_DEBUG_PUB
12.2.2
-
APPS.OE_DEFAULT_CONTRACT dependencies on OE_DEFAULT_CONTRACT
12.1.1
-
APPS.OE_DEFAULT_CONTRACT dependencies on OE_DEFAULT_CONTRACT
12.2.2