<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-5-17 下午12:53:39  
    $Revision: 1.0  
    $Purpose: 
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="rsc.RSC302.rsc_fin_statement_tmplt_hds" extendMode="reference">
    <ns1:fields>
        <ns1:field name="fin_statement_templet_id"/>
        <ns1:field name="fin_statement_templet_code" displayWidth="210" forDisplay="true" forQuery="true"/>
        <ns1:field name="fin_statement_templet_name" displayWidth="210" forDisplay="true" forQuery="true"/>
        <ns1:field name="company_id"/>
        <ns1:field name="enabled_flag"/>
    </ns1:fields>
    <ns1:data-filters>
        <ns1:data-filter name="company_id" enforceOperations="query" expression="(t1.company_id=${/session/@company_id} and t1.enabled_flag=&apos;Y&apos;)"/>
    </ns1:data-filters>
    <ns1:query-fields>
        <ns1:query-field field="fin_statement_templet_code" queryOperator="like"/>
        <ns1:query-field field="fin_statement_templet_name" queryOperator="like"/>
        <ns1:query-field name="indicator_formula_flag_id" queryExpression="t1.fin_statement_templet_id!=${@indicator_formula_flag_id}"/>
        <ns1:query-field name="bp_id" queryExpression="exists (select 1 from RSC_FIN_STATEMENT_PRJ_HDS t where t.FIN_STATEMENT_TEMPLET_ID =t1.FIN_STATEMENT_TEMPLET_ID and t.bp_id =${@bp_id} )"/>
    </ns1:query-fields>
</ns1:model>
