---
title: "SQL-052: PK80010_LEGAL_COLLECTIONS.APPLYPAYMENTS (unused, no caller)"
summary: Update operation for Collections.hbm.xml (no caller)
status: draft
owner: SAIF.Core documentation team
last_reviewed: 2026-09-24
library: SAIF.Data.NHibernate
reference_type: package
---


# SQL-052: PK80010_LEGAL_COLLECTIONS.APPLYPAYMENTS (unused, no caller)

This statement is a update operation invoked through StoredProc (named query Collections_ApplyPayments) — unused. Legacy definition retained in source but not called by any repository method; see the possibly-dead-code note in the analysis findings.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-052 |
| **Operation type** | Update |
| **Execution method** | StoredProc (named query `Collections_ApplyPayments`) — unused |
| **Database** | Oracle |
| **Schema** | WCIS_DBA* (package owner; unqualified inside package) |
| **Command type** | StoredProcedure |
| **Business object** | `Collections.hbm.xml (no caller)` |
| **Criteria property** | N/A — no IBusinessCriteria |
| **Lifecycle method** | `(none — ApplyPayments uses inline SQL)` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:inSeqNum` | Input | NUMBER | N/A | Case id (0 = all cases) |
| `:pmt_date` | Input | DATE | N/A | Payment date (unused by the procedure) |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [LEGAL_COLLECTION_TRANSACTION](../database-tables.md#legal_collection_transaction) | R/U | See Sample SQL |
| [LEGAL_COLLECTION_TRAN_CODE](../database-tables.md#legal_collection_tran_code) | Write | See Sample SQL |
| [LC_TRAN_CATEGORY_CODE](../database-tables.md#lc_tran_category_code) | Write | See Sample SQL |
| [LEGAL_COLLECTION_PAYMENT_REF](../database-tables.md#legal_collection_payment_ref) | C | See Sample SQL |

## Sample SQL

Source: `Data/SAIF.Data.NHibernate/Mappings/Collections/Collections.hbm.xml:39`

```sql
{ call PK80010_LEGAL_COLLECTIONS.APPLYPAYMENTS(:inSeqNum, :pmt_date) }
```

## Operations and processes

- [Collections payment application](../operations/collections-payment-application.md)

## Business rules

- [SDN-BR-010](../business-rules.md#sdn-br-010-collection-case-payments-are-applied-by-the-oracle-package-applypayments-for-the-case-and-payment-date)
- [PROC-RULE-025](../business-rules.md#proc-rule-025-only-unapplied-payments-are-applied)
- [PROC-RULE-028](../business-rules.md#proc-rule-028-the-payment-keeps-the-unapplied-remainder)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- `Data/SAIF.Data.NHibernate/Mappings/Collections/Collections.hbm.xml:39`
