Commit 0eb146b1 authored by TIANZHI.HU's avatar TIANZHI.HU

对账单打印bug修复 add by 39135 HuTianzhi

parent b8f6d5f4
......@@ -101,10 +101,13 @@
cwo.write_off_due_amount received_amount,
(ccc.due_amount -
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn,csh_transaction ct
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <=
cwo.creation_date),
and tn.csh_transaction_id=ct.transaction_id
and (ct.transaction_date<t.transaction_date
or (ct.transaction_date=t.transaction_date
and tn.write_off_date<=cwo.write_off_date
and tn.write_off_id<=cwo.write_off_id))),
0)) As unreceived_amount
From con_contract_cashflow ccc,
con_contract c,
......@@ -343,10 +346,13 @@
cwo.write_off_due_amount received_amount,
(ccc.due_amount -
nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
From csh_write_off tn,csh_transaction ct
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <=
cwo.creation_date),
and tn.csh_transaction_id=ct.transaction_id
and (ct.transaction_date<t.transaction_date
or (ct.transaction_date=t.transaction_date
and tn.write_off_date<=cwo.write_off_date
and tn.write_off_id<=cwo.write_off_id))),
0)) As unreceived_amount
From con_contract_cashflow ccc,
con_contract c,
......@@ -618,11 +624,13 @@
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),
From csh_write_off tn,csh_transaction ct
Where tn.cashflow_id = cwo.cashflow_id
and tn.csh_transaction_id=ct.transaction_id
and (ct.transaction_date<t.transaction_date
or (ct.transaction_date=t.transaction_date
and tn.write_off_date<=cwo.write_off_date
and tn.write_off_id<=cwo.write_off_id))),
0)) As unreceived_amount
From con_contract_cashflow ccc,
con_contract c,
......@@ -874,11 +882,13 @@
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),
From csh_write_off tn,csh_transaction ct
Where tn.cashflow_id = cwo.cashflow_id
and tn.csh_transaction_id=ct.transaction_id
and (ct.transaction_date<t.transaction_date
or (ct.transaction_date=t.transaction_date
and tn.write_off_date<=cwo.write_off_date
and tn.write_off_id<=cwo.write_off_id))),
0)) As unreceived_amount
From con_contract_cashflow ccc,
con_contract c,
......@@ -1079,7 +1089,6 @@
transaction_date,
write_off_date)
</select>
......
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