SELECT vv.*,(select v.code_value_name value_name from sys_code_values_v v where v.code ='YES_NO' and v.code_value = vv.rl_flag) rl_flag_n
FROM (select t2.journal_line_id,
t2.journal_header_id,
cc.company_id,
...
...
@@ -78,7 +78,15 @@
cc.termination_date,
cc.lease_channel,
t2.cf_direction,
t2.billing_status,
nvl(t2.billing_status,'NOT') billing_status,
(select v.code_value_name value_name from sys_code_values_v v where v.code ='CON_BILLING_STATUS' and v.code_value = nvl(t2.billing_status,'NOT')) billing_status_n,
case when acr_invoice_pkg.check_rl_cf_flag(cc.contract_id,t2.cf_item,t2.times)= 'Y' and
<!--<bm:query-field name="bp_id_agent_level1" queryExpression="((t1.bp_id_agent_level1=${@bp_id_agent_level1}) or exists (select 1 from con_contract_lease_item ccli,hls_lease_item hli where ccli.lease_item_id=hli.lease_item_id and hli.vender_id=${@bp_id_agent_level1} and t1.contract_id=ccli.contract_id))"/>-->
<bm:fieldname="acc_confirmed_by_desc"expression="(select description from sys_user where user_id=t1.acc_confirmed_by)"forInsert="false"forUpdate="false"/>
<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"/>
<bm:fieldname="receipt_sbo"forInsert="false"forUpdate="false"expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from csh_write_off cw, hls_journal_header h where cw.write_off_type = 'REFUND_ENTRY' and cw.csh_transaction_id = h.source_id and h.source_table = 'CSH_TRANSACTION' and t1.source_doc_type = cw.write_off_type and t1.source_doc_id = cw.write_off_id and exists (select 1 from hls_journal_detail d where h.journal_header_id = d.journal_header_id and cw.write_off_id = d.cashflow_id))"/>
<bm:fieldname="return_sbo"forInsert="false"forUpdate="false"expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from hls_journal_header h,csh_transaction ct where h.source_table = 'CSH_TRANSACTION' and h.source_id = ct.transaction_id and ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
<bm:fieldname="tenant_account_id"forInsert="false"forUpdate="false"expression="(select cc.bank_account_id from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:fieldname="tenant_account_num"forInsert="false"forUpdate="false"expression="(select ha.bank_account_num from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:fieldname="tenant_account_name"forInsert="false"forUpdate="false"expression="(select ha.bank_account_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:fieldname="tenant_bank_name"forInsert="false"forUpdate="false"expression="(select ha.bank_full_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:fieldname="return_date"forInsert="false"forUpdate="false"expression="(select listagg(to_char(ct.transaction_date,'yyyy-mm-dd'), ',') WITHIN group(order by ct.transaction_date) from csh_transaction ct where ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
<bm:data-filtername="query"expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filtername="position_code"expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/>
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
<a:model-querydefaultWhereClause="t.code = 'CSH511_TRANSACTION_TYPE' and t.code_value in ('RECEIPT','ADVANCE_RECEIPT')"fetchAll="true"model="sys.sys_code_values_v"rootPath="transaction_type"/>