<bm:fieldname="returned_amount"databaseType="NUMBER"datatype="java.lang.Double"physicalName="RETURNED_AMOUNT"prompt="CSH511.CSH_TRANSACTION.RETURNED_AMOUNT"expression="(select nvl(returned_amount,0) from dual)"/>
<bm:fieldname="bp_code"expression="(select d.bp_code from hls_bp_master_v d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="HLS.BP_CODE"/>
(select d.bp_code from hls_bp_master_v d where d.bp_id = t1.bp_id) as bp_code,
<bm:fieldname="bp_name"expression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id)"forInsert="false"forUpdate="false"prompt="HLS.BP_NAME"/>
(select d.bp_name from hls_bp_master_v d where d.bp_id = t1.bp_id) as bp_name,
<bm:fieldname="payment_method_display"expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)"forInsert="false"forUpdate="false"prompt="HLS.PAYMENT_METHOD"/>
(select cp.description
<bm:fieldname="currency_name"expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)"forInsert="false"forUpdate="false"prompt="HLS.CURRENCY"/>
from csh_payment_method cp
<bm:fieldname="bp_category_display"expression="(select b.description from hls_bp_category b where b.bp_category=t1.bp_category)"forInsert="false"forUpdate="false"prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
where cp.payment_method_id = t1.payment_method_id) as payment_method_display,
<bm:fieldname="exchange_rate_type_display"expression="(select tv.type_name from gld_exchangerate_types_vl tv where tv.type_code=t1.exchange_rate_type)"forInsert="false"forUpdate="false"prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:fieldname="bank_account_code"expression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_ACCOUNT_CODE"/>
where gc.currency_code = t1.currency_code) as currency_name,
<bm:fieldname="bank_account_name"expression="(select a.bank_account_name from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_ACCOUNT_NAME"/>
(select b.description
<bm:fieldname="bank_account_num"expression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BANK_ACCOUNT_NUM"/>
from hls_bp_category b
<bm:fieldname="bp_bank_account_code"expression="(select a.bank_account_code from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)"forInsert="false"forUpdate="false"prompt="CSH511.BP_BANK_ACCOUNT_CODE"/>
where b.bp_category = t1.bp_category) as bp_category_display,
<!--<bm:field name="bp_bank_account_name" expression="(select a.bank_account_name from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NAME"/>-->
<bm:fieldname="functional_currency_code"expression="(select gb.functional_currency_code from fnd_companies fc, gld_set_of_books gb where fc.company_id = ${/session/@company_id} and fc.set_of_books_id = gb.set_of_books_id)"forInsert="false"forUpdate="false"/>
where tv.type_code = t1.exchange_rate_type) as exchange_rate_type_display,
<bm:fieldname="rate_method_code"expression="(select t.rate_method_code from gld_exchangerate_types t where t.type_code=t1.exchange_rate_type)"forInsert="false"forUpdate="false"/>
gld_exchange_rate_pkg.get_currency_exchange(t1.transaction_amount,t1.exchange_rate,t1.exchange_rate_quotation) as transaction_functional_amount,
<bm:fieldname="zero_amounts_allowed"expression="(select d.zero_amounts_allowed from csh_bank_account_v d where d.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="precision"expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)"forInsert="false"forUpdate="false"/>
and a.company_id = t1.company_id) as bank_account_code,
<bm:fieldname="receipt_type_des"expression="(select v.code_value_name from sys_code_values_v v where v.code='RECEIPT_TYPE' and v.code_value=t1.receipt_type)"/>
where a.bank_account_id = t1.bank_account_id
<bm:fieldname="ref_contract_id"/>
and a.company_id = t1.company_id) as bank_account_num,
<bm:fieldname="contract_number"expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
(select a.bank_account_code from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id) as bp_bank_account_code,
<bm:fieldname="collection_classes"/>
(select a.bank_account_name from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id) as bp_bank_account_name,
<bm:fieldname="collection_classes_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_COLLECTION_CLASSES' and v.code_value =t1.collection_classes)"forInsert="false"forUpdate="false"/>
(select gb.functional_currency_code
<bm:fieldname="confirmed_flag_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CONFIRMED_FLAG' and v.code_value =t1.confirmed_flag)"forInsert="false"forUpdate="false"/>
from fnd_companies fc, gld_set_of_books gb
<bm:fieldname="written_off_flag_desc"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'WRITE_OFF_FLAG' and v.code_value =t1.WRITE_OFF_FLAG)"forInsert="false"forUpdate="false"/>
where fc.company_id = ${/session/@company_id}
<bm:fieldname="bank_branch_name"expression="(select bank_branch_name from csh_bank_branch where bank_branch_id = (select bank_branch_id from csh_bank_account where bank_account_id = t1.bank_account_id))"forInsert="false"forUpdate="false"/>
and fc.set_of_books_id = gb.set_of_books_id) as functional_currency_code,
<bm:fieldname="use_money_amount"expression="(select t1.transaction_amount-t1.returned_amount from dual)"forInsert="false"forUpdate="false"/>
(select t.rate_method_code
<bm:fieldname="opposite_band_na"/>
from gld_exchangerate_types t
<bm:fieldname="banka"/>
where t.type_code = t1.exchange_rate_type) as rate_method_code,
<bm:fieldname="purpose"/>
(select d.zero_amounts_allowed
<bm:fieldname="can_returned_amount"expression="(select transaction_amount-nvl(returned_amount,0) from dual)"/>
from csh_bank_account_v d
<bm:fieldname="gsber"/>
where d.bank_account_id = t1.bank_account_id) as zero_amounts_allowed,
<bm:fieldname="sus_belnr"/>
(t1.transaction_amount - nvl(t1.write_off_amount, 0)) as unwrite_off_amount,
<bm:fieldname="bp_virtual_bank_account"/>
(select g.precision
<bm:fieldname="confirmed_flag"/>
from gld_currency g
<bm:fieldname="debt_confirmed_by"/>
where g.country_code = t1.currency_code) as precision,
<bm:fieldname="debt_confirmed_by_desc"expression="(select description from sys_user where user_id=t1.debt_confirmed_by)"forInsert="false"forUpdate="false"/>
<bm:fieldname="acc_confirmed_by_desc"expression="(select description from sys_user where user_id=t1.acc_confirmed_by)"forInsert="false"forUpdate="false"/>
t1.created_by,
<bm:fieldname="receipt_type_n"expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)"forInsert="false"forUpdate="false"/>
(select u.employee_name from sys_user_v u where u.user_id=t1.created_by )user_desc,
order by t1.transaction_date desc,t1.transaction_num desc
<bm:primary-key>
]]></bm:query-sql>
<bm:pk-fieldname="transaction_id"/>
</bm:operation>
</bm:primary-key>
</bm:operations>
<bm:data-filters>
<bm:data-filters>
<bm:data-filtername="query"expression="(t1.company_id=${/session/@company_id} and t1.posted_flag='Y' and t1.reversed_flag='N' and write_off_flag<> 'FULL' and returned_flag <> 'FULL' and t1.transaction_type in ('RECEIPT','ADVANCE_RECEIPT') and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)<t1.transaction_amount)) "/>
<bm:data-filtername="query"expression="(t1.company_id=${/session/@company_id} and t1.posted_flag='Y' and t1.reversed_flag='N' and write_off_flag<> 'FULL' and returned_flag <> 'FULL' and t1.transaction_type in ('RECEIPT','ADVANCE_RECEIPT') and (nvl(t1.returned_amount, 0)+nvl(t1.write_off_amount, 0)<t1.transaction_amount)) "/>
<bm:data-filtername="query"expression="(t1.confirmed_flag='APPROVED' and t1.write_off_flag='NOT')"/>
<bm:query-fieldname="bank_account_code_from"queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) = ${@bank_account_code_from}"/>
<bm:query-fieldname="bank_account_code"queryExpression="exists (select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id and a.bank_account_code = ${@bank_account_code})"/>
<!--<bm:query-field name="bank_account_code_to" queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) <= ${@bank_account_code_to}"/>-->
<bm:query-fieldname="bank_account_code_from"queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) >= ${@bank_account_code_from}"/>
<bm:query-fieldname="bank_account_code_to"queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) <= ${@bank_account_code_to}"/>
<bm:query-fieldname="reverse_write_off_amount_flag"queryExpression="t1.write_off_amount > 0 and ${@reverse_write_off_amount_flag}='Y'"/>
<bm:query-fieldfield="bp_id"queryOperator="="/>
<bm:query-fieldname="description"queryExpression="t1.description like '%'||${@description}||'%'"/>
<bm:query-fieldname="bank_account_num"queryExpression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id) like '%'||upper(${@bank_account_num})||'%'"/>
<bm:query-fieldname="contract_number"queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like '%'||upper(${@contract_number})||'%'"/>