Commit 8dc519cb authored by stone's avatar stone

[add] 完成付款反冲功能

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