<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Guoxuezhao
    $Date: 2013-6-25 下午2:12:02
    $Revision: 1.0  
    $Purpose: 
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" extendMode="reference" needAccessControl="false">
    <ns1:fields>
        <ns1:field name="bank_account_id"/>
        <ns1:field name="bp_id"/>
        <ns1:field name="currency"/>
        <ns1:field name="bp_name" displayWidth="160" forDisplay="true" forQuery="true" prompt="HLS.BP_NAME"/>
        <ns1:field name="bank_branch_name" displayWidth="130" forDisplay="true" forQuery="true" prompt="HLS.BANK_BRANCH_NAME"/>
        <ns1:field name="bank_account_num" displayWidth="130" forDisplay="true" forQuery="true" prompt="CSH511.BANK_ACCOUNT_NUM_LOV"/>
        <ns1:field name="currency_name" displayWidth="100" forDisplay="true" prompt="HLS.CURRENCY"/>
        <ns1:field name="enabled_flag"/>
    </ns1:fields>
    <ns1:operations>
        <ns1:operation name="query">
            <ns1:query-sql><![CDATA[
                SELECT *
				  FROM (SELECT t1.BANK_ACCOUNT_ID,
				               t1.BP_ID,
				               t1.CURRENCY,
				               t1.BANK_ACCOUNT_CODE,
				               t1.BANK_ACCOUNT_NAME,
				               t1.BANK_ACCOUNT_NUM,
				               t1.BANK_BRANCH_NAME,
				               t1.CURRENCY_NAME,
				               t1.ENABLED_FLAG,
				               t2.BP_NAME
				          FROM HLS_BP_MASTER_BANK_ACCOUNT_V t1
				          LEFT OUTER JOIN HLS_BP_MASTER_V t2
				            ON t1.BP_ID = t2.BP_ID
				         WHERE (t2.bp_category = 'BANK' OR t2.bp_category = 'BANK_BRANCH')
				           AND t1.enabled_flag = 'Y') t #WHERE_CLAUSE#
            ]]></ns1:query-sql>
        </ns1:operation>
    </ns1:operations>
    <ns1:query-fields>
        <ns1:query-field field="bank_account_id" queryOperator="="/>
        <ns1:query-field field="bp_name" queryOperator="like"/>
        <ns1:query-field field="bank_branch_name" queryOperator="like"/>
        <ns1:query-field field="bank_account_num" queryOperator="like"/>
        <ns1:query-field field="enabled_flag" queryOperator="="/>
    </ns1:query-fields>
    <!-- <ns1:data-filters>
        <ns1:data-filter name="query" expression="(t2.bp_category = &apos;BANK&apos; OR t2.bp_category = &apos;BANK_BRANCH&apos;) and t1.enabled_flag = &apos;Y&apos;"/>
    </ns1:data-filters> -->
</ns1:model>
