<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from ( select tt.ref_contract_id contract_id,
       tt.transaction_num,
       (select t.bp_name
          from hls_bp_master t, con_contract ct
         where t.bp_id = ct.bp_id_tenant
           and ct.contract_id = tt.ref_contract_id) bp_id_telnet_n,
       (select cc.contract_number
          from con_contract cc
         where cc.contract_id = tt.ref_contract_id) contract_number,
       tt.deposit_trans_type,
       (select v.code_value_name
          from sys_code_values_v v
         where v.code = 'DEPOSIT_TRANS_TYPE'
           and v.code_value = tt.deposit_trans_type) deposit_trans_type_n,
       (select v.code_value_name
          from sys_code_values_v v
         where v.code = 'DEPOSIT_TRANS_TYPE'
           and v.code_value = tt.source_type) source_type_n,
       tt.transaction_amount,
       to_char(tt.creation_date, 'YYYY-MM-DD') creation_date
  from csh_transaction tt
 where tt.transaction_id = ${@source_csh_trx_id})v
                #WHERE_CLAUSE#

                ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>