<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: niujiaqing1265 $
    $Date: 2010/12/09 05:48:38 $
    $Revision: 1.2 $
    $Purpose “员工组定义” 模块中，使用到的作为combobox使用的bm，选取“责任中心”
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" extend="fnd.FND2110.fnd_responsibility_centers" extendMode="reference">
    <bm:fields>
        <bm:field name="company_id" databaseType="BIGINT" datatype="java.lang.Long"/>
        <bm:field name="responsibility_center_id" databaseType="BIGINT" datatype="java.lang.Long"/>
        <bm:field name="responsibility_center_code" databaseType="VARCHAR2" datatype="java.lang.String" prompt="FND_RESPONSIBILITY_CENTERS.RESPONSIBILITY_CENTER_CODE"/>
        <bm:field name="responsibility_center_name_id" databaseType="BIGINT" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="responsibility_center_name"/>
        <bm:field name="responsibility_center_name" databaseType="VARCHAR" datatype="java.lang.String" forInsert="false" forUpdate="false" prompt="FND_RESPONSIBILITY_CENTERS.RESPONSIBILITY_CENTER_NAME"/>
        <bm:field name="address_id" databaseType="BIGINT" datatype="java.lang.Long"/>
        <bm:field name="resp_center_type_code" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="RESP_CENTER_TYPE" lookupField="resp_center_type_code_display"/>
        <bm:field name="resp_center_type_code_display" databaseType="VARCHAR2" datatype="java.lang.String" forInsert="false" forUpdate="false" prompt="FND_RESPONSIBILITY_CENTERS.RESP_CENTER_TYPE_CODE"/>
        <bm:field name="summary_flag" databaseType="VARCHAR2" datatype="java.lang.String" prompt="FND_RESPONSIBILITY_CENTERS.SUMMARY_FLAG"/>
        <bm:field name="start_date_active" databaseType="DATE" datatype="java.util.Date" prompt="HAP_START_DATE"/>
        <bm:field name="end_date_active" databaseType="DATE" datatype="java.util.Date" prompt="HAP_END_DATE"/>
    </bm:fields>
    <bm:primary-key>
        <bm:pk-field name="responsibility_center_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="responsibility_center_id" queryOperator="="/>
        <bm:query-field field="responsibility_center_code" queryOperator="like"/>
        <bm:query-field field="responsibility_center_name" queryExpression="exists (select 1 from fnd_descriptions fd where rc.responsibility_center_name_id=fd.description_id and fd.description_text like ${@responsibility_center_name} and fd.language = ${/session/@lang})"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="company_id" enforceOperations="query" expression="             rc.company_id = ${/session/@company_id}             and (rc.summary_flag != &apos;Y&apos; or  rc.summary_flag is null )             and sysdate between nvl(rc.start_date_active,sysdate) and nvl(rc.end_date_active,sysdate) "/>
    </bm:data-filters>
    <bm:ref-fields/>
</bm:model>
