<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ZLF  
    $Date: 2014-12-31 下午12:11:46  
    $Revision: 1.0  
    $Purpose: 
-->
<ns1:model xmlns:s="leaf.plugin.script" xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="cont.CON500.con_contract_v" extendMode="reference">
    <ns1:fields>
        <ns1:field name="contract_id" forInsert="true"/>
        <ns1:field name="contract_number" displayWidth="200" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NUMBER"/>
        <ns1:field name="contract_name" displayWidth="250" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NAME"/>
        <ns1:field name="bp_id_tenant"/>
    </ns1:fields>
    <ns1:query-fields>
        <ns1:query-field field="contract_number" queryOperator="like"/>
        <ns1:query-field field="contract_name" queryOperator="like"/>
    </ns1:query-fields>
    <ns1:data-filters>
        <ns1:data-filter name="query" expression="exists (select *　from con_contract_cashflow cc where cc.contract_id=t1.contract_id and cc.billing_status !=&apos;NOT&apos; and cc.cf_direction=&apos;OUTFLOW&apos; )"/>
    </ns1:data-filters>
    <ns1:features>
        <s:bm-script><![CDATA[
            var cx = Packages.leaf.javascript.Context.getCurrentContext();
            Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
        ]]></s:bm-script>
    </ns1:features>
</ns1:model>
