<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangyi2652 $
    $Date: 2010/11/02 01:48:06 $
    $Revision: 1.1 $
    $Purpose:“帐套级汇率定义”中用于保存的bm文件
-->
<model xmlns="http://www.leaf-framework.org/schema/bm" xmlns:ns2="leaf.database.local.oracle">
    <operations>        
        <operation name="insert">
            <update-sql>
                begin
                  gld_exchange_rate_pkg.insert_gld_books_exchange_rate(${@currency_code},
                                                                       ${@to_currency},
                                                                       ${@type_code},
                                                                       ${@exchange_rate_quotation},
                                                                       ${/session/@company_id},
                                                                       ${@currency_volume},
                                                                       ${@conversion_rate},
                                                                       to_date(${@conversion_date},'yyyy-mm-dd'),
                                                                       ${@period_name},
                                                                       ${@period_num},
                                                                       ${/session/@user_id},
                                                                       ${/session/@user_id});
                
                end;
            </update-sql>
        </operation>
        
        <operation name="update">
            <update-sql>
                begin
                  gld_exchange_rate_pkg.update_gld_exchange_rate(${@exchange_rate_id},
                                                                 ${@currency_code},
                                                                 ${@to_currency},
                                                                 ${@type_code},
                                                                 ${@exchange_rate_quotation},
                                                                 ${/session/@company_id},
                                                                 ${@currency_volume},
                                                                 ${@conversion_rate},
                                                                 to_date(${@conversion_date},'yyyy-mm-dd'),
                                                                 ${@period_name},
                                                                 ${@period_num},
                                                                 ${/session/@user_id},
                                                                 ${/session/@user_id});
                
                end;
            </update-sql>
        </operation>
        
        <operation name="delete">
            <update-sql>
                begin
                  gld_exchange_rate_pkg.delete_gld_books_exchange_rate(${@exchange_rate_id});
                
                end;
            </update-sql>
        </operation>
    </operations>
</model>