<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2013-9-3 下午04:48:41  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="GLD_JE_AUTHORITY" needAccessControl="false">
    <!--  <bm:fields>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="GLD_JE_AUTHORITY.COMPANY_ID"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="DOCUMENT_TYPE" prompt="凭证类型"/>
        <bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="GLD_JE_AUTHORITY.USER_ID"/>
        <bm:field name="amount_upper_limit" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AMOUNT_UPPER_LIMIT" prompt="GLD_JE_AUTHORITY.AMOUNT_UPPER_LIMIT"/>
        <bm:field name="enterable" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENTERABLE" prompt="GLD_JE_AUTHORITY.ENTERABLE"/>
        <bm:field name="approvable" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVABLE" prompt="GLD_JE_AUTHORITY.APPROVABLE"/>
        <bm:field name="self_approval" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SELF_APPROVAL" prompt="GLD_JE_AUTHORITY.SELF_APPROVAL"/>
        <bm:field name="postable" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSTABLE" prompt="GLD_JE_AUTHORITY.POSTABLE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="company_id"/>
        <bm:pk-field name="document_type"/>
        <bm:pk-field name="user_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="document_type" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="query" expression="t1.company_id=${/session/@company_id}"/>
        <bm:data-filter name="query" expression="t1.user_id=${/session/@user_id}"/>
    </bm:data-filters> -->
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select v.document_type,v.code_auto_flag,v.document_type_desc 
				from hls_document_type_v v
				where 
				 v.document_category='GLD_JE'
				
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="code_auto_flag"/>
        <bm:field name="document_type" forDisplay="true" forQuery="true" prompt="凭证类型"/>
        <bm:field name="document_type_desc" forDisplay="true" forQuery="true" prompt="凭证描述"/>
    </bm:fields>
    <!--     <bm:query-fields>
    	<bm:query-field field="document_type" queryOperator="like"   />
    	<bm:query-field field="document_type_desc" queryOperator="like"   />
    </bm:query-fields> -->
</bm:model>
