<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="sob" extend="gld.gld_set_of_books" extendMode="reference">
    <bm:fields>
        <bm:field name="set_of_books_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <!-- <bm:field name="set_of_books_name_id" databaseType="NUMBER" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="set_of_books_name"/> -->
        <bm:field name="set_of_books_name" databaseType="VARCHAR" datatype="java.lang.String" prompt="GLD_SET_OF_BOOKS.SET_OF_BOOKS_NAME"/>
        <bm:field name="set_of_books_code" databaseType="VARCHAR2" datatype="java.lang.String" prompt="GLD_SET_OF_BOOKS.SET_OF_BOOKS_CODE"/>
        <!-- <bm:field name="company_short_name" databaseType="VARCHAR" datatype="java.lang.String" prompt="FND_COMPANIES.COMPANY_SHORT_NAME"/> -->
    </bm:fields>
    <bm:primary-key>
        <bm:pk-field name="set_of_books_id"/>
    </bm:primary-key>
    <bm:relations>
        <bm:relation name="cpy" joinType="INNER" refModel="fnd.fnd_companies">
            <bm:reference foreignField="set_of_books_id" localField="set_of_books_id"/>
        </bm:relation>
    </bm:relations>
    <bm:query-fields>
        <bm:query-field field="set_of_books_id" queryOperator="="/>
        <bm:query-field name="company_code_from" queryExpression="cpy.company_code &gt;= ${@company_code_from}"/>
        <bm:query-field name="company_code_to" queryExpression="cpy.company_code &lt;= ${@company_code_to}"/>
        <bm:query-field name="account_set_id" queryExpression="sob.set_of_books_id in(SELECT s.set_of_books_id FROM gld_set_of_books s WHERE enabled_flag = &apos;Y&apos; and account_set_id = ${/parameter/@account_set_id})"/>
    </bm:query-fields>
    <bm:features>
        <f:multi-language-display/>
    </bm:features>
    <bm:ref-fields>
        <bm:ref-field name="company_id" relationName="cpy" sourceField="company_id"/>
        <bm:ref-field name="company_code" prompt="FND_COMPANIES.COMPANY_CODE" relationName="cpy" sourceField="company_code"/>
        <bm:ref-field name="company_short_name" prompt="FND_COMPANIES.COMPANY_SHORT_NAME" relationName="cpy" sourceField="company_short_name"/>
    </bm:ref-fields>
</bm:model>
