Commit 4fa26125 authored by liyuan.chen's avatar liyuan.chen

核销反冲部分修改,合同结束查询,债权月报

parent 081ec636
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 下午06:07:55
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=> ${@invoice_hd_ids},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_reject(p_invoice_hd_id=> ${@invoice_hd_id},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 上午09:06:33
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.invoice_hd_id,
t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category,
t1.contract_id,
t1.contract_number,
nvl(t1.contract_name,(select contract_name from con_contract
where contract_id =(select cf.contract_id
from con_contract_Cashflow cf,acr_invoice_ln ln
where ln.invoice_hd_id=t1.invoice_hd_id
and cf.cashflow_id=ln.cashflow_id
and rownum=1)
))contract_name, --modify by wuts 2019-1-22
--decode(t1.lease_channel,'01',t1.project_name,'') contract_name2,
t1.project_id,
t1.project_number,
t1.project_name,
t1.invoice_bp_id,
t1.invoice_bp_code,
t1.invoice_bp_name,
t1.invoice_title,
t1.invoice_number,
t1.invoice_status,
t1.invoice_status_desc,
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
t1.created_by_name,
t1.created_by,
TO_CHAR(t1.accounting_date, 'yyyy-mm-dd') AS accounting_date,
t1.total_amount,
t1.tax_amount,
t1.billing_method,
t1.lease_organization,
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id
FROM acr_invoice_hd_v t1
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.delete_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE
acr_invoice_hd a
SET
a.merge_flag = ${@merge_flag}
WHERE
a.invoice_hd_id = ${@invoice_hd_id};
acr_invoice_pkg.invoice_row_merge(p_invoice_hd_id => ${@invoice_hd_id}, p_user_id => ${/session/@user_id}, p_merge_flag =>${@merge_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
<bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
<bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_f" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_t" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
<!--
<bm:query-field name="contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
-->
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-16 上午09:06:33
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (SELECT t1.invoice_hd_id,
t1.document_number,
TO_CHAR(t1.invoice_date, 'yyyy-mm-dd') AS invoice_date,
t1.document_category,
t1.contract_id,
t1.contract_number,
nvl(t1.contract_name,(select contract_name from con_contract
where contract_id =(select cf.contract_id
from con_contract_Cashflow cf,acr_invoice_ln ln
where ln.invoice_hd_id=t1.invoice_hd_id
and cf.cashflow_id=ln.cashflow_id
and rownum=1)
))contract_name, --modify by wuts 2019-1-22
--decode(t1.lease_channel,'01',t1.project_name,'') contract_name2,
t1.project_id,
t1.project_number,
t1.project_name,
t1.invoice_bp_id,
t1.invoice_bp_code,
t1.invoice_bp_name,
t1.invoice_title,
t1.invoice_number,
t1.invoice_status,
t1.invoice_status_desc,
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
t1.created_by_name,
t1.created_by,
TO_CHAR(t1.accounting_date, 'yyyy-mm-dd') AS accounting_date,
t1.total_amount,
t1.tax_amount,
t1.billing_method,
t1.lease_organization,
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id
FROM acr_invoice_hd_v t1
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
</bm:operation>
<bm:operation name="delete">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.delete_invoice(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE
acr_invoice_hd a
SET
a.merge_flag = ${@merge_flag}
WHERE
a.invoice_hd_id = ${@invoice_hd_id};
acr_invoice_pkg.invoice_row_merge(p_invoice_hd_id => ${@invoice_hd_id}, p_user_id => ${/session/@user_id}, p_merge_flag =>${@merge_flag});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
<bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
<bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
<bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
<bm:query-field name="contract_number_f" queryExpression="t1.contract_number &lt;= ${@contract_number_f}"/>
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_f" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="accounting_date_t" queryExpression="to_date(t1.accounting_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
<bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
<bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
<bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
<bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
<bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
<!--
<bm:query-field name="contract_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, con_contract cc where df.contract_id = cc.contract_id and df.ar_invoice_hd_id = t1.invoice_hd_id and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
-->
<bm:query-field name="query_project_number" queryExpression="exists (select 1 from hls_document_flow_all_v df, prj_project pp where df.ar_invoice_hd_id = t1.invoice_hd_id and df.project_id = pp.project_id and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel = ${@lease_channel}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;CONFIRMING&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
</bm:data-filters>
</bm:model>
...@@ -392,9 +392,9 @@ ...@@ -392,9 +392,9 @@
AND (t.contract_status IN ('INCEPT', AND (t.contract_status IN ('INCEPT',
'TERMINATING', 'TERMINATING',
'ETING', 'ETING',
'REPURING', 'REPURING') or
'ET') or (to_char(t.et_date, 'yyyy-mm') >= ${@period_name} and t.contract_status in ('TERMINATE',
(to_char(t.et_date, 'yyyy-mm') >= ${@period_name} and t.contract_status = 'TERMINATE')) 'ET')))
and trunc(t.lease_start_date) <= trunc(last_day(to_date(${@start_calc_date}, 'yyyy-mm-dd'))) and trunc(t.lease_start_date) <= trunc(last_day(to_date(${@start_calc_date}, 'yyyy-mm-dd')))
]]> ]]>
</bm:query-sql> </bm:query-sql>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/> <bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/> <bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/> <bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/> <bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/> <bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_desc"/> <bm:field name="bp_id_agent_desc"/>
<bm:field name="business_type_n"/> <bm:field name="business_type_n"/>
<bm:field name="division_n"/> <bm:field name="division_n"/>
......
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
<bm:field name="paid_byother_flag"/> <bm:field name="paid_byother_flag"/>
<bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/> <bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/>
<bm:field name="ref_n01"/> <bm:field name="ref_n01"/>
<bm:field name="approval_status" expression="nvl((select nvl(cw.approval_status, &apos;NEW&apos;) from csh_transaction_wfl cw where cw.transaction_wfl_id = t1.transaction_wfl_id), &apos;NEW&apos;)"/> <bm:field name="approval_status" expression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/>
<bm:field name="approval_status_desc" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;COST_SUPPORT_STATUS&apos; And v.code_value = nvl((Select cw.approval_status From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), &apos;NEW&apos;))"/> <bm:field name="approval_status_desc" expression="(Select v.code_value_name From sys_code_values_v v Where v.code = &apos;WFL_STATUS&apos; And v.code_value = decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
<bm:field name="transaction_wfl_id"/> <bm:field name="transaction_wfl_id"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!-- <bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>--> <!-- <bm:data-filter name="query" expression="(t1.posted_flag=&apos;Y&apos;)"/>-->
<bm:data-filter name="approval_status" enforceOperations="query" expression="('APPROVED' != nvl((select nvl(cw.approval_status, 'NEW') from csh_transaction_wfl cw where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'))"/> <bm:data-filter name="approval_status" enforceOperations="query" expression="('APPROVED' != decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')))"/>
</bm:data-filters> </bm:data-filters>
<bm:query-fields> <bm:query-fields>
<bm:query-field field="receipt_type" queryOperator="="/> <bm:query-field field="receipt_type" queryOperator="="/>
...@@ -146,5 +146,6 @@ and cwo.reversed_flag = 'N' ...@@ -146,5 +146,6 @@ and cwo.reversed_flag = 'N'
and cc.data_class = 'NORMAL' and cc.data_class = 'NORMAL'
and cwo.csh_transaction_id = t1.transaction_id and cwo.csh_transaction_id = t1.transaction_id
and hbm.bp_name like ${@bp_name_r})"/> and hbm.bp_name like ${@bp_name_r})"/>
<bm:query-field name="approval_status" queryExpression="decode(nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW'), 'APPROVED', decode(nvl(t1.reversed_flag, 'N'), 'N', 'NEW', 'APPROVED'), nvl((Select nvl(cw.approval_status, 'NEW') From csh_transaction_wfl cw Where cw.transaction_wfl_id = t1.transaction_wfl_id), 'NEW')) = ${@approval_status}"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
t.transaction_wfl_id, t.transaction_wfl_id,
t.transaction_id, t.transaction_id,
t.transaction_num, t.transaction_num,
t.transaction_date, to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
t.reversed_date, to_char(t.reversed_date, 'yyyy-mm-dd') reversed_date,
t.reversed_period_name, t.reversed_period_name,
t.description, t.description,
t.note, t.note,
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-insert model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
<batch-apply sourcePath="/parameter/details">
<a:model-update model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</batch-apply>
<a:model-execute model="csh.CSH514.csh_transaction_write_off_reverse_wfl" trace="true"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-15 下午04:39:15
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure>
</a:init-procedure>
<a:view>
<a:link id="acr610_invoice_detail_link" url="${/request/@context_path}/modules/acr/acr610/acr_invoice_detail_update_detail.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="acr610_detail_submit_link" model="acr.acr610.acr_invoice_apply_detail" modelaction="update"/>
<a:link id="attachment_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="attachment_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script><![CDATA[
function lock_current_detail_window() {
Leaf.Masker.mask($('${/parameter/@win_id}').wrap, '${l:HLS.EXECUTING}');
}
function unlock_current_detail_window() {
Leaf.Masker.unmask($('${/parameter/@win_id}').wrap);
}
function acr610_invoice_detail_exit() {
$('${/parameter/@win_id}').close();
}
function acr610_invoice_detail_query() {
$('acr610_invoice_detail_result_ds').query();
}
function acr610_invoice_detail_reset() {
$('acr610_invoice_detail_query_ds').reset();
}
function acr610_invoice_detail_submit() {
Leaf.showConfirm('提示', '您确认提交吗', function () {
lock_current_detail_window();
Leaf.request({
url: $('acr610_detail_submit_link').getUrl(),
para: {
invoice_apply_id: '${/parameter/@invoice_apply_id}'
},
success: function () {
Leaf.SideBar.show({
msg: '提交成功',
duration: 3000
});
unlock_current_detail_window();
acr610_invoice_detail_exit();
},
failure: function () {
unlock_current_detail_window();
},
error: function () {
unlock_current_detail_window();
},
scope: this
});
});
}
function acr610_detail_grid_readonly(reocrd_id, invoice_hd_wfl_id) {
var currency_reocrd = $('acr610_invoice_detail_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['winid'] = 'confirm_invoice_detail_win';
param['document_id'] = invoice_hd_wfl_id;
param['url_title'] = '${l:ACR.INVOICE_DETAIL_DETAIL}';
param['function_code'] = 'ACR610R';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'READONLY';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr610_invoice_detail_link');
}
function acr610_detail_upload_window(write_off_id) {
if(write_off_id){
var url = $('attachment_uploadFile_id').getUrl() + '?table_name=ACR_INVOICE_APPLY&header_id=' + record.get('write_off_id');
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'acr_apply_cdd_attachtment_upload_id',
width: 850,
height: 400
});
}else {
Leaf.showMessage('${l:HLS.PROMPT}', '无法上传,请联系管理员!');
}
}
function acr610_detail_renderer(value, record, name) {
if (name == 'document_number') {
return '<a href="javascript:acr610_detail_grid_readonly(' + record.id + ',' + record.get('invoice_hd_wfl_id') + '\');">' + value + '</a>';
}
if(name == 'attachment'){
if(record.get('paid_byother_flag') == 'T'){
return '<a href="javascript:acr610_detail_upload_window(\'' + record.get('write_off_id') + '\')">附件</a>';
}
}
}
function acr610_detail_formatMoney(value, record, name) {
return Leaf.formatNumber(value);
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<!--<a:dataSet id="acr610_invoice_apply_query_ds">
<a:fields>
<a:field name="invoice_apply_num"/>
<a:field name="invoice_apply_user_n"/>
<a:field name="invoice_apply_date"/>
</a:fields>
</a:dataSet>-->
<a:dataSet id="acr610_ipaid_byother_flag_ds" lookupCode="PAID_BYOTHER_FLAG"/>
<a:dataSet id="acr610_invoice_detail_query_ds">
<a:fields>
<a:field name="contract_number"/>
<a:field name="bp_code"/>
<a:field name="journal_month"/>
<a:field name="paid_byother_flag_n" displayField="code_value_name" options="acr610_ipaid_byother_flag_ds"
returnField="paid_byother_flag" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="acr610_invoice_detail_result_ds" autoPageSize="true" autoQuery="true" fetchAll="true"
model="acr.acr610.acr_invoice_apply_detail" queryUrl="${/request/@context_path}/autocrud/acr.acr610.acr_invoice_apply_detail/query?invoice_apply_id=${/parameter/@invoice_apply_id}" queryDataSet="acr610_invoice_detail_query_ds"
selectable="false"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:toolbarButton click="acr610_invoice_detail_exit" text="HLS.EXIT"/>
<a:toolbarButton click="acr610_invoice_detail_query" text="HLS.QUERY"/>
<a:toolbarButton click="acr610_invoice_detail_reset" text="HLS.RESET"/>
<a:toolbarButton click="acr610_invoice_detail_submit" text="HLS.SUBMIT"/>
</a:screenTopToolbar>
<a:form marginWidth="200" padding="0" title="查询条件">
<a:hBox labelSeparator=" ">
<a:textField name="contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="合同编号" width="135"/>
<a:textField name="bp_code" bindTarget="acr610_invoice_detail_query_ds" prompt="客户编号" width="135"/>
<a:datePicker name="journal_month" bindTarget="acr610_invoice_detail_query_ds" prompt="税款所属期" width="135"/>
<a:comboBox name="paid_byother_flag_n" bindTarget="acr610_invoice_detail_query_ds" prompt="担保支付" width="135"/>
</a:hBox>
</a:form>
<a:form marginWidth="200" padding="0" title="基本信息">
<a:hBox labelSeparator=" ">
<a:textField name="invoice_apply_num" bindTarget="acr610_invoice_result_ds" prompt="申请编号" width="135" readOnly="true"/>
<a:textField name="invoice_apply_user_n" bindTarget="acr610_invoice_result_ds" prompt="申请人" width="135" readOnly="true"/>
<a:textField name="invoice_apply_date" bindTarget="acr610_invoice_result_ds" prompt="申请时间" width="135" readOnly="true"/>
</a:hBox>
</a:form>
<a:grid id="acr610_invoice_detail_grid_ds" bindTarget="acr610_invoice_detail_result_ds" marginHeight="250"
marginWidth="30" navBar="true">
<a:columns>
<a:column name="document_number" lock="true" prompt="单据编号" renderer="acr610_detail_renderer" width="120"/>
<a:column name="contract_number" prompt="合同编号" width="100"/>
<a:column name="bp_code" prompt="客户编号" width="150"/>
<a:column name="bp_name" prompt="客户名称" width="100"/>
<a:column name="times" prompt="租期" width="100"/>
<a:column name="journal_month" prompt="税款所属期" width="150"/>
<a:column name="tax_type_rate" prompt="税率" width="150"/>
<a:column name="total_amount" prompt="开票金额" renderer="acr610_detail_formatMoney" width="150"/>
<a:column name="net_amount" prompt="不含税金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="tax_amount" prompt="税额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="paid_byother_flag_n" prompt="担保支付" width="100"/>
<a:column name="bp_bank_account_name" prompt="付款人" width="100"/>
<a:column name="transaction_amount" prompt="付款金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="write_off_due_amount" prompt="核销金额" renderer="acr610_detail_formatMoney" width="100"/>
<a:column name="transaction_num" prompt="收款业务编号" width="100"/>
<a:column name="journal_num" prompt="增值税凭证号" width="100"/>
<a:column name="attachment" prompt="担保代付协议" width="100" renderer="acr610_detail_renderer"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
...@@ -150,6 +150,7 @@ ...@@ -150,6 +150,7 @@
<a:dataSet id="currency_ds"> <a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/> <a:datas dataSource="/model/currency"/>
</a:dataSet> </a:dataSet>
<a:dataSet id="approval_status_ds" lookupCode="WFL_STATUS"/>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_query_ds" autoCreate="true"> <a:dataSet id="csh_transaction_receipt_write_off_reverse_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov" <a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov"
...@@ -239,6 +240,7 @@ ...@@ -239,6 +240,7 @@
<a:map from="bp_code" to="bp_code_to"/> <a:map from="bp_code" to="bp_code_to"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="approval_status_desc" displayField="code_value_name" options="approval_status_ds" returnField="approval_status" valueField="code_value"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="csh514_reversed_update"/> <a:event name="update" handler="csh514_reversed_update"/>
...@@ -301,9 +303,8 @@ ...@@ -301,9 +303,8 @@
prompt="对方账户名称"/> prompt="对方账户名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="对方账号"/> prompt="对方账号"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="我方账户名称"/> prompt="客户名称"/>
<!-- <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="我方账号" readOnly="true"/>--> <!-- <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="我方账号" readOnly="true"/>-->
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="现金事务编号"/> prompt="现金事务编号"/>
...@@ -314,8 +315,8 @@ ...@@ -314,8 +315,8 @@
prompt="HLS.ADVANCE_RECEIPT"/> prompt="HLS.ADVANCE_RECEIPT"/>
<a:textField name="contract_number_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:textField name="contract_number_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="合同编号"/> prompt="合同编号"/>
<a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" <a:comboBox name="approval_status_desc" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="客户名称"/> prompt="审批状态"/>
</a:form> </a:form>
<a:grid id="csh_transaction_receipt_write_off_grid_ds" <a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_result_ds" marginHeight="260" marginWidth="35" bindTarget="csh_transaction_receipt_write_off_reverse_result_ds" marginHeight="260" marginWidth="35"
......
...@@ -51,13 +51,13 @@ ...@@ -51,13 +51,13 @@
</a:screenTopToolbar>--> </a:screenTopToolbar>-->
<a:form title="CSH514.CSH_WRITE_OFF_DETAIL"> <a:form title="CSH514.CSH_WRITE_OFF_DETAIL">
<a:hBox> <a:hBox>
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" <a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" renderer="Leaf.formatDate"
prompt="HLS.REVERSE_DATE"/> prompt="HLS.REVERSE_DATE"/>
<a:textField name="reversed_period_name" <a:textField name="reversed_period_name"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.REVERSE_PERIOD"/> prompt="HLS.REVERSE_PERIOD"/>
<a:datePicker name="transaction_date" <a:datePicker name="transaction_date"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/> bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" renderer="Leaf.formatDate" prompt="收款日期"/>
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" <a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.NOTE" width="300"/> prompt="HLS.NOTE" width="300"/>
</a:hBox> </a:hBox>
......
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