Commit 842e2dc0 authored by panhong18943's avatar panhong18943

Merge branch 'remote_dev' of https://hel.hand-china.com/hlcm/leaf-hlcm into remote_dev

 Conflicts:
	src/main/webapp/WEB-INF/classes/cont/CON_ET001/con_early_termination_query.lwm
	src/main/webapp/modules/csh/CSH510/csh_transaction_receipt_maintain.lview
parents 7f4e1764 bbab35ab
......@@ -19,9 +19,9 @@ redis.db=10
db.type=oracle
db.driverClassName=oracle.jdbc.driver.OracleDriver
db.url=jdbc:oracle:thin:@10.200.17.70:1521/HLS.orcl
db.username=hl_cm_dev
db.password=hl_cm_dev
db.url=jdbc:oracle:thin:@10.200.17.180:1521/HLCMTEST
db.username=hl_cm_dev_2023
db.password=hl_cm_dev_2023
db.maxPoolSize=100
db.minIdle=10
......
......@@ -40,7 +40,7 @@
hbm.REF_V07 description,
nvl(hbm.invoice_title, hbm.bp_name) invoice_title,
(hbm.invoice_bp_address || '' || hbm.invoice_bp_phone_num) invoice_bp_address_phone_num,
(hbm.invoice_bp_bank || ' ' || hbm.invoice_bp_bank_account) invoice_bp_bank_account,
(hbm.invoice_bp_bank || '' || hbm.invoice_bp_bank_account) invoice_bp_bank_account,
hbm.tax_registry_num tax_registry_num,
cc.document_type,
t2.cashflow_id,
......@@ -76,6 +76,12 @@
From hls_bp_master m
Where m.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.termination_date,
cc.search_term_1,
(select pp.project_number
from prj_project pp,prj_project_lease_item ppli,con_contract_lease_item ccli
where pp.project_id=ppli.source_project_id
and ppli.project_lease_item_id = ccli.project_lease_item_id
and ccli.contract_id = cc.contract_id) pur_number,
cc.lease_channel,
t2.cf_direction,
nvl(t2.billing_status,'NOT') billing_status,
......@@ -87,7 +93,7 @@
when acr_invoice_pkg.check_rl_cf_flag(cc.contract_id,t2.cf_item,t2.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'N'
then
'N'
'N'
else
''
end rl_flag,
......@@ -125,9 +131,9 @@
WHERE v.code = 'DIVISION'
AND v.code_value = cc.division
AND v.code_enabled_flag = 'Y') division_n,
hbm.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = hbm.full_elec_invoice_flag) full_elec_invoice_flag_n
hbm.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = hbm.full_elec_invoice_flag) full_elec_invoice_flag_n
from con_contract cc, hls_bp_master hbm, CUS_ACR_INVOICE_V t2
where cc.contract_id = t2.contract_id
and hbm.bp_wfl_status = 'APPROVED'
......@@ -135,15 +141,12 @@
and hbm.bp_id = t2.bill_object_bp_id
and nvl(t2.billing_status, 'NOT') != 'FULL'
--合同状态为结束中(不论是否做过提前结清或解约回购)、提前结清中、提前结清完成、正常结清的合同
and
((t2.cf_item = 2 and cc.payment_deduction in ('TRI_AGREEMENT','TRADE_IN')
and ((t2.cf_item = 2 and cc.division !='95' and cc.payment_deduction in ('TRI_AGREEMENT','TRADE_IN')
and ((cc.contract_status in ('TERMINATING', 'ETING','ET','INCEPT', 'TERMINATE','REPURING','REPUR') and hbm.invoice_method = 'BILLING')
or (cc.contract_status in ('TERMINATING', 'ETING', 'ETING', 'TERMINATE') and hbm.invoice_method = 'NO_BILLING'))
)
or
(cc.contract_status in
('TERMINATING', 'ET', 'ETING', 'TERMINATE')
or (cc.division !='95' and cc.contract_status in
('TERMINATING', 'ETING', 'ETING', 'TERMINATE')
--合同状态为起租做过承租人变更的合同
or
(cc.contract_status = 'INCEPT' and t2.document_type = 'LEASE_CHAG' and
......@@ -193,12 +196,12 @@
(cc.contract_status = 'INCEPT' and
trunc(t2.due_date) >= trunc(nvl(cc.CCR_LEASE_DATE, t2.due_date)) and
hbm.taxpayer_type = 'SMALL_SCALE_TAXPAYER' and
hbm.invoice_method = 'BILLING'
and
nvl(t2.write_off_flag, 'NOT') = 'FULL'
/* and
trunc(t2.due_date) <= trunc(sysdate)*/
)))
hbm.invoice_method = 'BILLING' and
trunc(t2.due_date) <= trunc(sysdate))
--产品线为经营性租赁,并且全部核销
or
(cc.division = '95' and nvl(t2.write_off_flag,'NOT') = 'FULL')
))
--合同状态为起租→开票对象:一般纳税人(法人),小规模纳税人(法人)和深圳美鹏HCS小规模纳税人(自然人)→暂不开票→暂不展示
and not exists
(select 1
......@@ -343,13 +346,15 @@
<!-- <bm:query-field name="inv_object_taxpayer_type" queryExpression="vv.inv_object_taxpayer_type =${@inv_object_taxpayer_type}"/>-->
<bm:query-field name="object_taxpayer_type" queryExpression="vv.object_taxpayer_type =${@object_taxpayer_type}"/>
<bm:query-field name="ccr_document_type" queryExpression="vv.ccr_document_type =${@ccr_document_type}"/>
<bm:query-field name="invoice_method" queryExpression="vv.invoice_method = ${@invoice_method}"/>
<bm:query-field name="invoice_method" queryExpression="vv.invoice_method = ${@invoice_method}"/>
<bm:query-field name="division" queryExpression="vv.division = ${@division}"/>
<bm:query-field name="invoice_type" queryExpression="vv.invoice_type = ${@invoice_type}"/>
<bm:query-field name="rl_flag" queryExpression="vv.rl_flag = ${@rl_flag}"/>
<bm:query-field name="billing_status" queryExpression="vv.billing_status = ${@billing_status}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="vv.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
</bm:query-fields>
<bm:query-field name="full_elec_invoice_flag" queryExpression="vv.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="search_term_1" queryExpression="vv.search_term_1 = ${@search_term_1}"/>
<bm:query-field name="pur_number" queryExpression="vv.pur_number = ${@pur_number}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="vv.contract_status not in ('CANCEL')"/>
<!--<bm:data-filter enforceOperations="query" expression="t1.contract_id = vv.contract_id"/>-->
......
......@@ -13,6 +13,7 @@
<bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
<bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="HLS.PROJECT_NUMBER"/>
<bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NAME" prompt="HLS.PROJECT_NAME"/>
<bm:field name="product_name_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRODUCT_NAME_DESC" forInsert="false" forUpdate="false"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="HLS.CONTRACT_NUMBER"/>
<bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="HLS.CONTRACT_NAME"/>
......@@ -36,12 +37,17 @@
<bm:field name="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="cf_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="rl_flag"/>
<bm:field name="full_elec_invoice_flag"/>
<bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="full_elec_invoice_flag"/>
<bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="business_type" />
<bm:field name="business_type_desc"/>
<bm:field name="pur_model"/>
<bm:field name="pur_unit"/>
<bm:field name="search_term_1"/>
<bm:field name="vender_project_number"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -91,11 +97,12 @@
where v.rate_type_code = 'MANUAL') as exchange_rate_type_desc,
cf.times,
cf.last_received_date,
t.cf_item,
cf.cf_item,
(select i.description
from hls_cashflow_item i
where i.cf_item = t.cf_item) as cf_item_desc,
decode(con.contract_number,'HLL23120001','租赁费',decode(t.cf_item,250,'设备款','融资租赁费')) as product_name,
where i.cf_item = cf.cf_item) as cf_item_desc,
decode(con.contract_number,'HLL23120001','租赁费',decode(con.division,95,'*经营租赁*'||'租赁费'||'('||to_char(cf.due_date,'MM')||'月'||')',decode(t.cf_item,250,'融资租赁挖掘机','融资租赁费'))) as product_name,
decode(con.contract_number,'HLL23120001','租赁费',decode(con.division,95,'*经营租赁*'||'租赁费'||'('||to_char(cf.due_date,'MM')||'月'||')',decode(t.cf_item,250,'融资租赁挖掘机','融资租赁费'))) as product_name_desc,
con.contract_status contract_status,
cf.cf_status cf_status,
t.invoice_kind_type,
......@@ -114,9 +121,14 @@
else
''
end rl_flag,
con.con_search_term_1 as search_term_1,
con.vender_project_number,
decode(con.division,95,'高空作业平台','') as pur_model,
decode(con.division,95,'台','') as pur_unit,
con.business_type,
t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
(select v.code_value_name from sys_code_values_v v where v.code = 'BUSINESS_TYPE' and v.code_value = con.business_type) business_type_desc,
t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
from acr_invoice_create_tmp t,
con_contract_v con,
......
......@@ -41,6 +41,11 @@
<bm:field name="full_elec_invoice_flag"/>
<bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="business_type" />
<bm:field name="business_type_desc"/>
<bm:field name="pur_model"/>
<bm:field name="pur_unit"/>
<bm:field name="search_term_1"/>
<bm:field name="vender_project_number"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -65,6 +70,8 @@
WHERE l.ref_n04 = t.journal_line_id),0) cf_billing_amount,
t.contract_id,
con.contract_number,
con.con_search_term_1 as search_term_1,
con.vender_project_number,
con.contract_name,
con.project_id,
con.project_number,
......@@ -91,7 +98,11 @@
t.cf_item,
t.tax_amount,
'违约金' cf_item_desc,
'融资租赁费' AS product_name,
decode(con.division,95,'*经营租赁*'||'租赁费'||'('||to_char((SELECT cf.transaction_date FROM hls_journal_detail cf WHERE cf.journal_line_id = t.journal_line_id),'MM')||'月'||')','融资租赁费') as product_name,
decode(con.division,95,'高空作业平台','') as pur_model,
decode(con.division,95,'台','') as pur_unit,
con.business_type,
(select v.code_value_name from sys_code_values_v v where v.code = 'BUSINESS_TYPE' and v.code_value = con.business_type) business_type_desc,
t.invoice_kind_type,
(select v.code_value_name
from sys_code_values_v v
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-10-18
$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.description,
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.business_type_n,
t1.business_type_desc_n,
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,
t1.invoice_type,
t1.invoice_kind_type,
t1.invoice_kind_type_n,
t1.full_elec_invoice_flag,
t1.full_elec_invoice_flag_n
FROM acr_invoice_hd_v t1 where t1.division = 95
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-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;REJECT&apos;)"/>
<bm:data-filter enforceOperations="query" expression="nvl(t1.spv_company_id,t1.company_id)=${/session/@company_id}"/>
<bm:data-filter enforceOperations="query" expression="not exists (select 1 from acr_invoice_hd_wfl ah where ah.invoice_hd_id = t1.invoice_hd_id and ah.invoice_status = &apos;CONFIRMING&apos;)"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -39,6 +39,8 @@
t1.currency,
t1.business_type,
t1.business_type_desc,
t1.business_type_n,
t1.business_type_desc_n,
t1.invoice_kind,
t1.invoice_kind_desc,
t1.document_type,
......@@ -52,13 +54,13 @@
t1.lease_channel,
t1.division,
t1.company_id,
t1.spv_company_id,
t1.spv_company_id,
t1.invoice_type,
t1.invoice_kind_type,
t1.invoice_kind_type_n,
t1.full_elec_invoice_flag,
t1.full_elec_invoice_flag_n
FROM acr_invoice_hd_v t1
t1.full_elec_invoice_flag,
t1.full_elec_invoice_flag_n
FROM acr_invoice_hd_v t1 where t1.division != 95
ORDER BY t1.invoice_date DESC, t1.document_number DESC) t1 #WHERE_CLAUSE#
ORDER BY invoice_date DESC, document_number DESC
]]></bm:query-sql>
......@@ -114,8 +116,10 @@
-->
<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-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.invoice_status in( &apos;NEW&apos;,&apos;REJECT&apos;)"/>
......
......@@ -117,8 +117,12 @@
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type" prompt="发票种类"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type_n" prompt="发票种类"/>
<bm:field name="full_elec_invoice_flag" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="full_elec_invoice_flag_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:field name="full_elec_invoice_flag_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="business_type_n_desc" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="search_term_1" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="pur_number" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<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}"/>
......@@ -146,15 +150,19 @@
<bm:query-field name="confirmed_by" queryExpression="t1.confirmed_by = ${@confirmed_by}"/>
<bm:query-field name="query_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="invoice_apply_num" queryExpression="(exists(select 1 from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'APPLY' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.invoice_hd_id and ap.invoice_apply_num=${@invoice_apply_num}) or exists(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'REVERSE' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.source_invoice_header_id and ap.invoice_apply_num=${@invoice_apply_num}) )"/>
<bm:query-field name="invoice_apply_num" queryExpression="( exists(select 1 from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'APPLY' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.invoice_hd_id and ap.invoice_apply_num=${@invoice_apply_num}) or exists(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw where ap.wfl_apply_status = 'APPROVED' and ap.apply_mode = 'REVERSE' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.source_invoice_header_id and ap.invoice_apply_num=${@invoice_apply_num}) )"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="search_term_1" queryExpression="t1.search_term_1 = ${@search_term_1}"/>
<bm:query-field name="pur_number" queryExpression="t1.pur_number = ${@pur_number}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.company_id = ${/session/@company_id} and t1.reversed_flag in( &apos;N&apos;,&apos;O&apos;)"/>
<bm:data-filter enforceOperations="query" expression="(t1.invoice_status=&apos;CONFIRM&apos; OR t1.invoice_status=&apos;POST&apos;)"/>
<bm:data-filter enforceOperations="query" expression="(t1.invoice_kind = &apos;0&apos; or t1.invoice_kind = &apos;2&apos;)"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n!=&apos;LEASEOPERAT&apos;"/>
</bm:data-filters>
<bm:features>
<f:standard-who/>
......
......@@ -5,6 +5,10 @@
<bm:query-sql><![CDATA[
select t1.* from(SELECT confirmed_by_name,
create_je_flag,
business_type_n,
business_type_desc_n,
null as search_term_1,
null as pur_number,
document_type_desc,
vat_interface_status,
project_name,
......@@ -180,6 +184,7 @@
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="nvl(t1.reversed_flag ,'N')= &apos;N&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n!=&apos;LEASEOPERAT&apos;"/>
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<!-- <bm:data-filter name="query" expression="rownum &lt;=1000"/>-->
......
......@@ -5,6 +5,10 @@
<bm:query-sql><![CDATA[
select t1.* from( SELECT confirmed_by_name,
create_je_flag,
business_type_n,
business_type_desc_n,
search_term_1,
pur_number,
document_type_desc,
vat_interface_status,
project_name,
......@@ -181,6 +185,7 @@
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n!=&apos;LEASEOPERAT&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.claim_status not in (&apos;UNCLAIMED&apos;)"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t1.* from( SELECT confirmed_by_name,
create_je_flag,
business_type_n,
business_type_desc_n,
search_term_1,
pur_number,
document_type_desc,
vat_interface_status,
project_name,
company_id,
business_type_desc,
billing_method,
claim_status_n,
total_amount,
confirmed_date,
invoice_bp_code,
tax_amount,
owner_user_id,
receipt_number,
contract_number,
exchange_rate_quotation,
ref_d01,
ref_v05,
express_company,
currency,
confirmed_by,
contract_name,
invoice_code,
to_char(accounting_date,'yyyy-mm-dd')accounting_date,
ref_d04,
invoice_kind,
contract_id,
project_id,
ref_v02,
created_by,
ref_v08,
return_tax_amount,
ref_v03,
ref_n01,
document_number,
document_category,
reverse_date,
express_by,
express_note,
invoice_bp_id,
ref_v07,
source_document_number,
ref_v04,
ref_n10,
ref_n04,
ref_d02,
invoice_number,
bp_agent_name,
division_desc,
vat_invoice_status,
invoice_title,
posted_by_name,
express_status_desc,
ref_vat_invoice_code,
ref_n09,
currency_desc,
vat_red_notice_num,
last_receipt_print_time,
spv_company_id,
lease_organization_desc,
posted_date,
receipt_print_status,
ref_n08,
posted_by,
invoice_status_desc,
billing_method_desc,
exchange_rate_type_desc,
invoice_bp_name,
dif_tax_amount,
document_type,
reversed_flag_desc,
lease_channel,
bp_address_phone_num,
owner_user_name,
invoice_kind_desc,
ref_v10,
ref_v09,
express_date,
lease_organization,
last_updated_by,
tax_code,
description,
express_status,
to_char(invoice_date,'yyyy-mm-dd')invoice_date,
manual_invoice_flag,
exchange_rate_type,
document_category_desc,
gld_interface_flag,
last_update_date,
business_type,
period_name,
source_invoice_header_id,
distribution_set_id,
ref_invoice_number,
internal_period_num,
billing_way_desc,
net_amount,
express_num,
tax_msg,
ref_n05,
ref_n03,
billing_way,
batch_id,
vat_invoice_code,
bp_tax_registry_num,
created_by_name,
ref_v06,
ref_n06,
invoice_status,
ref_d05,
project_number,
exchange_rate,
express_by_name,
ref_v01,
ref_d03,
lease_channel_desc,
creation_date,
bp_bank_account,
division,
invoice_hd_id,
ref_n07,
reversed_flag,
claim_status,
ref_n02,
invoice_apply_num,
ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id)csh_transaction_flag,
decode(ACR_INVOICE_WFL_PKG.get_invoice_transaction_flag(t.invoice_hd_id),'NOT','未收款','PARTIAL','部分收款','FULL','完全收款')csh_transaction_flag_desc,
invoice_type,
invoice_kind_type,
invoice_kind_type_n,
bp_id_agent_level1,
full_elec_invoice_flag,
full_elec_invoice_flag_n
FROM acr_invoice_hd_v t) t1
#WHERE_CLAUSE#
ORDER BY t1.invoice_date desc , t1.document_number desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
acr_invoice_claim_pkg.apply_invoice_confirm(p_invoice_hd_id => ${@invoice_hd_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<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_kind_desc" queryExpression="t1.invoice_kind_desc = ${@invoice_kind_desc}"/>
<bm:query-field name="invoice_status_desc" queryExpression="t1.invoice_status_desc = ${@invoice_status_desc}"/>
<bm:query-field name="claim_status" queryExpression="t1.claim_status = ${@claim_status}"/>
<bm:query-field name="claim_status_n" queryExpression="t1.claim_status_n = ${@claim_status_n}"/>
<bm:query-field name="csh_transaction_flag" queryExpression="t1.csh_transaction_flag = ${@csh_transaction_flag}"/>
<bm:query-field name="cf_item_desc" queryExpression="t1.cf_item_desc = ${@cf_item_desc}"/>
<bm:query-field name="document_number" queryExpression="t1.document_number like ${@document_number}"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number like ${@contract_number}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
<bm:query-field name="invoice_apply_num" queryExpression="t1.invoice_apply_num like ${@invoice_apply_num}"/>
<bm:query-field name="invoice_code" queryExpression="t1.invoice_code like ${@invoice_code}"/>
<bm:query-field name="vat_invoice_code" queryExpression="t1.vat_invoice_code like ${@vat_invoice_code}"/>
<bm:query-field name="invoice_number" queryExpression="t1.invoice_number like ${@invoice_number}"/>
<bm:query-field name="invoice_date_from" queryExpression=" to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_to" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="query_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="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
<bm:query-field name="pur_number" queryExpression="t1.pur_number = ${@pur_number}"/>
<bm:query-field name="search_term_1" queryExpression="t1.search_term_1 = ${@search_term_1}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type_n = ${@business_type_n}"/>
</bm:query-fields>
<bm:data-filters>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t2.write_off_flag = &apos;FULL&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="t1.vat_interface_status = &apos;BACK&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.business_type_n=&apos;LEASEOPERAT&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.claim_status not in (&apos;UNCLAIMED&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -27,6 +27,27 @@
From con_contract c
Where c.contract_id = ah.contract_id) contract_number,
(Select c.search_term_1
from con_contract c
where c.contract_id = ah.contract_id) pur_contract_number,
(Select p.project_number
from prj_project p,
prj_project_lease_item ppli,
con_contract_lease_item ccli,
con_contract cc
where p.project_id = ppli.source_project_id
and ppli.project_lease_item_id =
ccli.project_lease_item_id
and ccli.contract_id = cc.contract_id
and cc.contract_id = ah.contract_id) pur_number,
(Select v.code_value_name
from sys_code_values_v v, con_contract cc
where v.code = 'BUSINESS_TYPE'
and v.code_value = cc.business_type
and cc.contract_id = ah.contract_id) business_type,
(Select hb.bp_code
From hls_bp_master hb
Where hb.bp_id = ah.bp_id) bp_code,
......@@ -36,19 +57,29 @@
From con_contract_cashflow t
Where t.cashflow_id = al.cashflow_id)) times,
nvl((Select to_char(h.journal_date, 'yyyy-mm')
From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id
And ((l.cashflow_id = al.cashflow_id
and al.cf_item<>9) or (al.ref_n04=l.journal_line_id and al.cf_item=9))
And rownum = 1),(select to_char(t.invoice_date, 'yyyymm')
from acr_invoice_hd t where t.invoice_hd_id=ah.invoice_hd_id)) journal_month,
(Select h.sbo_num
From hls_journal_header h, hls_journal_detail l
Where h.journal_header_id = l.journal_header_id
And ((l.cashflow_id = al.cashflow_id
and al.cf_item<>9) or (al.ref_n04=l.journal_line_id and al.cf_item=9))
And rownum = 1) journal_num,
nvl((Select to_char(h.journal_date, 'yyyy-mm')
From hls_journal_header h,
hls_journal_detail l
Where h.journal_header_id =
l.journal_header_id
And ((l.cashflow_id = al.cashflow_id and
al.cf_item <> 9) or
(al.ref_n04 = l.journal_line_id and
al.cf_item = 9))
And rownum = 1),
(select to_char(t.invoice_date, 'yyyy-mm')
from acr_invoice_hd t
where t.invoice_hd_id = ah.invoice_hd_id)) journal_month,
(Select h.sbo_num
From hls_journal_header h,
hls_journal_detail l
Where h.journal_header_id =
l.journal_header_id
And ((l.cashflow_id = al.cashflow_id and
al.cf_item <> 9) or
(al.ref_n04 = l.journal_line_id and
al.cf_item = 9))
And rownum = 1) journal_num,
al.tax_type_rate,
al.total_amount,
......@@ -143,6 +174,8 @@
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="t1.contract_number = ${@contract_number}"/>
<bm:query-field name="pur_contract_number" queryExpression="t1.pur_contract_number = ${@pur_contract_number}"/>
<bm:query-field name="pur_number" queryExpression="t1.pur_number = ${@pur_number}"/>
<bm:query-field name="bp_code" queryExpression="t1.bp_code = ${@bp_code}"/>
<bm:query-field name="journal_month" queryExpression="t1.journal_month = ${@journal_month}"/>
<bm:query-field name="paid_byother_flag_n" queryExpression="t1.paid_byother_flag = ${@paid_byother_flag}"/>
......
......@@ -18,6 +18,12 @@
(Select c.contract_number
From con_contract c
Where c.contract_id = h.contract_id) contract_number,
(Select c.search_term_1
from con_contract c
where c.contract_id=h.contract_id) pur_contract_number,
(Select p.project_number from prj_project p,prj_project_lease_item ppli,con_contract_lease_item ccli,
con_contract cc where p.project_id=ppli.source_project_id and ppli.project_lease_item_id=ccli.project_lease_item_id
and ccli.contract_id=cc.contract_id and cc.contract_id=h.contract_id) pur_number,
(Select c.contract_name
From con_contract c
Where c.contract_id = h.contract_id) contract_name,
......
......@@ -40,7 +40,7 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.enabled_flag = 'Y' and br.bp_category in('TENANT','AGENT') and br.bp_type in('TENANT','AGENT')))"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.enabled_flag = 'Y' and br.bp_category in('TENANT','AGENT','RENTER','MAN_FACTURER') and br.bp_type in('TENANT','AGENT','RENTER','MAN_FACTURER')))"/>
<bm:data-filter name="query" expression="(exists (select 1 from con_contract_bp bp, con_contract cc where bp.contract_id = cc.contract_id and bp.bp_id = t1.bp_id and cc.data_class = 'NORMAL' ))"/>
</bm:data-filters>
</bm:model>
......@@ -13,6 +13,7 @@
</bm:fields>
<bm:data-filters>
<bm:data-filter expression=" t1.enabled_flag = &apos;Y&apos; "/>
<bm:data-filter expression="t1.division != &apos;95&apos;"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="division" queryOperator="like"/>
......
......@@ -37,14 +37,14 @@
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
and PARENT_UNIT_ID <> 1544
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60'))
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60','95'))
UNION ALL
SELECT v.code_value AS value_code, v.code_value_name AS value_name
FROM sys_code_values_v v
WHERE v.code_enabled_flag = 'Y'
AND v.code_value_enabled_flag = 'Y'
AND v.code = 'DIVISION'
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60')
AND v.code_value IN ('10', '20', '30', '40','50','70','80','90','91','92','99','60','95')
AND NOT EXISTS (SELECT 1
FROM exp_emp_assign_e_v t
WHERE t.user_id = ${/session/@user_id}
......
......@@ -13,5 +13,6 @@
</ns1:query-fields>
<ns1:data-filters>
<ns1:data-filter name="query" enforceOperations="t1.due_date is not null"/>
<ns1:data-filter enforceOperations="query" expression="t1.division !=95"/>
</ns1:data-filters>
</ns1:model>
......@@ -13,6 +13,8 @@
con_contract_workflow_pkg.check_con_lease_item(
p_contract_id =>${@contract_id},
p_machine_number =>${@machine_number},
p_source_project_id =>${@source_project_id},
p_ref_d09 =>to_date(${@ref_d09},'yyyy-mm-dd hh24:mi:ss'),
p_user_id => ${/session/@user_id}
);
end;
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
-- Call the procedure
CON_CONTRACT_PKG.init_con_op_atm(p_contract_id => ${@p_contract_id},
p_file_path => ${@p_file_path},
p_file_name => ${@p_file_name},
p_file_size =>${@p_file_size},
p_user_id=>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select cc.times,
to_char(cc.due_amount, 'FM999,999,999,990.00') as due_amount,
to_char(cc.due_date, 'yyyy-mm-dd') as due_date
from con_contract_cashflow cc
where contract_id = ${/parameter/@contract_id}
order by times asc) t
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id=${@contract_id}"/>-->
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select c.contract_id,
to_char(c.lease_item_amount, 'FM999,999,999,990.00') as lease_item_amount,
to_char(c.lease_start_date, 'yyyy-mm-dd') as lease_start_date,
(to_number(c.int_rate)*100||'%') as int_rate,
(to_number(c.deposit_ratio)*100||'%') as deposit_ratio,
to_char(c.deposit, 'FM999,999,999,990.00') as deposit,
to_char(c.first_pay_date, 'yyyy-mm-dd') as first_pay_date,
to_char(c.pmt, 'FM999,999,999,990.00') as pmt,
to_char(c.lease_start_date, 'yyyy-mm-dd') as margin_date,
c.lease_times,
to_char(c.total_rental, 'FM999,999,999,990.00') as total_rental
from con_contract c) t
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id=${@contract_id}"/>-->
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (
SELECT c.contract_number,
h.bp_name,
--机型
ccli.modelcd pattern,
--合同签订日
to_char(c.CONTRACT_SIGN_DATE,'yyyy-mm-dd') inception_of_lease,
--c.rate
ch.bp_code client_bp_code,
ch.bp_name client_bp_name,
--机号
ccli.machine_number,
c.contract_id,
to_char(c.lease_start_date,'yyyy-mm-dd')lease_start_date,
--期间
c.lease_times,
(to_number(c.int_rate_display)*100||'%')int_rate_display
from con_contract c,
hls_bp_master h,
hls_bp_master ch,
con_contract_lease_item ccli
WHERE c.bp_id_agent_level1=h.bp_id
AND ccli.contract_id=c.contract_id
AND ch.bp_id=c.bp_id_tenant
) t
#WHERE_CLAUSE#
#ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<!-- <bm:query-field name="contract_id" queryExpression="t.contract_id=${@contract_id}"/>-->
</bm:query-fields>
</bm:model>
......@@ -9,10 +9,14 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select et.employee_type_code
from exp_employees ee, exp_employee_types et, sys_user su
where ee.employee_id = su.employee_id
and ee.employee_type_id = et.employee_type_id
select et.employee_type_code, ev.unit_id
from exp_employees ee,
exp_employee_types et,
sys_user su,
exp_employee_assigns_v ev
where ee.employee_id = su.employee_id
and ee.employee_type_id = et.employee_type_id
and ee.employee_id = ev.employee_id
and su.user_id = ${/session/@user_id}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Feng
$Date: 2013-9-27 上午10:27:56
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_CONTRACT_V" defaultOrderBy="lease_end_date desc" needAccessControl="false">
<bm:fields>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_CONTRACT.CONTRACT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="CON_CONTRACT.CONTRACT_NUMBER"/>
<bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="CON_CONTRACT.BUSINESS_TYPE"/>
<bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="CON_CONTRACT.DOCUMENT_TYPE"/>
<bm:field name="document_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY" prompt="CON_CONTRACT.DOCUMENT_CATEGORY"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_CONTRACT.COMPANY_ID"/>
<bm:field name="lease_organization" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION" prompt="CON_CONTRACT.LEASE_ORGANIZATION"/>
<bm:field name="lease_channel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL" prompt="CON_CONTRACT.LEASE_CHANNEL"/>
<bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="CON_CONTRACT.DIVISION"/>
<bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" prompt="CON_CONTRACT.BP_ID_TENANT"/>
<bm:field name="bp_name" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_tenant and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_level1" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_AGENT_LEVEL1" prompt="CON_CONTRACT.BP_ID_AGENT_LEVEL1"/>
<bm:field name="et_date" databaseType="DATE" datatype="java.util.Date" physicalName="ET_DATE" prompt="CON_CONTRACT.ET_DATE"/>
<bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="CON_CONTRACT.OWNER_USER_ID"/>
<bm:field name="inception_of_lease" databaseType="DATE" datatype="java.util.Date" physicalName="INCEPTION_OF_LEASE" prompt="CON_CONTRACT.INCEPTION_OF_LEASE"/>
<bm:field name="lease_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="LEASE_END_DATE" prompt="CON_CONTRACT.LEASE_END_DATE"/>
<bm:field name="lease_item_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_AMOUNT" prompt="CON_CONTRACT.LEASE_ITEM_AMOUNT"/>
<bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS" prompt="CON_CONTRACT.CONTRACT_STATUS"/>
<!--<bm:field name="signing_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SIGNING_USER_ID" prompt="CON_CONTRACT.SIGNING_USER_ID"/>-->
<bm:field name="signing_location" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SIGNING_LOCATION" prompt="CON_CONTRACT.SIGNING_LOCATION"/>
<bm:field name="residual_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RESIDUAL_VALUE" prompt="CON_CONTRACT.RESIDUAL_VALUE"/>
<bm:field name="signing_date" databaseType="DATE" datatype="java.util.Date" physicalName="SIGNING_DATE" prompt="CON_CONTRACT.SIGNING_DATE"/>
<!--<bm:field name="bp_id_vender" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_VENDER" prompt="CON_CONTRACT.BP_ID_VENDER"/>-->
<bm:field name="down_payment" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOWN_PAYMENT"/>
<!--<bm:field name="signing_user_id_n" expression="(select name from exp_employees where employee_id = t1.signing_user_id)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_channel_desc" expression="(select description from hls_lease_channel where lease_channel = t1.lease_channel)" 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="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 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="business_type_n"/>
<bm:field name="division_n"/>
<bm:field name="con_search_term_1"/>
<bm:field name="vender_project_number"/>
<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="received_amount_total" expression="(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=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_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_received_interest" expression="(select sum(nvl(ccc.received_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_received_penalty" expression="(nvl((select sum(nvl(ccc.received_amount,0)) 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=9),0))" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
<!--<s:bm-script><![CDATA[-->
<!--var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!--Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!--]]></s:bm-script>-->
</bm:features>
<bm:primary-key>
<bm:pk-field name="contract_id"/>
</bm:primary-key>
<bm:query-fields>
<bm:query-field field="contract_number" queryExpression="contract_number like upper(&apos;%&apos;||${@contract_number}||&apos;%&apos;)"/>
<bm:query-field field="owner_user_id" queryOperator="="/>
<bm:query-field field="bp_id_tenant" queryOperator="="/>
<bm:query-field field="lease_organization" queryOperator="="/>
<bm:query-field field="bp_id_agent_desc" queryExpression="bp_id_agent_desc like upper(&apos;%&apos;||${@bp_id_agent_desc}||&apos;%&apos;)"/>
</bm:query-fields>
<bm:data-filters>
<!-- <bm:field name="is_terminate" expression="((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1)) = 0"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;ADING&apos;) "/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.con_finish_batch_id = ${@con_finish_batch_id}"/>
<bm:data-filter enforceOperations="query" expression="t1.division = &apos;95&apos;"/>
<!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND cf_item IN (1,8,52) AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;NOT&apos;) OR received_amount != due_amount))"/>-->
<!--<bm:data-filter enforceOperations="query" expression="exists (select 1 from con_contract where contract_id = t1.contract_id and created_by = ${/session/@user_id})"/>-->
</bm:data-filters>
</bm:model>
......@@ -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="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="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="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 and ccc.cf_item&lt;&gt;40) - (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 and ccc.cf_item&lt;&gt;40 )) = 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_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"/>
......@@ -83,6 +83,7 @@
<bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;TERMINATING&apos;) "/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.division != &apos;95&apos;"/>
<!-- <bm:data-filter enforceOperations="query" expression=" not exists (select 1 from con_contract_cashflow ccw where ccw.contract_id = t1.contract_id and ccw.cf_item=1 and ccw.cf_status=&apos;RELEASE&apos; and nvl(ccw.output_tax_create_je_flag,'N')='N')"/>-->
<bm:data-filter enforceOperations="query" expression=" not exists (select 1 from con_contract_cashflow ccw , con_unearned_finance_income cf where ccw.contract_id = t1.contract_id and ccw.cf_item=1 and cf.cashflow_id(+)=ccw.cashflow_id and ccw.cf_status=&apos;RELEASE&apos; and nvl(cf.create_je_flag,'N')='N' and nvl(ccw.output_tax_create_je_flag,'N')='N')"/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id = ${@contract_id}"/>-->
......
......@@ -68,7 +68,8 @@
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;ADING&apos;) "/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.contract_id = ${@contract_id}"/>
<bm:data-filter enforceOperations="query" expression="t1.con_finish_batch_id = ${@con_finish_batch_id}"/>
<bm:data-filter enforceOperations="query" expression="t1.division != &apos;95&apos;"/>
<!--<bm:data-filter enforceOperations="query" expression=" NOT EXISTS (SELECT 1 FROM con_contract_cashflow WHERE contract_id = t1.contract_id AND cf_item IN (1,8,52) AND (write_off_flag IN (&apos;PARTIAL&apos;, &apos;NOT&apos;) OR received_amount != due_amount))"/>-->
<!--<bm:data-filter enforceOperations="query" expression="exists (select 1 from con_contract where contract_id = t1.contract_id and created_by = ${/session/@user_id})"/>-->
</bm:data-filters>
......
......@@ -7,26 +7,63 @@
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
con_contract_closed_pkg.contract_use_seal_save(p_contract_id => ${@contract_id},
p_user_id => ${/session/@user_id},
p_instruments_types => ${@instruments_types},
p_common_seal => ${@common_seal},
p_corporate_visa_seal => ${@corporate_visa_seal},
p_legal_seal => ${@legal_seal},
p_con_special_seal => ${@con_special_seal},
p_financial_seal => ${@financial_seal},
p_supervisio_seal => ${@supervisio_seal},
p_seal_number => ${@seal_number});
con_contract_closed_pkg.contract_use_seal_save(p_con_finish_batch_id => ${/parameter/@con_finish_batch_id},
p_user_id => ${/session/@user_id});
con_contract_closed_pkg.terminate_contract(
p_contract_id =>${@contract_id},
p_user_id =>${/session/@user_id}
p_con_finish_batch_id =>${/parameter/@con_finish_batch_id},
p_user_id =>${/session/@user_id},
p_company_id => ${/session/@company_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:parameters>
<bm:parameter name="con_finish_batch_id" output="true" outputPath="@con_finish_batch_id"/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
declare
v_con_finish_batch_id contract_finish_batch.con_finish_batch_id%TYPE := contract_finish_batch_s.nextval;
begin
${@con_finish_batch_id} := v_con_finish_batch_id;
insert into contract_finish_batch
(con_finish_batch_id,
instance_id,
wfl_status,
created_by,
creation_date,
last_updated_by,
last_update_date)
values
(v_con_finish_batch_id,
null,
null,
${/session/@user_id},
sysdate,
${/session/@user_id},
sysdate
);
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql>
<![CDATA[
update con_contract cc
set
cc.con_finish_batch_id = ${/parameter/@con_finish_batch_id},
cc.last_updated_by = ${/session/@user_id},
cc.last_update_date = sysdate
where cc.contract_id = ${@contract_id}
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -424,6 +424,6 @@
<bm:query-field name="send_message" queryExpression="t1.send_message = ${@send_message}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
</bm:data-filters>
</bm:model>
......@@ -63,6 +63,7 @@
Where t.bp_id_tenant = b.bp_id(+)
And t.contract_status = 'INCEPT'
And t.data_class = 'NORMAL'
And t.division != '95'
And dt.document_type(+) = t.document_type
And Exists
(Select 1
......
......@@ -22,6 +22,7 @@
bp_code,
bp_name,
bp_category,
bp_type,
(SELECT description FROM hls_bp_category WHERE bp_category = t1.bp_category) bp_category_name,
bp_class,
(SELECT code_value_name
......@@ -51,5 +52,6 @@
and a2.authorized_user_id = ${/session/@user_id}
and trunc(sysdate) between a2.start_date and
nvl(a2.end_date, trunc(sysdate))) "/>
<bm:data-filter name="query" expression="t1.bp_type not in (&apos;RENTER&apos;,&apos;MAN_FACTURER&apos;,&apos;ASSET_REGULATOR&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -149,23 +149,9 @@
t.bp_id_tenant = b.bp_id(+) AND
t.contract_status in ('INCEPT','REPURING') AND
t.data_class = 'NORMAL' AND
dt.document_type(+) = t.document_type
and (t.bp_id_agent_level1 = (select t.bp_id from sys_user s, exp_employees e, exp_employee_assigns a, exp_org_position pp,hls_bp_master t
where a.position_id = pp.position_id
and a.employee_id = e.employee_id
and s.employee_id = e.employee_id
and pp.unit_id = t.unit_id
and a.enabled_flag = 'Y'
and e.enabled_flag = 'Y'
and a.primary_position_flag = 'Y'
and pp.enabled_flag = 'Y'
and t.bp_type = 'AGENT'
and s.user_id = ${/session/@user_id}) or not exists (select 1
from sys_user_role_groups g, sys_role r
where g.role_id = r.role_id
and g.user_id = ${/session/@user_id}
and r.role_code in ('0018','0019')
and trunc(sysdate) <= nvl(g.end_date, trunc(sysdate))))
dt.document_type(+) = t.document_type AND
t.division != '95'
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
......@@ -46,6 +46,10 @@
WHERE cc.contract_id = h.contract_id
AND cc.data_class = 'NORMAL'
AND cc.contract_status = 'CLOSED')
AND NOT EXISTS (SELECT 1
FROM con_contract cc
WHERE cc.contract_id = h.contract_id
AND cc.division = '95')
AND t.returned_flag = 'NOT'
AND EXISTS
(SELECT 1
......
......@@ -168,7 +168,8 @@
p_status =>${@status},
p_bank_account_num =>${@bank_account_num},
p_guarantor_name_duty =>${@guarantor_name_duty},
p_import_source => 'EXCEL_ADD'
p_import_source => 'EXCEL_ADD',
p_operat_flag =>${@operat_flag}
);
end;
]]></bm:update-sql>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-5-9 下午06:42:00
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-5-9 下午06:42:00
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
......@@ -76,7 +76,8 @@
p_ref_v05 =>${@ref_v05},
p_status =>${@status},
p_guarantor_name_duty=>${@guarantor_name_duty},
p_import_source =>'HAND_ADD'
p_import_source =>'HAND_ADD',
p_operat_flag =>${@operat_flag}
);
end;
......@@ -148,7 +149,8 @@
p_gsber =>${@gsber},
p_sus_belnr =>${@sus_belnr},
p_bp_virtual_bank_account =>${@bp_virtual_bank_account},
p_guarantor_name_duty=>${@guarantor_name_duty});
p_guarantor_name_duty=>${@guarantor_name_duty},
p_operat_flag =>${@operat_flag});
end;
]]></bm:update-sql>
</bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-6-3 下午12:38:12
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-6-3 下午12:38:12
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_WRITE_OFF" defaultOrderBy="t1.write_off_id">
<bm:fields>
......@@ -80,6 +80,6 @@
<bm:query-field field="write_off_id" queryOperator="="/>
<bm:query-field field="csh_transaction_id" queryOperator="="/>
<bm:query-field field="reversed_flag" queryOperator="="/>
<bm:query-field name="reverse_detail_flag" queryExpression="((nvl(${@deposit_type},'N')=&apos;Y&apos; and t1.write_off_type=&apos;DEPOSIT_CREDIT&apos;)or(${@reverse_detail_flag}=&apos;Y&apos; and nvl(${@deposit_type},'N') in(&apos;N&apos;,null) and t1.write_off_type in (&apos;RECEIPT_CREDIT&apos;,&apos;RECEIPT_ADVANCE_RECEIPT&apos;,&apos;ADVANCE_RECEIPT_CREDIT&apos;,&apos;DEPOSIT&apos;,&apos;RISK&apos;,&apos;DEPOSIT_CUS&apos;,&apos;RECEIPT_NONBUSINESS&apos;,&apos;RECEIPT_DEPOSIT_POOL&apos;)))"/>
<bm:query-field name="reverse_detail_flag" queryExpression="((nvl(${@deposit_type},'N')=&apos;Y&apos; and t1.write_off_type=&apos;DEPOSIT_CREDIT&apos;)or(${@reverse_detail_flag}=&apos;Y&apos; and nvl(${@deposit_type},'N') in(&apos;N&apos;,null) and t1.write_off_type in (&apos;RECEIPT_CREDIT&apos;,&apos;RECEIPT_ADVANCE_RECEIPT&apos;,&apos;ADVANCE_RECEIPT_CREDIT&apos;,&apos;DEPOSIT&apos;,&apos;RISK&apos;,&apos;DEPOSIT_CUS&apos;,&apos;RECEIPT_NONBUSINESS&apos;,&apos;RECEIPT_DEPOSIT_POOL&apos;,&apos;OPERAT_COMBINED&apos;)))"/>
</bm:query-fields>
</bm:model>
......@@ -3,37 +3,44 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from
(select t1.contract_id,
t1.dd_bank_account_num,
t1.dd_bank_account_name,
t1.contract_number,
t1.contract_name,
t1.bp_id_tenant,
t1.bp_id_agent_level1,
(select bp_name from hls_bp_master where bp_id = t1.bp_id_tenant) bp_name,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'CON500_CONTRACT_STATUS'
AND sc.code_value = t1.contract_status) contract_status_desc,
t1.payment_deduction,t1.division
from con_contract t1
where
t1.contract_status in ('INCEPT','NEW','ETING','REPURING')
and t1.data_class = 'NORMAL'
and t1.company_id in ((
select company_id
from fnd_companies t
where t.company_id = ${/session/@company_id} or
t.parent_company_id = ${/session/@company_id}
union
select t.parent_company_id company_id
from fnd_companies t
where t.parent_company_id is not null
and (t.company_id = ${/session/@company_id} or t.parent_company_id = ${/session/@company_id})))
) t
#WHERE_CLAUSE#
]]></bm:query-sql>
select * from
(select t1.contract_id,
t1.dd_bank_account_num,
t1.dd_bank_account_name,
t1.contract_number,
t1.contract_name,
t1.bp_id_tenant,
t1.bp_id_agent_level1,
(select bp_name from hls_bp_master where bp_id = t1.bp_id_tenant) bp_name,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'CON500_CONTRACT_STATUS'
AND sc.code_value = t1.contract_status) contract_status_desc,
t1.payment_deduction,
t1.division,
t1.business_type,
(Select bt.description
From hls_business_type bt
Where bt.business_type = t1.business_type) As business_type_n,
t1.search_term_1
from con_contract t1
where
t1.contract_status in ('INCEPT','NEW','ETING','REPURING')
and t1.data_class = 'NORMAL'
and t1.document_type<>'PUR_ORDER'
and t1.company_id in ((
select company_id
from fnd_companies t
where t.company_id = ${/session/@company_id} or
t.parent_company_id = ${/session/@company_id}
union
select t.parent_company_id company_id
from fnd_companies t
where t.parent_company_id is not null
and (t.company_id = ${/session/@company_id} or t.parent_company_id = ${/session/@company_id})))
) t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
......@@ -47,6 +54,8 @@
<bm:field name="dd_bank_account_name"/>
<bm:field name="payment_deduction"/>
<bm:field name="division"/>
<bm:field name="business_type_n"/>
<bm:field name="search_term_1"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="contract_id" queryOperator="="/>
......@@ -64,18 +73,20 @@
Where h.bp_name in ( select hbm.bp_name from hls_bp_master hbm where hbm.bp_id= ${@bp_id})
and hbr.bp_id = h.bp_id
and h.bp_id= bp.bp_id
and hbr.bp_type in('TENANT','GUTA_NP')
and hbr.bp_type in('TENANT','GUTA_NP','RENTER','GUTA_ORG')
and bp.contract_id=t.contract_id) Or not Exists
(Select 1
From hls_bp_master h, hls_bp_master_role hbr
Where h.bp_id = ${@bp_id}
and hbr.bp_id = h.bp_id
and hbr.bp_type = 'TENANT'
and hbr.bp_type in('TENANT','RENTER')
))"/>
<bm:query-field name="bp_name" queryExpression="t.bp_name like '%' || ${@bp_name} || '%'"/>
<bm:query-field field="search_term_1" queryOperator="like"/>
<bm:query-field field="business_type_n" queryOperator="like"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" Expression=" exists
<bm:data-filters>
<bm:data-filter name="query" Expression=" exists
(select 1
from con_contract_cashflow ccc
where ccc.contract_id = t.contract_id
......
......@@ -4,7 +4,7 @@
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_interface_pkg.post_interface(p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id},
p_err_count =>${@err_count});
......@@ -16,8 +16,11 @@
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
declare
v_transaction_num varchar2(400);
begin
if ${@flag} = 'SUBMIT' then
csh_transaction_interface_pkg.check_operat_flag(p_transaction_id =>${@transaction_id} );
update CSH_TRANSACTION
set confirmed_flag = 'WF_APPROVING'
where transaction_id = ${@transaction_id};
......
......@@ -124,6 +124,7 @@ end;
p_penalty_flag=>'Y')-nvl(received_amount,0),
due_amount) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="payment_deduction" expression="(select payment_deduction from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="division" expression="(select division from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-6-24 下午04:30:53
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-6-24 下午04:30:53
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CON_CONTRACT_V" defaultOrderBy="t1.contract_number desc" needAccessControl="false">
<bm:fields>
......@@ -234,6 +234,7 @@
<bm:field name="con_search_term_2" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CON_SEARCH_TERM_2" prompt="CON301.CON_CONTRACT_V.CON_SEARCH_TERM_2"/>
<bm:field name="con_content_confirm_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CON_CONTENT_CONFIRM_STATUS" prompt="CON301.CON_CONTRACT_V.CON_CONTENT_CONFIRM_STATUS"/>
<bm:field name="bp_id_agent_level1_n"/>
<bm:field name="vender_project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VENDER_PROJECT_NUMBER" prompt="采购单编号"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -249,5 +250,7 @@
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.contract_status not in (&apos;TERMINATE&apos;, &apos;CANCEL&apos;, &apos;REPUR&apos;, &apos;ET&apos;, &apos;INCEPT_RETURN&apos;)"/>
<!--<bm:data-filter name="query" expression="CASE WHEN t1.business_type='LEASEOPERAT' THEN t1.bp_id_tenant else to_number(${/parameter/@bp_id_tenant}) end =to_number(${/parameter/@bp_id_tenant})"/>-->
<bm:data-filter enforceOperations="query" expression="t1.document_type not in (&apos;PUR_ORDER&apos;)"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-6-24 下午04:30:53
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-6-24 下午04:30:53
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CON_CONTRACT_V" defaultOrderBy="t1.contract_number desc" needAccessControl="false">
<bm:fields>
......@@ -234,6 +234,7 @@
<bm:field name="con_search_term_2" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CON_SEARCH_TERM_2" prompt="CON301.CON_CONTRACT_V.CON_SEARCH_TERM_2"/>
<bm:field name="con_content_confirm_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CON_CONTENT_CONFIRM_STATUS" prompt="CON301.CON_CONTRACT_V.CON_CONTENT_CONFIRM_STATUS"/>
<bm:field name="bp_id_agent_level1_n"/>
<bm:field name="vender_project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VENDER_PROJECT_NUMBER" prompt="采购单编号"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -250,5 +251,6 @@
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.contract_status not in (&apos;TERMINATE&apos;, &apos;CANCEL&apos;, &apos;REPUR&apos;, &apos;ET&apos;, &apos;INCEPT_RETURN&apos;)"/>
<bm:data-filter enforceOperations="query" expression="t1.document_type not in (&apos;PUR_ORDER&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -2,8 +2,8 @@
<!--
$Author: sf
$Date: 2019-9-9 下午01:23:36
$Revision: 1.0
$Purpose:
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num" needAccessControl="false">
<bm:fields>
......@@ -98,6 +98,7 @@
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEPOSIT_TRANS_TYPE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_NUM"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -110,8 +111,9 @@
<bm:data-filter name="query" expression="(t1.transaction_type in (&apos;DEPOSIT&apos;))"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is null)"/>
<bm:data-filter name="query" expression="(nvl(t1.reversed_flag,'N') = 'N')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED'))"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED','ACCAUDITED_RECOI'))"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="not exists(select 1 from csh_transaction ct where ct.transaction_id =t1.transaction_id and ct.deposit_trans_type in('vender_deposit'))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -2,7 +2,7 @@
<!--
$Author: trd
$Date: 2023-7-28 下午01:23:36
$Revision: 1.0
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.creation_date desc,t1.transaction_num desc">
......@@ -85,13 +85,13 @@
<f:standard-who/>
</bm:features>
<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.transaction_type in (&apos;DEPOSIT&apos;))"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is null)"/>
<bm:data-filter name="query" expression="(nvl(t1.reversed_flag,'N') = 'N')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED'))"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
</bm:data-filters>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED','ACCAUDITED_RECOI'))"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="transaction_num" queryExpression="t1.transaction_num = ${@transaction_num}"/>
<bm:query-field name="bp_name" queryExpression="t1.bp_id in (select d.bp_id from hls_bp_master d where d.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos;)"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-5-23 下午04:23:02
$Revision: 1.0
$Purpose:
$Author: gaoyang
$Date: 2013-5-23 下午04:23:02
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
......@@ -13,28 +13,28 @@
hlcm_cux_deposit_pkg.execute_deposit_transfer(
p_session_id=>${/session/@session_id},
p_source_contract_id=>${@source_contract_id},
p_source_transaction_id=>${@source_transaction_id},
p_je_date=>to_date(${@je_date},'yyyy-mm-dd hh24:mi:ss'),
p_source_transaction_id=>${@source_transaction_id},
p_je_date=>to_date(${@je_date},'yyyy-mm-dd hh24:mi:ss'),
p_contract_id=>${@contract_id},
p_transaction_id=>${@transaction_id},
p_deposit_amount=>${@deposit_amount},
p_transaction_id=>${@transaction_id},
p_deposit_amount=>${@deposit_amount},
p_deposit_trans_type=>${@deposit_trans_type},
p_company_id=>${/session/@company_id},
p_user_id=>${/session/@user_id},
p_source_trans_type=>${@source_trans_type}
);
end;
]]></bm:update-sql>
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
hlcm_cux_deposit_pkg.create_deposit_transfer_je(
p_hd_contract_id=>${@hd_contract_id},
p_contract_id=>${@source_contract_id},
p_transaction_id=>${@source_transaction_id},
p_contract_id=>${@contract_id},
p_transaction_id=>${@transaction_id},
p_batch_id=>${@batch_id},
p_user_id=>${/session/@user_id}
p_user_id=>${/session/@user_id}
);
end;
]]></bm:update-sql>
......
......@@ -11,39 +11,48 @@
<bm:query-sql><![CDATA[
select *
from (select ct.contemp_id,
ct.batch_id,
ct.bp_id,
ct.source_contract_id,
ct.contract_id,
ct.source_transaction_id,
ct.transaction_id,
ct.source_trans_type,
ct.batch_id,
ct.bp_id,
ct.source_contract_id,
ct.contract_id,
ct.source_transaction_id,
ct.transaction_id,
ct.source_trans_type,
(select t.contract_number
from con_contract t
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
and rownum = 1) contract_number,
'' transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
to_char(ct.je_date, 'yyyy-MM-dd') je_date,
ct.deposit_amount,
ct.deposit_info,
cc.bp_id_agent_level1,
(SELECT t.bp_name
FROM hls_bp_master t
WHERE t.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.bp_id_tenant,
(SELECT bpv.bp_name
FROM hls_bp_master bpv
WHERE bpv.bp_id = cc.bp_id_tenant) bp_name
from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id
and cc.data_class = 'NORMAL'
union all
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
and rownum = 1) contract_number,
(select t.search_term_1 from con_contract t
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
and rownum = 1) vender_contract_number,
(select p.project_number
from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci
where pi.source_project_id = p.project_id
and pi.project_lease_item_id = ci.project_lease_item_id
and ci.contract_id=ct.contract_id) vender_project_number,
'' transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'DEPOSIT_TRANS_TYPE'
AND sc.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
to_char(ct.je_date,'yyyy-MM-dd') je_date,
ct.deposit_amount,
ct.deposit_info,
cc.bp_id_agent_level1,
(SELECT t.bp_name
FROM hls_bp_master t
WHERE t.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.bp_id_tenant,
(SELECT bpv.bp_name
FROM hls_bp_master bpv
WHERE bpv.bp_id = cc.bp_id_tenant) bp_name
from csh_transaction_contemp ct, con_contract cc
where ct.contract_id = cc.contract_id
and cc.data_class = 'NORMAL'
union all
select ct.contemp_id,
ct.batch_id,
ct.bp_id,
......@@ -53,6 +62,8 @@
ct.transaction_id,
ct.source_trans_type,
'' contract_number,
'' vender_contract_number,
'' vender_project_number,
cc.transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
......@@ -78,7 +89,7 @@
where hbm.bp_id = cc.bp_id) bp_name
from csh_transaction_contemp ct, csh_transaction cc
where ct.transaction_id = cc.transaction_id) t1
#WHERE_CLAUSE#
#WHERE_CLAUSE#
order by t1.je_date desc
]]></bm:query-sql>
</bm:operation>
......
......@@ -15,8 +15,8 @@
<bm:query-sql><![CDATA[
select *
from (select v.source_contract_id,
null source_transaction_id,
v.batch_id,
null source_transaction_id,
v.batch_id,
v.trans_review_status,
to_char(v.je_date,'yyyy-MM-dd') je_date,
v.source_trans_type,
......@@ -29,7 +29,18 @@
WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n,
cc.contract_number,
'' transaction_num,
cc.business_type,
(select hb.description from
hls_business_type_v hb
where hb.enabled_flag = 'Y'
and hb.business_type=cc.business_type) AS business_type_desc,
cc.search_term_1 vender_contract_number,
(select p.project_number
from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci
where pi.source_project_id = p.project_id
and pi.project_lease_item_id = ci.project_lease_item_id
and ci.contract_id=cc.contract_id) vender_project_number,
'' transaction_num,
cc.contract_name,
cc.bp_id_agent_level1,
(SELECT t.bp_name
......@@ -70,7 +81,7 @@
) v
where cc.contract_id = v.source_contract_id
and cc.data_class = 'NORMAL'
union all
union all
select null source_contract_id,
v.source_transaction_id,
v.batch_id,
......@@ -86,6 +97,10 @@
WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n,
'' contract_number,
'' business_type,
'' business_type_desc,
'' vender_contract_number,
'' vender_project_number,
cc.transaction_num,
'' contract_name,
(select u.bp_id from hls_bp_master u,hls_bp_master hbm where u.unit_id= hbm.unit_id and u.bp_category='AGENT' and hbm.bp_id=cc.bp_id) bp_id_agent_level1,
......@@ -114,7 +129,8 @@
and ct.batch_id is not null
) v
where cc.transaction_id = v.source_transaction_id
) t1
) t1
#WHERE_CLAUSE#
order by t1.trans_review_status,t1.je_date desc
......@@ -128,5 +144,9 @@
<bm:query-field name="deposit_trans_type" queryExpression="t1.source_trans_type = ${@deposit_trans_type}"/>
<bm:query-field name="trans_review_status" queryExpression="t1.trans_review_status =${@trans_review_status}"/>
<bm:query-field name="no_status" queryExpression="t1.trans_review_status != ${@no_status}"/>
<bm:query-field name="no_status_op" queryExpression="t1.trans_review_status != ${@no_status_op}"/>
<bm:query-field name="vender_contract_number" queryExpression="t1.vender_contract_number like &apos;%&apos;||${@vender_contract_number}||&apos;%&apos;"/>
<bm:query-field name="vender_project_number" queryExpression="t1.vender_project_number like &apos;%&apos;||${@vender_project_number}||&apos;%&apos;"/>
<bm:query-field name="business_type" queryExpression="t1.business_type like &apos;%&apos;||${@business_type}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
\ No newline at end of file
......@@ -11,8 +11,8 @@
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID"/>
<bm:field name="source_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CONTRACT_ID"/>
<bm:field name="source_transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_TRANSACTION_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
<bm:field name="source_transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_TRANSACTION_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" forInsert="false" forUpdate="false"/>
<bm:field name="je_date" databaseType="DATE" datatype="java.util.Date" physicalName="JE_DATE"/>
<bm:field name="deposit_trans_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEPOSIT_TRANS_TYPE"/>
......@@ -25,9 +25,11 @@
<bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" forInsert="false" forUpdate="false"/>
<bm:field name="file_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FILE_NUM" forInsert="false" forUpdate="false"/>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID"/>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID"/>
<bm:field name="transaction_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" forInsert="false" forUpdate="false"/>
<bm:field name="con_search_term_1" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="con_search_term_1" forInsert="false" forUpdate="false"/>
<bm:field name="vender_project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="vender_project_number" forInsert="false" forUpdate="false"/>
<bm:field name="agent_bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AGENT_BP_CODE" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -44,13 +46,22 @@
ct.batch_id,
ct.source_trans_type,
ct.source_contract_id,
ct.source_transaction_id,
ct.contract_id,
ct.source_transaction_id,
ct.contract_id,
(select t.contract_number from con_contract t
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
and rownum = 1) contract_number,
ct.transaction_id,
(select t.search_term_1 from con_contract t
where t.contract_id = ct.contract_id
and t.data_class = 'NORMAL'
) con_search_term_1,
(select p.project_number
from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci
where pi.source_project_id = p.project_id
and pi.project_lease_item_id = ci.project_lease_item_id
and ci.contract_id=ct.contract_id) vender_project_number,
ct.transaction_id,
'' transaction_num,
ct.deposit_trans_type,
(SELECT sc.code_value_name
......@@ -61,6 +72,7 @@
ct.deposit_amount,
ct.deposit_info,
cc.bp_id_agent_level1,
(select hbm.bp_code from hls_bp_master hbm where hbm.bp_id=bp_id_agent_level1) agent_bp_code,
(SELECT t.bp_name
FROM hls_bp_master t
WHERE t.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
......@@ -85,6 +97,8 @@
ct.source_transaction_id,
ct.contract_id,
'' contract_number,
'' con_search_term_1,
'' vender_project_number,
ct.transaction_id transaction_id,
(select t.transaction_num
from csh_transaction t
......@@ -103,6 +117,11 @@
where hbm.unit_id=h.unit_id
and hbm.bp_id=cc.bp_id
and h.bp_category='AGENT') bp_id_agent_level1,
(select h.bp_code
from hls_bp_master hbm,hls_bp_master h
where hbm.unit_id=h.unit_id
and hbm.bp_id=cc.bp_id
and h.bp_category='AGENT') agent_bp_code,
(SELECT u.bp_name
FROM hls_bp_master u,hls_bp_master hbm
WHERE u.unit_id = hbm.unit_id
......@@ -119,13 +138,13 @@
from csh_transaction_contemp ct,csh_transaction cc
where ct.transaction_id = cc.transaction_id
and ct.trans_review_status = 'NEW') t1
#WHERE_CLAUSE#
#WHERE_CLAUSE#
order by t1.contemp_id
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="(t1.source_contract_id is null or(t1.source_contract_id is not null and t1.source_contract_id=${@source_contract_id})) "/>
<bm:data-filter enforceOperations="query" expression="(t1.source_contract_id is null or(t1.source_contract_id is not null and t1.source_contract_id=${@source_contract_id}))"/>
<bm:data-filter enforceOperations="query" expression="t1.bp_id=${@bp_id} "/>
</bm:data-filters>
</bm:model>
......@@ -2,8 +2,8 @@
<!--
$Author: sf
$Date: 2019-9-9 下午01:23:36
$Revision: 1.0
$Purpose:
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num" needAccessControl="false">
<bm:fields>
......@@ -104,6 +104,10 @@
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="vender_contract_number" expression="(select cc.search_term_1 from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="vender_project_number" expression="(select p.project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id)"/>
<bm:field name="business_type" expression="(select cc.business_type from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type_desc" expression="(select hb.description from con_contract cc,hls_business_type_v hb where cc.business_type= hb.business_type and hb.enabled_flag = 'Y' and cc.contract_id = t1.ref_contract_id)"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -113,9 +117,11 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED','ACCAUDITED_RECOI')))"/>
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="not exists(select 1 from csh_transaction ct where ct.transaction_id =t1.transaction_id and ct.deposit_trans_type in('vender_deposit'))"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......@@ -165,5 +171,8 @@
<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
<bm:query-field name="bp_name_n" queryExpression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id) like &apos;%&apos;||${@bp_name_n}||&apos;%&apos; "/>
<bm:query-field name="deposit_trans_type" queryExpression="t1.deposit_trans_type=${@deposit_trans_type}"/>
<bm:query-field name="vender_contract_number" queryExpression="(SELECT cc.search_term_1 FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@vender_contract_number}||&apos;%&apos;"/>
<bm:query-field name="vender_project_number" queryExpression="(select p.project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id) like &apos;%&apos;||${@vender_project_number}||&apos;%&apos;"/>
<bm:query-field name="business_type" queryExpression="(SELECT cc.business_type FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@business_type}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -18,6 +18,16 @@
(Select cc.contract_number
From con_contract cc
Where cc.contract_id = t.contract_id) contract_number,
(select cc.search_term_1
from con_contract cc
where cc.contract_id = t.contract_id) AS vender_contract_number,
(select p.project_number
from prj_project_lease_item pi,
prj_project p,
con_contract_lease_item ci
where pi.source_project_id = p.project_id
and pi.project_lease_item_id = ci.project_lease_item_id
and ci.contract_id = t.contract_id) AS vender_project_number,
t.creation_date,
t.created_by,
t.last_updated_by,
......
......@@ -2,8 +2,8 @@
<!--
$Author: sf
$Date: 2019-9-9 下午01:23:36
$Revision: 1.0
$Purpose:
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num " needAccessControl="false">
<bm:fields>
......@@ -115,7 +115,7 @@
From csh_transaction_return cr
Where cr.transaction_id = t1.transaction_id
And cr.status = 'APPROVING'),0)) from dual),
(Select (nvl(Sum(c.transaction_amount), 0) -
(Select (nvl(Sum(c.transaction_amount), 0) -
nvl(Sum(c.write_off_amount), 0) - nvl(Sum(c.returned_amount), 0) -
nvl(Sum((Select nvl(cr.return_amount, 0)
From csh_transaction_return cr
......@@ -130,7 +130,11 @@
And c.ref_contract_id =
(Select c1.ref_contract_id
From csh_transaction c1
Where c1.transaction_id = t1.transaction_id) ))" forInsert="false" forUpdate="false"/>
Where c1.transaction_id = t1.transaction_id)) )" forInsert="false" forUpdate="false"/>
<bm:field name="vender_contract_number" expression="(select cc.search_term_1 vender_contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="vender_project_number" expression="(select p.project_number vender_project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id)"/>
<bm:field name="business_type" expression="(select cc.business_type from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type_desc" expression="(select hb.description from con_contract cc,hls_business_type_v hb where cc.business_type=hb.business_type and hb.enabled_flag = 'Y'and cc.contract_id = t1.ref_contract_id)"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -141,7 +145,7 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is not null or (t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED','ACCAUDITED_RECOI')))"/>
<bm:data-filter name="query" expression="(t1.transaction_type ='DEPOSIT')"/>
<bm:data-filter name="query" expression="(t1.returned_flag not in ('RETURN'))"/>
</bm:data-filters>
......@@ -191,5 +195,8 @@
<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
<bm:query-field name="bp_name_n" queryExpression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id) like &apos;%&apos;||${@bp_name_n}||&apos;%&apos; "/>
<bm:query-field name="deposit_trans_type" queryExpression="t1.deposit_trans_type=${@deposit_trans_type}"/>
<bm:query-field name="vender_contract_number" queryExpression="(SELECT cc.search_term_1 FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like ${@vender_contract_number}"/>
<bm:query-field name="vender_project_number" queryExpression="(SELECT pp.project_number FROM con_contract_lease_item ci,prj_project_lease_item pi,prj_project pp WHERE ci.project_lease_item_id=pi.project_lease_item_id and pi.source_project_id=pp.project_id and ci.contract_id = t1.ref_contract_id ) like ${@vender_project_number}"/>
<bm:query-field name="business_type" queryExpression="(SELECT cc.business_type FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like ${@business_type}"/>
</bm:query-fields>
</bm:model>
......@@ -3,7 +3,9 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
select
decode(v.vender_project_number,null,null,v.bp_agent_name) vender_name,
v.*
from (select
cr.return_id,
to_char(cr.return_date, 'yyyy-mm-dd') return_date,
......@@ -52,6 +54,21 @@
(select cc.contract_number
from con_contract cc
where cc.contract_id = ct.ref_contract_id) contract_number,
(select cc.search_term_1
from con_contract cc
where cc.contract_id = ct.ref_contract_id) AS vender_contract_number,
ct.deposit_trans_type,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = ct.deposit_trans_type) deposit_trans_type_desc,
(select p.project_number
from prj_project_lease_item pi,
prj_project p,
con_contract_lease_item ci
where pi.source_project_id = p.project_id
and pi.project_lease_item_id = ci.project_lease_item_id
and ci.contract_id = ct.ref_contract_id) AS vender_project_number,
(select a.bp_name
from hls_bp_master a
where a.bp_id = ct.bp_id) bp_agent_name,
......
......@@ -30,7 +30,7 @@
where ha.bp_id(+) = hb.bp_id
and ha.enabled_flag(+) = 'Y'
and hb.enabled_flag = 'Y'
and hb.bp_category in ('TENANT', 'AGENT', 'THIRD_PARTY'))t #WHERE_CLAUSE#
and hb.bp_category in ('TENANT', 'AGENT', 'THIRD_PARTY','VENDER','RENTER','MAN_FACTURER'))t #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -2,8 +2,8 @@
<!--
$Author: sf
$Date: 2019-9-9 下午01:23:36
$Revision: 1.0
$Purpose:
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num" needAccessControl="false">
<bm:fields>
......@@ -99,13 +99,17 @@
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type"/>
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<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;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:fields>
<bm:field name="vender_contract_number" expression="(select cc.search_term_1 vender_contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="vender_project_number" expression="(select p.project_number vender_project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id)"/>
<bm:field name="business_type" expression="(select cc.business_type from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type_desc" expression="(select hb.description from con_contract cc,hls_business_type_v hb where cc.business_type= hb.business_type and hb.enabled_flag = 'Y' and cc.contract_id = t1.ref_contract_id)"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
......@@ -163,5 +167,8 @@
<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
<bm:query-field name="bp_name_n" queryExpression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id) like &apos;%&apos;||${@bp_name_n}||&apos;%&apos; "/>
<bm:query-field name="deposit_trans_type" queryExpression="t1.deposit_trans_type=${@deposit_trans_type}"/>
<bm:query-field name="vender_contract_number" queryExpression="(SELECT cc.search_term_1 FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@vender_contract_number}||&apos;%&apos;"/>
<bm:query-field name="vender_project_number" queryExpression="(select p.project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id) like &apos;%&apos;||${@vender_project_number}||&apos;%&apos;"/>
<bm:query-field name="business_type" queryExpression="(SELECT cc.business_type FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@business_type}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -2,8 +2,8 @@
<!--
$Author: sf
$Date: 2019-9-9 下午01:23:36
$Revision: 1.0
$Purpose:
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num" needAccessControl="false">
<bm:fields>
......@@ -114,6 +114,10 @@
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="source_type"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="vender_contract_number" expression="(select cc.search_term_1 vender_contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="vender_project_number" expression="(select p.project_number vender_project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id)"/>
<bm:field name="business_type" expression="(select cc.business_type from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type_desc" expression="(select hb.description from con_contract cc,hls_business_type_v hb where cc.business_type= hb.business_type and hb.enabled_flag = 'Y' and cc.contract_id = t1.ref_contract_id)"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......@@ -137,8 +141,8 @@
and t1.collection_classes = 'DEPOSIT'
and t1.paid_byother_flag = 'F') or
(t1.ref_contract_id is null and nvl(t1.reversed_flag, 'N') = 'N' and
t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED')))"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
t1.confirmed_flag not in ('ACCAUDITING', 'NEW', 'CT_REJECTED','ACCAUDITED_RECOI')))"/>
<bm:data-filter name="query" expression="(t1.returned_flag &lt;&gt; 'RETURN')"/>
<bm:data-filter name="query" expression="(exists (
(select 1
from exp_emp_assign_e_v ee
......@@ -202,5 +206,8 @@
<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
<bm:query-field name="bp_name_n" queryExpression="(select d.bp_name from hls_bp_master_v d where d.bp_id=t1.bp_id) like &apos;%&apos;||${@bp_name_n}||&apos;%&apos; "/>
<bm:query-field name="deposit_trans_type" queryExpression="t1.deposit_trans_type=${@deposit_trans_type}"/>
<bm:query-field name="vender_contract_number" queryExpression="(SELECT cc.search_term_1 FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@vender_contract_number}||&apos;%&apos;"/>
<bm:query-field name="vender_project_number" queryExpression="(select p.project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id) like &apos;%&apos;||${@vender_project_number}||&apos;%&apos;"/>
<bm:query-field name="business_type" queryExpression="(SELECT cc.business_type FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||${@business_type}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t.division from (select hb.division,ee.user_id
from exp_emp_assign_e_v ee,
hls_bp_master h,
hls_bp_master_agent_division hb
where ee.unit_id = h.unit_id
and h.bp_id = hb.bp_id
and h.bp_category = 'AGENT') t #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryExpression="t.user_id=${@user_id}"/>
</bm:query-fields>
</bm:model>
......@@ -26,6 +26,7 @@
<bm:field name="mark" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MARK" prompt="HLS_ACR_EBANK_OUTPUT_TEMP.MARK"/>
<bm:field name="apply_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="APPLY_AMOUNT" ></bm:field>
<bm:field name="due_amount_his" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DUE_AMOUNT_HIS" ></bm:field>
<bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select cc.division from con_contract cc where cc.data_class=&apos;NORMAL&apos; and cc.division!=&apos;95&apos; and cc.dd_bank_account_num=t1.dd_bank_account_num and rownum=1)"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-09-07
$Revision: 1.0
$Purpose:经租新增校验机号唯一性
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
-- Call the procedure
hlcm_pur_order_pkg.pur_check_lease_item(p_peoject_id => ${@project_id},
p_project_lease_item_id => ${@project_lease_item_id},
p_user_id =>${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zhangxing5129
$Date: 2014-10-13 下午01:02:37
$Revision: 1.0
$Purpose: 项目创建校验
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:parameters>
<bm:parameter name="cdd_list_id" dataType="java.lang.Long" input="true" output="true" outputPath="@cdd_list_id"/>
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
hlcm_pur_order_pkg.pur_create_save_check(p_project_id =>${@project_id},
p_user_id =>${/session/@user_id},
p_function_code =>${@function_code},
p_function_usage =>${@function_usage},
p_project_status =>${@project_status},
p_bp_id_tenant =>${@bp_id_tenant},
p_cdd_list_id => ${@cdd_list_id});
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql>
select bp.bp_wfl_status from hls_bp_master bp where bp.bp_id =${@bp_id_tenant}
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: 38823
$Date: 2023-09-05
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hlcm_pur_order_pkg.pur_wfl_start(
p_project_id =>${@project_id},
p_user_id => ${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql>
<![CDATA[
update prj_project pp
set
pp.project_status = 'CANCEL',
pp.last_updated_by = ${/session/@user_id},
pp.last_update_date = sysdate
where pp.project_id = ${@project_id}
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年11月23日20:40:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t1.*
FROM (SELECT li.line_id,
li.error_message,
li.status,
li.header_id,
li.line_number,
hd.created_by,
li.source_table,
li.attribute_1,
li.attribute_2,
li.attribute_3,
li.attribute_4,
li.attribute_5,
li.attribute_6,
li.attribute_7,
li.attribute_8,
li.attribute_9,
li.attribute_10,
li.attribute_11,
li.attribute_12,
li.attribute_13,
li.attribute_14,
li.attribute_15,
li.attribute_16,
li.attribute_17,
li.attribute_18,
li.attribute_19,
li.attribute_20,
li.attribute_21,
li.attribute_22,
li.attribute_23,
li.attribute_24,
li.attribute_25,
li.attribute_26
FROM fnd_interface_headers hd,
fnd_interface_lines li
WHERE hd.header_id = li.header_id
AND hd.template_code = 'PURCHASE_ORDER_LEASE'
AND li.line_number >0
AND HD.CREATED_BY = ${/session/@user_id}
) t1
#WHERE_CLAUSE#
order by t1.line_number
]]></bm:query-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
hlcm_pur_order_pkg.purchase_order_import_lease(p_header_id =>${/parameter/@header_id},
p_project_id =>${@project_id},
p_user_id =>${/session/@user_id});
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hlcm_pur_order_pkg.purchase_import_lease_check(p_header_id => ${/model/header/record/@header_id},
p_project_id =>${@project_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="header_id" queryExpression="t1.header_id=${@header_id}"/>
</bm:query-fields>
</bm:model>
......@@ -112,7 +112,16 @@
p_ref_d03=>to_date(${@ref_d03},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d04=>to_date(${@ref_d04},'yyyy-mm-dd hh24:mi:ss'),
p_ref_d05=>to_date(${@ref_d05},'yyyy-mm-dd hh24:mi:ss'),
p_int_rate_display=>v_int_rate_display,
p_lease_item_amount=>${@lease_item_amount},
p_insurance_fee =>${@insurance_fee},
p_int_rate_display=>${@int_rate_display},
p_deposit_ratio=>${@deposit_ratio},
p_first_pay_date=>to_date(${@first_pay_date},'yyyy-mm-dd hh24:mi:ss'),
p_pmt=>${@pmt},
p_hd_user_col_d01=>to_date(${@hd_user_col_d01},'yyyy-mm-dd hh24:mi:ss'),
p_deposit=>${@deposit},
p_lease_term_month=>${@lease_term_month},
p_total_rental=>${@total_rental},
p_btb_int_rate=>${@btb_int_rate},
p_hd_user_col_v06=>${@hd_user_col_v06}
);
......
......@@ -12,7 +12,7 @@
select *
from con_contract_bp_lv p
where p.contract_id=${@contract_id}
and p.bp_category='TENANT'
and p.bp_category in ('TENANT','RENTER')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: WW
$Date: 2014-11-13 下午5:36:09
$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 t1.user_id,t1.user_name FROM sys_user t1 #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="user_id" queryExpression="t1.user_id=${@user_id}"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: weiwuzhen
$Date: 2016-5-5 下午3:45:05
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from prj_project_bp_operat_lv p
where p.project_id=${@project_id}
and p.bp_category='RENTER'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: trd
$Date: 2023-11-1 下午04:17:01
$Revision: 1.0
$Purpose: 采购单报价信息
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[SELECT T1.* FROM (SELECT * FROM prj_quotation a) T1 #WHERE_CLAUSE#]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="document_id" queryExpression="t1.document_id=${@document_id} and t1.document_category=&apos;PROJECT&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -9,6 +9,10 @@ var add_datafilters=[{
{ name:'contract_status',
expression :" t1.contract_status not in ('NEW','INCEPTING','INCEPT_RETURN') "
},
{
name: 'division',
expression: "t1.division != 95"
}
];
......
......@@ -71,7 +71,11 @@ var add_datafilters = [
{
name : "con_status",
expression : "t1.contract_status in ('INCEPT','NEW') "
}
},
{
name : "division",
expression: "t1.division != '95'"
}
];
override();
......
......@@ -4,6 +4,8 @@ var override_queryfields = [
queryoperator : "="
}
];
var add_datafilters = [{
name : 'bp_id_agent_level1',
......
......@@ -128,6 +128,10 @@ var override_queryfields = [
{
name:'gua_bp_name',
queryexpression:"exists(select 1 from con_contract_bp bp where bp.contract_id=t1.contract_id and bp.bp_category='GUARANTOR' and bp.bp_name like '%'||${@gua_bp_name}||'%')\n"
},
{
name:'tenant_code',
queryexpression: "t1.tenant_code like ${@tenant_code}"
}
];
......
var add_datafilters = [
{
name : "unit_code",
expression: "(t1.unit_code != '1011' or t1.unit_code is null)"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name : "unit_code",
expression: "t1.unit_code = '1011'"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name : "unit_code",
expression: "(t1.unit_code != '1011' or t1.unit_code is null)"
}
];
add_datafilter();
\ No newline at end of file
var add_datafilters = [
{
name : "unit_code",
expression: "t1.unit_code = '1011'"
}
];
add_datafilter();
\ No newline at end of file
......@@ -7,6 +7,10 @@ var override_queryfields = [
name : 'submit_date_to',
queryexpression : "trunc(t1.submit_date_detail) <=to_date(${@submit_date_to},'yyyy-mm-dd')"
},
{
name : 'tenant_code',
queryexpression: "t1.tenant_code like ${@tenant_code}"
}
];
var add_datafilters = [];
......
var override_queryfields = [
{
name : 'ref_d10_from',
queryexpression : "trunc(t1.ref_d10) >=to_date(${@ref_d10_from},'yyyy-mm-dd')"
},
{
name : 'ref_d10_to',
queryexpression : "trunc(t1.ref_d10) <=to_date(${@ref_d10_to},'yyyy-mm-dd')"
},
{
name : 'ref_d09_from',
queryexpression : "trunc(t1.ref_d09) >=to_date(${@ref_d09_from},'yyyy-mm-dd')"
},
{
name : 'ref_d09_to',
queryexpression : "trunc(t1.ref_d09) <=to_date(${@ref_d09_to},'yyyy-mm-dd')"
},
{
name : 'lease_item_amount_from',
queryexpression : "trunc(t1.lease_item_amount) >=${@lease_item_amount_from}"
},
{
name : 'lease_item_amount_to',
queryexpression : "trunc(t1.lease_item_amount) <=${@lease_item_amount_to}"
}
];
override();
......@@ -3,7 +3,6 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<script><![CDATA[
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -61,6 +61,10 @@
param['function_code'] = 'ACP522_DETAIL';
param['payment_req_id'] = payment_req_id;
param['url_title'] = '进项发票详情';
// param['invoice_number'] = record.get('invoice_number');
// param['asset_number'] = record.get('asset_number');
// param['asset_money'] = record.get('asset_money');
// param['items'] = record.get('items');
hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id',param,'ap_invoice_detail_link', ds_id,'AP_INVOICE_DETAILS');
}
......
......@@ -8,7 +8,7 @@
<a:init-procedure>
<a:model-query model="basic.sys_session_info" rootPath="default_value_record"/>
<a:model-query model="acr.ACR510.acr_invoice_group_billing_method" rootPath="group_billing_method_list"/>
<a:model-query model="basic.sys_invoice_kind_type_v" rootPath="acr512_invoice_kind_type"/>
<a:model-query model="basic.sys_invoice_kind_type_v" rootPath="acr512_invoice_kind_type"/>
</a:init-procedure>
<a:view>
<a:link id="svcLink_create_invoice" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_create.lsc"/>
......@@ -43,7 +43,6 @@
function createScreen_create()
{
debugger;
var message_flag =false;
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
......@@ -55,6 +54,7 @@
//判断本次开票金额是否为租金,本金,和利息之中某一个
var selectedDs=$('selectedDs').getAll();
for(var i=0;i<selectedDs.length;i++){
debugger;
var billing_amount=selectedDs[i].get('billing_amount');
var due_amount=selectedDs[i].get('due_amount');
var principal=selectedDs[i].get('principal');
......@@ -78,7 +78,7 @@
Leaf.showMessage("提示","售后回租只能开普通发票!");
return;
}
if(business_type=='LEASEBACK'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
if(business_type=='LEASEBACK'&&kind_type!='ELECTRONIC_GENERAL'){
message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!");
}
......@@ -87,16 +87,13 @@
$L.showErrorMessage("提示","本次开票金额+已开票金额不能超过已核销金额!");
return;
}
//全电发票只能选择电子增值税普通发票和电子增值税专用发票
var full_elec_invoice_flag= selectedDs[i].get('full_elec_invoice_flag');
//全电发票只能选择电子增值税普通发票和电子增值税专用发票
var full_elec_invoice_flag= selectedDs[i].get('full_elec_invoice_flag');
if(full_elec_invoice_flag=='Y'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='ELECTRONIC_SPECIAL')){
Leaf.showMessage("提示","全电发票只能选择电子增值税普通发票和电子增值税专用发票!");
return;
}
}
var datas = ds.getJsonData();
......@@ -108,7 +105,7 @@
}
Leaf.showConfirm('${l:HLS.PROMPT}',message_info,function()
{
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.Masker.mask(Ext.getBody(),'${l:HLS.EXECUTING}');
Leaf.request({
url: $('svcLink_create_invoice').getUrl(),
para: datas,
......@@ -117,7 +114,7 @@
createScreen_close();
contractDs_grid_query();
},
failure: function() {
failure: function(){
Leaf.Masker.unmask(Ext.getBody());
},
......@@ -134,6 +131,8 @@
}
function unSelect_selectedDs(ds,record){
record.dirty = false;
}
......@@ -150,14 +149,9 @@
if (records[i].get('invoice_kind') && records[i].get('invoice_kind')=='RECEIPT' && records[i].get('cf_item') && records[i].get('cf_item')=='51') {
records[i].set('product_name','保证金');
}
if(records[i].get('invoice_kind_type')=='RECEIPT'){
records[i].getField('invoice_kind_type').setReadOnly(true);
records[i].getField('invoice_kind_type_n').setReadOnly(true);
}
}
}
window['acr510_get_object_for_invoice'] = function(object) {
debugger;
var record = object.record;
......@@ -172,6 +166,7 @@
};
function onUpdate_selectedDs(ds,record,name,value,oldvalue){
if(name == 'billing_amount' && record.get('rl_flag') == 'Y'){
Leaf.showConfirm('提示', '此现金流为日立返还金现金流,请确认是否修改?', null, function() {
......@@ -186,7 +181,7 @@
}
]]></style>
<a:dataSets>
<!--<a:dataSet id="invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>-->
<!--<a:dataSet id="invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>-->
<a:dataSet id="invoiceKindDs">
<a:datas dataSource="/model/acr512_invoice_kind_type"/>
</a:dataSet>
......@@ -234,10 +229,15 @@
<a:grid id="selectedDs_grid" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="search_term_1" prompt="厂商合同编号" width="150"/>
<a:column name="vender_project_number" prompt="采购单编号" width="150"/>
<a:column name="business_type_desc" prompt="业务类型" align="center" width="70"/>
<a:column name="times" align="right" width="40"/>
<a:column name="cf_item_desc"/>
<a:column name="product_name" editor="selectedDs_grid_editor_tf" width="150"/>
<!--<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>-->
<a:column name="product_name" editor="selectedDs_grid_editor_tf_box" width="150"/>
<a:column name="pur_model" prompt="规格型号" editor="selectedDs_grid_model_tf" width="130"/>
<a:column name="pur_unit" prompt="单位" editor="selectedDs_grid_unit_tf" width="40"/>
<!--<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>-->
<a:column name="invoice_kind_type_n" editorFunction="" editor="selectedDs_grid_editor_comb" width="150"/>
<a:column name="billing_object_name" width="150"/>
......@@ -248,8 +248,8 @@
<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="cf_billing_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="billing_amount" align="right" editor="selectedDs_grid_editor_nf" renderer="Leaf.formatMoney" footerRenderer="sum_foot"/>
<a:column name="full_elec_invoice_flag_n" prompt="是否全电发票" align="center"/>
</a:columns>
<a:column name="full_elec_invoice_flag_n" prompt="是否全电发票" align="center"/>
</a:columns>
<a:editors>
<a:comboBox id="selectedDs_grid_editor_comb">
<a:events>
......@@ -257,7 +257,9 @@
</a:events>
</a:comboBox>
<a:textField id="selectedDs_grid_editor_tf"/>
<a:numberField id="selectedDs_grid_editor_nf"/>
<a:textField id="selectedDs_grid_model_tf"/>
<a:textField id="selectedDs_grid_unit_tf"/>
<a:comboBox id="selectedDs_grid_editor_tf_box"/>
</a:editors>
</a:grid>
</a:tab>
......@@ -269,10 +271,10 @@
<a:column name="cf_item_desc"/>
<a:column name="contract_name" width="200"/>
<a:column name="project_number" width="150" prompt="报单编号"/>
<!-- <a:column name="project_name" width="200" prompt="报单名称"/>-->
<!-- <a:column name="project_name" width="200" prompt="报单名称"/>-->
<a:column name="last_received_date" renderer="Leaf.formatDate" width="80"/>
<!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>-->
<!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>-->
</a:columns>
</a:grid>
</a:tab>
......@@ -283,4 +285,4 @@
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
</a:screen>
\ No newline at end of file
......@@ -202,8 +202,13 @@
<a:grid id="selectedDs_grid" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="search_term_1" prompt="厂商合同编号" width="150"/>
<a:column name="vender_project_number" prompt="采购单编号" width="150"/>
<a:column name="business_type_desc" prompt="业务类型" align="center" width="70"/>
<a:column name="cf_item_desc"/>
<a:column name="product_name" editor="selectedDs_grid_editor_tf" width="150"/>
<a:column name="pur_model" prompt="规格型号" editor="selectedDs_grid_model_tf" width="130"/>
<a:column name="pur_unit" prompt="单位" editor="selectedDs_grid_unit_tf" width="40"/>
<!--<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>-->
<a:column name="invoice_kind_type_n" editorFunction="" editor="selectedDs_grid_editor_comb" width="150"/>
<a:column name="billing_object_name" width="150"/>
......
......@@ -118,6 +118,7 @@
function invoiceHd_confirm() {
debugger;
Leaf.Masker.mask(Ext.getBody());
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var cat_ini_flag = $('allConditionDs').getAt(0).get('cat_ini_flag');
......@@ -263,6 +264,7 @@
<a:datas>
<a:record code_value="LEASE" code_value_name="直租"/>
<a:record code_value="LEASEBACK" code_value_name="售后回租"/>
<a:record code_value="LEASEOPERAT" code_value_name="经营性租赁"/>
</a:datas>
</a:dataSet>
<a:dataSet id="write_off_flag_ds">
......@@ -281,7 +283,7 @@
<a:record code_value="REPUR" code_value_name="解约回购"/>
</a:datas>
</a:dataSet>
<a:dataSet id="acr510n_invoice_type_ds">
<a:dataSet id="acr510n_invoice_type_ds">
<a:datas>
<a:record code_value="ECT" code_value_name="电子发票"/>
<a:record code_value="PAPER" code_value_name="数电纸质发票"/>
......@@ -294,14 +296,13 @@
<a:record code_value="30" code_value_name="高空作业车"/>
<a:record code_value="40" code_value_name="其它"/>
<a:record code_value="50" code_value_name="星邦高空作业车"/>
<!--<a:record code_value="90" code_value_name="租赁二手机"/>-->
<a:record code_value="90" code_value_name="租赁二手机(日立)"/>
<a:record code_value="91" code_value_name="神钢建机"/>
<a:record code_value="92" code_value_name="北京心诚"/>
<a:record code_value="99" code_value_name="工程机械"/>
<a:record code_value="80" code_value_name="叉车"/>
<!--<a:record code_value="70" code_value_name="铁甲业务"/>-->
<a:record code_value="70" code_value_name="二手机业务"/>
<a:record code_value="95" code_value_name="经租设备"/>
</a:datas>
</a:dataSet>
<a:dataSet id="acr510n_invoice_method_ds">
......@@ -312,7 +313,7 @@
</a:dataSet>
<a:dataSet id="allConditionDs" autoCreate="true">
<a:fields>
<a:field name="invoice_method"/>
<a:field name="invoice_method"/>
<a:field displayField="code_value_name" name="invoice_method_n" options="acr510n_invoice_method_ds"
returnField="invoice_method" valueField="code_value"/>
<a:field name="division"/>
......@@ -453,9 +454,9 @@
<a:field name="billing_status"/>
<a:field name="billing_status_n" displayField="code_value_name" options="billing_status_ds"
returnField="billing_status" valueField="code_value"/>
<a:field name="full_elec_invoice_flag"/>
<a:field name="full_elec_invoice_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="full_elec_invoice_flag" valueField="code_value"/>
<a:field name="full_elec_invoice_flag"/>
<a:field name="full_elec_invoice_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="full_elec_invoice_flag" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="queryUpdateFunction"/>
......@@ -531,7 +532,8 @@
</a:hBox>
<a:hBox>
<a:comboBox bindTarget="allConditionDs" name="billing_status_n" prompt="开票状态"/>
<a:comboBox bindTarget="allConditionDs" name="full_elec_invoice_flag_n" prompt="是否全电发票"/>
<a:comboBox bindTarget="allConditionDs" name="full_elec_invoice_flag_n" prompt="是否全电发票"/>
</a:hBox>
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
......@@ -596,13 +598,13 @@
<a:column name="exchange_rate" align="right" width="80"/>
<a:column name="exchange_rate_type_desc" width="100"/> -->
<a:column name="bill_object_bp_class_desc" width="100" align="center" prompt="商业伙伴分类" />
<a:column name="invoice_method_n" prompt="开票方式" width="100"/>
<a:column name="invoice_method_n" prompt="开票方式" width="100"/>
<a:column name="division_n" prompt="租赁物" width="100"/>
<a:column name="write_off_flag_desc" width="100" align="center" prompt="核销标记" />
<a:column name="rl_flag_n" width="100" align="center" prompt="是否日立为优质客户付租金" />
<a:column name="billing_status_n" width="100" align="center" prompt="开票状态" />
<a:column name="full_elec_invoice_flag_n" width="100" align="center" prompt="是否全电发票" />
</a:columns>
<a:column name="full_elec_invoice_flag_n" width="100" align="center" prompt="是否全电发票" />
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="抬头信息" width="150">
......@@ -613,7 +615,8 @@
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="contract_status_desc" prompt="合同状态" align="center" width="80"/>
<a:column name="billing_method_desc" prompt="开票规则" width="155"/>
<a:column name="billing_method_desc" prompt="开票规则"
width="155"/>
<a:column name="billing_object_name" autoAdjust="false"
editor="contractDs_grid_editor_lov" prompt="开票对象名称"
renderer="render_contractDs_grid" showTitle="true" width="200"/>
......@@ -621,7 +624,7 @@
width="200"/>
<a:column name="object_tax_registry_num" prompt="纳税人识别号" width="150"/>
<a:column name="object_taxpayer_type_desc" prompt="纳税人类型" align="center" width="150"/>
<a:column name="invoice_type_n" prompt="开票类型" width="150"/>
<a:column name="invoice_type_n" prompt="开票类型" width="150"/>
<a:column name="invoice_bp_address_phone_num" autoAdjust="false" prompt="开票地址电话"
showTitle="true" width="200"/>
<a:column name="invoice_bp_bank_account" autoAdjust="false" prompt="开户行及账号"
......
......@@ -349,6 +349,8 @@
renderer="acr514_detail_renderer" width="120"/>
<a:column name="invoice_number" prompt="发票号码" align="center" width="100"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="pur_contract_number" prompt="厂商合同编号" align="center" width="100"/>
<a:column name="pur_number" prompt="采购单编号" align="center" width="100"/>
<a:column name="contract_name" prompt="合同名称" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="invoice_date" prompt="发票日期" renderer="Leaf.formatDate" align="center" width="95"/>
......
......@@ -212,6 +212,10 @@
<a:hBox labelSeparator=" ">
<a:textField name="contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="合同编号"
width="135"/>
<a:textField name="pur_contract_number" bindTarget="acr610_invoice_detail_query_ds" prompt="厂商合同编号"
width="150"/>
<a:textField name="pur_number" bindTarget="acr610_invoice_detail_query_ds" prompt="采购单编号"
width="150"/>
<a:textField name="bp_code" bindTarget="acr610_invoice_detail_query_ds" prompt="客户编号" width="135"/>
<a:textField name="journal_month" bindTarget="acr610_invoice_detail_query_ds" prompt="税款所属期"
width="135" emptyText="YYYY-MM"/>
......@@ -235,8 +239,11 @@
<a:column name="document_number" lock="true" prompt="单据编号" align="center"
renderer="acr610_detail_renderer" width="120"/>
<a:column name="contract_number" prompt="合同编号" align="center" width="100"/>
<a:column name="pur_contract_number" prompt="厂商合同编号" align="center" width="100"/>
<a:column name="pur_number" prompt="采购单编号" align="center" width="100"/>
<a:column name="bp_code" prompt="客户编号" align="center" width="100"/>
<a:column name="bp_name" prompt="客户名称" align="center" width="100"/>
<a:column name="business_type" prompt="业务类型" align="center" width="100"/>
<a:column name="times" prompt="租期" align="center" width="60"/>
<a:column name="journal_month" prompt="税款所属期" align="center" width="120"
footerRenderer="sumFunction_foot"/>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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