{
  "test_id": "ORCL.P2P.AP.INV.PREPAYMENT.APPLY",
  "scenario_name": "Apply Prepayment to Invoice",
  "application": "Oracle Fusion Cloud",
  "product": "Financials",
  "module": "Accounts Payable",
  "process": "Invoice Processing",
  "business_flow": "Procure-to-Pay",
  "scenario_type": "Positive / Functional",
  "priority": "High",
  "automation_status": "SyntraFlow Ready",
  "library": "Syntra Standard",
  "canonical_url": "https://www.syntraflow.cloud/oracle-erp-testing-tool/test-library/financials/accounts-payable/invoice-processing/apply-prepayment-to-invoice/",
  "objective": {
    "intro": "Validate that an eligible, paid supplier prepayment can be correctly applied against an applicable standard invoice in Oracle Fusion Payables, and that all downstream balances and statuses update accurately.",
    "confirms": [
      "The correct prepayment is selected from the eligible list for the supplier",
      "The correct application amount is applied against the invoice",
      "The remaining invoice amount (amount due) is calculated correctly after application",
      "The prepayment available balance is updated correctly after application",
      "The prepayment application is visible on the invoice's distributions and application history",
      "A negative prepayment application distribution line is created with the correct accounting impact",
      "The prepayment status transitions appropriately (Available with reduced balance, or Fully Applied)",
      "Tax proration on the applied prepayment amount, where configured, is handled correctly",
      "The invoice validates successfully after the application is recorded"
    ],
    "scope_note": "This scenario begins after the prepayment has already been created, validated, and paid; prepayment creation and payment are covered by the sibling Create Prepayment Invoice test."
  },
  "preconditions": [
    "A standard invoice has already been created for the supplier and exists in Incomplete or Validated status",
    "An eligible, fully paid prepayment already exists for the same supplier and business unit",
    "The prepayment is of type Temporary; Permanent prepayments are excluded from application eligibility",
    "The prepayment has been validated and its associated payment has been confirmed as paid",
    "Where a settlement date is defined on the prepayment, that date has been reached",
    "The prepayment has an available (unapplied) balance greater than zero",
    "The invoice and prepayment share the same currency, or approved cross-currency application rules are configured",
    "The user has the Accounts Payable Invoice processing role with Apply Prepayment privileges",
    "The target invoice is not fully paid, cancelled, or on a hold that blocks prepayment application"
  ],
  "test_data": [
    {
      "field": "Supplier",
      "example": "Acme Industrial Supplies"
    },
    {
      "field": "Supplier Site",
      "example": "ACME-US-001"
    },
    {
      "field": "Business Unit",
      "example": "US1 Business Unit"
    },
    {
      "field": "Prepayment Invoice Number",
      "example": "PREPAY-100234"
    },
    {
      "field": "Prepayment Type",
      "example": "Temporary"
    },
    {
      "field": "Prepayment Amount",
      "example": "$10,000.00"
    },
    {
      "field": "Prepayment Available Balance",
      "example": "$10,000.00"
    },
    {
      "field": "Standard Invoice Number",
      "example": "INV-100987"
    },
    {
      "field": "Standard Invoice Amount",
      "example": "$12,500.00"
    },
    {
      "field": "Settlement Date",
      "example": "01-Aug-2026"
    },
    {
      "field": "Application Amount",
      "example": "$10,000.00"
    },
    {
      "field": "Currency",
      "example": "USD"
    }
  ],
  "business_steps": [
    {
      "step_number": 1,
      "step_name": "Open Eligible Standard Invoice",
      "action": "Search for and open the standard invoice that has an eligible paid prepayment available from the same supplier.",
      "test_data": "INV-100987",
      "expected_result": "Invoice opens in edit mode showing the header, current amount due, and line details.",
      "validation_type": "action"
    },
    {
      "step_number": 2,
      "step_name": "Initiate Prepayment Application",
      "action": "From the invoice header, select Actions and then Apply Prepayment.",
      "test_data": "",
      "expected_result": "The Apply Prepayment window opens for the invoice.",
      "validation_type": "action"
    },
    {
      "step_number": 3,
      "step_name": "Review Eligible Prepayments",
      "action": "Review the list of validated, paid, unapplied prepayments displayed for the supplier and business unit.",
      "test_data": "",
      "expected_result": "PREPAY-100234 appears in the list with its correct available balance and currency.",
      "validation_type": "action",
      "note": "Only Temporary prepayments that are paid and past any settlement date restriction appear as eligible."
    },
    {
      "step_number": 4,
      "step_name": "Select Prepayment",
      "action": "Select the specific prepayment line to apply against the invoice.",
      "test_data": "PREPAY-100234",
      "expected_result": "The prepayment is selected and its available balance is displayed for reference.",
      "validation_type": "action"
    },
    {
      "step_number": 5,
      "step_name": "Enter Application Amount",
      "action": "Enter or confirm the amount to apply, not exceeding the lesser of the prepayment's available balance or the invoice's open amount.",
      "test_data": "$10,000.00",
      "expected_result": "The application amount field accepts the entered value within the eligible range.",
      "validation_type": "action"
    },
    {
      "step_number": 6,
      "step_name": "System Eligibility Validation",
      "action": "System validates prepayment status (paid), settlement date, supplier match, currency, and available balance sufficiency.",
      "test_data": "",
      "expected_result": "All eligibility checks pass without error.",
      "validation_type": "action"
    },
    {
      "step_number": 7,
      "step_name": "Confirm Application",
      "action": "Click Apply to commit the prepayment application to the invoice.",
      "test_data": "",
      "expected_result": "A confirmation message is displayed and the Apply Prepayment window closes.",
      "validation_type": "action"
    },
    {
      "step_number": 8,
      "step_name": "Review Invoice Distributions",
      "action": "Navigate to the invoice Distributions tab.",
      "test_data": "",
      "expected_result": "A new prepayment application distribution line appears with a negative amount equal to the applied amount.",
      "validation_type": "action"
    },
    {
      "step_number": 9,
      "step_name": "Save Invoice",
      "action": "Save the invoice record.",
      "test_data": "",
      "expected_result": "The invoice saves without error and the application is persisted.",
      "validation_type": "action"
    },
    {
      "step_number": 10,
      "step_name": "Validate Invoice",
      "action": "Run the Validate action on the invoice.",
      "test_data": "",
      "expected_result": "The invoice validates successfully and the open/due amount is recalculated.",
      "validation_type": "action"
    },
    {
      "step_number": 11,
      "step_name": "Review Updated Invoice Amount Due",
      "action": "View the invoice header amount due field.",
      "test_data": "",
      "expected_result": "Amount Due reflects a reduction equal to the applied prepayment amount ($2,500.00 remaining on a $12,500.00 invoice).",
      "validation_type": "action"
    },
    {
      "step_number": 12,
      "step_name": "Review Prepayment Status and Balance",
      "action": "Open the prepayment invoice record.",
      "test_data": "PREPAY-100234",
      "expected_result": "The prepayment's available balance is reduced by the applied amount and its status updates to Fully Applied or remains Available with a reduced balance.",
      "validation_type": "action"
    },
    {
      "step_number": 13,
      "step_name": "Validate End-to-End Application Outcome",
      "action": "Cross-check the invoice and prepayment records together to confirm the full outcome of the application.",
      "test_data": "",
      "expected_result": "The correct prepayment (PREPAY-100234) was selected, the correct amount ($10,000.00) was applied, the remaining invoice balance ($2,500.00) is correct, the prepayment available balance ($0.00) is updated correctly, and the application is visible in the invoice's Prepayment Applications history.",
      "validation_type": "business_assertion"
    }
  ],
  "expected_results": [
    "The Apply Prepayment window lists only eligible, paid, unapplied prepayments for the correct supplier",
    "The selected prepayment and entered amount are accepted without validation error",
    "A negative prepayment application distribution line is created on the invoice",
    "The invoice's amount due is reduced by exactly the applied amount",
    "The prepayment's available balance is reduced by exactly the applied amount",
    "The prepayment status correctly reflects Fully Applied or partially reduced Available balance",
    "The invoice validates successfully after the application is recorded",
    "The application is visible and traceable from both the invoice and the prepayment records",
    "Accounting impact of the application is reflected correctly in subsequent distribution and accounting review",
    "No unintended change occurs to unrelated invoice lines, tax lines, or other prepayments for the supplier"
  ],
  "validation_checkpoints": [
    "Eligible prepayment list filters correctly by supplier, business unit, and currency",
    "Prepayment type is confirmed as Temporary before appearing as eligible",
    "Prepayment paid status is confirmed before appearing as eligible",
    "Settlement date restriction, if configured, is enforced before allowing application",
    "Application amount does not exceed the prepayment's available balance",
    "Application amount does not exceed the invoice's open amount",
    "Prepayment application distribution line amount matches the entered application amount exactly",
    "Invoice amount due recalculates correctly post-application",
    "Prepayment available balance recalculates correctly post-application",
    "Prepayment status field updates correctly post-application",
    "Application is recorded in the invoice's Prepayment Applications history for audit traceability",
    "Invoice validation completes without new holds introduced by the application"
  ]
}