<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-2-27 上午11:17:58  
    $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 l.je_id,
				       l.je_line_id,
				       l.je_desc,
				       l.account_id,
				       (select a.description
				          from gld_accounts_vl a
				         where a.account_id = l.account_id) as account_name,
				       l.dr_cr,
				       (select v.code_value_name
				          from sys_code_values_v v
				         where v.code = 'GLD_JE_TEMPLATE_DR_CR'
				           and v.code_value = l.dr_cr) as dr_cr_name,
				       l.dr_amt,
				       l.cr_amt,
				       l.resp_center_id,
				       (select r.responsibility_center_name
				          from fnd_responsibility_centers_vl r
				         where r.responsibility_center_id = l.resp_center_id) resp_center_name,
				       l.ref_1,
				       l.ref_2,
				       l.ref_3,
				       l.ref_4
				  from gld_je_test_lines l
				  #WHERE_CLAUSE#
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="je_id" queryExpression="je_id=${@je_id}"/>
    </bm:query-fields>
</bm:model>
