Commit 3ca4d9ee authored by wangwei5743's avatar wangwei5743

租金余额月末报表调整

parent 1d96f9ba
......@@ -681,7 +681,54 @@
WHERE v.code = 'BRANCH_CODE_SZMP'
AND v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code_value = ct.branch_code) branch_code_n
AND v.code_value = ct.branch_code) branch_code_n,
(select decode(bp.bp_class, 'NP', '自然人', '法人')
from con_contract_bp bp
where bp.contract_id = ct.contract_id
and bp.bp_category = 'TENANT') bp_class_n,
(select b.description
from hls_business_type b
where b.business_type = ct.business_type) business_type_n,
NVL((Select h1.code_value_name value_name
From sys_code_values_v h1
Where h1.code = 'SECONDARY_LEASE'
And h1.code_enabled_flag = 'Y'
And h1.code_value_enabled_flag = 'Y'
AND H1.code_value = CT.SECONDARY_LEASE),
'否') SECONDARY_LEASE_N,
(select d.description from hls_division d where d.division = ct.division) division_n,
nvl((select '是'
from con_contract_change_req ccr
where ccr.contract_id = ct.contract_id
and ccr.req_status = 'APPROVED'
and ccr.document_type = 'LEASE_CHAG'
and rownum = 1),
'否') tenant_change_flag_n,
nvl((select '是'
from con_contract_cashflow ccc
where ccc.cf_item = 1
and ccc.times = 12
and ccc.contract_id = ct.contract_id
and ccc.write_off_flag = 'FULL'
and ccc.cf_direction = 'INFLOW'),
'否') rental_12_pay_flag,
nvl((select '是'
from con_contract_cashflow ccc
where ccc.cf_item = 9
and ccc.cf_direction = 'INFLOW'
and ccc.contract_id = ct.contract_id
and ccc.due_amount > 0
and rownum = 1),
'否') cf_9_exists_flag,
nvl((select '是'
from con_contract_cashflow ccc
where ccc.cf_item = 9
and ccc.cf_direction = 'INFLOW'
and ccc.contract_id = ct.contract_id
and ccc.due_amount > 0
and ccc.times > 1
and rownum = 1),
'否') cf_9_notfirsttime_exists_flag
FROM con_contract ct
WHERE ct.contract_status NOT IN ('CANCEL')
AND ct.data_class = 'NORMAL'
......@@ -753,6 +800,14 @@
<bm:field name="residual_date"/>
<bm:field name="terminate_date"/>
<bm:field name="is_buyout_n"/>
<bm:field name="bp_class_n"/>
<bm:field name="business_type_n"/>
<bm:field name="division_n"/>
<bm:field name="tenant_change_flag_n"/>
<bm:field name="rental_12_pay_flag"/>
<bm:field name="cf_9_exists_flag"/>
<bm:field name="cf_9_notfirsttime_exists_flag"/>
<bm:field name="secondary_lease_n"/>
</bm:fields>
<!-- <bm:query-fields>-->
......
......@@ -191,6 +191,48 @@
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="租金余额表" width="150">
<a:grid id="con_contract_rental_result_add_grid" bindTarget="con_contract_rental_result_ds" marginHeight="115" navBar="true" marginWidth="30">
<a:columns>
<a:column name="agent_extra_name" align="center" prompt="代理店" width="120"/>
<a:column name="bp_tenant_name" align="center" prompt="客户名称" width="120"/>
<a:column name="contract_number" align="center" prompt="合同编号" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁期开始日" width="80"/>
<a:column name="branch_code_n" align="center" prompt="分公司" width="100"/>
<a:column name="large_balance_n" align="center" prompt="大额尾款" width="100"/>
<a:column name="is_buyout_n" align="center" prompt="是否买断机" width="100"/>
<a:column name="modelcd" align="center" prompt=" 机型" width="180"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="80"/>
<a:column name="int_rate_display" exportDataFormat="" align="center" prompt="利率" width="80"/>
<a:column name="int_rate_display" align="center" prompt="基准利率" width="80"/>
<a:column name="lease_times" align="center" prompt="租赁期间" width="80"/>
<a:column name="down_payment_ratio" align="center" prompt="首付款比率" width="80"/>
<a:column name="lease_item_amount" align="center" prompt="代理店销售金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="residual_amount" align="center" prompt="留购价格" renderer="Leaf.formatMoney" width="80"/>
<a:column name="contract_amount" align="center" prompt="合同总金额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="down_payment" align="center" prompt="首付款" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_due_amount_after" align="center" prompt="当月末应收款余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_due_principal_after" align="center" prompt="当月末本金余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_interest_after" align="center" prompt="当月末利息余额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="month_residual" align="center" prompt="当月末留购金余额" renderer="Leaf.formatMoney" width="80"/>
<a:column name="business_due_times_after" align="center" prompt="逾期期数" width="80"/>
<a:column name="business_due_amount_after" align="center" prompt="当月末逾期金额(合计)" renderer="Leaf.formatMoney" width="80"/>
<a:column name="deposit_amount" align="center" prompt="保证金" renderer="Leaf.formatMoney" width="80"/>
<a:column name="contract_status_n" align="center" prompt="合同状态" width="80"/>
<a:column name="residual_date" align="center" prompt="合同终了" width="80"/>
<a:column name="terminate_date" align="center" prompt="结清年月" width="80"/>
<a:column name="bp_class_n" align="center" prompt="商业伙伴分类" width="80"/>
<a:column name="business_type_n" align="center" prompt="业务类型" width="80"/>
<a:column name="division_n" align="center" prompt="租赁物" width="80"/>
<a:column name="secondary_lease_n" align="center" prompt="二次租赁" width="80"/>
<a:column name="tenant_change_flag_n" align="center" prompt="承租人变更" width="80"/>
<a:column name="rental_12_pay_flag" align="center" prompt="是否已履约12期及以上" width="160"/>
<a:column name="cf_9_exists_flag" align="center" prompt="是否有违约金记录产生" width="160"/>
<a:column name="cf_9_notfirsttime_exists_flag" align="center" prompt="除第1期外是否有违约金记录产生" width="160"/>
</a:columns>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody>
......
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