---
title: "pk73057_billing_master.is_on_arrears_plan stored procedure documentation"
summary: "Analysis of Oracle package/procedure including business rules and operations."
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Core
reference_type: package
source_schema: "WCIS_DBA"
source_name: "pk73057_billing_master.is_on_arrears_plan"
source_type: "Package function"
oracle_status: "found"
---

# pk73057_billing_master.is_on_arrears_plan

## Overview

| Field | Value |
| --- | --- |
| **Schema** | WCIS_DBA |
| **Type** | Package function |
| **Database** | Oracle |
| **Calling libraries** | `SAIF.Business.Policy.Core` |
| **Calling classes** | `clsPolicyPeriodBase` |

## Purpose

Same join path; classifies the plan as arrears unless it generates instalments or prepayments

## Procedures / Methods

### is_on_arrears_plan

| Field | Value |
| --- | --- |
| **Returns** | See PL/SQL source below. |
| **Called by** | `clsPolicyPeriodBase` |

**Description:** Same join path; classifies the plan as arrears unless it generates instalments or prepayments

#### Parameters

| Parameter | Direction | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `in_policy_num` | IN | `NUMBER` | — | Policy number whose billing plan is being classified as arrears or not. |
| `in_policy_period_eff_date` | IN | `DATE` | — | Policy-period effective date used to locate the applicable billing-master row. |

## Business Rules

| Rule ID | Rule | Condition | Action |
| --- | --- | --- | --- |
| PROC-RULE-015 | A policy period is on an arrears plan unless its billing generates instalments or prepayments | `PAYMENT_PLAN_TYPE_CODE.generate_billing_code NOT IN ('INST','PPAY')` | Return `'Y'`; otherwise `'N'` - prepays are explicitly **not** arrears |
| PROC-RULE-016 | A period with no billing master is not on an arrears plan | `NO_DATA_FOUND` | Return `'N'` |

## Operations

| Operation | Description | Trigger |
| --- | --- | --- |
| Determine arrears billing | Same join path; classifies the plan as arrears unless it generates instalments or prepayments | `clsPolicyPeriodBase.IsOnArrearsPlan` (SQL-086) |

## Source Code

<details>
<summary>PL/SQL source</summary>

```sql
FUNCTION is_on_arrears_plan(in_policy_num               IN NUMBER
                             , in_policy_period_eff_date   IN DATE)
      RETURN VARCHAR2
   IS
      v_generate_billing_code   payment_plan_type_code.generate_billing_code%TYPE;
   BEGIN
      SELECT pptc.generate_billing_code
        INTO v_generate_billing_code
        FROM billing_master bm
           , billing_defaults bd
           , payment_plan_type_code pptc
       WHERE     bm.policy_num = in_policy_num
             AND bm.policy_period_eff_date = in_policy_period_eff_date
             AND bm.billing_default_code = bd.billing_default_code
             AND bd.payment_plan_type = pptc.code;

      IF v_generate_billing_code NOT IN ('INST', 'PPAY') THEN
         RETURN 'Y';
      ELSE
         RETURN 'N';
      END IF;
   EXCEPTION
      WHEN NO_DATA_FOUND THEN
         RETURN 'N';
      WHEN OTHERS THEN
         pk73090_error_handler.raise_an_error(
            'is_on_arrears_plan ' || in_policy_num || ',' || in_policy_period_eff_date || ',' || SQLERRM);
   END is_on_arrears_plan;

   /***********************************************************
    * PROCEDURE NAME : create_osc_billing_history
    * Create billing history for osc
    *
    * *****************************************************************
    * PROGRAMMER     ANALYST     DATE       MOD #
    *************************************************************/
```

</details>

## Related Documentation
- [Procedure catalog](index.md)
- [Business rules](../business-rules.md)
- [Operations and processes](../operations-processes.md)
- [SQL catalog](../sql/index.md)

> **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
- Oracle DBA_SOURCE: pk73057_billing_master.is_on_arrears_plan
- `Business\SAIF.Business.Policy.Core\clsPolicyPeriodBase.vb`
