Commit 97136093 authored by TIANZHI.HU's avatar TIANZHI.HU

对账单打印报表逻辑问题的bug修复 add by 39135 HuTianzhi

parent f13bce27
......@@ -309,8 +309,8 @@
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
And rownum = 1) -
nvl((Select nvl(Sum(cc2.received_amount), 0)
From con_contract_cashflow cc2
nvl((Select nvl(Sum(tn.write_off_due_amount), 0)
From con_contract_cashflow cc2,csh_write_off tn,csh_transaction ct
Where cc2.contract_id = t2.contract_id
And cc2.times = t2.times
And cc2.cf_item Not In (0, 9)
......@@ -321,7 +321,14 @@
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
'NOT'))),
'NOT'))
and tn.cashflow_id = cc2.cashflow_id
and tn.csh_transaction_id=ct.transaction_id
and (ct.transaction_date < to_date( t2.transaction_date,'yyyy-mm-dd') or
(ct.transaction_date =to_date( t2.transaction_date,'yyyy-mm-dd') and
tn.write_off_date < to_date( t2.write_off_date ,'yyyy-mm-dd')
))
),
0)) As unreceived_amount,
t2.times As times_9,
nvl(t2.due_amount, 0) As due_amount_9,
......
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