Search Results ra_terms_lines_discounts




Overview

The RA_TERMS_LINES_DISCOUNTS table is a core data structure within the Oracle E-Business Suite Receivables (AR) module, specifically for versions 12.1.1 and 12.2.2. It serves as the primary repository for storing discount rules associated with payment terms. When a payment term is defined in the system, this table holds the detailed conditions under which a customer may take an early payment discount, including the discount percentage and the number of days from the invoice date within which the discount is valid. Its role is critical for automating the calculation of available discounts on transactions, directly impacting cash flow management and customer settlement behavior.

Key Information Stored

The table's primary purpose is to define the discount component of a payment term schedule. While the full column list is not detailed in the provided metadata, the structure is logically inferred from its purpose and key relationships. The primary key, TERMS_LINES_DISCOUNT_ID, uniquely identifies each discount rule. The foreign key column, TERM_ID, links the discount line to its parent payment term definition in the RA_TERMS_B table. Essential data columns typically include DISCOUNT_PERCENT (the offered discount rate), DISCOUNT_DAYS (the period from the invoice date eligible for the discount), and a SEQUENCE_NUM to order multiple discount lines. It also stores creation and last update dates, along with corresponding user IDs for auditing.

Common Use Cases and Queries

This table is central to any process involving payment term analysis or discount validation. A common reporting use case is to list all payment terms that offer a discount and their specific conditions. For system support, queries often join to RA_TERMS_B and its descriptive RA_TERMS_TL table to troubleshoot why a specific discount was not applied to a transaction. A typical SQL pattern retrieves the discount rules for a given term name:

  • SELECT rtlb.name TERM_NAME, rtld.discount_percent, rtld.discount_days
  • FROM ra_terms_lines_discounts rtld,
  • ra_terms_b rtb,
  • ra_terms_tl rtlb
  • WHERE rtld.term_id = rtb.term_id
  • AND rtb.term_id = rtlb.term_id
  • AND rtlb.name = '&TERM_NAME'
  • AND rtlb.language = USERENV('LANG');

This data is also vital for month-end closing procedures to validate outstanding discount liabilities.

Related Objects

The RA_TERMS_LINES_DISCOUNTS table has a direct and essential relationship within the Payment Terms data model, as documented by the provided foreign key metadata.

  • RA_TERMS_B: This is the primary parent table. The foreign key RA_TERMS_LINES_DISCOUNTS.TERM_ID references RA_TERMS_B.TERM_ID. Every discount line must be associated with a valid payment term header defined in this base table.
  • RA_TERMS_TL: While not a direct foreign key relationship, this is the translated descriptions table for RA_TERMS_B. For any user-facing report or query, a join from RA_TERMS_LINES_DISCOUNTS to RA_TERMS_B and then to RA_TERMS_TL (on TERM_ID and LANGUAGE) is standard to retrieve the term name.
  • RA_TERMS_LINES: In a complete terms structure, payment terms consist of both due date lines (stored in RA_TERMS_LINES) and discount lines (stored in RA_TERMS_LINES_DISCOUNTS). These child tables are siblings, both linked to the RA_TERMS_B parent.