<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-4-23 上午10:19:14  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            	select hls_fin_calculator_save_pkg.get_formula(${@calc_session_id},${@calc_line_id},${@column_name}) formula,
            	${@column_code} column_code,
            	decode(nvl(${@calc_line_id},-999),-999,(select c.prompt from hls_fin_calc_config c, hls_fin_calculator_hd h where c.column_code =${@column_code} and h.calc_session_id =${@calc_session_id} and h.price_list = c.price_list),(select hc.prompt
			  from hls_fin_calc_config   hc,
			       hls_fin_calculator_ln l,
			       hls_fin_calculator_hd h
			 where l.calc_line_id = ${@calc_line_id}
			   and l.calc_session_id = h.calc_session_id
			   and h.price_list = hc.price_list
			   and hc.column_code=${@column_code})) prompt
			    from dual
			]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="formula" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FORMULA"/>
        <bm:field name="column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_CODE"/>
        <bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT"/>
    </bm:fields>
</bm:model>
