<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: xuls  
    $Date: 2014-11-10 下午03:55:25  
    $Revision: 1.0  
    $Purpose: 该页面用户项目二开，覆盖dynamic里面的函数
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:view>
        <a:link id="hls_fin_calc_get_int_rate_link_id" model="hls.HLS500.get_interest_rate" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
			function getintRate(param) {
                Leaf.request({
                    url: $('hls_fin_calc_get_int_rate_link_id').getUrl(),
                    para: {
                        int_rate_type: param.int_rate_type,
                        currency: param.currency,
                        valid_date: param.valid_date,
                        month: param.month
                    },
                    sync: true,
                    success: setIntRate,
                    failure: function() {},
                    error: function() {},
                    scope: this
                });
            }
            function setIntRate(res) {
                if (new_calc_flag == 'N') {
                    int_rate_record = get_ds_record($('hls_fin_calculator_hd_ds'), $('temp_hd_attribute_ds'), 'int_rate');
                    /* if (!int_rate_record) {
                        Leaf.showMessage('${l:PROMPT}', '${l:HLS500.BASE_RATE_IS_NULL}');
                    } */
                    if (res.result.int_rate && int_rate_record) {
                        int_rate_record.set('column_value', mul(res.result.int_rate, 100));
                    }
                } else {
                    var head_record = $('hls_fin_calculator_hd_ds').getAt(0);
                    head_record.set('int_rate', mul(res.result.int_rate, 100));
                }
            }
		]]></script>
    </a:view>
</a:screen>
