<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: niujiaqing1265 $
    $Date: 2010/12/09 05:48:38 $
    $Revision: 1.2 $
    $Purpose: “会计期查询”模块使用的查询bm
-->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="gp" baseTable="GLD_PERIODS">
    <ns1:fields>
        <ns1:field name="period_set_code" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <ns1:field name="period_year" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="period_num" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <ns1:field name="adjustment_flag" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <ns1:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="start_date" databaseType="DATE" datatype="java.sql.Date"/>
        <ns1:field name="end_date" databaseType="DATE" datatype="java.sql.Date"/>
        <ns1:field name="quarter_num" databaseType="NUMBER" datatype="java.lang.Long"/>
        <!-- <ns1:field databaseType="VARCHAR" datatype="java.lang.String" expression="(select gps.period_set_code||&apos;-&apos;||fd.description_text from fnd_descriptions fd where gps.period_set_name_id = fd.description_id             and fd.language = ${/session/@lang} )" forInsert="false" forUpdate="false" name="period_code_name" prompt="GLD_PERIOD_SET.PERIOD_ADDITIONAL_FLAG"/> -->
        <!-- <ns1:field databaseType="VARCHAR" datatype="java.lang.String" forInsert="false" forUpdate="false" name="period_code_name" /> -->
    </ns1:fields>
    <ns1:primary-key>
        <ns1:pk-field name="internal_period_num"/>
        <ns1:pk-field name="period_set_code"/>
    </ns1:primary-key>
    <ns1:relations>
        <ns1:relation name="gps" joinType="inner" refModel="gld.gld_period_sets">
            <ns1:reference foreignField="period_set_code" localField="period_set_code"/>
        </ns1:relation>
    </ns1:relations>
    <ns1:query-fields>
        <ns1:query-field dataType="java.lang.String" field="period_set_code" queryOperator="="/>
    </ns1:query-fields>
    <ns1:features>
        <f:multi-language-display/>
    </ns1:features>
    <ns1:ref-fields>
        <!-- <ns1:ref-field name="period_set_name_id" relationName="gps" sourceField="period_set_name_id"/> -->
        <ns1:ref-field name="period_set_name" relationName="gps" sourceField="period_set_name"/>
    </ns1:ref-fields>
</ns1:model>
