Commit 2d277c66 authored by stone's avatar stone

【fix】优化打印界面

parent b54f4891
......@@ -8,59 +8,60 @@
FROM (SELECT to_char(cw.times) times,
to_char(cw.due_date, 'yyyy-mm-dd') due_date,
to_char(cw.contract_id) contract_id,
cw.due_amount,
nvl(cw.vat_due_amount, 0) vat_due_amount,
to_char(cw.due_amount,'FM999,999,999,990.00')due_amount,
to_char(nvl(cw.vat_due_amount, 0),'FM999,999,999,990.00') vat_due_amount,
to_char(cw.cf_item) cf_item,
--上下端利息
nvl((SELECT cu.interest
to_char(nvl((SELECT cu.interest
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_interest, --上端
nvl((SELECT cu.interest
0),'FM999,999,999,990.00') up_interest, --上端
to_char(nvl((SELECT cu.interest
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_interest, --下端
(SELECT nvl(SUM(cu.interest), 0)
0),'FM999,999,999,990.00') down_interest, --下端
to_char((SELECT nvl(SUM(cu.interest), 0)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id) total_interest,
AND cu.contract_id = cw.contract_id),'FM999,999,999,990.00') total_interest,
--上下段税利息
nvl((SELECT cu.vat_interest
to_char(nvl((SELECT cu.vat_interest
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_vat_interest, --上端
nvl((SELECT cu.vat_interest
0),'FM999,999,999,990.00') up_vat_interest, --上端
to_char(nvl((SELECT cu.vat_interest
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_vat_interest, --下端
(SELECT nvl(SUM(cu.vat_interest), 0)
0),'FM999,999,999,990.00') down_vat_interest, --下端
to_char((SELECT nvl(SUM(cu.vat_interest), 0)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id) total_vat_interest,
AND cu.contract_id = cw.contract_id),'FM999,999,999,990.00') total_vat_interest,
--不含税利息
to_char(
nvl((SELECT cu.unearned_finance_income
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_net_interest,
nvl((SELECT cu.unearned_finance_income
0),'FM999,999,999,990.00') up_net_interest,
to_char(nvl((SELECT cu.unearned_finance_income
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_net_interest,
(nvl((SELECT cu.unearned_finance_income
0),'FM999,999,999,990.00') down_net_interest,
to_char((nvl((SELECT cu.unearned_finance_income
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -72,7 +73,7 @@
AND cu.seq_in_period = 1),
0)
) total_net_interest,
),'FM999,999,999,990.00') total_net_interest,
--本期天数
nvl((SELECT cu.weight_factor
FROM con_unearned_finance_income cu
......@@ -97,64 +98,63 @@
WHERE ct.contract_id = cw.contract_id
AND cf_item <> 0
AND ct.contract_id = ${/parameter/@contract_id}
UNION ALL
SELECT '' times,
'合计' due_date,
'' contract_id,
nvl(SUM(cw.due_amount), 0) due_amount,
SUM(nvl(cw.vat_due_amount, 0)) vat_due_amount,
to_char(nvl(SUM(cw.due_amount), 0),'FM999,999,999,990.00') due_amount,
to_char(SUM(nvl(cw.vat_due_amount, 0)),'FM999,999,999,990.00') vat_due_amount,
'' cf_item,
--上下端利息
SUM(nvl((SELECT cu.interest
to_char(SUM(nvl((SELECT cu.interest
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_interest, --上端
SUM(nvl((SELECT cu.interest
0)),'FM999,999,999,990.00') up_interest, --上端
to_char(SUM(nvl((SELECT cu.interest
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_interest, --下端
SUM((SELECT nvl(SUM(cu.interest), 0)
0)),'FM999,999,999,990.00') down_interest, --下端
to_char(SUM((SELECT nvl(SUM(cu.interest), 0)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id)) total_interest,
AND cu.contract_id = cw.contract_id)),'FM999,999,999,990.00') total_interest,
--上下段税利息
SUM(nvl((SELECT cu.vat_interest
to_char(SUM(nvl((SELECT cu.vat_interest
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_vat_interest, --上端
SUM(nvl((SELECT cu.vat_interest
0)),'FM999,999,999,990.00') up_vat_interest, --上端
to_char(SUM(nvl((SELECT cu.vat_interest
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_vat_interest, --下端
SUM((SELECT nvl(SUM(cu.vat_interest), 0)
0)),'FM999,999,999,990.00') down_vat_interest, --下端
to_char(SUM((SELECT nvl(SUM(cu.vat_interest), 0)
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id)) total_vat_interest,
AND cu.contract_id = cw.contract_id)),'FM999,999,999,990.00') total_vat_interest,
--不含税利息
SUM(nvl((SELECT cu.unearned_finance_income
to_char(SUM(nvl((SELECT cu.unearned_finance_income
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_net_interest,
SUM(nvl((SELECT cu.unearned_finance_income
0)),'FM999,999,999,990.00') up_net_interest,
to_char(SUM(nvl((SELECT cu.unearned_finance_income
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_net_interest,
SUM((nvl((SELECT cu.unearned_finance_income
0)),'FM999,999,999,990.00') down_net_interest,
to_char(SUM((nvl((SELECT cu.unearned_finance_income
FROM con_unearned_finance_income cu
WHERE cu.cashflow_id = cw.cashflow_id
AND cu.contract_id = cw.contract_id
......@@ -166,7 +166,7 @@
AND cu.seq_in_period = 1),
0)
)) total_net_interest,
)),'FM999,999,999,990.00') total_net_interest,
--本期天数
SUM(nvl((SELECT cu.weight_factor
FROM con_unearned_finance_income cu
......@@ -189,11 +189,10 @@
FROM con_contract ct, con_contract_cashflow cw
WHERE ct.contract_id = cw.contract_id
AND cf_item <> 0
AND ct.contract_id = ${/parameter/@contract_id}
AND cf_item <> 0 AND ct.contract_id = ${/parameter/@contract_id}
) t
ORDER BY to_number(times)
ORDER BY to_number(times),cf_item
#WHERE_CLAUSE#
......
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