<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-8-29 下午6:55:50  
    $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" physicalName="PAYMENT_REQ_NUMBER" prompt="CSH_PAYMENT_REQ_HD.PAYMENT_REQ_NUMBER"/>
        <bm:field name="req_date" databaseType="DATE" datatype="java.util.Date" physicalName="REQ_DATE" prompt="CSH_PAYMENT_REQ_HD.REQ_DATE"/>
        <bm:field name="apply_pay_date" databaseType="DATE" datatype="java.util.Date" physicalName="APPLY_PAY_DATE" prompt="CSH_PAYMENT_REQ_HD.APPLY_PAY_DATE"/>
        <bm:field name="transaction_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_CATEGORY" prompt="CSH_PAYMENT_REQ_HD.TRANSACTION_CATEGORY"/>
        <bm:field name="distribution_set_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISTRIBUTION_SET_ID" prompt="CSH_PAYMENT_REQ_HD.DISTRIBUTION_SET_ID"/>
        <bm:field name="payment_method_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PAYMENT_METHOD_ID" prompt="CSH_PAYMENT_REQ_HD.PAYMENT_METHOD_ID"/>
        <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_code" expression="(select m.bp_code from hls_bp_master m where m.bp_id = t1.bp_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="bp_name" expression="(select m.bp_name from hls_bp_master m where m.bp_id = t1.bp_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="CSH_PAYMENT_REQ_HD.BP_CATEGORY"/>
        <bm:field name="amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AMOUNT" prompt="CSH_PAYMENT_REQ_HD.AMOUNT"/>
        <bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="CSH_PAYMENT_REQ_HD.CURRENCY_CODE"/>
        <bm:field name="currency_name" expression="(select g.currency_name from gld_currency_v g where g.currency_code = t1.currency_code)" forInsert="false" forUpdate="false"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CSH_PAYMENT_REQ_HD.DESCRIPTION"/>
        <bm:field name="submitted_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUBMITTED_FLAG" prompt="CSH_PAYMENT_REQ_HD.SUBMITTED_FLAG"/>
        <bm:field name="printed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRINTED_FLAG" prompt="CSH_PAYMENT_REQ_HD.PRINTED_FLAG"/>
        <bm:field name="printed_times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRINTED_TIMES" prompt="CSH_PAYMENT_REQ_HD.PRINTED_TIMES"/>
        <bm:field name="last_print_date" databaseType="DATE" datatype="java.util.Date" physicalName="LAST_PRINT_DATE" prompt="CSH_PAYMENT_REQ_HD.LAST_PRINT_DATE"/>
        <bm:field name="closed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOSED_FLAG" prompt="CSH_PAYMENT_REQ_HD.CLOSED_FLAG"/>
        <bm:field name="closed_date" databaseType="DATE" datatype="java.util.Date" physicalName="CLOSED_DATE" prompt="CSH_PAYMENT_REQ_HD.CLOSED_DATE"/>
        <bm:field name="closed_note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLOSED_NOTE" prompt="CSH_PAYMENT_REQ_HD.CLOSED_NOTE"/>
        <bm:field name="approval_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVAL_STATUS" prompt="CSH_PAYMENT_REQ_HD.APPROVAL_STATUS"/>
        <bm:field name="approval_date" databaseType="DATE" datatype="java.util.Date" physicalName="APPROVAL_DATE" prompt="CSH_PAYMENT_REQ_HD.APPROVAL_DATE"/>
        <bm:field name="approval_note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVAL_NOTE" prompt="CSH_PAYMENT_REQ_HD.APPROVAL_NOTE"/>
        <bm:field name="business_type"/>
    </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_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
