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

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

parent 856bf7d3
...@@ -277,21 +277,7 @@ ...@@ -277,21 +277,7 @@
cc2.cf_direction = 'NONCASH' And cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != 'NOT')) nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
And rownum = 1) - And rownum = 1) ) As due_amount,
nvl((Select nvl(Sum(cc2.received_amount), 0)
From con_contract_cashflow cc2
Where cc2.contract_id = t2.contract_id
And cc2.times = t2.times
And cc2.cf_item Not In (0, 9)
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
'NOT'))),
0)) As due_amount,
nvl(t1.transaction_date, t2.transaction_date) transaction_date, nvl(t1.transaction_date, t2.transaction_date) transaction_date,
nvl(t1.write_off_date, t2.write_off_date) write_off_date, nvl(t1.write_off_date, t2.write_off_date) write_off_date,
nvl(t1.received_amount, 0) As received_amount, nvl(t1.received_amount, 0) As received_amount,
...@@ -832,23 +818,8 @@ ...@@ -832,23 +818,8 @@
('REPURING', 'REPUR') And ('REPURING', 'REPUR') And
cc2.cf_direction = 'NONCASH' And cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') != nvl(cc2.write_off_flag, 'NOT') != 'NOT'))
'NOT')) And rownum = 1) ) As due_amount,
And rownum = 1) -
nvl((Select nvl(Sum(cc2.received_amount), 0)
From con_contract_cashflow cc2
Where cc2.contract_id = t2.contract_id
And cc2.times = t2.times
And cc2.cf_item Not In (0, 9)
And ((cc2.cf_direction = 'INFLOW' And
cc2.cf_status = 'RELEASE') Or
(t2.contract_status In
('REPURING', 'REPUR') And
cc2.cf_direction = 'NONCASH' And
cc2.cf_status = 'BLOCK' And
nvl(cc2.write_off_flag, 'NOT') !=
'NOT'))),
0)) As due_amount,
nvl(t1.transaction_date, t2.transaction_date) transaction_date, nvl(t1.transaction_date, t2.transaction_date) transaction_date,
nvl(t1.write_off_date, t2.write_off_date) write_off_date, nvl(t1.write_off_date, t2.write_off_date) write_off_date,
nvl(t1.received_amount, 0) As received_amount, nvl(t1.received_amount, 0) As received_amount,
...@@ -1116,10 +1087,10 @@ ...@@ -1116,10 +1087,10 @@
And nvl(cc2.received_amount, 0) != 0), And nvl(cc2.received_amount, 0) != 0),
-1)))) -1))))
Order By times, Order By times,
--cf_item,
--due_amount Desc, --due_amount Desc,
transaction_date, transaction_date,
write_off_date, write_off_date,
cf_item,
write_off_id) write_off_id)
</select> </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