Commit 1d5f5e9d authored by 陆正友's avatar 陆正友

进项发票功能优化

parent 32ff8051
...@@ -18,17 +18,30 @@ ...@@ -18,17 +18,30 @@
c.search_term_1, c.search_term_1,
(SELECT description (SELECT description
FROM HLS_BUSINESS_TYPE_V a FROM HLS_BUSINESS_TYPE_V a
WHERE a.business_type = c.business_type) business_type_n WHERE a.business_type = c.business_type) business_type_n,
(select pp.project_number
from PRJ_PROJECT pp, prj_project_lease_item t2
where t2.source_project_id = pp.project_id
and c.project_id = t2.project_id) project_number,
(select bp.bp_name
from hls_bp_master bp
where bp.bp_id =
(SELECT pp.bp_id_tenant
FROM PRJ_PROJECT pp,
prj_project_lease_item t2
WHERE t2.source_project_id = pp.project_id
and c.project_id = t2.project_id)) bp_id_tenant_n
from con_contract c from con_contract c
where c.data_class = 'NORMAL' where c.data_class = 'NORMAL'
and c.contract_status IN and c.contract_status IN
('REPURING', 'ETING', 'INCEPT', 'PENDING') ('REPURING', 'ETING', 'INCEPT', 'PENDING')
and c.business_type not in ('LEASEBACK' , 'LEASEOPERAT') and c.business_type not in ('LEASEBACK', 'LEASEOPERAT')
and not exists and not exists
(select 1 (select 1
from acp_invoice_ln an from acp_invoice_ln an
where an.contract_id = c.contract_id where an.contract_id = c.contract_id
and an.confirmation_status in ('APPROVING', 'APPROVED')) and an.confirmation_status in
('APPROVING', 'APPROVED'))
union union
select c.contract_id, select c.contract_id,
c.contract_number, c.contract_number,
...@@ -37,7 +50,19 @@ ...@@ -37,7 +50,19 @@
c.search_term_1, c.search_term_1,
(SELECT description (SELECT description
FROM HLS_BUSINESS_TYPE_V a FROM HLS_BUSINESS_TYPE_V a
WHERE a.business_type = c.business_type) business_type_n WHERE a.business_type = c.business_type) business_type_n,
(select pp.project_number
from PRJ_PROJECT pp, prj_project_lease_item t2
where t2.source_project_id = pp.project_id
and c.project_id = t2.project_id) project_number,
(select bp.bp_name
from hls_bp_master bp
where bp.bp_id =
(SELECT pp.bp_id_tenant
FROM PRJ_PROJECT pp,
prj_project_lease_item t2
WHERE t2.source_project_id = pp.project_id
and c.project_id = t2.project_id)) bp_id_tenant_n
from con_contract c, from con_contract c,
con_contract_lease_item ci, con_contract_lease_item ci,
prj_project_lease_item pi, prj_project_lease_item pi,
...@@ -55,7 +80,8 @@ ...@@ -55,7 +80,8 @@
(select 1 (select 1
from acp_invoice_ln an from acp_invoice_ln an
where an.contract_id = c.contract_id where an.contract_id = c.contract_id
and an.confirmation_status in ('APPROVING', 'APPROVED'))) V and an.confirmation_status in
('APPROVING', 'APPROVED'))) V
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
...@@ -63,9 +89,11 @@ ...@@ -63,9 +89,11 @@
</bm:operations> </bm:operations>
<bm:fields> <bm:fields>
<bm:field name="project_number" forDisplay="true" forQuery="true" prompt="采购单编号"/>
<bm:field name="contract_number" forDisplay="true" forQuery="true" prompt="ACR310.CONTRACT_NUMBER"/> <bm:field name="contract_number" forDisplay="true" forQuery="true" prompt="ACR310.CONTRACT_NUMBER"/>
<bm:field name="contract_name" forDisplay="true" forQuery="true" prompt="ACR310.CONTRACT_NAME"/> <bm:field name="contract_name" forDisplay="true" forQuery="true" prompt="ACR310.CONTRACT_NAME"/>
<bm:field name="contract_id"/> <bm:field name="contract_id"/>
<bm:field name="bp_id_tenant_n" forDisplay="true" forQuery="true" prompt="厂商"/>
<bm:field name="search_term_1" forDisplay="true" forQuery="true" prompt="厂商合同编号"/> <bm:field name="search_term_1" forDisplay="true" forQuery="true" prompt="厂商合同编号"/>
<bm:field name="business_type_n" forDisplay="true" forQuery="true" prompt="业务类型"/> <bm:field name="business_type_n" forDisplay="true" forQuery="true" prompt="业务类型"/>
<!-- <bm:field name="business_type" forDisplay="true" forQuery="true" prompt="业务类型"/>--> <!-- <bm:field name="business_type" forDisplay="true" forQuery="true" prompt="业务类型"/>-->
...@@ -77,11 +105,14 @@ ...@@ -77,11 +105,14 @@
<!-- <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="contract_id" />--> <!-- <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="contract_id" />-->
<!-- </bm:fields>--> <!-- </bm:fields>-->
<bm:query-fields> <bm:query-fields>
<bm:query-field field="project_number" queryOperator="like"/>
<bm:query-field field="contract_number" queryOperator="like"/> <bm:query-field field="contract_number" queryOperator="like"/>
<bm:query-field field="contract_name" queryOperator="like"/> <bm:query-field field="contract_name" queryOperator="like"/>
<bm:query-field field="bp_id_tenant_n" queryOperator="like"/>
<bm:query-field field="search_term_1" queryOperator="like"/>
<bm:query-field field="business_type_n" queryOperator="like"/> <bm:query-field field="business_type_n" queryOperator="like"/>
<!-- <bm:query-field field="business_type" queryOperator="like"/>--> <!-- <bm:query-field field="business_type" queryOperator="like"/>-->
<bm:query-field field="search_term_1" queryOperator="like"/>
</bm:query-fields> </bm:query-fields>
</bm:model> </bm:model>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<a:dataSets> <a:dataSets>
<a:dataSet id="acp522_acp_invoice_import_detail_ds" autoCreate="true"> <a:dataSet id="acp522_acp_invoice_import_detail_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="contract_number" prompt="合同编号" required="true" lovGridHeight="350" lovHeight="580" lovWidth="850" lovLabelWidth="100" <a:field name="contract_number" prompt="合同编号" required="true" lovGridHeight="350" lovHeight="580" lovWidth="990" lovLabelWidth="200"
lovService="acp.ACP522.acp_import_contract_lov" lovService="acp.ACP522.acp_import_contract_lov"
title="SELECT_CONTRACT" autoComplete="true"> title="SELECT_CONTRACT" autoComplete="true">
<a:mapping> <a:mapping>
...@@ -124,8 +124,8 @@ ...@@ -124,8 +124,8 @@
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<!--<a:form title="请扫描发票二维码">--> <!--<a:form title="请扫描发票二维码">-->
<a:form title="请选择合同"> <a:form title="请选择合同/采购单">
<a:lov name="contract_number" bindTarget="acp522_acp_invoice_import_detail_ds" width="180" prompt="SELECT_CONTRACT"/> <a:lov name="contract_number" bindTarget="acp522_acp_invoice_import_detail_ds" width="180" prompt="合同/采购单选择"/>
<!-- <a:textField name="contract_number" bindTarget="acp522_acp_invoice_import_ds" width="270" prompt="SELECT_CONTRACT"/>--> <!-- <a:textField name="contract_number" bindTarget="acp522_acp_invoice_import_ds" width="270" prompt="SELECT_CONTRACT"/>-->
<!--<a:textField name="invoice" width="270" bindTarget="acp522_acp_invoice_import_ds" prompt="扫描发票"/>--> <!--<a:textField name="invoice" width="270" bindTarget="acp522_acp_invoice_import_ds" prompt="扫描发票"/>-->
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
Leaf.showMessage('提示', '本次发票明细含税总计不等于该合同设备价!'); Leaf.showMessage('提示', '本次发票明细含税总计不等于该合同设备价!');
return; return;
} }
var diff = ((sum_net_amount + sum_tax - lease_item_amount) > 0 ? (sum_net_amount + sum_tax - lease_item_amount) : (lease_item_amount - sum_tax - sum_net_amount)); var diff = ((net_lease_item_amount + sum_tax - lease_item_amount) > 0 ? (net_lease_item_amount + sum_tax - lease_item_amount) : (lease_item_amount - sum_tax - net_lease_item_amount));
console.log(diff); console.log(diff);
if (diff > 1) { if (diff > 1) {
Leaf.showMessage('提示', '营业外收入或营业外支出科目金额超过1,请联系系统管理员!'); Leaf.showMessage('提示', '营业外收入或营业外支出科目金额超过1,请联系系统管理员!');
......
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