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

凭证导入工作流开发4 和 对账单打印bug修复 add by 39135 HuTianzhi

parent 68b9039f
......@@ -24,14 +24,41 @@
to_char(due_amount, 'fm999,999,999,990.00') due_amount,
transaction_date,
write_off_date,
to_char(received_amount, 'fm999,999,999,990.00') received_amount,
--to_char(received_amount, 'fm999,999,999,990.00') received_amount,
--modify by 18938 I-7256
to_char((case
when received_amount > 0 then
hlcm_query_entrance_pkg.get_due_amout(p_transaction_date => transaction_date,
p_times => times,
p_contract_id => contract_id,
p_received_amount_9 => received_amount_9,
p_due_amount => received_amount,
p_write_off_id => write_off_id,
p_field => 'received_amount')
else
received_amount
end), 'fm999,999,999,990.00') As received_amount,
to_char(unreceived_amount, 'fm999,999,999,990.00') unreceived_amount,
times_9,
to_char(due_amount_9, 'fm999,999,999,990.00') due_amount_9,
to_char(nvl(received_amount_9, 0), 'fm999,999,999,990.00') received_amount_9,
--to_char(nvl(received_amount_9, 0), 'fm999,999,999,990.00') received_amount_9,
--modify by 18938 I-7256
to_char((case
when received_amount_9 > 0 then
hlcm_query_entrance_pkg.get_due_amout_new(p_transaction_date => transaction_date,
p_times => times,
p_contract_id => contract_id,
p_due_amount => received_amount_9,
p_write_off_id => write_off_id,
p_field => 'received_amount_9',
p_write_off_id_9 =>write_off_id_9)
else
received_amount_9
end), 'fm999,999,999,990.00') As received_amount_9,
to_char(unreceived_amount_9, 'fm999,999,999,990.00') unreceived_amount_9
From (Select *
From (Select
t2.write_off_id write_off_id_9,
t1.contract_id,
t1.cashflow_id,
t1.write_off_id,
......@@ -58,13 +85,15 @@
Where h.cf_item = ccc.cf_item) cf_item_n,
ccc.times,
to_char(ccc.due_date, 'yyyy-mm-dd') due_date,
(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),
0) + cwo.write_off_due_amount) As due_amount,
--修改点1
ccc.due_amount due_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),
--0) + cwo.write_off_due_amount) As due_amount,
--收款日
to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
to_char(cwo.write_off_date, 'yyyy-mm-dd') write_off_date,
......@@ -175,6 +204,7 @@
And t1.cf_item = t2.cf_item (+)
Union
Select
t2.write_off_id write_off_id_9,
nvl(t1.contract_id, t2.contract_id) contract_id,
nvl(t1.cashflow_id, t2.cashflow_id) cashflow_id,
nvl(t1.write_off_id, t2.write_off_id) write_off_id,
......@@ -297,13 +327,15 @@
Where h.cf_item = ccc.cf_item) cf_item_n,
ccc.times,
to_char(ccc.due_date, 'yyyy-mm-dd') due_date,
(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),
0) + cwo.write_off_due_amount) As due_amount,
--修改点2
ccc.due_amount due_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),
--0) + cwo.write_off_due_amount) As due_amount,
--收款日
to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
to_char(cwo.write_off_date, 'yyyy-mm-dd') write_off_date,
......@@ -417,6 +449,7 @@
And t1.cf_item (+) = t2.cf_item
Union
Select
null write_off_id_9,
ccc.contract_id,
ccc.cashflow_id,
Null write_off_id,
......@@ -494,6 +527,7 @@
-1)
Union
Select
null write_off_id_9,
Null contract_id,
Null cashflow_id,
Null write_off_id,
......@@ -510,7 +544,48 @@
Sum(due_amount_9) due_amount_9,
Sum(received_amount_9) received_amount_9,
Sum(unreceived_amount_9) unreceived_amount_9
From (Select
From(Select
contract_id,
cashflow_id,
write_off_id,
cf_item,
cf_item_n,
times,
due_date,
due_amount,
transaction_date,
write_off_date,
--to_char(received_amount, 'fm999,999,999,990.00') received_amount,
--modify by 18938 I-7256
(case
when received_amount > 0 then
hlcm_query_entrance_pkg.get_due_amout(p_transaction_date => transaction_date,
p_times => times,
p_contract_id => contract_id,
p_received_amount_9 => received_amount_9,
p_due_amount => received_amount,
p_write_off_id => write_off_id,
p_field => 'received_amount')
else
received_amount
end) As received_amount,
unreceived_amount,
times_9,
due_amount_9,
--to_char(nvl(received_amount_9, 0), 'fm999,999,999,990.00') received_amount_9,
--modify by 18938 I-7256
(case
when received_amount_9 > 0 then
hlcm_query_entrance_pkg.get_due_amout(p_transaction_date => transaction_date,
p_times => times,
p_contract_id => contract_id,
p_due_amount => received_amount_9,
p_write_off_id => write_off_id,
p_field => 'received_amount_9')
else
received_amount_9
end) As received_amount_9,
unreceived_amount_9 From (Select
t1.*,
nvl(t2.times, t1.times) As times_9,
nvl(t2.due_amount, 0) As due_amount_9,
......@@ -526,14 +601,16 @@
Where h.cf_item = ccc.cf_item) cf_item_n,
ccc.times,
to_char(ccc.due_date, 'yyyy-mm-dd') due_date,
(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),
0) + cwo.write_off_due_amount) As due_amount,
--修改点3
ccc.due_amount due_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),
--0) + cwo.write_off_due_amount) As due_amount,
--收款日
to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
to_char(cwo.write_off_date, 'yyyy-mm-dd') write_off_date,
......@@ -780,14 +857,16 @@
Where h.cf_item = ccc.cf_item) cf_item_n,
ccc.times,
to_char(ccc.due_date, 'yyyy-mm-dd') due_date,
(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),
0) + cwo.write_off_due_amount) As due_amount,
--修改点4
ccc.due_amount due_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),
--0) + cwo.write_off_due_amount) As due_amount,
--收款日
to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
to_char(cwo.write_off_date, 'yyyy-mm-dd') write_off_date,
......@@ -993,7 +1072,7 @@
Where cc2.contract_id = ccc.contract_id
And cc2.cf_item != 0
And nvl(cc2.received_amount, 0) != 0),
-1)))
-1))))
Order By times,
--cf_item,
--due_amount Desc,
......
......@@ -45,6 +45,6 @@
<bm:query-field name="journal_date_to" queryExpression="t1.journal_date &lt;= to_date(${@journal_date_to},'yyyy-mm-dd')"/>
<bm:query-field name="total_amount_dr_from" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &gt;= ${@total_amount_dr_from}"/>
<bm:query-field name="total_amount_dr_to" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &lt;= ${@total_amount_dr_to}"/>
<bm:query-field name="journal_submit_batch_id" queryExpression="t1.journal_submit_batch_id = ${@journal_submit_batch_id}"/>
<bm:query-field name="journal_submit_batch_id" queryExpression="t1.journal_submit_batch_id = ${@journal_submit_batch_id}"/>
</bm:query-fields>
</bm:model>
......@@ -270,6 +270,7 @@
height: 400
});
win.on('close', function() {
hls536_journal_query();
});
}
......@@ -387,7 +388,7 @@
<a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<a:column name="wfl_status_n" prompt="凭证导入状态" width="100"/>
<a:column name="reverse_wfl_status_n" prompt="凭证反冲状态" width="100"/>
<a:column name="attachment_file" prompt="附件" width="120" renderer="receipt_attachment_upload" align="center"/>-
<a:column name="attachment_file" prompt="附件" width="120" renderer="receipt_attachment_upload" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
......
......@@ -11,6 +11,7 @@
<a:view>
<a:link id="hls_journal_import_create_link_id" url="${/request/@context_path}/modules/hls/HLS536/hls_journal_import_create.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="journal_attachment_uploadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
......@@ -54,6 +55,24 @@
return '<a href="javascript:hls536_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
}
function receipt_attachment_upload(val,rec,name){
return '<a href=javascript:open_upload_window('+rec.get('journal_header_id')+')>附件</a>';
}
function open_upload_window(record_id){
var url = $('journal_attachment_uploadFile_id').getUrl() + '?table_name=HLS_JOURNAL_HEADER_IMP&header_id=' + record_id;
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'attachment_uploadFile_id',
width: 850,
height: 400
});
win.on('close', function() {
hls536_journal_query();
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -162,6 +181,8 @@
<a:column name="description" prompt="凭证摘要" width="220"/>
<a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<a:column name="wfl_status_n" prompt="凭证导入状态" width="100"/>
<a:column name="reverse_wfl_status_n" prompt="凭证反冲状态" width="100"/>
<a:column name="attachment_file" prompt="附件" width="120" renderer="receipt_attachment_upload" align="center"/>
</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