Commit b4997d35 authored by 18083's avatar 18083

保证金管理模块改造

No related merge requests found
...@@ -173,7 +173,7 @@ ...@@ -173,7 +173,7 @@
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} AND t1.reversed_flag = 'N' and t1.returned_flag != 'FULL')"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} AND t1.reversed_flag = 'N' and t1.returned_flag != 'FULL')"/>
<!-- <bm:data-filter name="query" expression="(not exists(select 1 from csh_transaction t where t.transaction_type = 'RECEIPT' and t.paid_byother_flag = 'T' and t.write_off_flag = 'FULL' and t.transaction_id = t1.transaction_id))"/>--> <!-- <bm:data-filter name="query" expression="(not exists(select 1 from csh_transaction t where t.transaction_type = 'RECEIPT' and t.paid_byother_flag = 'T' and t.write_off_flag = 'FULL' and t.transaction_id = t1.transaction_id))"/>-->
<!-- <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-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-filter name="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="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,'DEPOSIT','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-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-filter name="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))))"/> <bm:data-filter name="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))))"/>
<bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/> <bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-7-28 下午01:23:36
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.creation_date desc,t1.transaction_num desc">
<bm:fields>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_ID"/>
<bm:field name="transaction_num" forDisplay="true" forQuery="true" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_NUM"/>
<bm:field name="transaction_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_CATEGORY" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_CATEGORY"/>
<bm:field name="transaction_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="CSH511_TRANSACTION_TYPE" lookupField="transaction_type_desc" physicalName="TRANSACTION_TYPE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_TYPE"/>
<bm:field name="receivables_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="RECEIVABLES_TYPE" lookupField="receivables_type_desc" physicalName="RECEIVABLES_TYPE" prompt="收款类型"/>
<bm:field name="transaction_date" databaseType="DATE" datatype="java.util.Date" physicalName="TRANSACTION_DATE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_DATE"/>
<bm:field name="penalty_calc_date" databaseType="DATE" datatype="java.util.Date" physicalName="PENALTY_CALC_DATE" prompt="CSH511.CSH_TRANSACTION.PENALTY_CALC_DATE"/>
<bm:field name="bank_slip_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_SLIP_NUM" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CSH511.CSH_TRANSACTION.COMPANY_ID"/>
<bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CSH511.CSH_TRANSACTION.INTERNAL_PERIOD_NUM"/>
<bm:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME" prompt="HLS.ACCOUNT_PERIOD_NAME"/>
<bm:field name="payment_method_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PAYMENT_METHOD_ID" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="distribution_set_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISTRIBUTION_SET_ID" prompt="CSH511.CSH_TRANSACTION.DISTRIBUTION_SET_ID"/>
<bm:field name="cashflow_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CASHFLOW_AMOUNT" prompt="CSH511.CSH_TRANSACTION.CASHFLOW_AMOUNT"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="HLS.CURRENCY"/>
<bm:field name="transaction_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TRANSACTION_AMOUNT" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT"/>
<bm:field name="exchange_rate_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="exchange_rate_quotation" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_QUOTATION" prompt="CSH511.CSH_TRANSACTION.EXCHANGE_RATE_QUOTATION"/>
<bm:field name="exchange_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EXCHANGE_RATE" prompt="HLS.EXCHANGE_RATE"/>
<bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID" prompt="CSH511.CSH_TRANSACTION.BANK_ACCOUNT_ID"/>
<bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="CSH511.CSH_TRANSACTION.BP_ID"/>
<bm:field name="bp_bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_BANK_ACCOUNT_ID" prompt="CSH511.CSH_TRANSACTION.BP_BANK_ACCOUNT_ID"/>
<bm:field name="bp_bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_BANK_ACCOUNT_NUM" prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.NOTE"/>
<bm:field name="handling_charge" databaseType="NUMBER" datatype="java.lang.Double" physicalName="HANDLING_CHARGE" prompt="CSH511.CSH_TRANSACTION.HANDLING_CHARGE"/>
<bm:field name="posted_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSTED_FLAG" prompt="CSH511.CSH_TRANSACTION.POSTED_FLAG"/>
<bm:field name="reversed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REVERSED_FLAG" prompt="CSH511.CSH_TRANSACTION.REVERSED_FLAG"/>
<bm:field name="reversed_date" databaseType="DATE" datatype="java.util.Date" physicalName="REVERSED_DATE" prompt="CSH511.CSH_TRANSACTION.REVERSED_DATE"/>
<bm:field name="returned_flag" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="CSH510_RETURN_SELECT" lookupField="returned_flag_desc" physicalName="RETURNED_FLAG" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="returned_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RETURNED_AMOUNT" prompt="CSH511.CSH_TRANSACTION.RETURNED_AMOUNT"/>
<bm:field name="write_off_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WRITE_OFF_FLAG" prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_FLAG"/>
<bm:field name="write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_AMOUNT" prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_AMOUNT"/>
<bm:field name="full_write_off_date" databaseType="DATE" datatype="java.util.Date" physicalName="FULL_WRITE_OFF_DATE" prompt="CSH511.CSH_TRANSACTION.FULL_WRITE_OFF_DATE"/>
<bm:field name="twin_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TWIN_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.TWIN_CSH_TRX_ID"/>
<bm:field name="return_from_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RETURN_FROM_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.RETURN_FROM_CSH_TRX_ID"/>
<bm:field name="reversed_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REVERSED_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.REVERSED_CSH_TRX_ID"/>
<bm:field name="source_csh_trx_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_CSH_TRX_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_TYPE"/>
<bm:field name="source_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_ID"/>
<bm:field name="source_doc_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_DOC_CATEGORY"/>
<bm:field name="source_doc_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_DOC_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_TYPE"/>
<bm:field name="source_doc_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_DOC_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_ID"/>
<bm:field name="source_doc_line_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_DOC_LINE_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_LINE_ID"/>
<bm:field name="create_je_mothed" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_MOTHED"/>
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG"/>
<bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLD_INTERFACE_FLAG" prompt="CSH511.CSH_TRANSACTION.GLD_INTERFACE_FLAG"/>
<bm:field name="bp_code" expression="(select d.bp_code from hls_bp_master d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" forDisplay="true" forQuery="true" expression="(select d.bp_name from hls_bp_master d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="bp_id_agent_level1_n" expression="(select u.bp_name FROM hls_bp_master u,hls_bp_master hbm WHERE u.unit_id = hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="代理店"/>
<bm:field name="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"/>
<bm:field name="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"/>
<bm:field name="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"/>
<bm:field name="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:field name="transaction_functional_amount" expression="gld_exchange_rate_pkg.get_currency_exchange(t1.transaction_amount,t1.exchange_rate,t1.exchange_rate_quotation)" forInsert="false" forUpdate="false" prompt="HLS.FUNCTIONAL_AMOUNT"/>
<bm:field name="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"/>
<bm:field name="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"/>
<bm:field name="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"/>
<bm:field name="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"/>
<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:field name="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"/>
<bm:field name="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" />
<bm:field name="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:field name="transaction_type_desc" prompt="HLS.TRANSACTION_TYPE" forInsert="false" forUpdate="false"/>
<bm:field name="receivables_type_desc" expression="decode(t1.receivables_type,null,&apos;其他&apos;,t1.receivables_type)" prompt="收款类型" forInsert="false" forUpdate="false"/>
<bm:field name="unwrite_off_amount" datatype="java.lang.Double" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))" forInsert="false" forUpdate="false" prompt="HLS.UNWRITEOFF_AMOUNT"/>
<bm:field name="precision" expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)" forInsert="false" forUpdate="false"/>
<bm:field name="reverse_amount" expression="(-1*t1.transaction_amount)" forInsert="false" forUpdate="false" prompt="CSH511.REVERSE_AMOUNT"/>
<bm:field name="user_desc" expression="(select su.description from sys_user su where su.user_id=t1.created_by)" forInsert="false" forUpdate="false"/>
<bm:field name="auto_filt_penalty" expression="&apos;N&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PENALTY"/>
<bm:field name="auto_filt_prinicipal_interest" expression="&apos;Y&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PRINICIPAL_INTEREST"/>
<bm:field name="returned_flag_desc" forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="status" expression="nvl(t1.status,&apos;NEW&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="ref_contract_id"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.transaction_type in (&apos;DEPOSIT&apos;))"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is null)"/>
<bm:data-filter name="query" expression="(nvl(t1.reversed_flag,'N') = 'N')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED'))"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="transaction_num" queryExpression="t1.transaction_num = ${@transaction_num}"/>
<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 &apos;%&apos;||${@bp_name}||&apos;%&apos;)"/>
</bm:query-fields>
</bm:model>
...@@ -13,8 +13,10 @@ ...@@ -13,8 +13,10 @@
hlcm_cux_deposit_pkg.execute_deposit_transfer( hlcm_cux_deposit_pkg.execute_deposit_transfer(
p_session_id=>${/session/@session_id}, p_session_id=>${/session/@session_id},
p_source_contract_id=>${@source_contract_id}, p_source_contract_id=>${@source_contract_id},
p_source_transaction_id=>${@source_transaction_id},
p_je_date=>to_date(${@je_date},'yyyy-mm-dd hh24:mi:ss'), p_je_date=>to_date(${@je_date},'yyyy-mm-dd hh24:mi:ss'),
p_contract_id=>${@contract_id}, p_contract_id=>${@contract_id},
p_transaction_id=>${@transaction_id},
p_deposit_amount=>${@deposit_amount}, p_deposit_amount=>${@deposit_amount},
p_deposit_trans_type=>${@deposit_trans_type}, p_deposit_trans_type=>${@deposit_trans_type},
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
...@@ -30,6 +32,8 @@ ...@@ -30,6 +32,8 @@
hlcm_cux_deposit_pkg.create_deposit_transfer_je( hlcm_cux_deposit_pkg.create_deposit_transfer_je(
p_hd_contract_id=>${@hd_contract_id}, p_hd_contract_id=>${@hd_contract_id},
p_contract_id=>${@source_contract_id}, p_contract_id=>${@source_contract_id},
p_transaction_id=>${@source_transaction_id},
p_batch_id=>${@batch_id},
p_user_id=>${/session/@user_id} p_user_id=>${/session/@user_id}
); );
end; end;
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
begin begin
hlcm_cux_deposit_pkg.check_csh_transaction_status( hlcm_cux_deposit_pkg.check_csh_transaction_status(
p_contract_id=>${@contract_id}, p_contract_id=>${@contract_id},
p_transaction_id=>${@transaction_id},
p_user_id=>${/session/@user_id} p_user_id=>${/session/@user_id}
); );
end; end;
...@@ -28,6 +29,8 @@ ...@@ -28,6 +29,8 @@
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * select *
from (select v1.contract_id, from (select v1.contract_id,
null transaction_id,
'' transaction_num,
(select cc.contract_number (select cc.contract_number
from con_contract cc from con_contract cc
where cc.contract_id = v1.contract_id) contract_number, where cc.contract_id = v1.contract_id) contract_number,
...@@ -62,7 +65,8 @@ ...@@ -62,7 +65,8 @@
(select max(contemp_id) (select max(contemp_id)
FROM csh_transaction_contemp tc FROM csh_transaction_contemp tc
where tc.source_contract_id = v1.contract_id where tc.source_contract_id = v1.contract_id
and tc.batch_id is not null)),'NEW') trans_review_status, and tc.batch_id is not null)),
'NEW') trans_review_status,
nvl((SELECT sc.code_value_name nvl((SELECT sc.code_value_name
FROM csh_transaction_contemp tc, sys_code_values_v sc FROM csh_transaction_contemp tc, sys_code_values_v sc
where tc.contemp_id = where tc.contemp_id =
...@@ -71,7 +75,8 @@ ...@@ -71,7 +75,8 @@
where tc.source_contract_id = v1.contract_id where tc.source_contract_id = v1.contract_id
and tc.batch_id is not null) and tc.batch_id is not null)
and sc.code = 'TRANS_REVIEW_STATUS' and sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value =nvl(tc.trans_review_status,'NEW')),'新建') trans_review_status_n AND sc.code_value = nvl(tc.trans_review_status, 'NEW')),
'新建') trans_review_status_n
from (select tt.ref_contract_id contract_id, from (select tt.ref_contract_id contract_id,
tt.deposit_trans_type, tt.deposit_trans_type,
sum((nvl(tt.transaction_amount, 0) - sum((nvl(tt.transaction_amount, 0) -
...@@ -84,7 +89,62 @@ ...@@ -84,7 +89,62 @@
and tt.transaction_amount > 0 and tt.transaction_amount > 0
and tt.deposit_trans_type is not null and tt.deposit_trans_type is not null
group by tt.ref_contract_id, tt.deposit_trans_type, tt.bp_id) v1 group by tt.ref_contract_id, tt.deposit_trans_type, tt.bp_id) v1
where v1.unwrite_off_amount > 0) v where v1.unwrite_off_amount > 0
union all
select null contract_id,
tt.transaction_id,
tt.transaction_num,
'' contract_number,
'' contract_name,
nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0) unwrite_off_amount,
'' deposit_trans_type,
(select hbm.bp_name
from hls_bp_master hbm
where hbm.bp_id = tt.bp_id) bp_id_telnet_n,
(select h.bp_id
from hls_bp_master hbm, hls_bp_master h
where hbm.unit_id = h.unit_id
and hbm.bp_id = tt.bp_id
and h.bp_category = 'AGENT') bp_id_agent_level1,
(select h.bp_name
from hls_bp_master hbm, hls_bp_master h
where hbm.unit_id = h.unit_id
and hbm.bp_id = tt.bp_id
and h.bp_category = 'AGENT') bp_name,
'' deposit_trans_type_n,
nvl((hlcm_cux_deposit_pkg.get_transaction_status_new(p_contract_id => Null,
p_transaction_id => tt.transaction_id,
p_user_id => 1)),
'正常') approve_status,
tt.bp_id,
nvl((SELECT tc.trans_review_status
FROM csh_transaction_contemp tc
where tc.contemp_id =
(select max(contemp_id)
FROM csh_transaction_contemp tc
where tc.source_transaction_id =
tt.transaction_id
and tc.batch_id is not null)),
'NEW') trans_review_status,
nvl((SELECT sc.code_value_name
FROM csh_transaction_contemp tc, sys_code_values_v sc
where tc.contemp_id =
(select max(contemp_id)
FROM csh_transaction_contemp tc
where tc.source_transaction_id =
tt.transaction_id
and tc.batch_id is not null)
and sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = nvl(tc.trans_review_status, 'NEW')),
'新建') trans_review_status_n
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
and tt.ref_contract_id is null
and tt.confirmed_flag not in
('ACCAUDITING', 'NEW', 'CT_REJECTED')
and (nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0) > 0)) v
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
...@@ -9,22 +9,27 @@ ...@@ -9,22 +9,27 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * from (select ct.contemp_id, select *
from (select ct.contemp_id,
ct.batch_id, ct.batch_id,
ct.bp_id, ct.bp_id,
ct.source_contract_id, ct.source_contract_id,
ct.contract_id, ct.contract_id,
ct.source_transaction_id,
ct.transaction_id,
ct.source_trans_type, ct.source_trans_type,
(select t.contract_number from con_contract t (select t.contract_number
from con_contract t
where t.contract_id = ct.contract_id where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL' and t.data_class = 'NORMAL'
and rownum = 1) contract_number, and rownum = 1) contract_number,
'' transaction_num,
ct.deposit_trans_type, ct.deposit_trans_type,
(SELECT sc.code_value_name (SELECT sc.code_value_name
FROM sys_code_values_v sc FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE' WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc, AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
to_char(ct.je_date,'yyyy-MM-dd') je_date, to_char(ct.je_date, 'yyyy-MM-dd') je_date,
ct.deposit_amount, ct.deposit_amount,
ct.deposit_info, ct.deposit_info,
cc.bp_id_agent_level1, cc.bp_id_agent_level1,
...@@ -37,7 +42,42 @@ ...@@ -37,7 +42,42 @@
WHERE bpv.bp_id = cc.bp_id_tenant) bp_name WHERE bpv.bp_id = cc.bp_id_tenant) bp_name
from csh_transaction_contemp ct, con_contract cc from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id where ct.contract_id = cc.contract_id
and cc.data_class = 'NORMAL') t1 and cc.data_class = 'NORMAL'
union all
select ct.contemp_id,
ct.batch_id,
ct.bp_id,
ct.source_contract_id,
ct.contract_id,
ct.source_transaction_id,
ct.transaction_id,
ct.source_trans_type,
'' contract_number,
cc.transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
to_char(ct.je_date, 'yyyy-MM-dd') je_date,
ct.deposit_amount,
ct.deposit_info,
(select u.bp_id
from hls_bp_master u, hls_bp_master hbm
where u.unit_id = hbm.unit_id
and hbm.bp_id = cc.bp_id
and u.bp_category = 'AGENT'),
(select u.bp_name
from hls_bp_master u, hls_bp_master hbm
where u.unit_id = hbm.unit_id
and hbm.bp_id = cc.bp_id
and u.bp_category = 'AGENT'),
cc.bp_id bp_id_tenant,
(select hbm.bp_name
from hls_bp_master hbm
where hbm.bp_id = cc.bp_id) bp_name
from csh_transaction_contemp ct, csh_transaction cc
where ct.transaction_id = cc.transaction_id) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.je_date desc order by t1.je_date desc
]]></bm:query-sql> ]]></bm:query-sql>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select * select *
from (select v.source_contract_id, from (select v.source_contract_id,
null source_transaction_id,
v.batch_id, v.batch_id,
v.trans_review_status, v.trans_review_status,
to_char(v.je_date,'yyyy-MM-dd') je_date, to_char(v.je_date,'yyyy-MM-dd') je_date,
...@@ -28,6 +29,7 @@ ...@@ -28,6 +29,7 @@
WHERE sc.code = 'TRANS_REVIEW_STATUS' WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n, AND sc.code_value = v.trans_review_status) trans_review_status_n,
cc.contract_number, cc.contract_number,
'' transaction_num,
cc.contract_name, cc.contract_name,
cc.bp_id_agent_level1, cc.bp_id_agent_level1,
(SELECT t.bp_name (SELECT t.bp_name
...@@ -67,7 +69,52 @@ ...@@ -67,7 +69,52 @@
and ct.batch_id is not null and ct.batch_id is not null
) v ) v
where cc.contract_id = v.source_contract_id where cc.contract_id = v.source_contract_id
and cc.data_class = 'NORMAL') t1 and cc.data_class = 'NORMAL'
union all
select null source_contract_id,
v.source_transaction_id,
v.batch_id,
v.trans_review_status,
to_char(v.je_date,'yyyy-MM-dd') je_date,
v.source_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = v.source_trans_type) deposit_trans_type_n,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n,
'' contract_number,
cc.transaction_num,
'' contract_name,
(select u.bp_id from hls_bp_master u,hls_bp_master hbm where u.unit_id= hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=cc.bp_id) bp_id_agent_level1,
(select u.bp_name from hls_bp_master u,hls_bp_master hbm where u.unit_id= hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=cc.bp_id) bp_id_agent_level1,
cc.bp_id bp_id_tenant,
(SELECT bpv.bp_name
FROM hls_bp_master bpv
WHERE bpv.bp_id = cc.bp_id) bp_id_telnet_n,
nvl(cc.transaction_amount, 0) -
nvl(cc.write_off_amount, 0) -
nvl(cc.returned_amount, 0) unwrite_off_amount,
nvl((hlcm_cux_deposit_pkg.get_transaction_status_new(p_contract_id => null,
p_transaction_id =>cc.transaction_id,
p_user_id => 1)),
'正常') approve_status
from csh_transaction cc,
(select distinct ct.batch_id,
ct.source_transaction_id,
ct.bp_id,
ct.trans_review_status,
ct.source_trans_type,
ct.je_date
from csh_transaction_contemp ct
where nvl(ct.trans_review_status, 'NEW') <> 'NEW'
and ct.batch_id is not null
) v
where cc.transaction_id = v.source_transaction_id
) t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.trans_review_status,t1.je_date desc order by t1.trans_review_status,t1.je_date desc
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID"/> <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID"/> <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID"/>
<bm:field name="source_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CONTRACT_ID"/> <bm:field name="source_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CONTRACT_ID"/>
<bm:field name="source_transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_TRANSACTION_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/> <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" forInsert="false" forUpdate="false"/> <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" forInsert="false" forUpdate="false"/>
<bm:field name="je_date" databaseType="DATE" datatype="java.util.Date" physicalName="JE_DATE"/> <bm:field name="je_date" databaseType="DATE" datatype="java.util.Date" physicalName="JE_DATE"/>
...@@ -24,6 +25,9 @@ ...@@ -24,6 +25,9 @@
<bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" forInsert="false" forUpdate="false"/> <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" forInsert="false" forUpdate="false"/> <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" forInsert="false" forUpdate="false"/>
<bm:field name="file_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FILE_NUM" forInsert="false" forUpdate="false"/> <bm:field name="file_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FILE_NUM" forInsert="false" forUpdate="false"/>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID"/>
<bm:field name="transaction_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -40,11 +44,14 @@ ...@@ -40,11 +44,14 @@
ct.batch_id, ct.batch_id,
ct.source_trans_type, ct.source_trans_type,
ct.source_contract_id, ct.source_contract_id,
ct.source_transaction_id,
ct.contract_id, ct.contract_id,
(select t.contract_number from con_contract t (select t.contract_number from con_contract t
where t.contract_id = ct.contract_id where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL' and t.data_class = 'NORMAL'
and rownum = 1) contract_number, and rownum = 1) contract_number,
ct.transaction_id,
'' transaction_num,
ct.deposit_trans_type, ct.deposit_trans_type,
(SELECT sc.code_value_name (SELECT sc.code_value_name
FROM sys_code_values_v sc FROM sys_code_values_v sc
...@@ -68,14 +75,57 @@ ...@@ -68,14 +75,57 @@
from csh_transaction_contemp ct, con_contract cc from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id where ct.contract_id = cc.contract_id
and ct.trans_review_status = 'NEW' and ct.trans_review_status = 'NEW'
and cc.data_class = 'NORMAL') t1 and cc.data_class = 'NORMAL'
union all
select ct.contemp_id,
ct.bp_id,
ct.batch_id,
ct.source_trans_type,
ct.source_contract_id,
ct.source_transaction_id,
ct.contract_id,
'' contract_number,
ct.transaction_id transaction_id,
(select t.transaction_num
from csh_transaction t
where t.transaction_id = ct.transaction_id
and rownum = 1) transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
ct.je_date,
ct.deposit_amount,
ct.deposit_info,
(select h.bp_id
from hls_bp_master hbm,hls_bp_master h
where hbm.unit_id=h.unit_id
and hbm.bp_id=cc.bp_id
and h.bp_category='AGENT') bp_id_agent_level1,
(SELECT u.bp_name
FROM hls_bp_master u,hls_bp_master hbm
WHERE u.unit_id = hbm.unit_id
and hbm.bp_id=cc.bp_id
and u.bp_category='AGENT') bp_id_agent_level1_n,
cc.bp_id bp_id_tenant,
(SELECT t.bp_name
FROM hls_bp_master t
WHERE t.bp_id = cc.bp_id) bp_name,
(select count(1)
from fnd_atm_attachment_multi fm
where fm.table_name = 'CSH_TRANSACTION_CONTEMP'
and fm.table_pk_value = ct.contemp_id) file_num
from csh_transaction_contemp ct,csh_transaction cc
where ct.transaction_id = cc.transaction_id
and ct.trans_review_status = 'NEW') t1
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by t1.contemp_id order by t1.contemp_id
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.source_contract_id=${@source_contract_id} "/> <bm:data-filter enforceOperations="query" expression="(t1.source_contract_id is null or(t1.source_contract_id is not null and t1.source_contract_id=${@source_contract_id})) "/>
<bm:data-filter enforceOperations="query" expression="t1.bp_id=${@bp_id} "/> <bm:data-filter enforceOperations="query" expression="t1.bp_id=${@bp_id} "/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
</bm:primary-key> </bm:primary-key>
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null)"/> <bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/> <bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/> <bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
</bm:data-filters> </bm:data-filters>
......
<?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 hlcm_cux_deposit_pkg.deposit_return_bp_name(p_transaction_id=>${@transaction_id}) v_flag from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -107,7 +107,15 @@ ...@@ -107,7 +107,15 @@
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/> <bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/> <bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/> <bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="left_amount" expression=" (Select (nvl(Sum(c.transaction_amount), 0) - <bm:field name="left_amount" expression=" decode(t1.ref_contract_id,null,
(select (nvl(t1.transaction_amount,0)-
nvl(t1.write_off_amount,0)-
nvl(t1.returned_amount,0)-
nvl((Select nvl(cr.return_amount, 0)
From csh_transaction_return cr
Where cr.transaction_id = t1.transaction_id
And cr.status = 'APPROVING'),0)) from dual),
(Select (nvl(Sum(c.transaction_amount), 0) -
nvl(Sum(c.write_off_amount), 0) - nvl(Sum(c.returned_amount), 0) - nvl(Sum(c.write_off_amount), 0) - nvl(Sum(c.returned_amount), 0) -
nvl(Sum((Select nvl(cr.return_amount, 0) nvl(Sum((Select nvl(cr.return_amount, 0)
From csh_transaction_return cr From csh_transaction_return cr
...@@ -122,7 +130,7 @@ ...@@ -122,7 +130,7 @@
And c.ref_contract_id = And c.ref_contract_id =
(Select c1.ref_contract_id (Select c1.ref_contract_id
From csh_transaction c1 From csh_transaction c1
Where c1.transaction_id = t1.transaction_id) )" forInsert="false" forUpdate="false"/> Where c1.transaction_id = t1.transaction_id) ))" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -133,7 +141,7 @@ ...@@ -133,7 +141,7 @@
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/> <bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null)"/> <bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/> <bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="(t1.returned_flag not in ('RETURN'))"/> <bm:data-filter name="query" expression="(t1.returned_flag not in ('RETURN'))"/>
</bm:data-filters> </bm:data-filters>
......
...@@ -102,6 +102,9 @@ ...@@ -102,6 +102,9 @@
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/> <bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/> <bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/> <bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<bm:field name="approval_status" expression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/>
<bm:field name="approval_status_desc" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;WFL_STATUS&apos; And v.code_value = decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
<bm:field name="transaction_wfl_id"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
......
...@@ -130,10 +130,13 @@ ...@@ -130,10 +130,13 @@
<bm:data-filter name="query" expression="((t1.ref_contract_id is not null and t1.source_type is not null) or <bm:data-filter name="query" expression="((t1.ref_contract_id is not null and t1.source_type is not null) or
exists (select hm.bp_id exists (select hm.bp_id
from hls_bp_master hm from hls_bp_master hm
where hm.bp_code = 'D00010012' where hm.bp_code in('D00010020','D00010023')
and hm.bp_id = t1.bp_id and hm.bp_id = t1.bp_id
and t1.collection_classes = 'DEPOSIT' and t1.collection_classes = 'DEPOSIT'
and t1.paid_byother_flag = 'F'))"/> and t1.paid_byother_flag = 'F') or
(t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and
t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
<bm:data-filter name="query" expression="(exists ( <bm:data-filter name="query" expression="(exists (
(select 1 (select 1
from exp_emp_assign_e_v ee from exp_emp_assign_e_v ee
......
...@@ -104,7 +104,54 @@ ...@@ -104,7 +104,54 @@
records[i].set('_status', 'update'); records[i].set('_status', 'update');
saveData.push(records[i].data); saveData.push(records[i].data);
} }
} else { }else if(transaction_type == 'DEPOSIT'){
//保证金抵扣时无合同按照收款的校验来判断 18083 2023/8/22
if(Ext.isEmpty('${/parameter/@ref_contract_id}')||'${/parameter/@ref_contract_id}' == 'undefined'){
if (all.length != records.length) {
Leaf.showInfoMessage("提示", "该现金事务不支持部分反冲");
return;
}
for (var i = 0; i < records.length; i++) {
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
}else{
var gld_batch_id = records[0].get('gld_batch_id');
for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择同一批次号的记录反冲!");
return;
}
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
//同批次未勾选的
var allR = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
var unR = [];
for (var i = 0; i < allR.length; i++) {
if (records.indexOf(allR[i]) === -1) {
unR.push(allR[i]);
}
}
for (var i = 0; i < unR.length; i++) {
if (unR[i].get('gld_batch_id') == gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!");
return;
}
//校验必须先核销批次较大的 18083 2023/8/23
for (var j = 0; j < records.length; j++) {
if (unR[i].get('gld_batch_id')>records[j].get('gld_batch_id')) {
Leaf.showInfoMessage("提示", "此现金事务下存在核销批次较大的批次,请先反冲!");
return;
}
}
}
}
}else {
var gld_batch_id = records[0].get('gld_batch_id'); var gld_batch_id = records[0].get('gld_batch_id');
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) { if (records[i].get('gld_batch_id') != gld_batch_id) {
...@@ -129,6 +176,13 @@ ...@@ -129,6 +176,13 @@
Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!"); Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!");
return; return;
} }
//校验必须先核销批次较大的 18083 2023/8/23
for (var j = 0; j < records.length; j++) {
if (unR[i].get('gld_batch_id')>records[j].get('gld_batch_id')) {
Leaf.showInfoMessage("提示", "此现金事务下存在核销批次较大的批次,请先反冲!");
return;
}
}
} }
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query model="basic.hls_sys_time_default_value" rootPath="sys_time_default_value_path"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="csh_review_transfer_link_id" <a:link id="csh_review_transfer_link_id"
...@@ -36,6 +37,11 @@ ...@@ -36,6 +37,11 @@
Leaf.showMessage('${l:PROMPT}', "请完成附件上传!"); Leaf.showMessage('${l:PROMPT}', "请完成附件上传!");
return; return;
} }
if((Ext.isEmpty(deposit_records[i].get('contract_number'))&&Ext.isEmpty(deposit_records[i].get('transaction_num')))||
(!Ext.isEmpty(deposit_records[i].get('contract_number'))&&!Ext.isEmpty(deposit_records[i].get('transaction_num')))){
Leaf.showMessage('${l:PROMPT}', "合同编号或现金事务编号中必须填写一个,且两个字段不能在同一行数据中同时填写!");
return;
}
var trans_record; var trans_record;
trans_record = deposit_records[i]; trans_record = deposit_records[i];
trans_record.set('review_type', 'REVIEWING'); trans_record.set('review_type', 'REVIEWING');
...@@ -64,6 +70,14 @@ ...@@ -64,6 +70,14 @@
return; return;
} }
$('deposit_transfer_detail_result_ds').submit(); $('deposit_transfer_detail_result_ds').submit();
//不同代理店之间的划转添加弱校验 18083 2023/8/4
var flag= true;
for (var j = 0; j < deposit_records.length; j++) {
if(head_record.get('bp_id_agent_level1') !=deposit_records[j].get('bp_id_agent_level1')){
var flag= false;
}
}
if (flag){
Leaf.showConfirm('${l:PROMPT}', '确定提交保证金划转?', function () { Leaf.showConfirm('${l:PROMPT}', '确定提交保证金划转?', function () {
Leaf.Masker.mask($('${/parameter/@winId}').wrap, "正在执行划转。。。"); Leaf.Masker.mask($('${/parameter/@winId}').wrap, "正在执行划转。。。");
Leaf.request({ Leaf.request({
...@@ -88,6 +102,32 @@ ...@@ -88,6 +102,32 @@
}, function () { }, function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap); Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
}, null, null); }, null, null);
}else{
Leaf.showConfirm('${l:PROMPT}', '是否确认在不同代理店之间进行划转?', function () {
Leaf.Masker.mask($('${/parameter/@winId}').wrap, "正在执行划转。。。");
Leaf.request({
url: $('csh_review_transfer_link_id').getUrl(),
para: param,
success: function () {
cshdeposit102_receipt_exit();
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
},
failure: function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
},
error: function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
},
scope: this
});
}, function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
}, null, null);
}
} }
} }
...@@ -151,6 +191,47 @@ ...@@ -151,6 +191,47 @@
// } // }
} }
} }
//划转至现金事务时,保证金类型为只读 18083 2023/8/16
if(name=='transaction_num'){
if(!Ext.isEmpty(record.get('transaction_num'))){
record.getField('deposit_trans_type').setReadOnly(true);
record.getField('deposit_trans_type_desc').setReadOnly(true);
record.getField('deposit_trans_type').setRequired(false);
record.getField('deposit_trans_type_desc').setRequired(false);
record.set('deposit_trans_type','');
record.set('deposit_trans_type_desc','');
record.getField('contract_number').setReadOnly(true);
record.getField('contract_number').setRequired(false);
}else{
record.getField('deposit_trans_type').setReadOnly(false);
record.getField('deposit_trans_type_desc').setReadOnly(false);
record.getField('deposit_trans_type').setRequired(true);
record.getField('deposit_trans_type_desc').setRequired(true);
record.set('deposit_trans_type','${/parameter/@deposit_trans_type}');
record.set('deposit_trans_type_desc','${/parameter/@deposit_trans_type_desc}');
record.getField('contract_number').setReadOnly(false);
record.getField('contract_number').setRequired(true);
}
}
if(name=='contract_number'){
if(!Ext.isEmpty(record.get('contract_number'))){
record.getField('transaction_num').setReadOnly(true);
record.getField('transaction_num').setRequired(false);
}else{
record.getField('transaction_num').setReadOnly(false);
record.getField('transaction_num').setRequired(true);
}
}
//已入账的合同保证金需要划转回未入账的保证金申请时,经济业务发生日为操作当天,不可修改
if(!Ext.isEmpty(head_record.get('contract_number'))){
if(name=='ref_contract_id'){
if(Ext.isEmpty(record.get('ref_contract_id'))){
record.set('je_date', '${/model/sys_time_default_value_path/record/@now_time}');
record.getField('je_date').setReadOnly(true);
}
}
}
} }
function on_csh_trx_deposit_write_off_remove(ds, record, index) { function on_csh_trx_deposit_write_off_remove(ds, record, index) {
...@@ -183,6 +264,14 @@ ...@@ -183,6 +264,14 @@
// head_record.set('current_apply_amount', total_deposit_amount); // head_record.set('current_apply_amount', total_deposit_amount);
// } // }
function on_csh_trx_deposit_write_off_add(ds, record, index) {
//未入账合同进行划转时,经济业务发生日为操作当天,不可修改
var head_record = $('deposit_transfer_maintain_result_ds').getSelected()[0];
if(Ext.isEmpty(head_record.get('contract_number'))){
record.set('je_date', '${/model/sys_time_default_value_path/record/@now_time}');
record.getField('je_date').setReadOnly(true);
}
}
function attach_win(contemp_id){ function attach_win(contemp_id){
var url = $('contemp_upload_link').getUrl(); var url = $('contemp_upload_link').getUrl();
var win = new Leaf.Window({ var win = new Leaf.Window({
...@@ -217,6 +306,28 @@ ...@@ -217,6 +306,28 @@
var total_deposit_amount = 0; var total_deposit_amount = 0;
for (var i = 0; i < deposit_records.length; i++) { for (var i = 0; i < deposit_records.length; i++) {
total_deposit_amount = plus(total_deposit_amount, deposit_records[i].get('deposit_amount')); total_deposit_amount = plus(total_deposit_amount, deposit_records[i].get('deposit_amount'));
if(!Ext.isEmpty(deposit_records[i].get('transaction_num'))){
deposit_records[i].getField('deposit_trans_type').setReadOnly(true);
deposit_records[i].getField('deposit_trans_type_desc').setReadOnly(true);
deposit_records[i].getField('deposit_trans_type').setRequired(false);
deposit_records[i].getField('deposit_trans_type_desc').setRequired(false);
deposit_records[i].getField('contract_number').setReadOnly(true);
deposit_records[i].getField('contract_number').setRequired(false);
}else{
deposit_records[i].getField('deposit_trans_type').setReadOnly(false);
deposit_records[i].getField('deposit_trans_type_desc').setReadOnly(false);
deposit_records[i].getField('deposit_trans_type').setRequired(true);
deposit_records[i].getField('deposit_trans_type_desc').setRequired(true);
deposit_records[i].getField('contract_number').setReadOnly(false);
deposit_records[i].getField('contract_number').setRequired(true);
}
if(!Ext.isEmpty(deposit_records[i].get('contract_number'))){
deposit_records[i].getField('transaction_num').setReadOnly(true);
deposit_records[i].getField('transaction_num').setRequired(false);
}else{
deposit_records[i].getField('transaction_num').setReadOnly(false);
deposit_records[i].getField('transaction_num').setRequired(true);
}
} }
head_record.set('current_apply_amount', total_deposit_amount); head_record.set('current_apply_amount', total_deposit_amount);
} }
...@@ -229,13 +340,15 @@ ...@@ -229,13 +340,15 @@
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="CUS102_DEPOSIT_TRANS_TYPE_DS" lookupCode="DEPOSIT_TRANS_TYPE"/> <a:dataSet id="CUS102_DEPOSIT_TRANS_TYPE_DS" lookupCode="DEPOSIT_TRANS_TYPE"/>
<a:dataSet id="deposit_transfer_detail_result_ds" autoQuery="true" loadData="true" selectable="true" model="cus_deposit.CUS_DEPOSIT102.csh_transaction_review_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT102.csh_transaction_review_query/query?source_contract_id=${/parameter/@contract_id}&amp;bp_id=${/parameter/@bp_id_agent_level1}"> <a:dataSet id="deposit_transfer_detail_result_ds" autoQuery="true" loadData="true" selectable="true" model="cus_deposit.CUS_DEPOSIT102.csh_transaction_review_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT102.csh_transaction_review_query/query?source_contract_id=${/parameter/@contract_id}&amp;bp_id=${/parameter/@bp_id_agent_level1}&amp;source_transaction_id=${/parameter/@transaction_id}">
<a:fields> <a:fields>
<a:field name="je_date" required="true" prompt="经济业务发生日"/> <a:field name="je_date" required="true" prompt="经济业务发生日"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/> <a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="transaction_type" defaultValue="DEPOSIT"/> <a:field name="transaction_type" defaultValue="DEPOSIT"/>
<a:field name="document_category" defaultValue="CONTRACT"/> <a:field name="document_category" defaultValue="CONTRACT"/>
<a:field name="contract_id"/> <a:field name="contract_id"/>
<a:field name="transaction_id"/>
<a:field name="ref_contract_id"/>
<a:field name="bp_id_agent_level1"/> <a:field name="bp_id_agent_level1"/>
<a:field name="bp_id_agent_level1_n"/> <a:field name="bp_id_agent_level1_n"/>
<a:field name="bp_name"/> <a:field name="bp_name"/>
...@@ -246,9 +359,9 @@ ...@@ -246,9 +359,9 @@
<a:field name="contemp_id" /> <a:field name="contemp_id" />
<a:field name="file_num" /> <a:field name="file_num" />
<a:field name="source_contract_id" defaultValue="${/parameter/@contract_id}"/> <a:field name="source_contract_id" defaultValue="${/parameter/@contract_id}"/>
<a:field name="source_transaction_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="bp_id" defaultValue="${/parameter/@bp_id_agent_level1}"/> <a:field name="bp_id" defaultValue="${/parameter/@bp_id_agent_level1}"/>
<a:field name="source_trans_type" defaultValue="${/parameter/@deposit_trans_type}"/> <a:field name="source_trans_type" defaultValue="${/parameter/@deposit_trans_type}"/>
<a:field name="contract_number" lovGridHeight="300" lovHeight="430" <a:field name="contract_number" lovGridHeight="300" lovHeight="430"
lovService="cus_deposit.CUS_DEPOSIT100.con_contract_v" lovService="cus_deposit.CUS_DEPOSIT100.con_contract_v"
lovWidth="500" required="true" prompt="合同编号"> lovWidth="500" required="true" prompt="合同编号">
...@@ -261,6 +374,19 @@ ...@@ -261,6 +374,19 @@
<a:map from="bp_id_tenant" to="bp_id_tenant"/> <a:map from="bp_id_tenant" to="bp_id_tenant"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="transaction_num" lovGridHeight="300" lovHeight="430"
lovService="cus_deposit.CUS_DEPOSIT102.csh_deposit_transaction_query"
lovWidth="550" required="true" prompt="现金事务编号">
<a:mapping>
<a:map from="transaction_num" to="transaction_num"/>
<a:map from="transaction_id" to="transaction_id"/>
<a:map from="bp_id_agent_level1" to="bp_id_agent_level1"/>
<a:map from="bp_id_agent_level1_n" to="bp_id_agent_level1_n"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_id_tenant" to="bp_id_tenant"/>
<a:map from="ref_contract_id" to="ref_contract_id"/>
</a:mapping>
</a:field>
<a:field name="deposit_trans_type_desc" options="CUS102_DEPOSIT_TRANS_TYPE_DS" <a:field name="deposit_trans_type_desc" options="CUS102_DEPOSIT_TRANS_TYPE_DS"
returnField="deposit_trans_type" displayField="code_value_name" valueField="code_value" returnField="deposit_trans_type" displayField="code_value_name" valueField="code_value"
required="true" defaultValue="${/parameter/@deposit_trans_type_desc}"/> required="true" defaultValue="${/parameter/@deposit_trans_type_desc}"/>
...@@ -270,6 +396,7 @@ ...@@ -270,6 +396,7 @@
<a:event name="remove" handler="on_csh_trx_deposit_write_off_remove"/> <a:event name="remove" handler="on_csh_trx_deposit_write_off_remove"/>
<a:event name="load" handler="on_csh_trx_deposit_write_off_load"/> <a:event name="load" handler="on_csh_trx_deposit_write_off_load"/>
<a:event name="submitsuccess" handler="on_csh_trx_deposit_write_off_remove_success"/> <a:event name="submitsuccess" handler="on_csh_trx_deposit_write_off_remove_success"/>
<a:event name="add" handler="on_csh_trx_deposit_write_off_add"/>
<!-- <a:event name="afterremove" handler="csh_trx_deposit_write_off_afterremove"/>--> <!-- <a:event name="afterremove" handler="csh_trx_deposit_write_off_afterremove"/>-->
</a:events> </a:events>
</a:dataSet> </a:dataSet>
...@@ -301,7 +428,7 @@ ...@@ -301,7 +428,7 @@
</a:fieldSet> </a:fieldSet>
<a:grid id="deposit_transfer_detail_result_grid" bindTarget="deposit_transfer_detail_result_ds" <a:grid id="deposit_transfer_detail_result_grid" bindTarget="deposit_transfer_detail_result_ds"
marginHeight="170" marginHeight="170"
navBar="false" width="1000"> navBar="false" width="1200">
<a:toolBar> <a:toolBar>
<a:button type="add"/> <a:button type="add"/>
<a:button type="delete"/> <a:button type="delete"/>
...@@ -310,8 +437,10 @@ ...@@ -310,8 +437,10 @@
<a:columns> <a:columns>
<a:column name="contract_number" align="center" editor="contract_number_lov" prompt="合同编号" <a:column name="contract_number" align="center" editor="contract_number_lov" prompt="合同编号"
width="135"/> width="135"/>
<a:column name="transaction_num" align="center" editor="transaction_num_lov" prompt="现金事务编号"
width="135"/>
<a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="160"/> <a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="160"/>
<a:column name="bp_name" align="center" prompt="承租人" width="122"/> <a:column name="bp_name" align="center" prompt="承租人/收款商业伙伴" width="160"/>
<a:column name="deposit_trans_type_desc" align="center" editor="deposit_type_box" prompt="保证金类型" <a:column name="deposit_trans_type_desc" align="center" editor="deposit_type_box" prompt="保证金类型"
width="124"/> width="124"/>
<a:column name="deposit_amount" align="right" editor="deposit_amount_nb" prompt="划转金额" <a:column name="deposit_amount" align="right" editor="deposit_amount_nb" prompt="划转金额"
...@@ -325,6 +454,7 @@ ...@@ -325,6 +454,7 @@
<a:datePicker id="je_date_picker"/> <a:datePicker id="je_date_picker"/>
<a:comboBox id="deposit_type_box"/> <a:comboBox id="deposit_type_box"/>
<a:lov id="contract_number_lov"/> <a:lov id="contract_number_lov"/>
<a:lov id="transaction_num_lov"/>
<a:numberField id="deposit_amount_nb" allowDecimals="true" decimalPrecision="2"/> <a:numberField id="deposit_amount_nb" allowDecimals="true" decimalPrecision="2"/>
<a:textArea id="deposit_info_textArea" height="200" width="300"/> <a:textArea id="deposit_info_textArea" height="200" width="300"/>
</a:editors> </a:editors>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
} }
function cshdeposit102N_transfer_submit() { function cshdeposit102N_transfer_submit() {
debugger;
if ($('deposit_transfer_detail_result_ds').validate()) { if ($('deposit_transfer_detail_result_ds').validate()) {
var deposit_records = $('deposit_transfer_detail_result_ds').getAll(); var deposit_records = $('deposit_transfer_detail_result_ds').getAll();
var role_code = '${/parameter/@role_code}'; var role_code = '${/parameter/@role_code}';
...@@ -69,8 +70,11 @@ ...@@ -69,8 +70,11 @@
}else if(role_code == '0003' || role_code == '0005'){ }else if(role_code == '0003' || role_code == '0005'){
var param = {}; var param = {};
var saveData = []; var saveData = [];
//新增划转源单据为未入账收款,传现金事务id 18083 2023/8/11
param['source_transaction_id'] = '${/parameter/@transaction_id}';
param['source_contract_id'] = '${/parameter/@contract_id}'; param['source_contract_id'] = '${/parameter/@contract_id}';
param['je_date'] = deposit_records[0].get('je_date'); param['je_date'] = deposit_records[0].get('je_date');
param['batch_id'] = deposit_records[0].get('batch_id');
param['hd_contract_id'] = deposit_records[0].get('contract_id'); param['hd_contract_id'] = deposit_records[0].get('contract_id');
var deposit_record; var deposit_record;
for (var i = 0; i < deposit_records.length; i++) { for (var i = 0; i < deposit_records.length; i++) {
...@@ -234,7 +238,11 @@ ...@@ -234,7 +238,11 @@
}, },
success: function () { success: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
if(!Ext.isEmpty(record.get('contract_number'))){
var file_name = "保证金划转-" + record.get('contract_number'); var file_name = "保证金划转-" + record.get('contract_number');
}else{
var file_name = "保证金划转-" + record.get('transaction_num');
}
var url_l = $('csh_deposit_trans_history_print_link_id').getUrl() + '?document_id=' + batch_id + '&file_name=' + encodeURI(file_name) + '&document_table=CSH_TRANSACTION_TRANSFER&batch_flag=Y&source_type=common'; var url_l = $('csh_deposit_trans_history_print_link_id').getUrl() + '?document_id=' + batch_id + '&file_name=' + encodeURI(file_name) + '&document_table=CSH_TRANSACTION_TRANSFER&batch_flag=Y&source_type=common';
window.open(href = url_l, target = "_self"); window.open(href = url_l, target = "_self");
}, },
...@@ -282,9 +290,10 @@ ...@@ -282,9 +290,10 @@
</a:fieldSet> </a:fieldSet>
<a:grid id="deposit_review_detail_result_grid" bindTarget="deposit_transfer_detail_result_ds" <a:grid id="deposit_review_detail_result_grid" bindTarget="deposit_transfer_detail_result_ds"
marginHeight="170" marginHeight="170"
navBar="false" width="1000"> navBar="false" width="1200">
<a:columns> <a:columns>
<a:column name="contract_number" align="center" prompt="合同编号" width="135"/> <a:column name="contract_number" align="center" prompt="合同编号" width="135"/>
<a:column name="transaction_num" align="center" prompt="现金事务编号" width="135"/>
<a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="160"/> <a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="160"/>
<a:column name="bp_name" align="center" prompt="承租人" width="122"/> <a:column name="bp_name" align="center" prompt="承租人" width="122"/>
<a:column name="deposit_trans_type_desc" align="center" prompt="保证金类型" width="124"/> <a:column name="deposit_trans_type_desc" align="center" prompt="保证金类型" width="124"/>
......
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
Leaf.request({ Leaf.request({
url: $('check_csh_transaction_status_link_id').getUrl(), url: $('check_csh_transaction_status_link_id').getUrl(),
para: { para: {
contract_id:record.get('contract_id') contract_id:record.get('contract_id'),
transaction_id:record.get('transaction_id')
}, },
success: function () { success: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
params: { params: {
winId: 'csh_transaction_deposit_transfer_link_winid', winId: 'csh_transaction_deposit_transfer_link_winid',
contract_id:record.get('contract_id'), contract_id:record.get('contract_id'),
transaction_id:record.get('transaction_id'),
bp_id_agent_level1:record.get('bp_id'), bp_id_agent_level1:record.get('bp_id'),
deposit_trans_type:record.get('deposit_trans_type'), deposit_trans_type:record.get('deposit_trans_type'),
deposit_trans_type_desc:record.get('deposit_trans_type_n') deposit_trans_type_desc:record.get('deposit_trans_type_n')
...@@ -106,7 +108,7 @@ ...@@ -106,7 +108,7 @@
title="查询条件" style="margin-left:20px" column="3"> title="查询条件" style="margin-left:20px" column="3">
<a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:textField name="bp_id_telnet_n" prompt="承租人" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:textField name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
<a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_transfer_maintain_query_ds"/> <a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_transfer_maintain_query_ds"/>
</a:form> </a:form>
...@@ -114,7 +116,7 @@ ...@@ -114,7 +116,7 @@
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_transfer_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" > <a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_transfer_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" >
<a:columns> <a:columns>
<a:column name="bp_name" prompt="代理店" align="center" width="200"/> <a:column name="bp_name" prompt="代理店" align="center" width="200"/>
<a:column name="bp_id_telnet_n" prompt="承租人" align="center" width="120"/> <a:column name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" align="center" width="180"/>
<a:column name="contract_number" prompt="合同编号" align="center"/> <a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="150"/> <a:column name="contract_name" prompt="合同名称" align="center" width="150"/>
<a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/> <a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/>
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
params: { params: {
winId: 'csh_transaction_detail_transfer_link_winid', winId: 'csh_transaction_detail_transfer_link_winid',
contract_id:record.get('source_contract_id'), contract_id:record.get('source_contract_id'),
transaction_id:record.get('source_transaction_id'),
batch_id:record.get('batch_id'), batch_id:record.get('batch_id'),
bp_id_agent_level1:record.get('bp_id'), bp_id_agent_level1:record.get('bp_id'),
deposit_trans_type:record.get('deposit_trans_type'), deposit_trans_type:record.get('deposit_trans_type'),
...@@ -106,7 +107,7 @@ ...@@ -106,7 +107,7 @@
title="查询条件" style="margin-left:20px" column="3"> title="查询条件" style="margin-left:20px" column="3">
<a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:textField name="contract_number" prompt="合同编号" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:textField name="bp_name_n" prompt="代理店" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:textField name="bp_id_telnet_n" prompt="承租人" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:textField name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:comboBox name="deposit_trans_type_desc" prompt="保证金类型" bindTarget="csh_deposit_review_maintain_query_ds"/>
<a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_review_maintain_query_ds"/> <a:comboBox name="trans_review_status_desc" prompt="复核状态" bindTarget="csh_deposit_review_maintain_query_ds"/>
</a:form> </a:form>
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
<a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_review_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" > <a:grid id="csh_transaction_receipt_maintain_grid_ds" bindTarget="deposit_review_maintain_result_ds" marginHeight="165" marginWidth="100" navBar="true" >
<a:columns> <a:columns>
<a:column name="bp_name" prompt="代理店" align="center" width="200"/> <a:column name="bp_name" prompt="代理店" align="center" width="200"/>
<a:column name="bp_id_telnet_n" prompt="承租人" align="center" width="120"/> <a:column name="bp_id_telnet_n" prompt="承租人/收款商业伙伴" align="center" width="120"/>
<a:column name="contract_number" prompt="合同编号" align="center"/> <a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="200"/> <a:column name="contract_name" prompt="合同名称" align="center" width="200"/>
<a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/> <a:column name="deposit_trans_type_n" prompt="保证金类型" width="110" align="center"/>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
modelaction="update"/> modelaction="update"/>
<a:link id="csh560_start_wfl_link" model="cus_deposit.CUS_DEPOSIT106.return_workflow_start" <a:link id="csh560_start_wfl_link" model="cus_deposit.CUS_DEPOSIT106.return_workflow_start"
modelaction="execute"/> modelaction="execute"/>
<a:link id="deposit_csh_return_bp_name_link" model="cus_deposit.CUS_DEPOSIT106.check_csh_bp_name" modelaction="query"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
var csh_return_atm_id = '${/model/csh_return_list_id/record/@return_list_id}'; var csh_return_atm_id = '${/model/csh_return_list_id/record/@return_list_id}';
...@@ -242,7 +243,7 @@ ...@@ -242,7 +243,7 @@
<a:lov name="csh_return_bp_name" bindTarget="csh_transaction_deposit_return_maintain_ds" <a:lov name="csh_return_bp_name" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="退款用户" width="185"/> prompt="退款用户" width="185"/>
</a:box> </a:box>
<a:box column="4" labelWidth="115"> <a:box id="contract_number_ds" column="4" labelWidth="115">
<a:textField name="contract_number" bindTarget="csh_transaction_deposit_return_maintain_ds" <a:textField name="contract_number" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="合同编号" readOnly="true" width="180"/> prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_deposit_return_maintain_ds" <a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_deposit_return_maintain_ds"
...@@ -345,12 +346,40 @@ ...@@ -345,12 +346,40 @@
// record.getField('return_date').setRequired(true); // record.getField('return_date').setRequired(true);
// record.getField('return_amount').setRequired(true); // record.getField('return_amount').setRequired(true);
var deposit_record = $('csh_transaction_deposit_return_maintain_ds').getCurrentRecord(); var deposit_record = $('csh_transaction_deposit_return_maintain_ds').getCurrentRecord();
//判断现金事务最初的收款商业伙伴与对方账户户名是否一致,不一致则不带出
Leaf.request({
url: $('deposit_csh_return_bp_name_link').getUrl(),
para: {
transaction_id:record.get('transaction_id')
},
success: function (res) {
if (res.result.record.v_flag=='Y'){
deposit_record.set('csh_return_bp_name', record.get('bp_name')); deposit_record.set('csh_return_bp_name', record.get('bp_name'));
deposit_record.set('csh_return_bp_id', record.get('bp_id')); deposit_record.set('csh_return_bp_id', record.get('bp_id'));
}else{
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
}
},
failure: function () {
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
},
error: function () {
deposit_record.set('csh_return_bp_name','');
deposit_record.set('csh_return_bp_id','');
},
scope: this
});
deposit_record.set('contract_number', record.get('contract_number')); deposit_record.set('contract_number', record.get('contract_number'));
deposit_record.set('bp_id_telnet_code', record.get('bp_id_telnet_code')); deposit_record.set('bp_id_telnet_code', record.get('bp_id_telnet_code'));
deposit_record.set('bp_id_telnet_n', record.get('bp_id_telnet_n')); deposit_record.set('bp_id_telnet_n', record.get('bp_id_telnet_n'));
deposit_record.set('bp_bank_branch_name', record.get('bp_bank_branch_name')); deposit_record.set('bp_bank_branch_name', record.get('bp_bank_branch_name'));
//未入账现金事务隐藏合同编号、承租人编码、承租人名称、合同剩余保证金 18083 2023/7/28
if(Ext.isEmpty(record.get('ref_contract_id'))){
document.getElementById('contract_number_ds').style.display='none';
}
} }
]]></script> ]]></script>
......
...@@ -116,9 +116,15 @@ ...@@ -116,9 +116,15 @@
if("${/model/seq_info/record/@position_012_flag}"=="1" && "${/model/seq_info/record/@current_seq}"=="5") { if("${/model/seq_info/record/@position_012_flag}"=="1" && "${/model/seq_info/record/@current_seq}"=="5") {
record.getField('finance_flag').setReadOnly(false); record.getField('finance_flag').setReadOnly(false);
record.set('finance_flag','N'); record.set('finance_flag','N');
if(Ext.isEmpty(record.get('contract_number'))){
document.getElementById('contract_number_ds').style.display='none';
}
}else{ }else{
record.set('finance_flag','Y'); record.set('finance_flag','Y');
record.getField('finance_flag').setReadOnly(true); record.getField('finance_flag').setReadOnly(true);
if(Ext.isEmpty(record.get('contract_number'))){
document.getElementById('contract_number_ds').style.display='none';
}
} }
} }
...@@ -161,7 +167,7 @@ ...@@ -161,7 +167,7 @@
<!--<a:comboBox name="payment_method_display" bindTarget="csh_transaction_return_wfl_ds" prompt="HLS.PAYMENT_METHOD" readOnly="true"/>--> <!--<a:comboBox name="payment_method_display" bindTarget="csh_transaction_return_wfl_ds" prompt="HLS.PAYMENT_METHOD" readOnly="true"/>-->
<!--<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_transaction_return_wfl_ds" decimalPrecision="-1" prompt="HLS.EXCHANGE_RATE" readOnly="true"/>--> <!--<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_transaction_return_wfl_ds" decimalPrecision="-1" prompt="HLS.EXCHANGE_RATE" readOnly="true"/>-->
</a:box> </a:box>
<a:box column="4" labelWidth="115"> <a:box id="contract_number_ds" column="4" labelWidth="115">
<a:textField name="contract_number" bindTarget="csh_transaction_return_wfl_ds" <a:textField name="contract_number" bindTarget="csh_transaction_return_wfl_ds"
prompt="合同编号" readOnly="true" width="180"/> prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_return_wfl_ds" <a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_return_wfl_ds"
...@@ -246,6 +252,7 @@ ...@@ -246,6 +252,7 @@
if ('${/model/default_value_path/record/@status}' != 'APPROVED') { if ('${/model/default_value_path/record/@status}' != 'APPROVED') {
document.getElementById("csh106_return_print_id").style.display = "none"; document.getElementById("csh106_return_print_id").style.display = "none";
} }
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<a:view> <a:view>
<a:link id="csh_write_off_reverse_detail_link" <a:link id="csh_write_off_reverse_detail_link"
url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/> url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/>
<a:link id="csh_write_off_reverse_wfl_link" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_wfl.lview"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
//锁表 //锁表
...@@ -59,7 +60,10 @@ ...@@ -59,7 +60,10 @@
function seedetail_transaction_num(value, record, name) { function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) { if (record.get('transaction_id')) {
url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01') + '&receipt_type=' + record.get('receipt_type') + '&bp_category=' + record.get('bp_category') + '&paid_byother_flag=' + record.get('paid_byother_flag')+ '&deposit_type=Y'; url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01') + '&receipt_type=' + record.get('receipt_type') + '&bp_category=' + record.get('bp_category') + '&paid_byother_flag=' + record.get('paid_byother_flag')+ '&ref_contract_id=' + record.get('ref_contract_id')+ '&deposit_type=Y';
if(record.get('approval_status') == 'APPROVING' || record.get('approval_status') == 'APPROVED'){
url = $('csh_write_off_reverse_wfl_link').getUrl() + '?transaction_wfl_id=' + record.get('transaction_wfl_id')+ '&button_flag=YES';
}
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>'; return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment