<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="ga" extend="gld.FND2140.gld_accounts" extendMode="reference">
    <bm:fields/>
    <bm:operations>
        <bm:operation name="update">
            <bm:parameters>
                <bm:parameter name="account_id" dataType="java.lang.Long" required="true"/>
                <bm:parameter name="account_description" dataType="java.lang.String" required="true"/>
                <bm:parameter name="account_type" dataType="java.lang.String" required="true"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                begin
                   gld_account_pkg.update_gld_account
                   (
                   	   p_account_code    =>${@account_code},
                       p_account_id      =>${@account_id},   
                       p_description     =>${@account_description},
                       p_account_type    =>${@account_type},
                       p_enabled_flag    =>nvl(${@enabled_flag},'N'),
                       p_summary_flag    =>nvl(${@summary_flag},'N'),
                       p_created_by      =>${/session/@user_id},
                       p_last_updated_by =>${/session/@user_id},
                       p_ref_v01         =>${@ref_v01},
                       p_ref_v02         =>${@ref_v02},
                       p_ref_v03         =>${@ref_v03}
                   );
                end;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:parameters>
                <bm:parameter name="account_id" dataType="java.lang.Long" inputPath="@account_id" output="true" outputPath="@account_id"/>
                <bm:parameter name="account_set_id" dataType="java.lang.Long" required="true"/>
                <bm:parameter name="account_code" dataType="java.lang.String" required="true"/>
                <bm:parameter name="account_description" dataType="java.lang.String" required="true"/>
                <bm:parameter name="account_type" dataType="java.lang.String" required="true"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                begin
                   gld_account_pkg.insert_gld_account
                   (
                       p_account_set_id   =>${@account_set_id},
                       p_account_code	  =>${@account_code},
                       p_description	  =>${@account_description},
                       p_account_type	  =>${@account_type},
                       p_enabled_flag	  =>nvl(${@enabled_flag},'N'),
                       p_summary_flag	  =>nvl(${@summary_flag},'N'),
                       p_created_by		  =>${/session/@user_id},
                       p_last_updated_by  =>${/session/@user_id},
                       p_function_code	  =>null,
                       p_company_id       =>${/session/@company_id},
                       p_account_id 	  =>${@account_id},
                       p_ref_v01         =>${@ref_v01},
                       p_ref_v02         =>${@ref_v02},
                       p_ref_v03         =>${@ref_v03}
                   );
                end;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields><![CDATA[
    ]]></bm:query-fields>
    <bm:features/>
    <bm:ref-fields/>
</bm:model>
