Commit 701e80e1 authored by stone's avatar stone

【fix] 应收明细表修改

parent f76fecf0
......@@ -4,7 +4,7 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
SELECT *
FROM (SELECT to_char(cw.times) times,
to_char(cw.due_date, 'yyyy-mm-dd') due_date,
to_char(cw.contract_id) contract_id,
......@@ -24,7 +24,7 @@
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0),'FM999,999,999,990.00') up_interest, --上端
to_char(nvl((SELECT cu.interest
to_char(nvl((SELECT SUM(cu.interest)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -41,7 +41,7 @@
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0),'FM999,999,999,990.00') up_vat_interest, --上端
to_char(nvl((SELECT cu.vat_interest
to_char(nvl((SELECT SUM(cu.vat_interest)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -60,7 +60,7 @@
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0),'FM999,999,999,990.00') up_net_interest,
to_char(nvl((SELECT cu.unearned_finance_income
to_char(nvl((SELECT SUM(cu.unearned_finance_income)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
......@@ -72,7 +72,7 @@
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0) + nvl((SELECT cu.unearned_finance_income
0) + nvl((SELECT SUM(cu.unearned_finance_income)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -81,19 +81,19 @@
),'FM999,999,999,990.00') total_net_interest,
--本期天数
nvl((SELECT cu.weight_factor
nvl((SELECT SUM(cu.weight_factor)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0) up_weight_factor,
nvl((SELECT cu.weight_factor
nvl((SELECT SUM(cu.weight_factor)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 1),
0) down_weight_factor,
nvl((SELECT cu.total_weight
nvl((SELECT SUM(cu.total_weight)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -104,6 +104,7 @@
WHERE ct.contract_id = cw.contract_id
AND cf_item <> 0
AND ct.contract_id = ${/parameter/@contract_id}
UNION ALL
SELECT '' times,
......@@ -124,7 +125,7 @@
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0)),'FM999,999,999,990.00') up_interest, --上端
to_char(SUM(nvl((SELECT cu.interest
to_char(SUM(nvl((SELECT SUM(cu.interest)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -141,7 +142,7 @@
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0)),'FM999,999,999,990.00') up_vat_interest, --上端
to_char(SUM(nvl((SELECT cu.vat_interest
to_char(SUM(nvl((SELECT SUM(cu.vat_interest)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -159,7 +160,7 @@
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0)),'FM999,999,999,990.00') up_net_interest,
to_char(SUM(nvl((SELECT cu.unearned_finance_income
to_char(SUM(nvl((SELECT SUM(cu.unearned_finance_income)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -170,7 +171,7 @@
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0) + nvl((SELECT cu.unearned_finance_income
0) + nvl((SELECT SUM(cu.unearned_finance_income)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -185,13 +186,13 @@
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 2),
0)) up_weight_factor,
SUM(nvl((SELECT cu.weight_factor
SUM(nvl((SELECT SUM(cu.weight_factor)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
AND cu.seq_in_period = 1),
0)) down_weight_factor,
SUM(nvl((SELECT cu.total_weight
SUM(nvl((SELECT SUM(cu.total_weight)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......
......@@ -276,28 +276,47 @@
marginWidth="30" navBar="true" height="1000">
<a:columns>
<a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
renderer="CON620_render_contract_dun_grid" width="150"/>
renderer="CON620_render_contract_dun_grid" width="100"/>
<a:column name="contract_name" align="center"
prompt="合同名称" width="120"/><!--<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" renderer="CON620_render_contract_dun_grid" showTitle="true" width="210"/>-->
<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true" width="170"
<a:column name="bp_id_tenant_desc" lock="true" prompt="承租人名称" showTitle="true" width="100"
align="center"/>
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="200"/>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60" footerRenderer="summaryRenderer"/>
<a:column name="business_due_times" align="center" prompt="营业逾期总期数"
<a:column name="bp_id_agent_desc" align="center" prompt="代理店" width="100"/>
<a:column name="min_overdue_date" align="center" prompt="预定支付日" width="100" renderer="Leaf.formatDate"/>
<a:column name="business_due_times" align="center" prompt="逾期期数(营业)"
width="100"/>
<a:column name="business_due_days" align="center" prompt="营业逾期总天数"
<a:column name="business_due_days" align="center" prompt="逾期天数(营业)"
width="100"/>
<a:column name="business_due_amount" align="right" prompt="营业逾期总金额" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="business_due_amount" align="right" prompt="逾期金额(营业)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="over_due_amount" align="right" prompt="违约金" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="account_due_times" align="center" prompt="会计逾期总期数"
<a:column name="business_received_amount" align="right" prompt="已收租金(营业)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_unreceived_amount" align="right" prompt="未收租金(营业)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="account_due_times" align="center" prompt="逾期期数(会计)"
width="100"/>
<a:column name="account_due_days" align="center" prompt="逾期天数(会计)"
width="100"/>
<a:column name="account_due_days" align="center" prompt="会计逾期总天数"
<a:column name="account_due_amount" align="right" prompt="逾期金额(会计)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="account_due_amount" align="right" prompt="会计逾期总金额" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
<a:column name="ac_received_amount" align="right" prompt="已收租金(会计)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="ac_unreceived_amount" align="right" prompt="未收租金(会计)" renderer="Leaf.formatMoney" footerRenderer="summaryRenderer"
width="100"/>
<a:column name="business_type_n" align="center" prompt="业务类型" width="60"/>
<a:column name="division_n" align="center" prompt="租赁物" width="60" footerRenderer="summaryRenderer"/>
<a:column name="modelcd" align="center" prompt="机型" width="100"/>
<a:column name="machine_number" align="center" prompt="机器号码" width="100"/>
<a:column name="lease_start_date" align="center" prompt="租赁开始日" width="100"/>
<a:column name="lease_times" align="center" prompt="期数" width="100"/>
<a:column name="total_due_amount" align="right" prompt="租金合计" width="100" renderer="Leaf.formatMoney"/>
<!-- <a:column name="contract_status" align="center" prompt="合同状态" width="100"/>-->
</a:columns>
</a:grid>
</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