<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2013-11-29 下午04:07:06  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_PAYMENT_REQ_HD">
    <bm:fields>
        <bm:field name="payment_req_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PAYMENT_REQ_ID" prompt="CSH_PAYMENT_REQ_HD.PAYMENT_REQ_ID"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CSH_PAYMENT_REQ_HD.COMPANY_ID"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="CSH_PAYMENT_REQ_HD.DOCUMENT_TYPE"/>
        <bm:field name="payment_req_number" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="PAYMENT_REQ_NUMBER" prompt="AUT103.PAYMENT_REQ_NUMBER"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="CSH_PAYMENT_REQ_HD.BP_ID"/>
        <bm:field name="bp_name" expression="(select m.bp_name from hls_bp_master m where m.bp_id=t1.bp_id)" forDisplay="true" forQuery="true" prompt="HLS.BP_NAME"/>
        <bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="CSH_PAYMENT_REQ_HD.BP_CATEGORY"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="payment_req_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="payment_req_number" queryOperator="like"/>
        <bm:query-field name="bp_name" queryExpression="t1.bp in (select m.bp_id from hls_bp_master m where m.bp_name like ${@bp_name})"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="company_id=${/session/@company_id}"/>
    </bm:data-filters>
</bm:model>
