Skip to content

pk73057_billing_master.bm_report_schedule_flag_yn

Overview

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

Purpose

Walks billing master → billing defaults → payment-plan type to read the payroll-report-schedule flag

Procedures / Methods

bm_report_schedule_flag_yn

Field Value
Returns See PL/SQL source below.
Called by clsPolicyPeriodBase

Description: Walks billing master → billing defaults → payment-plan type to read the payroll-report-schedule flag

Parameters

Parameter Direction Type Default Description
in_policy_num IN NUMBER — Policy number whose billing-default payment-plan flag is being checked.
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-012 The payroll-report-schedule flag comes from the payment-plan type behind the period's billing default Join BILLING_MASTER → BILLING_DEFAULTS (billing_default_code) → PAYMENT_PLAN_TYPE_CODE (payment_plan_type = code) for the policy + period effective date Return PAYMENT_PLAN_TYPE_CODE.payroll_report_schedule_flag
PROC-RULE-013 A period with no billing master is not on a payroll report schedule NO_DATA_FOUND Return 'N'
PROC-RULE-014 Unexpected failures are raised, not defaulted WHEN OTHERS raise_application_error(-20012, …) including policy number and period effective date

Operations

Operation Description Trigger
Determine payroll-report-schedule billing Walks billing master → billing defaults → payment-plan type to read the payroll-report-schedule flag clsPolicyPeriodBase.IsPayrollReportSchedule (SQL-087)

Source Code

PL/SQL source
FUNCTION bm_report_schedule_flag_yn(in_policy_num               IN NUMBER
                                     , in_policy_period_eff_date   IN DATE)
      RETURN VARCHAR2
   IS
      v_return_val   VARCHAR2(1);
   BEGIN
      SELECT pptc.payroll_report_schedule_flag
        INTO v_return_val
        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;

      RETURN v_return_val;
   EXCEPTION
      WHEN NO_DATA_FOUND THEN
         RETURN 'N';
      WHEN OTHERS THEN
         raise_application_error(
            -20012
          ,    'Error in pk73057.bm_report_schedule_flag_yn '
            || in_policy_num
            || ' '
            || in_policy_period_eff_date
            || ' '
            || SQLERRM);
   END bm_report_schedule_flag_yn;


   /***********************************************************
    * PROCEDURE NAME : is_on_arrears_plan
    * Determine if the policy period has an arrears plan. prepays are not
    *           considered arrears for this function.
    *
    * *****************************************************************
    * PROGRAMMER     ANALYST     DATE       MOD #
    *************************************************************/

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.bm_report_schedule_flag_yn
  • Business\SAIF.Business.Policy.Core\clsPolicyPeriodBase.vb