<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-1-1 上午10:03:20  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="GLD_COMPANY_ACCOUNTS_VL" defaultOrderBy="t1.account_code">
    <bm:fields>
        <bm:field name="set_of_books_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SET_OF_BOOKS_ID" prompt="GLD_COMPANY_ACCOUNTS_VL.SET_OF_BOOKS_ID"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="GLD_COMPANY_ACCOUNTS_VL.COMPANY_ID"/>
        <bm:field name="account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ACCOUNT_ID" prompt="GLD_COMPANY_ACCOUNTS_VL.ACCOUNT_ID"/>
        <bm:field name="account_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="ACCOUNT_CODE" prompt="HLS.ACCOUNT_CODE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="280" forDisplay="true" forQuery="true" physicalName="DESCRIPTION" prompt="HLS.ACCOUNT_DESC"/>
        <bm:field name="account_set_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ACCOUNT_SET_ID" prompt="GLD_COMPANY_ACCOUNTS_VL.ACCOUNT_SET_ID"/>
        <bm:field name="functional_currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FUNCTIONAL_CURRENCY_CODE" prompt="GLD_COMPANY_ACCOUNTS_VL.FUNCTIONAL_CURRENCY_CODE"/>
        <bm:field name="subsystem_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUBSYSTEM_FLAG" prompt="GLD_COMPANY_ACCOUNTS_VL.SUBSYSTEM_FLAG"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="GLD_COMPANY_ACCOUNTS_VL.ENABLED_FLAG"/>
        <bm:field name="account_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ACCOUNT_TYPE" prompt="GLD_COMPANY_ACCOUNTS_VL.ACCOUNT_TYPE"/>
        <bm:field name="summary_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUMMARY_FLAG" prompt="GLD_COMPANY_ACCOUNTS_VL.SUMMARY_FLAG"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="description" queryExpression="t1.description like ${@description}||&apos;%&apos;"/>
        <bm:query-field field="account_code" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.company_id=${/session/@top_biz_company_id}"/>
        <bm:data-filter enforceOperations="query" expression="t1.set_of_books_id = (select c.set_of_books_id from fnd_companies c where c.company_id = ${/session/@top_biz_company_id})"/>
        <bm:data-filter enforceOperations="query" expression="t1.summary_flag=&apos;N&apos;"/>
    </bm:data-filters>
    <bm:features>
        <f:standard-who/>
    </bm:features>
</bm:model>
