Commit ef6c562b authored by 邓乾隆's avatar 邓乾隆

收款退款校验添加;保证金退款页面、保证金退款工作流页面添加业绩冲销列表

parent 44d7ec8c
...@@ -58,7 +58,12 @@ ...@@ -58,7 +58,12 @@
<!-- <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')"/>--> <!-- <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')"/>-->
<bm:query-field name="cf_item" queryExpression="t.cf_item = ${@cf_item}"/> <bm:query-field name="cf_item" queryExpression="t.cf_item = ${@cf_item}"/>
<bm:query-field name="deposit_flag" <bm:query-field name="deposit_flag"
queryExpression="((nvl(${@deposit_flag},'N') = 'Y' and cf_item in (1,8,9,200,11,250)) or (nvl(${@deposit_flag},'N') = 'N'))"/> queryExpression="((nvl(${@deposit_flag},'N') = 'Y' and cf_item in (1,8,9,200,11,250)) or (nvl(${@deposit_flag},'N') = 'N') or
(cf_item in (1, 8, 9, 200, 11, 250, 2) and
(select cc.division
from con_contract cc
where cc.contract_id = t.contract_id) in
(10, 91)) )"/>
<bm:query-field name="due_date_from" <bm:query-field name="due_date_from"
queryExpression="due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/> queryExpression="due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="due_date_to" <bm:query-field name="due_date_to"
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" baseTable="CSH_DEPOSIT_CASHFLOW" alias="t">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (
Select
cwo.cashflow_id,
t.transaction_num,
cwo.write_off_id,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'RECEIPT_TYPE'
And v.code_value = t.receipt_type) transaction_type,
c.contract_id,
cwo.times,
ccc.cf_item,
(Select h.description
From hls_cashflow_item h
Where h.cf_item = ccc.cf_item) cf_item_n,
--代理店简称
(Select h.extra_nam
From hls_bp_master h
Where h.bp_id = c.bp_id_agent_level1) extra_nam,
--合同编号
c.contract_number,
--机号
(Select nvl(ccli.machine_number,ccli.machine_number_70)
From con_contract_lease_item ccli
Where ccli.contract_id = c.contract_id) machine_number,
--承租人编号,名称,身份证号
h.bp_code bp_id_tenant,
h.bp_name,
decode(h.bp_class, 'NP', h.id_card_no, h.social_code) id_card_no,
--合同总额
nvl(c.down_payment, 0) + nvl(c.total_rental, 0) total_amount,
to_char(ccc.due_date,'yyyy-mm-dd') due_date,
--收款日
to_char(t.transaction_date,'yyyy-mm-dd') transaction_date,
-- ccc.due_amount,
(ccc.due_amount - nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
--t.transaction_num,
to_char(cwo.write_off_date,'yyyy-mm-dd') write_off_date,
--实收金额
cwo.write_off_due_amount received_amount,
(ccc.due_amount - nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date),
0)) As unreceived_amount,
c.BUSINESS_TYPE,
(select hbt.DESCRIPTION
from hls_business_type hbt
where hbt.BUSINESS_TYPE = c.BUSINESS_TYPE) BUSINESS_TYPE_N,
c.large_balance,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'SECONDARY_LEASE'
and v.code_value = c.large_balance) large_balance_n,
c.branch_code,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'BRANCH_CODE_SZMP'
And v.code_enabled_flag = 'Y'
And v.code_value_enabled_flag = 'Y'
And v.code_value = c.branch_code) branch_code_n
From con_contract_cashflow ccc,
con_contract c,
hls_bp_master h,
csh_write_off cwo,
csh_transaction t
Where cwo.cashflow_id = ccc.cashflow_id
And ccc.contract_id = c.contract_id
And cwo.csh_transaction_id = t.transaction_id
And nvl(cwo.reversed_flag, 'N') = 'N'
And h.bp_id = c.bp_id_tenant
And cwo.write_off_type In ('RECEIPT_CREDIT', 'DEPOSIT_CREDIT')
--And ccc.cf_status = 'RELEASE'
--modify by 18938 I-7158
And ccc.cf_status in ('RELEASE','BLOCK')
And cwo.write_off_due_amount > 0
Order By c.contract_id,
ccc.times,
ccc.cf_item,
t.transaction_date,
cwo.write_off_id) t
#WHERE_CLAUSE#
order by extra_nam, bp_id_tenant, contract_id,times,cf_item, due_amount desc, transaction_date,write_off_date
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="t.contract_id = ${@ref_contract_id}"/>
<bm:data-filter enforceOperations="query" expression="exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 WHERE a1.trx_category = 'CONTRACT' and a1.trx_id = t.contract_id AND trunc(sysdate) between a1.start_date AND nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id AND a1.trx_category = a2.trx_category AND a2.authorized_user_id = ${/session/@user_id} AND trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate)))"/>
<bm:data-filter enforceOperations="query" expression="( (decode(${/session/@user_id}, 10600, 1, 2) = 1
and exists (select 1 from con_contract c, hls_bp_master hb where c.contract_id = t.contract_id
and hb.bp_id = c.bp_id_agent_level1
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
</bm:data-filters>
<!--<bm:query-fields>
<bm:query-field name="return_id" queryExpression="t1.return_id = ${@return_id}"/>
</bm:query-fields>-->
</bm:model>
...@@ -219,6 +219,10 @@ ...@@ -219,6 +219,10 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/> <a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/>
<a:dataSet id="csh_write_off_report_grid_ds" fetchAll="false" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query"
queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query/query?ref_contract_id=${/parameter/@ref_contract_id}"/>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
...@@ -286,6 +290,25 @@ ...@@ -286,6 +290,25 @@
<a:column name="contract_number" prompt="合同编号" width="150" align="center"/> <a:column name="contract_number" prompt="合同编号" width="150" align="center"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
<!--业务冲销-->
<a:grid id="csh_write_off_report_grid_ds_id" bindTarget="csh_write_off_report_grid_ds" marginHeight="200" marginWidth="80" navBar="true">
<a:columns>
<a:column name="extra_nam" prompt="代理店简称" width="100" align="center"/>
<a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="bp_name" prompt="承租人名称" width="150" align="center"/>
<a:column name="total_amount" prompt="合同总额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="times" prompt="回数" width="80" align="center"/>
<a:column name="due_date" prompt="预定支付日" align="center" renderer="Leaf.formatDate"/>
<a:column name="due_amount" prompt="应收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="cf_item_n" prompt="应收项目" width="100" align="center"/>
<a:column name="transaction_type" prompt="收款类型" width="100" align="center"/>
<a:column name="transaction_date" prompt="实际收款日" align="center" renderer="Leaf.formatDate"/>
<a:column name="write_off_date" prompt="核销日期" align="center" renderer="Leaf.formatDate"/>
<a:column name="received_amount" prompt="实收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="unreceived_amount" prompt="未收金额" align="right" renderer="Leaf.formatMoney"/>
</a:columns>
</a:grid>
</a:screenBody> </a:screenBody>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Leaf.onReady(init); Leaf.onReady(init);
......
...@@ -135,6 +135,9 @@ ...@@ -135,6 +135,9 @@
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/> <a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/>
<a:dataSet id="csh_write_off_report_grid_ds" fetchAll="false" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query"
queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query/query?ref_contract_id=${/parameter/@ref_contract_id}"/>
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
...@@ -217,6 +220,24 @@ ...@@ -217,6 +220,24 @@
<a:column name="contract_number" prompt="合同编号" width="150" align="center"/> <a:column name="contract_number" prompt="合同编号" width="150" align="center"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
<!--业务冲销-->
<a:grid id="csh_write_off_report_grid_ds_id" bindTarget="csh_write_off_report_grid_ds" marginHeight="200" marginWidth="80" navBar="true">
<a:columns>
<a:column name="extra_nam" prompt="代理店简称" width="100" align="center"/>
<a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="bp_name" prompt="承租人名称" width="150" align="center"/>
<a:column name="total_amount" prompt="合同总额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="times" prompt="回数" width="80" align="center"/>
<a:column name="due_date" prompt="预定支付日" align="center" renderer="Leaf.formatDate"/>
<a:column name="due_amount" prompt="应收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="cf_item_n" prompt="应收项目" width="100" align="center"/>
<a:column name="transaction_type" prompt="收款类型" width="100" align="center"/>
<a:column name="transaction_date" prompt="实际收款日" align="center" renderer="Leaf.formatDate"/>
<a:column name="write_off_date" prompt="核销日期" align="center" renderer="Leaf.formatDate"/>
<a:column name="received_amount" prompt="实收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="unreceived_amount" prompt="未收金额" align="right" renderer="Leaf.formatMoney"/>
</a:columns>
</a:grid>
</a:screenBody> </a:screenBody>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
Leaf.onReady(init); Leaf.onReady(init);
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
opposite_band_na: record.get('opposite_band_na'), opposite_band_na: record.get('opposite_band_na'),
bp_bank_account_num: record.get('bp_bank_account_num'), bp_bank_account_num: record.get('bp_bank_account_num'),
left_amount: record.get('left_amount'), left_amount: record.get('left_amount'),
ref_contract_id: record.get('ref_contract_id'),
winId: 'csh_transaction_deposit_link_winid' winId: 'csh_transaction_deposit_link_winid'
}, },
url: url, url: url,
......
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