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,
......@@ -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
......@@ -349,6 +352,8 @@
<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-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')"/>
......
......@@ -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"/>
......@@ -42,6 +43,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">
......@@ -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,7 +121,12 @@
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,
(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
......
......@@ -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,
......@@ -58,7 +60,7 @@
t1.invoice_kind_type_n,
t1.full_elec_invoice_flag,
t1.full_elec_invoice_flag_n
FROM acr_invoice_hd_v t1
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>
......@@ -116,6 +118,8 @@
<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;)"/>
......
......@@ -118,6 +118,10 @@
<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: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}"/>
......@@ -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,
......@@ -37,17 +58,27 @@
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,
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))
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,
......@@ -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
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>
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......@@ -16,18 +16,25 @@
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.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
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
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})))
......@@ -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,15 +73,17 @@
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
......
......@@ -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/>
......
......@@ -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>
......@@ -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>
......@@ -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}"/>
......
......@@ -89,7 +89,7 @@
<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="(t1.returned_flag &lt;&gt; 'RETURN')"/>
</bm:data-filters>
<bm:query-fields>
......
......@@ -31,8 +31,8 @@
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}
);
......
......@@ -37,6 +37,20 @@
(select cc.contract_name
from con_contract cc
where cc.contract_id = v1.contract_id) contract_name,
(select cc.business_type
from con_contract cc
where cc.contract_id = v1.contract_id) AS business_type,
(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 = v1.contract_id) AS business_type_desc,
(select cc.search_term_1 from con_contract cc where cc.contract_id=v1.contract_id) 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=v1.contract_id) vender_project_number,
--to_char(v1.unwrite_off_amount,'FM999,999,999,990.00')unwrite_off_amount,
v1.unwrite_off_amount,
v1.deposit_trans_type,
......@@ -51,6 +65,10 @@
from hls_bp_master t, con_contract ct
where t.bp_id = ct.bp_id_agent_level1
and ct.contract_id = v1.contract_id) bp_name,
(select t.bp_code
from hls_bp_master t, con_contract ct
where t.bp_id = ct.bp_id_agent_level1
and ct.contract_id = v1.contract_id) agent_bp_code,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
......@@ -87,6 +105,7 @@
where tt.transaction_type = 'DEPOSIT'
and tt.ref_contract_id is not null
and tt.transaction_amount > 0
and tt.deposit_trans_type<>'vender_deposit'
and tt.deposit_trans_type is not null
group by tt.ref_contract_id, tt.deposit_trans_type, tt.bp_id) v1
where v1.unwrite_off_amount > 0
......@@ -96,9 +115,13 @@
tt.transaction_num,
'' contract_number,
'' contract_name,
'' business_type,
'' business_type_desc,
'' vender_contract_number,
'' vender_project_number,
nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0) unwrite_off_amount,
'' deposit_trans_type,
tt.deposit_trans_type deposit_trans_type,
(select hbm.bp_name
from hls_bp_master hbm
where hbm.bp_id = tt.bp_id) bp_id_telnet_n,
......@@ -112,7 +135,15 @@
where hbm.unit_id = h.unit_id
and hbm.bp_id = tt.bp_id
and h.bp_category = 'AGENT') bp_name,
'' deposit_trans_type_n,
(select h.bp_code
from hls_bp_master hbm, hls_bp_master h
where hbm.unit_id = h.unit_id
and hbm.bp_id = tt.bp_id
and h.bp_category = 'AGENT') agent_bp_code,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = tt.deposit_trans_type) deposit_trans_type_n,
nvl((hlcm_cux_deposit_pkg.get_transaction_status_new(p_contract_id => Null,
p_transaction_id => tt.transaction_id,
p_user_id => 1)),
......@@ -143,7 +174,8 @@
and tt.ref_contract_id is null
and tt.reversed_flag='N'
and tt.confirmed_flag not in
('ACCAUDITING', 'NEW', 'CT_REJECTED')
('ACCAUDITING', 'NEW', 'CT_REJECTED','ACCAUDITED_RECOI')
and not exists(select 1 from csh_transaction ct where ct.transaction_id =tt.transaction_id and ct.deposit_trans_type in('vender_deposit'))
and (nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
nvl(tt.returned_amount, 0) > 0)) v
#WHERE_CLAUSE#
......@@ -159,5 +191,8 @@
<bm:query-field name="bp_id_telnet_n" queryExpression="v.bp_id_telnet_n =${@bp_id_telnet_n}"/>
<bm:query-field name="deposit_trans_type" queryExpression="v.deposit_trans_type =${@deposit_trans_type}"/>
<bm:query-field name="trans_review_status" queryExpression="v.trans_review_status =${@trans_review_status}"/>
<bm:query-field name="vender_contract_number" queryExpression="v.vender_contract_number like &apos;%&apos;||${@vender_contract_number}||&apos;%&apos;"/>
<bm:query-field name="vender_project_number" queryExpression="v.vender_project_number like &apos;%&apos;||${@vender_project_number}||&apos;%&apos;"/>
<bm:query-field name="business_type" queryExpression="v.business_type =${@business_type}"/>
</bm:query-fields>
</bm:model>
\ No newline at end of file
......@@ -23,13 +23,22 @@
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,
to_char(ct.je_date,'yyyy-MM-dd') je_date,
ct.deposit_amount,
ct.deposit_info,
cc.bp_id_agent_level1,
......@@ -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
......
......@@ -29,6 +29,17 @@
WHERE sc.code = 'TRANS_REVIEW_STATUS'
AND sc.code_value = v.trans_review_status) trans_review_status_n,
cc.contract_number,
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,
......@@ -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,6 +129,7 @@
and ct.batch_id is not null
) v
where cc.transaction_id = v.source_transaction_id
) t1
#WHERE_CLAUSE#
......@@ -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
......@@ -27,7 +27,9 @@
<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_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/>
......@@ -50,6 +52,15 @@
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'
) 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,
......@@ -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
......@@ -125,7 +144,7 @@
</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>
......@@ -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,
......
......@@ -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>
......
......@@ -105,6 +105,10 @@
<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: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/>
......@@ -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>
......@@ -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,7 +141,7 @@
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')))"/>
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
......@@ -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,6 +71,10 @@ var add_datafilters = [
{
name : "con_status",
expression : "t1.contract_status in ('INCEPT','NEW') "
},
{
name : "division",
expression: "t1.division != '95'"
}
];
......
......@@ -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');
}
......
......@@ -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,7 +87,6 @@
$L.showErrorMessage("提示","本次开票金额+已开票金额不能超过已核销金额!");
return;
}
//全电发票只能选择电子增值税普通发票和电子增值税专用发票
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')){
......@@ -95,8 +94,6 @@
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,11 +149,6 @@
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);
}
}
}
......@@ -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() {
......@@ -234,9 +229,14 @@
<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="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"/>
......@@ -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,7 +271,7 @@
<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"/>-->
......
......@@ -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">
......@@ -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">
......@@ -532,6 +533,7 @@
<a:hBox>
<a:comboBox bindTarget="allConditionDs" name="billing_status_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"/>
......@@ -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"/>
......
......@@ -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"/>
......
......@@ -223,6 +223,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"/>
......@@ -246,6 +250,8 @@
<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="times" prompt="租期" align="center" width="60"/>
......
......@@ -164,6 +164,8 @@
<a:column name="document_number" lock="true" prompt="单据编号" align="center" renderer="acr620_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="100"/>
......@@ -188,6 +190,8 @@
<a:column name="document_number" lock="true" prompt="单据编号" align="center" renderer="acr620_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="100"/>
......
......@@ -33,6 +33,8 @@
url="${/request/@context_path}/modules/cont/CON301N/con_contract_print.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_op_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_op_modify.lview"/>
<a:link id="${/parameter/@layout_code}_contract_seal_link_id" url="${/request/@context_path}/modules/cont/CON301N/con_contract_finish_seal_info.lview"/>
<a:link id="con_contract_finish_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<!-- <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>-->
......@@ -41,10 +43,21 @@
<a:link id="rl_notice_print_link"
url="${/request/@context_path}/modules/cont/CON301N/rl_notice_print.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="operate_readonly_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"/>
<a:link id="prj2000_pur_deteail_link_id" url="${/request/@context_path}/modules/prj/PRJ2000/purchase_order_deteail.lview"></a:link>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
Leaf.onReady(function() {
//只要经租代理店或者管理人员才可能看到采购单编号
if("${/model/role_info/record/@role_code}"=="0018"||"${/model/role_info/record/@role_code}"=="0019"){
if('${/model/user_type_code/record/@unit_id}'!="2224"){
if(document.getElementById('CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_PRJ_NUMBER')){
document.getElementById('CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_PRJ_NUMBER_prompt').style.display = 'none';
document.getElementById('CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_PRJ_NUMBER').style.display = 'none';
}
}
}
if("${/model/role_info/record/@role_code}"!="0018"&&"${/model/role_info/record/@role_code}"!="0019") {
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM_prompt").style.display = "";
document.getElementById("CONTRACT_QUERY_ENTRANCE_F_QUERY_NULL_AGENT_EXTRA_NAM").style.display = "";
......@@ -93,19 +106,28 @@
}
}
});
function open_contract_win(ds_id, record_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
// param['function_code'] = 'CON301';
var division=param.division;
if(division!='95'){
param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
var url = '${/parameter/@layout_code}con_contract_query_link';
}else {
param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q_OP';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
var url = '${/parameter/@layout_code}con_contract_op_query_link';
}
//hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', null);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id);
}
function open_project_Window(record_id, ds_id) {
......@@ -120,6 +142,7 @@
param['function_usage'] = 'QUERY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
if(record.get('division')!='95'){
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
......@@ -129,11 +152,28 @@
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
}else {
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'operate_readonly_link';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id);
}
function open_pur_Window(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'PRJ2000D_WFL';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'QUERY'
param['url_title'] = '采购申请单维护';
param['project_id'] = record.get('source_project_id');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'prj2000_pur_deteail_link_id', ds_id);
}
function open_bs_Window(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
......@@ -190,6 +230,9 @@
if (name == 'project_id_c' && value) {
return '<a href="javascript:open_project_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if(name == 'prj_number' && value){
return '<a href="javascript:open_pur_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if (name == 'bs_link') {
return '<a href="javascript:open_bs_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">明细</a>';
}
......
......@@ -17,11 +17,14 @@
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON311/con_re_print_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_op_link"
url="${/request/@context_path}/modules/cont/CON505/con_contract_op_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="con_contract_update_print_detail_link_id" url="${/request/@context_path}/modules/cont/CON311/con_contract_update_print_word_detail.lview"/>
<a:link id="con_lease_org_print_link"
url="${/request/@context_path}/modules/cont/CON620/create_content_for_collection.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="operate_readonly_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"/>
<script type="text/javascript"><![CDATA[
......@@ -48,8 +51,10 @@
function open_contract_win(ds_id, record_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
if(record.get('division')!='95'){
if(record.get('sign_contract_status')=='NEW' || record.get('sign_contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM';
param['function_usage'] = 'MODIFY';
......@@ -66,7 +71,25 @@
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
if(record.get('division')=='95'){
if(record.get('sign_contract_status')=='NEW' || record.get('sign_contract_status')=='SIGN_RETURN'){
param['function_code'] = 'CON301MM_OP';
param['function_usage'] = 'MODIFY';
}
else{
param['function_code'] = 'CON301OP';
param['function_usage'] = 'QUERY';
param['sign_contract_status'] = record.get('sign_contract_status');
param['contract_status'] = record.get('contract_status');
}
param['winid'] = 'con_contract_modify_op_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_op_link', ds_id);
}
}
function open_project_Window(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
var url;
......@@ -79,6 +102,7 @@
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
if(record.get('division')!='95'){
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
......@@ -88,6 +112,10 @@
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
}else {
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'operate_readonly_link';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id, '${/parameter/@layout_code}');
}
......@@ -173,6 +201,11 @@
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(ds_id).getSelected();
var division=records[0].data.division;
if(division == '95'){
Leaf.showErrorMessage('提示','经营性租赁暂不支持线上生成合同文本!');
return;
}
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}','${l:HLS.SELECT_RECORD}');
return;
......@@ -197,6 +230,11 @@
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var records = $(ds_id).getSelected();
var division=records[0].data.division;
if(division == '95'){
Leaf.showErrorMessage('提示','经营性租赁暂不支持线上生成用印信息!');
return;
}
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}','${l:HLS.SELECT_RECORD}');
return;
......
......@@ -57,6 +57,8 @@
<!-- <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_op_update_link_id"
url="${/request/@context_path}/modules/hls/HLS500N/hls_fin_calculator_update_n_for_ol.lview"/>
<a:link id="get_atch_download_link"
url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<a:link id="check_contract_status" model="cont.CON3200.con_checklist_contract" modelaction="query"/>
......@@ -364,7 +366,10 @@
if (record.get('bp_category') == 'AGENT') {
param['function_code'] = 'HLS303_Q';
param['function_usage'] = 'QUERY';
} else {
}else if(record.get('bp_category')=='RENTER' || record.get('bp_category')=='MAN_FACTURER' || record.get('bp_category')=='ASSET_REGULATOR'){
param['function_code'] = 'HLS215D_OP';
param['function_usage'] = 'QUERY';
}else{
param['function_code'] = 'CON505H';
param['function_usage'] = 'QUERY';
}
......@@ -680,6 +685,12 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cashflow_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var record = $(ds_id).getCurrentRecord();
var division = record.get('division');
if(division == '95'){
var url =$('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_op_update_link_id').getUrl();
}else {
var url = $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl();
}
var price_list = record.get('price_list');
var calc_session_id = record.get('calc_session_id');
var parent_pk_value = record.get('contract_id');
......@@ -707,7 +718,7 @@
recreate_L_formula: 'Y',
recreate_H_formula: 'Y'
},
url: $('${/parameter/@layout_code}${/parameter/@tree_code}_hls_fin_calculator_update_link_id').getUrl(),
url: url,
fullScreen: true,
draggable: true
});
......@@ -798,9 +809,34 @@
}
}
};
/* 时间戳转换为时间 */
function timestampToTime(timestamp) {
timestamp = timestamp ? timestamp : null;
var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
var Y = date.getFullYear() + '-';
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate());
// var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
// var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
// var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
return Y + M + D;
};
var count = 0;
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
debugger;
if('${/parameter/@layout_code}' == 'CONTRACT_OP_CREATE_INC'){
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var contract_record = $(con_ds_id).getAt(0);
var ref_d09 = timestampToTime(Date.parse(lease_item_record.get('ref_d09')));
var lease_start_date = timestampToTime(Date.parse(record.get('lease_start_date')));
if(lease_start_date>ref_d09){
Leaf.showMessage('${l:PROMPT}','采购单的付款预定日期需大于合同起租日,请重新选择!');
return false;
}
}
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'con_contract_lease_item');
var lease_item_record = $(lease_item_ds_id).getCurrentRecord();
var con_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
......
......@@ -17,10 +17,13 @@
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_op_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_op_modify.lview"/>
<a:link id="car_modify_special_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="cont_con_sale_contract_info_print_link"
url="${/request/@context_path}/modules/cont/CON3200/contract_receipt_detail_print.lsc"/>
<a:link id="car_modify_link_readonly_c" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_constru.lview"/>
<a:link id="operate_readonly_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_opreat.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(function() {
......@@ -38,8 +41,11 @@
});
function open_contract_win(ds_id, record_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
var division=param.division;
if(division !='95'){
if((record.get('contract_status')=='NEW' || record.get('contract_status')=='INCEPT_RETURN')&& (record.get('sign_contract_status')=='SIGNING' || record.get('sign_contract_status') =='SIGN')){
param['function_code'] = 'CON3200N';
param['function_usage'] = 'MODIFY';
......@@ -52,8 +58,25 @@
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
if(division =='95'){
if((record.get('contract_status')=='NEW' || record.get('contract_status')=='INCEPT_RETURN')&& (record.get('sign_contract_status')=='SIGNING' || record.get('sign_contract_status') =='SIGN')){
param['function_code'] = 'CON3200N_OP';
param['function_usage'] = 'MODIFY';
var link_id = '${/parameter/@layout_code}con_contract_op_query_link';
}
else{
param['function_code'] = 'CON3200Q_OP';
param['function_usage'] = 'QUERY';
var link_id = '${/parameter/@layout_code}con_contract_op_query_link';
}
param['winid'] = 'con_contract_op_modify_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, link_id, ds_id);
}
}
function open_project_Window(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
var url;
......@@ -66,6 +89,7 @@
/* param['window_open_flag'] = 'Y';
param['show_history_flag'] = 'Y'; */
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
if(record.get('division')!='95'){
if(record.get('is_constru_unit') == 'N'){
//不是虚拟店
param['function_code'] = 'PRJ501_WFL';
......@@ -75,6 +99,10 @@
param['function_code'] = 'PRJ501Q_CONSTRU';
url = 'car_modify_link_readonly_c';
}
}else {
param['function_code'] = 'PRJ501_OPERAT_WFL';
url = 'operate_readonly_link';
}
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, url, ds_id, '${/parameter/@layout_code}');
}
......@@ -116,6 +144,11 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
debugger
var selectedDS=$(ds_id).getSelected();
var division = selectedDS[0].data.division;
if(division == '95'){
$L.showErrorMessage("提示",'经营性租赁暂不支持打印应收明细!');
return;
}
if(selectedDS.length!=1){
$L.showErrorMessage("提示",'请选择一条数据进行打印!');
return;
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="contract_id=${/parameter/@contract_id}" fetchAll="true" model="cont.CON1300.get_contract_print_info" rootPath="/model/head_info"/>
<a:model-query fetchAll="true" model="cont.CON1300.get_contract_print_grid_info" rootPath="/model/grid_data"/>
<s:server-script><![CDATA[
function getdate() {
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
d = now.getDate()
m = m < 10 ? "0" + m : m
d = d < 10 ? "0" + d : d
return y + "" + m + "" + d
}
$ctx.parameter.file_name = $ctx.parameter.file_name+getdate()+'.xlsx';
]]></s:server-script>
<dr:excel-report enableTask="false" fileName="${/parameter/@file_name}">
<styles>
<dr:cell-style name="title" align="ALIGN_CENTER">
<dr:font fontName="黑体" height="12" italic="false"/>
</dr:cell-style>
<dr:cell-style name="left" align="ALIGN_LEFT">
<dr:font fontName="黑体" height="10" italic="false"/>
</dr:cell-style>
<dr:cell-style name="right" align="ALIGN_RIGHT">
<dr:font fontName="黑体" height="10" italic="false"/>
</dr:cell-style>
<dr:cell-style name="grid_title" align="ALIGN_CENTER" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderTop="BORDER_THIN" borderRight="BORDER_THIN">
<dr:font fontName="黑体" height="9" italic="false"/>
</dr:cell-style>
<dr:cell-style name="grid_cell" align="ALIGN_CENTER" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderTop="BORDER_THIN" borderRight="BORDER_THIN">
<dr:font fontName="黑体" height="9" italic="false"/>
</dr:cell-style>
<dr:cell-style name="header" align="ALIGN_CENTER">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="foot">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="footNumber" dataFormat="#,##0.000">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="dateFormat" dataFormat="YYYY-MM-DD">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
<dr:cell-style name="group">
<dr:font bold="false" fontName="宋体" height="12"/>
</dr:cell-style>
</styles>
<sheets>
<dr:sheet name="第一页" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20" displayGridlines="true">
<dr:static-content>
<dr:cell-data cell="A" row="1" stylename="title" type="content" value="合同应收明细表"/>
<dr:cell-data cell="A" row="3" stylename="right" type="content" value="代理店:"/>
<dr:cell-data cell="B" row="3" stylename="left" type="content" value="${/model/head_info/record/@bp_name}"/>
<dr:cell-data cell="J" row="3" stylename="right" type="content" value="业务伙伴号:"/>
<dr:cell-data cell="k" row="3" stylename="left" type="content" value="${/model/head_info/record/@client_bp_code}"/>
<dr:cell-data cell="A" row="4" stylename="right" type="content" value="合同编号:"/>
<dr:cell-data cell="B" row="4" stylename="left" type="content" value="${/model/head_info/record/@contract_number}"/>
<dr:cell-data cell="J" row="4" stylename="right" type="content" value="客户名称:"/>
<dr:cell-data cell="k" row="4" stylename="left" type="content" value="${/model/head_info/record/@client_bp_name}"/>
<dr:cell-data cell="A" row="5" stylename="right" type="content" value="机型:"/>
<dr:cell-data cell="B" row="5" stylename="left" type="content" value="${/model/head_info/record/@pattern}"/>
<dr:cell-data cell="J" row="5" stylename="right" type="content" value="机号:"/>
<dr:cell-data cell="k" row="5" stylename="left" type="content" value="${/model/head_info/record/@machine_number}"/>
<dr:cell-data cell="A" row="6" stylename="right" type="content" value="合同签订日:"/>
<dr:cell-data cell="B" row="6" stylename="left" type="content" value="${/model/head_info/record/@inception_of_lease}"/>
<dr:cell-data cell="J" row="6" stylename="right" type="content" value="租赁开始日:"/>
<dr:cell-data cell="k" row="6" stylename="left" type="content" value="${/model/head_info/record/@lease_start_date}"/>
<dr:cell-data cell="A" row="7" stylename="right" type="content" value="利率:"/>
<dr:cell-data cell="B" row="7" stylename="left" type="content" value="${/model/head_info/record/@int_rate_display}"/>
<dr:cell-data cell="J" row="7" stylename="right" type="content" value="租赁期间:"/>
<dr:cell-data cell="k" row="7" stylename="left" type="content" value="${/model/head_info/record/@lease_times}"/>
</dr:static-content>
<dr:dynamic-content cell="A" datamodel="/model/grid_data" row="8">
<dr:columns>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="439" field="times" title="期数" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="440" field="due_date" title="预定收款日" type="content" groupDesc="计数" />
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="due_amount" title="预定收款金额" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="vat_due_amount" title="租金增值税" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="principal" title="本金" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="441" field="vat_principal" title="本金增值税" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="448" field="total_interest" title="利息合计" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="442" field="up_interest" title="利息上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="443" field="down_interest" title="利息下段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="444" field="total_net_interest" title="利息(不含税)合计" type="content" />
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="445" field="up_net_interest" title="利息(不含税)上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="446" field="down_net_interest" title="利息(不含税)下段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="total_vat_interest" title="利息(增值税)合计" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="up_vat_interest" title="利息(增值税)上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="down_vat_interest" title="利息(增值税)下段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="total_weight_factor" title="本期天数合计" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="up_weight_factor" title="本期天数上段" type="content"/>
<dr:table-column cellStyle="grid_cell" titleStyle="grid_title" column_id="447" field="down_weight_factor" title="本期天数下段" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
</sheets>
</dr:excel-report>
</a:init-procedure>
</a:service>
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