<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lixi  
    $Date: 2011-7-12 下午06:55:08  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
         select * from (select t.budget_item_id, t.budget_item_code, t.description
			  from bgt_budget_items_vl t, bgt_organizations bo
			 where t.enabled_flag = 'Y'
			   and t.summary_flag = 'N'
			   and t.budget_org_id = bo.bgt_org_id
			   and bo.set_of_books_id = ${/parameter/@set_of_books_id}) v
			   #WHERE_CLAUSE#
			 order by budget_item_code
			]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter inputPath="/parameter/@set_of_books_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="budget_item_code" queryExpression="budget_item_code like ${@budget_item_code}"/>
        <bm:query-field name="description" queryExpression="description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
    </bm:query-fields>
    <bm:fields>
        <bm:field name="budget_item_id"/>
        <bm:field name="budget_item_code" displayWidth="233" forDisplay="true" forQuery="true" prompt="预算项目"/>
        <bm:field name="description" displayWidth="235" forDisplay="true" forQuery="true" prompt="描述"/>
    </bm:fields>
</bm:model>
