<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                select null agent_extra_name, --代理店简称
               null null_column,
       (SELECT m.bp_name
          FROM hls_bp_master m
         WHERE m.bp_id = ct.bp_id_tenant) AS bp_tenant_name, --承租人名称
       null branch_company, --分公司
       ct.contract_number, --合同编号
       to_char(ct.lease_start_date, 'yyyy-mm-dd') lease_start_date, --租赁期开始日
       (select to_char(due_date, 'yyyy-mm-dd')
          from con_contract_cashflow
         where contract_id = ct.contract_id
           and cf_item = 8
		   and cf_status='RELEASE') residual_date, -- 合同终了
       to_char(ct.et_date, 'yyyy-mm-dd') terminate_date, --合同到期日
       (SELECT i.machine_number
          FROM con_contract_lease_item i
         WHERE i.contract_id = ct.contract_id
           AND i.equipment_type = 'MAIN') machine_number, --机号
       (SELECT ccli.modelcd
          FROM con_contract_lease_item ccli
         WHERE ccli.contract_id = ct.contract_id) modelcd, --机型

       NVL(ct.total_rental, 0) + NVL(ct.down_payment, 0) +
       NVL(ct.residual_value, 0) contract_amount, --合同金额
       ct.lease_times, --租赁期间
       ct.lease_item_amount as lease_item_amount, --设备款
       NVL(ct.down_payment, 0) down_payment, --首付款
       NVL(ct.residual_value, 0) residual_amount, --留购金


       NVL(ct.down_payment, 0)+nvl((select sum(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
             FROM csh_write_off cwo, csh_transaction cn
            WHERE nvl(cwo.reversed_flag, 'N') = 'N'
              AND cwo.contract_id = ccw.contract_id
              AND cwo.times = ccw.times
              and cwo.csh_transaction_id = cn.transaction_id
              AND cwo.cf_item = ccw.cf_item
              and trunc(cn.transaction_date) <=
                  trunc(to_date(${@before_end}, 'yyyy-mm-dd'))),
           0))
          from con_contract_cashflow ccw
         where ccw.contract_id = ct.contract_id
           and ccw.cf_status = 'RELEASE'
           and ccw.cf_direction = 'INFLOW'
           and ccw.cf_item in (1,8)
           and trunc(ccw.due_date) <=
               trunc(to_date(${@before_end}, 'yyyy-mm-dd'))) ,0)before_received_amount ,--截至上月底已收的

       (NVL(ct.total_rental, 0) + NVL(ct.residual_value, 0)-nvl( (select sum(nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
             FROM csh_write_off cwo, csh_transaction cn
            WHERE nvl(cwo.reversed_flag, 'N') = 'N'
              AND cwo.contract_id = ccw.contract_id
              AND cwo.times = ccw.times
              and cwo.csh_transaction_id = cn.transaction_id
              AND cwo.cf_item = ccw.cf_item
              and trunc(cn.transaction_date) <=
                  trunc(to_date(${@before_end}, 'yyyy-mm-dd'))),
           0))
          from con_contract_cashflow ccw
         where ccw.contract_id = ct.contract_id
           and ccw.cf_status = 'RELEASE'
           and ccw.cf_direction = 'INFLOW'
           and ccw.cf_item in (1,8)
           and trunc(ccw.due_date) <=
               trunc(to_date(${@before_end}, 'yyyy-mm-dd'))),0)) before_due_left, --上月末应收款余额

       (select ccw.times
          from con_contract_cashflow ccw
         where ccw.contract_id = ct.contract_id
           and ccw.cf_item in (1, 200, 250)
           and ccw.cf_status = 'RELEASE'
           and ccw.cf_direction = 'INFLOW'
           and trunc(ccw.due_date) <=
               trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))
           and trunc(ccw.due_date) >=
               trunc(to_date(${@cur_begin}, 'yyyy-mm-dd'))
           and rownum = 1) times, --当月期次

       (select to_char(ccw.due_date, 'yyyy-mm-dd')
          from con_contract_cashflow ccw
         where ccw.contract_id = ct.contract_id
           and ccw.cf_item in (1, 200, 250)
           and ccw.cf_status = 'RELEASE'
           and ccw.cf_direction = 'INFLOW'
           and trunc(ccw.due_date) <=
               trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))
           and trunc(ccw.due_date) >=
               trunc(to_date(${@cur_begin}, 'yyyy-mm-dd'))
           and rownum = 1) due_date, --当月应收日期

       (select sum(ccw.due_amount)
          from con_contract_cashflow ccw
         where ccw.contract_id = ct.contract_id
           and ccw.cf_item in (1)
           and ccw.cf_status = 'RELEASE'
           and ccw.cf_direction = 'INFLOW'
           and trunc(ccw.due_date) <=
               trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))
           and trunc(ccw.due_date) >=
               trunc(to_date(${@cur_begin}, 'yyyy-mm-dd'))) due_amount, --当月应收租金

       0 advance_received_amount, --截止上月末提前支付

       (select sum(ccw.due_amount - nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
             FROM csh_write_off cwo, csh_transaction cn
            WHERE nvl(cwo.reversed_flag, 'N') = 'N'
              AND cwo.contract_id = ccw.contract_id
              AND cwo.times = ccw.times
              and cwo.csh_transaction_id = cn.transaction_id
              AND cwo.cf_item = ccw.cf_item
              and trunc(cn.transaction_date) <=
                  trunc(to_date(${@before_end}, 'yyyy-mm-dd'))),
           0))
          from con_contract_cashflow ccw
         where ccw.contract_id = ct.contract_id
           and ccw.cf_status = 'RELEASE'
           and ccw.cf_direction = 'INFLOW'
           and ccw.cf_item in (1)
           and trunc(ccw.due_date) <=
               trunc(to_date(${@before_end}, 'yyyy-mm-dd'))) before_overdue_amount, --截止上月末逾期租金

       (nvl((select sum(ccw.due_amount)
              from con_contract_cashflow ccw
             where ccw.contract_id = ct.contract_id
               and ccw.cf_item in (1)
               and ccw.cf_status = 'RELEASE'
               and ccw.cf_direction = 'INFLOW'
               and trunc(ccw.due_date) <=
                   trunc(to_date(${@cur_end}, 'yyyy-mm-dd'))
               and trunc(ccw.due_date) >=
                   trunc(to_date(${@cur_begin}, 'yyyy-mm-dd'))),
            0) +
       nvl((select sum(ccw.due_amount - nvl((SELECT SUM(nvl(cwo.write_off_due_amount, 0))
             FROM csh_write_off cwo, csh_transaction cn
            WHERE nvl(cwo.reversed_flag, 'N') = 'N'
              AND cwo.contract_id = ccw.contract_id
              AND cwo.times = ccw.times
              and cwo.csh_transaction_id = cn.transaction_id
              AND cwo.cf_item = ccw.cf_item
              and trunc(cn.transaction_date) <=
                  trunc(to_date(${@before_end}, 'yyyy-mm-dd'))),
           0))
              from con_contract_cashflow ccw
             where ccw.contract_id = ct.contract_id
               and ccw.cf_status = 'RELEASE'
               and ccw.cf_direction = 'INFLOW'
               and ccw.cf_item in (1)
               and trunc(ccw.due_date) <=
                   trunc(to_date(${@before_end}, 'yyyy-mm-dd'))),
            0)) due_total, --本月合计应收

       con_contract_pkg.get_business_times(p_contract_id => ct.contract_id, p_calc_date => to_date(${@cur_end}, 'yyyy-mm-dd'), p_contract_inception_date => ct.contract_inception_date) over_due_times, --逾期期次

       (SELECT SUM(cwo.write_off_due_amount)
          FROM csh_transaction t, csh_write_off cwo
         WHERE cwo.cf_item in (1, 8, 9)
         and cwo.contract_id=ct.contract_id
           AND t.transaction_id = cwo.csh_transaction_id
           AND NVL(cwo.reversed_flag, 'N') = 'N'
           and nvl(t.reversed_flag, 'N') = 'N'
           AND TRUNC(T.transaction_date) <=
               TRUNC(to_date(${@cur_end}, 'yyyy-mm-dd'))
           AND TRUNC(T.transaction_date) >=
               TRUNC(to_date(${@cur_begin}, 'yyyy-mm-dd'))) cur_real,
       (SELECT SUM(cwo.write_off_due_amount)
          FROM csh_transaction t, csh_write_off cwo
         WHERE cwo.cf_item in (1, 8, 9)
         and cwo.contract_id=ct.contract_id
           AND t.transaction_id = cwo.csh_transaction_id
           AND NVL(cwo.reversed_flag, 'N') = 'N'
           and nvl(t.reversed_flag, 'N') = 'N'
           AND TRUNC(T.transaction_date) <=
               trunc(add_months(to_date(${@month}, 'YYYYMM'), 0)-1)
           AND TRUNC(T.transaction_date) >=
                trunc(add_months(to_date(${@month}, 'YYYYMM'), -1))) before1_real,
       (SELECT SUM(cwo.write_off_due_amount)
          FROM csh_transaction t, csh_write_off cwo
         WHERE cwo.cf_item in (1, 8, 9)
         and cwo.contract_id=ct.contract_id
           AND t.transaction_id = cwo.csh_transaction_id
           AND NVL(cwo.reversed_flag, 'N') = 'N'
           and nvl(t.reversed_flag, 'N') = 'N'
          AND TRUNC(T.transaction_date) <=
               trunc(add_months(to_date(${@month}, 'YYYYMM'), -1)-1)
           AND TRUNC(T.transaction_date) >=
                trunc(add_months(to_date(${@month}, 'YYYYMM'), -2))) before2_real,
       (SELECT SUM(cwo.write_off_due_amount)
          FROM csh_transaction t, csh_write_off cwo
         WHERE cwo.cf_item in (1, 8, 9)
         and cwo.contract_id=ct.contract_id
           AND t.transaction_id = cwo.csh_transaction_id
           AND NVL(cwo.reversed_flag, 'N') = 'N'
           and nvl(t.reversed_flag, 'N') = 'N'
           AND TRUNC(T.transaction_date) <=
               trunc(add_months(to_date(${@month}, 'YYYYMM'), -2)-1)
           AND TRUNC(T.transaction_date) >=
                trunc(add_months(to_date(${@month}, 'YYYYMM'), -3))) before3_real,
       (SELECT SUM(cwo.write_off_due_amount)
          FROM csh_transaction t, csh_write_off cwo
         WHERE cwo.cf_item in (1, 8, 9)
         and cwo.contract_id=ct.contract_id
           AND t.transaction_id = cwo.csh_transaction_id
           AND NVL(cwo.reversed_flag, 'N') = 'N'
           and nvl(t.reversed_flag, 'N') = 'N'
           AND TRUNC(T.transaction_date) <=
               trunc(add_months(to_date(${@month}, 'YYYYMM'), -3)-1)
           AND TRUNC(T.transaction_date) >=
                trunc(add_months(to_date(${@month}, 'YYYYMM'), -4))) before4_real,
       (SELECT SUM(cwo.write_off_due_amount)
          FROM csh_transaction t, csh_write_off cwo
         WHERE cwo.cf_item in (1, 8, 9)
         and cwo.contract_id=ct.contract_id
           AND t.transaction_id = cwo.csh_transaction_id
           AND NVL(cwo.reversed_flag, 'N') = 'N'
           and nvl(t.reversed_flag, 'N') = 'N'
          AND TRUNC(T.transaction_date) <=
               trunc(add_months(to_date(${@month}, 'YYYYMM'), -4)-1)
           AND TRUNC(T.transaction_date) >=
                trunc(add_months(to_date(${@month}, 'YYYYMM'), -5))) before5_real

  from con_contract ct
 where ct.contract_status = 'INCEPT'
 and ct.data_class='NORMAL'
   and con_contract_pkg.get_business_times(p_contract_id => ct.contract_id,
                                                p_calc_date   => to_date(${@cur_end},
                                                                         'yyyy-mm-dd'),
                                                p_contract_inception_date        => ct.contract_inception_date) >= 3
 order by ct.bp_id_agent_level1
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <!--   <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="RPT5010_DAY_REPORT.RECORD_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="RPT5010_DAY_REPORT.CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="RPT5010_DAY_REPORT.CONTRACT_NUMBER"/>
        <bm:field name="tenant_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TENANT_NAME" prompt="RPT5010_DAY_REPORT.TENANT"/>
        <bm:field name="amount_1" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_1" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_1"/>
        <bm:field name="principal_1" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_1" prompt="RPT5010_DAY_REPORT.PRINCIPAL_1"/>
        <bm:field name="interest_1" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_1" prompt="RPT5010_DAY_REPORT.INTEREST_1"/>
        <bm:field name="amount_2" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_2" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_2"/>
        <bm:field name="principal_2" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_2" prompt="RPT5010_DAY_REPORT.PRINCIPAL_2"/>
        <bm:field name="interest_2" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_2" prompt="RPT5010_DAY_REPORT.INTEREST_2"/>
        <bm:field name="amount_3" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_3" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_3"/>
        <bm:field name="principal_3" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_3" prompt="RPT5010_DAY_REPORT.PRINCIPAL_3"/>
        <bm:field name="interest_3" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_3" prompt="RPT5010_DAY_REPORT.INTEREST_3"/>
        <bm:field name="amount_4" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_4" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_4"/>
        <bm:field name="principal_4" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_4" prompt="RPT5010_DAY_REPORT.PRINCIPAL_4"/>
        <bm:field name="interest_4" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_4" prompt="RPT5010_DAY_REPORT.INTEREST_4"/>
        <bm:field name="amount_5" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_5" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_5"/>
        <bm:field name="principal_5" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_5" prompt="RPT5010_DAY_REPORT.PRINCIPAL_5"/>
        <bm:field name="interest_5" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_5" prompt="RPT5010_DAY_REPORT.INTEREST_5"/>
        <bm:field name="amount_6" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_6" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_6"/>
        <bm:field name="principal_6" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_6" prompt="RPT5010_DAY_REPORT.PRINCIPAL_6"/>
        <bm:field name="interest_6" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_6" prompt="RPT5010_DAY_REPORT.INTEREST_6"/>
        <bm:field name="amount_7" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_7" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_7"/>
        <bm:field name="principal_7" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_7" prompt="RPT5010_DAY_REPORT.PRINCIPAL_7"/>
        <bm:field name="interest_7" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_7" prompt="RPT5010_DAY_REPORT.INTEREST_7"/>
        <bm:field name="amount_8" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_8" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_8"/>
        <bm:field name="principal_8" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_8" prompt="RPT5010_DAY_REPORT.PRINCIPAL_8"/>
        <bm:field name="interest_8" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_8" prompt="RPT5010_DAY_REPORT.INTEREST_8"/>
        <bm:field name="amount_9" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_9" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_9"/>
        <bm:field name="principal_9" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_9" prompt="RPT5010_DAY_REPORT.PRINCIPAL_9"/>
        <bm:field name="interest_9" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_9" prompt="RPT5010_DAY_REPORT.INTEREST_9"/>
        <bm:field name="amount_10" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_10" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_10"/>
        <bm:field name="principal_10" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_10" prompt="RPT5010_DAY_REPORT.PRINCIPAL_10"/>
        <bm:field name="interest_10" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_10" prompt="RPT5010_DAY_REPORT.INTEREST_10"/>
        <bm:field name="amount_11" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_11" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_11"/>
        <bm:field name="principal_11" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_11" prompt="RPT5010_DAY_REPORT.PRINCIPAL_11"/>
        <bm:field name="interest_11" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_11" prompt="RPT5010_DAY_REPORT.INTEREST_11"/>
        <bm:field name="amount_12" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_12" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_12"/>
        <bm:field name="principal_12" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_12" prompt="RPT5010_DAY_REPORT.PRINCIPAL_12"/>
        <bm:field name="interest_12" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_12" prompt="RPT5010_DAY_REPORT.INTEREST_12"/>
        <bm:field name="amount_13" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_13" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_13"/>
        <bm:field name="principal_13" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_13" prompt="RPT5010_DAY_REPORT.PRINCIPAL_13"/>
        <bm:field name="interest_13" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_13" prompt="RPT5010_DAY_REPORT.INTEREST_13"/>
        <bm:field name="amount_14" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_14" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_14"/>
        <bm:field name="principal_14" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_14" prompt="RPT5010_DAY_REPORT.PRINCIPAL_14"/>
        <bm:field name="interest_14" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_14" prompt="RPT5010_DAY_REPORT.INTEREST_14"/>
        <bm:field name="amount_15" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_15" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_15"/>
        <bm:field name="principal_15" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_15" prompt="RPT5010_DAY_REPORT.PRINCIPAL_15"/>
        <bm:field name="interest_15" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_15" prompt="RPT5010_DAY_REPORT.INTEREST_15"/>
        <bm:field name="amount_16" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_16" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_16"/>
        <bm:field name="principal_16" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_16" prompt="RPT5010_DAY_REPORT.PRINCIPAL_16"/>
        <bm:field name="interest_16" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_16" prompt="RPT5010_DAY_REPORT.INTEREST_16"/>
        <bm:field name="amount_17" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_17" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_17"/>
        <bm:field name="principal_17" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_17" prompt="RPT5010_DAY_REPORT.PRINCIPAL_17"/>
        <bm:field name="interest_17" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_17" prompt="RPT5010_DAY_REPORT.INTEREST_17"/>
        <bm:field name="amount_18" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_18" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_18"/>
        <bm:field name="principal_18" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_18" prompt="RPT5010_DAY_REPORT.PRINCIPAL_18"/>
        <bm:field name="interest_18" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_18" prompt="RPT5010_DAY_REPORT.INTEREST_18"/>
        <bm:field name="amount_19" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_19" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_19"/>
        <bm:field name="principal_19" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_19" prompt="RPT5010_DAY_REPORT.PRINCIPAL_19"/>
        <bm:field name="interest_19" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_19" prompt="RPT5010_DAY_REPORT.INTEREST_19"/>
        <bm:field name="amount_20" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_20" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_20"/>
        <bm:field name="principal_20" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_20" prompt="RPT5010_DAY_REPORT.PRINCIPAL_20"/>
        <bm:field name="interest_20" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_20" prompt="RPT5010_DAY_REPORT.INTEREST_20"/>
        <bm:field name="amount_21" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_21" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_21"/>
        <bm:field name="principal_21" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_21" prompt="RPT5010_DAY_REPORT.PRINCIPAL_21"/>
        <bm:field name="interest_21" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_21" prompt="RPT5010_DAY_REPORT.INTEREST_21"/>
        <bm:field name="amount_22" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_22" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_22"/>
        <bm:field name="principal_22" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_22" prompt="RPT5010_DAY_REPORT.PRINCIPAL_22"/>
        <bm:field name="interest_22" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_22" prompt="RPT5010_DAY_REPORT.INTEREST_22"/>
        <bm:field name="amount_23" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_23" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_23"/>
        <bm:field name="principal_23" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_23" prompt="RPT5010_DAY_REPORT.PRINCIPAL_23"/>
        <bm:field name="interest_23" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_23" prompt="RPT5010_DAY_REPORT.INTEREST_23"/>
        <bm:field name="amount_24" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_24" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_24"/>
        <bm:field name="principal_24" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_24" prompt="RPT5010_DAY_REPORT.PRINCIPAL_24"/>
        <bm:field name="interest_24" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_24" prompt="RPT5010_DAY_REPORT.INTEREST_24"/>
        <bm:field name="amount_25" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_25" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_25"/>
        <bm:field name="principal_25" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_25" prompt="RPT5010_DAY_REPORT.PRINCIPAL_25"/>
        <bm:field name="interest_25" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_25" prompt="RPT5010_DAY_REPORT.INTEREST_25"/>
        <bm:field name="amount_26" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_26" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_26"/>
        <bm:field name="principal_26" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_26" prompt="RPT5010_DAY_REPORT.PRINCIPAL_26"/>
        <bm:field name="interest_26" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_26" prompt="RPT5010_DAY_REPORT.INTEREST_26"/>
        <bm:field name="amount_27" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_27" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_27"/>
        <bm:field name="principal_27" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_27" prompt="RPT5010_DAY_REPORT.PRINCIPAL_27"/>
        <bm:field name="interest_27" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_27" prompt="RPT5010_DAY_REPORT.INTEREST_27"/>
        <bm:field name="amount_28" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_28" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_28"/>
        <bm:field name="principal_28" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_28" prompt="RPT5010_DAY_REPORT.PRINCIPAL_28"/>
        <bm:field name="interest_28" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_28" prompt="RPT5010_DAY_REPORT.INTEREST_28"/>
        <bm:field name="amount_29" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_29" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_29"/>
        <bm:field name="principal_29" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_29" prompt="RPT5010_DAY_REPORT.PRINCIPAL_29"/>
        <bm:field name="interest_29" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_29" prompt="RPT5010_DAY_REPORT.INTEREST_29"/>
        <bm:field name="amount_30" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_30" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_30"/>
        <bm:field name="principal_30" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_30" prompt="RPT5010_DAY_REPORT.PRINCIPAL_30"/>
        <bm:field name="interest_30" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_30" prompt="RPT5010_DAY_REPORT.INTEREST_30"/>
        <bm:field name="amount_31" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT_31" prompt="RPT5010_DAY_REPORT.ATTRIBUTE_31"/>
        <bm:field name="principal_31" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL_31" prompt="RPT5010_DAY_REPORT.PRINCIPAL_31"/>
        <bm:field name="interest_31" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST_31" prompt="RPT5010_DAY_REPORT.INTEREST_31"/>
        </bm:fields> -->
    <bm:data-filters><![CDATA[
    ]]></bm:data-filters>
</bm:model>