Commit 8dc519cb authored by stone's avatar stone

[add] 完成付款反冲功能

parent 35bc3343
......@@ -9,83 +9,57 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
*
FROM
(SELECT
t.transaction_id,
t.transaction_num,
TO_CHAR(t.transaction_date,'yyyy-mm-dd') transaction_date,
t.transaction_amount,
t.currency_code,
(SELECT
g.currency_name
FROM
gld_currency_v g
WHERE
g.currency_code = t.currency_code
) currency_name,
t.bp_bank_account_id,
t.bp_bank_account_num,
(SELECT
b.bank_account_name
FROM
csh_bank_account b
WHERE
b.bank_account_id = t.bank_account_id
) bank_account_name,
(SELECT
b.bank_account_code
FROM
csh_bank_account b
WHERE
b.bank_account_id = t.bank_account_id
) bank_account_code,
t.bp_id,
(SELECT m.bp_name FROM hls_bp_master m WHERE m.bp_id = t.bp_id
) bp_name,
h.payment_req_number
FROM
csh_transaction t,
csh_payment_req_hd h
WHERE
t.transaction_type = 'PAYMENT' AND
t.source_doc_id = h.payment_req_id AND
t.posted_flag = 'Y' AND
t.reversed_flag = 'N' AND
t.write_off_flag = 'FULL' AND
NOT EXISTS
(SELECT
1
FROM
con_contract cc
WHERE
cc.contract_id = h.contract_id AND
cc.data_class = 'NORMAL' AND
cc.contract_status = 'CLOSED'
) AND t.returned_flag = 'NOT' AND
EXISTS
(SELECT
1
FROM
con_contract_cashflow cc
WHERE
cc.cashflow_id =
(SELECT
l.ref_doc_line_id
FROM
csh_payment_req_ln l
WHERE
l.payment_req_id = h.payment_req_id AND
rownum = 1
)
--AND
--cc.cf_item = '52'
)
) v #WHERE_CLAUSE#
ORDER BY
transaction_date DESC,
transaction_num
SELECT *
FROM (SELECT t.transaction_id,
t.transaction_num,
TO_CHAR(t.transaction_date, 'yyyy-mm-dd') transaction_date,
t.transaction_amount,
t.currency_code,
(SELECT g.currency_name
FROM gld_currency_v g
WHERE g.currency_code = t.currency_code) currency_name,
t.bp_bank_account_id,
t.bp_bank_account_num,
(SELECT b.bank_branch_name
FROM csh_bank_account_v b
WHERE b.bank_account_id = t.bank_account_id) bank_account_name,
(SELECT b.bank_account_num
FROM csh_bank_account_v b
WHERE b.bank_account_id = t.bank_account_id) bank_account_num,
t.bp_id,
(SELECT hbbc.bank_account_name
FROM hls_bp_master_bank_account hbbc
WHERE hbbc.bank_account_id=t.bp_bank_account_id) bp_name,
t.bp_category,
(select description
from hls_bp_category h
where h.bp_category=t.bp_category ) bp_category_n,
h.payment_req_number
FROM csh_transaction t, csh_payment_req_hd h
WHERE t.transaction_type = 'PAYMENT'
AND t.source_doc_id = h.payment_req_id
AND t.posted_flag = 'Y'
AND t.reversed_flag = 'N'
AND t.write_off_flag = 'FULL'
AND NOT EXISTS (SELECT 1
FROM con_contract cc
WHERE cc.contract_id = h.contract_id
AND cc.data_class = 'NORMAL'
AND cc.contract_status = 'CLOSED')
AND t.returned_flag = 'NOT'
AND EXISTS
(SELECT 1
FROM con_contract_cashflow cc
WHERE cc.cashflow_id =
(SELECT l.ref_doc_line_id
FROM csh_payment_req_ln l
WHERE l.payment_req_id = h.payment_req_id
AND rownum = 1)
--AND
--cc.cf_item = '52'
)) v #WHERE_CLAUSE#
ORDER BY transaction_date DESC, transaction_num
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -240,12 +240,13 @@
<a:columns>
<a:column name="transaction_num" prompt="CSH502.CSH_TRANSACTION.TRANSACTION_NUM" width="140"/>
<a:column name="transaction_date" prompt="CSH502.CSH_PAY_DATE"/>
<a:column name="transaction_amount" align="right" prompt="CSH502.CSH_PAYMENT_AMOUNT" renderer="Leaf.formatMoney"/>
<a:column name="currency_name" prompt="HLS.CURRENCY"/>
<a:column name="bank_account_code" prompt="CSH502.BANK_ACCOUNT_CODE"/>
<a:column name="bank_account_name" prompt="CSH502.BANK_ACCOUNT_NAME" width="200"/>
<a:column name="transaction_amount" align="right" prompt="本次付款总额" renderer="Leaf.formatMoney"/>
<a:column name="bank_account_name" prompt="付款账户" width="200"/>
<a:column name="bank_account_num" prompt="付款账号"/>
<a:column name="bp_category_n" prompt="商业伙伴类别"/>
<a:column name="bp_name" prompt="CSH502.CSH_PAYMENT_OBJ" width="200"/>
<a:column name="payment_req_number" prompt="CSH502.CSH_PAYMENT_REQ_HD.PAYMENT_REQ_NUMBER" width="200"/>
<a:column name="currency_name" prompt="HLS.CURRENCY"/>
</a:columns>
<a:editors>
<a:checkBox id="grid_checkbox"/>
......
......@@ -72,11 +72,11 @@
<script type="text/javascript"><![CDATA[
Leaf.onReady(init);
function init() {
//var a = $('csh_payment_reverse_ds').getSelected();
//var record = a[0];
var a = $('csh_payment_reverse_ds').getSelected();
var record = a[0];
//var record = $('csh_payment_reverse_ds').getAt(0);
//record.set('bp_name');
var record = $('csh_payment_reverse_ds').getCurrentRecord();
//var record = $('csh_payment_reverse_ds').getCurrentRecord();
record.getField('bp_name').setReadOnly(true);
record.getField('amount').setReadOnly(true);
record.getField('currency_code').setReadOnly(true);
......
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