<!-- <bm:query-field name="due_date_from" queryExpression="t.due_date between to_date(${@due_date_from},'yyyy-mm-dd') and nvl(to_date(${@due_date_to},'yyyy-mm-dd'),t.due_date)"/>-->
<!-- <bm:query-field name="due_date_to" queryExpression="t.due_date between nvl(to_date(${@due_date_from},'yyyy-mm-dd'),t.due_date) and to_date(${@due_date_to},'yyyy-mm-dd')"/>-->
@@ -96,6 +96,7 @@ where transaction_id = ${@transaction_id}
<bm:fieldname="ref_v01"/>
<bm:fieldname="ref_v05"/>
<bm:fieldname="purpose"/>
<bm:fieldname="paid_byother_flag_n"expression="(select code_value_name from sys_code_values_v where code = 'PAID_BYOTHER_FLAG' and code_value = t1.paid_byother_flag)"/>
<bm:fieldname="contract_number"expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:data-filtername="query"expression="(t1.transaction_id=${@transaction_id} and t1.company_id=${/session/@company_id} and t1.write_off_type = ${@write_off_type})"/>
<bm:fieldname="unallocate_amount"expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)-nvl((select sum(i.write_off_amount) from csh_write_off_interface i where i.trx_interface_id = t1.transaction_id and i.record_type is not null),0))"forInsert="false"forUpdate="false"/>
<bm:fieldname="status_desc"expression="(select code_value_name from sys_code_values_v where code = 'CSH_WRITE_OFF_STATUS' and code_value = nvl(t1.status,'NEW'))"/>
<bm:fieldname="ref_contract_id"/>
<bm:fieldname="csh_bp_name"/>
<bm:fieldname="receipt_type_desc"expression="(select code_value_name from sys_code_values_v where code = 'RECEIPT_TYPE' and code_value = t1.receipt_type)"/>
<bm:fieldname="contract_number"expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<!--add by chenlingfeng-->
<bm:fieldname="bank_name"expression="(select a.bank_short_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)"forInsert="false"forUpdate="false"/>
...
...
@@ -96,6 +98,8 @@
<!--end-->
<!--add by lisitong-->
<bm:fieldname="approving_return_amount"datatype="java.lang.Double"expression="(select nvl(sum(ctr.this_return_amount),0) from csh_transaction_return ctr where ctr.transaction_id = t1.transaction_id and ctr.status = 'APPROVING')"forInsert="false"forUpdate="false"prompt="审批中退款金额"/>
<bm:fieldname="created_user_name"expression="(select description from sys_user where user_id = t1.created_by)"forceUpdate="false"forInsert="false"/>
<bm:fieldname="confirm_user_name"expression="(select description from sys_user where user_id = t1.confirmed_by)"forceUpdate="false"forInsert="false"/>
<!--end-->
</bm:fields>
<bm:features>
...
...
@@ -144,7 +148,7 @@
<bm:query-fieldname="reverse_write_off_amount_flag"queryExpression="t1.write_off_amount > 0 and ${@reverse_write_off_amount_flag}='Y'"/>
<bm:query-fieldname="bp_name"queryExpression="t1.bp_id in (select d.bp_id from hls_bp_master d where d.bp_name like '%'||${@bp_name_from}||'%')"/>
<!-- <bm:query-field name="bp_name" queryExpression="t1.bp_id in (select d.bp_id from hls_bp_master d where d.bp_name like '%'||${@bp_name_from}||'%')"/>-->
<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})||'%'"/>
<!--add by chenlingfeng-->
<bm:query-fieldname="full_write_off_flag"queryExpression="(t1.write_off_flag = ${@full_write_off_flag} or t1.write_off_flag = ${@partial_write_off_flag} or t1.write_off_flag = ${@not_write_off_flag})"/>
<bm:data-filtername="type"expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filtername="type"expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and nvl(t1.deposit_flag,'N')='N' and t1.confirmed_flag = 'APPROVED' "/>
<bm:fieldname="due_date"datatype="java.util.Date"expression="(select a.due_date from con_contract_cashflow a where a.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="write_off_cf_item_desc"expression="(select a.cf_item_desc from hls_cashflow_item_v a where a.cf_item = t1.write_off_cf_item)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_amount"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_amount"expression="(select decode(cf_item,1,ca.due_amount - nvl(ca.received_amount,0)) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="unreceived_amount"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_principal"expression="(select ca.principal - nvl(ca.received_principal,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_interest"expression="(select ca.interest - nvl(ca.received_interest,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="unreceived_penalty"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9)"forInsert="false"forUpdate="false"/>
<bm:fieldname="agent_id_desc"expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)"forUpdate="false"forInsert="false"/>