<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SDIC_FIN_PLAN_RPT_MONTH_LN" defaultOrderBy="ln_id">
    <bm:fields>
        <bm:field name="ln_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LN_ID" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.LN_ID"/>
        <bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.HD_ID"/>
        <bm:field name="item_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_CODE" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.ITEM_CODE"/>
        <bm:field name="item_description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_DESCRIPTION" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.ITEM_DESCRIPTION"/>
        <bm:field name="last_month_actual_data" databaseType="NUMBER" datatype="java.lang.Double" physicalName="LAST_MONTH_ACTUAL_DATA" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.LAST_MONTH_ACTUAL_DATA"/>
        <bm:field name="last_month_plan_data" databaseType="NUMBER" datatype="java.lang.Double" physicalName="LAST_MONTH_PLAN_DATA" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.LAST_MONTH_PLAN_DATA"/>
        <bm:field name="current_month_plan_data" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CURRENT_MONTH_PLAN_DATA" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.CURRENT_MONTH_PLAN_DATA"/>
        <bm:field name="order_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ORDER_SEQ" prompt="SDIC_FIN_PLAN_RPT_MONTH_LN.ORDER_SEQ"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="ln_id"/>
    </bm:primary-key>
    <bm:operations>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
                BEGIN
                    sdic_fin_plan_rpt_pkg.sdic_fin_plan_month_ln_ins(p_hd_id =>${@hd_id}, 
                                                                     p_user_id =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.hd_id=${@hd_id}"/>
    </bm:data-filters>
</bm:model>
