Commit 20d54f2e authored by Darming's avatar Darming

[fix] month end

parent 2458810c
...@@ -96,6 +96,9 @@ ...@@ -96,6 +96,9 @@
t1.WRITE_OFF_DUE_AMOUNT write_off_amount, t1.WRITE_OFF_DUE_AMOUNT write_off_amount,
t1.WRITE_OFF_PRINCIPAL, t1.WRITE_OFF_PRINCIPAL,
t1.WRITE_OFF_INTEREST, t1.WRITE_OFF_INTEREST,
(select principal from con_contract_cashflow where cashflow_id = t.cashflow_id) principal,
(select interest from con_contract_cashflow where cashflow_id = t.cashflow_id) interest,
(select due_amount from con_contract_cashflow where cashflow_id = t.cashflow_id) due_amount,
(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id) bp_tenant_name (select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id) bp_tenant_name
from csh_write_off t1) t from csh_write_off t1) t
#WHERE_CLAUSE# #WHERE_CLAUSE#
...@@ -134,6 +137,9 @@ ...@@ -134,6 +137,9 @@
prompt="CSH_WRITE_OFF.WRITE_OFF_ID"/> prompt="CSH_WRITE_OFF.WRITE_OFF_ID"/>
<bm:field name="transaction_id"/> <bm:field name="transaction_id"/>
<bm:field name="bp_tenant_name"/> <bm:field name="bp_tenant_name"/>
<bm:field name="principal"/>
<bm:field name="interest"/>
<bm:field name="due_amount"/>
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field field="transaction_id" queryOperator="="/> <bm:query-field field="transaction_id" queryOperator="="/>
......
...@@ -115,6 +115,9 @@ end; ...@@ -115,6 +115,9 @@ end;
<bm:field name="write_off_classification_desc" forInsert="false" forUpdate="false"/> <bm:field name="write_off_classification_desc" forInsert="false" forUpdate="false"/>
<bm:field name="bp_tenant_name" expression="(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/> <bm:field name="bp_tenant_name" expression="(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="journal_date" databaseType="DATE" datatype="java.util.Date"/> <bm:field name="journal_date" databaseType="DATE" datatype="java.util.Date"/>
<bm:field name="principal" expression="(select principal from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="interest" expression="(select interest from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="due_amount" expression="(select due_amount from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-12-30 下午5:33:43
$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(
SELECT
TO_CHAR(to_date(${@internal_period_num}, 'yyyymm') + (rownum - 1),'yyyy-mm-dd') calc_end_date
FROM
all_tables
WHERE
rownum <=
(SELECT
last_day(to_date(${@internal_period_num},'yyyymm')) - to_date(${@internal_period_num},'yyyymm')+1
FROM
dual
)) #WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="calc_end_date" forDisplay="true" forQuery="true" prompt="截止日"/>
<!-- <bm:field name="internal_period_num"/> -->
</bm:fields>
<bm:query-fields>
<bm:query-field name="calc_end_date" queryExpression="calc_end_date = ${@calc_end_date}"/>
</bm:query-fields>
<!-- <bm:query-fields>
<bm:query-field name="internal_period_num" queryExpression="v.internal_period_num like ${@internal_period_num}"/>
</bm:query-fields> -->
</bm:model>
...@@ -7,42 +7,47 @@ ...@@ -7,42 +7,47 @@
--> -->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm"> <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations> <bm:operations>
<bm:operation name="execute"> <!-- <bm:operation name="execute">
<bm:parameters> <bm:parameters>
<bm:parameter name="return_value" dataType="java.lang.String" input="false" inputPath="@return_value" output="true" outputPath="/parameter/@return_value"/> <bm:parameter name="return_value" dataType="java.lang.String" input="false" inputPath="@return_value" output="true" outputPath="/parameter/@return_value"/>
<bm:parameter name="company_id" dataType="java.lang.Long" input="true" output="false"/> <bm:parameter name="company_id" dataType="java.lang.Long" input="true" output="false"/>
<bm:parameter name="internal_period_num" dataType="java.lang.Long" input="true" output="false"/> <bm:parameter name="internal_period_num" dataType="java.lang.Long" input="true" output="false"/>
<bm:parameter name="calc_end_date" dataType="java.util.Date" input="true" output="false"/>
<bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/> <bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
</bm:parameters> </bm:parameters>
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
declare declare
v_return_value varchar2(30); v_return_value varchar2(30);
begin begin
v_return_value := HLS_MONTHEND_PKG.con_unearned_fin_income
(
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
p_user_id=>${/session/@user_id}
);
if v_return_value ='SUCCESS' then
v_return_value := HLS_MONTHEND_PKG.con_finance_income v_return_value := HLS_MONTHEND_PKG.con_finance_income
( (
p_company_id=>${/session/@company_id}, p_company_id =>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num =>${@internal_period_num},
p_user_id=>${/session/@user_id} p_accounting_date =>${@calc_end_date},
p_user_id =>${/session/@user_id}
); );
end if;
if v_return_value ='SUCCESS' then if v_return_value ='SUCCESS' then
${@return_value} := HLS_MONTHEND_PKG.con_finance_income_je ${@return_value} := HLS_MONTHEND_PKG.con_finance_income_je
( (
p_company_id=>${/session/@company_id}, p_company_id =>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num =>${@internal_period_num},
p_user_id=>${/session/@user_id} p_user_id =>${/session/@user_id}
); );
end if; end if;
end;]]></bm:update-sql> end;]]></bm:update-sql>
</bm:operation> -->
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hls_monthend_new_pkg.finance_income_je_job(
p_date => to_date(${@calc_end_date},'YYYY-MM-DD'),
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
$Author: qwm $Author: qwm
$Date: 2013-12-28 下午1:31:12 $Date: 2013-12-28 下午1:31:12
$Revision: 1.0 $Revision: 1.0
$Purpose: $Purpose:
--> -->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_UNEARNED_FINANCE_INCOME"> <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_UNEARNED_FINANCE_INCOME">
<bm:fields> <bm:fields>
<bm:field name="seq" databaseType="NUMBER" datatype="java.lang.Long" expression="(row_number() over(order by t1.contract_id))"/> <bm:field name="seq" databaseType="NUMBER" datatype="java.lang.Long" expression="(row_number() over(order by t1.contract_id))"/>
<bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.finance_amount from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="interest" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.interest from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/>
<bm:field name="int_rate_implicit" databaseType="NUMBER" datatype="java.lang.Double" expression="round((select nvl(c.int_rate,c.annual_mean_rate) from con_contract c where c.contract_id = t1.contract_id),4)" forInsert="false" forUpdate="false"/>
<bm:field name="calc_period" databaseType="VARCHAR2" datatype="java.lang.String" expression="(to_char(t1.calc_start_date,&apos;yyyy/mm/dd&apos;)||&apos;-&apos;||to_char(t1.calc_end_date,&apos;yyyy/mm/dd&apos;))" forInsert="false" forUpdate="false"/>
<bm:field name="calc_date_count" databaseType="NUMBER" datatype="java.lang.Long" expression="(t1.calc_end_date-t1.calc_start_date+1)" forInsert="false" forUpdate="false"/>
<bm:field name="vat_unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(t1.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/>
<bm:field name="unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UNEARNED_FINANCE_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME"/>
<bm:field name="finance_income_recognized" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FINANCE_INCOME_RECOGNIZED" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCE_INCOME_RECOGNIZED"/>
<bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="CON_UNEARNED_FINANCE_INCOME.RECORD_ID"/> <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="CON_UNEARNED_FINANCE_INCOME.RECORD_ID"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_UNEARNED_FINANCE_INCOME.COMPANY_ID"/> <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_UNEARNED_FINANCE_INCOME.COMPANY_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CONTRACT_ID"/> <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CONTRACT_ID"/>
<bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CON_UNEARNED_FINANCE_INCOME.INTERNAL_PERIOD_NUM"/>
<bm:field name="net_unearned_finance_income" expression="(t1.unearned_finance_income * (select decode(t.tax_type_id, 1, 1, 1 + (select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)-t1.unearned_finance_income)" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CON_UNEARNED_FINANCE_INCOME.INTERNAL_PERIOD_NUM"/>
<bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_ITEM" prompt="CON_UNEARNED_FINANCE_INCOME.CF_ITEM"/> <bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_ITEM" prompt="CON_UNEARNED_FINANCE_INCOME.CF_ITEM"/>
<bm:field name="seq_in_period" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_IN_PERIOD" prompt="CON_UNEARNED_FINANCE_INCOME.SEQ_IN_PERIOD"/> <bm:field name="seq_in_period" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_IN_PERIOD" prompt="CON_UNEARNED_FINANCE_INCOME.SEQ_IN_PERIOD"/>
<bm:field name="unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" physicalName="UNEARNED_FINANCE_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME"/>
<bm:field name="financing_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FINANCING_COST" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCING_COST"/> <bm:field name="financing_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FINANCING_COST" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCING_COST"/>
<bm:field name="main_business_income" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_INCOME"/> <bm:field name="main_business_income" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_INCOME" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_INCOME"/>
<bm:field name="main_business_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_COST" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_COST"/> <bm:field name="main_business_cost" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MAIN_BUSINESS_COST" prompt="CON_UNEARNED_FINANCE_INCOME.MAIN_BUSINESS_COST"/>
<bm:field name="unearned_finance_income_balanc" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNEARNED_FINANCE_INCOME_BALANC" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME_BALANC"/> <bm:field name="unearned_finance_income_balanc" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNEARNED_FINANCE_INCOME_BALANC" prompt="CON_UNEARNED_FINANCE_INCOME.UNEARNED_FINANCE_INCOME_BALANC"/>
<bm:field name="finance_income_recognized" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FINANCE_INCOME_RECOGNIZED" prompt="CON_UNEARNED_FINANCE_INCOME.FINANCE_INCOME_RECOGNIZED"/>
<bm:field name="weight_factor" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WEIGHT_FACTOR" prompt="CON_UNEARNED_FINANCE_INCOME.WEIGHT_FACTOR"/> <bm:field name="weight_factor" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WEIGHT_FACTOR" prompt="CON_UNEARNED_FINANCE_INCOME.WEIGHT_FACTOR"/>
<bm:field name="total_weight" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TOTAL_WEIGHT" prompt="CON_UNEARNED_FINANCE_INCOME.TOTAL_WEIGHT"/> <bm:field name="total_weight" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TOTAL_WEIGHT" prompt="CON_UNEARNED_FINANCE_INCOME.TOTAL_WEIGHT"/>
<bm:field name="factor_days" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FACTOR_DAYS" prompt="CON_UNEARNED_FINANCE_INCOME.FACTOR_DAYS"/> <bm:field name="factor_days" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FACTOR_DAYS" prompt="CON_UNEARNED_FINANCE_INCOME.FACTOR_DAYS"/>
...@@ -39,19 +31,20 @@ ...@@ -39,19 +31,20 @@
<bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CASHFLOW_ID"/> <bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID" prompt="CON_UNEARNED_FINANCE_INCOME.CASHFLOW_ID"/>
<bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" prompt="CON_UNEARNED_FINANCE_INCOME.TIMES"/> <bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" prompt="CON_UNEARNED_FINANCE_INCOME.TIMES"/>
<bm:field name="cf_type" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_TYPE" prompt="CON_UNEARNED_FINANCE_INCOME.CF_TYPE"/> <bm:field name="cf_type" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_TYPE" prompt="CON_UNEARNED_FINANCE_INCOME.CF_TYPE"/>
<bm:field name="calc_start_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_START_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_START_DATE"/> --> <bm:field name="calc_start_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_START_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_START_DATE"/>
<!-- <bm:field name="calc_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_END_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_END_DATE"/> --> <bm:field name="calc_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="CALC_END_DATE" prompt="CON_UNEARNED_FINANCE_INCOME.CALC_END_DATE"/>
<!-- <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select p.project_name from prj_project p ,con_contract c where c.contract_id = t1.contract_id and p.project_id = c.project_id)" forInsert="false" forUpdate="false"/> --> <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select p.project_name from prj_project p ,con_contract c where c.contract_id = t1.contract_id and p.project_id = c.project_id)" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="period" databaseType="VARCHAR2" datatype="java.lang.String" expression="((SELECT TO_CHAR(cf1.due_date + 1, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id )) || &apos;-&apos;||(SELECT TO_CHAR(cf.due_date, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id))" forInsert="false" forUpdate="false"/> --> <bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.finance_amount from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="current_month_vat_income" databaseType="NUMBER" datatype="java.lang.Double" expression="ROUND((select sum(t.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num} ),(select c.PRECISION from gld_currency c,con_contract ct where c.currency_code = ct.currency and ct.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/> --> <bm:field name="period" databaseType="VARCHAR2" datatype="java.lang.String" expression="((CASE WHEN t1.cf_item = 8 THEN (SELECT to_char(cf1.due_date,&apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item)||'-'||(SELECT TO_CHAR(cf.due_date, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id) ELSE ( (SELECT to_char(cf1.due_date,&apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id)) ||'-'|| (SELECT TO_CHAR(cf.due_date -1, &apos;yyyy/mm/dd&apos;) FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id))END))" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="current_month_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(select sum(t.unearned_finance_income) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num})" forInsert="false" forUpdate="false"/> --> <bm:field name="interest" databaseType="NUMBER" datatype="java.lang.Double" expression="(select c.interest from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id)" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/> --> <bm:field name="int_rate_implicit" databaseType="NUMBER" datatype="java.lang.Double" expression="round((select c.int_rate from con_contract c where c.contract_id = t1.contract_id),4)" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="search_term_1" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.search_term_1 from con_contract t where t.contract_id =t1.contract_id)" forInsert="false" forUpdate="false"/> --> <bm:field name="calc_period" databaseType="VARCHAR2" datatype="java.lang.String" expression="(to_char(t1.calc_start_date,&apos;yyyy/mm/dd&apos;)||&apos;-&apos;||to_char(t1.calc_end_date,&apos;yyyy/mm/dd&apos;))" forInsert="false" forUpdate="false"/>
<bm:field name="vat_interest" /> <bm:field name="calc_date_count" databaseType="NUMBER" datatype="java.lang.Long" expression="(t1.calc_end_date-t1.calc_start_date+1)" forInsert="false" forUpdate="false"/>
<bm:field name="vat_unearned_finance_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(t1.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="interest"/>--> <bm:field name="current_month_vat_income" databaseType="NUMBER" datatype="java.lang.Double" expression="ROUND((select sum(t.unearned_finance_income*(select decode(t.tax_type_id, 1, 1, 1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num} ),(select c.PRECISION from gld_currency c,con_contract ct where c.currency_code = ct.currency and ct.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/>
<!-- <bm:field name="interest" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/>--> <bm:field name="current_month_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(select sum(t.unearned_finance_income) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num})" forInsert="false" forUpdate="false"/>
<bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.contract_number from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/>
<bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -60,21 +53,13 @@ ...@@ -60,21 +53,13 @@
<bm:pk-field name="record_id"/> <bm:pk-field name="record_id"/>
</bm:primary-key> </bm:primary-key>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="company_id" queryExpression="t1.company_id = ${@company_id}"/> <bm:query-field field="company_id" queryOperator="="/>
<bm:query-field name="finance_income_recognized" queryExpression="nvl(t1.finance_income_recognized,'N') = ${@finance_income_recognized}"/> <bm:query-field field="finance_income_recognized" queryExpression="t1.finance_income_recognized=${@finance_income_recognized}"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.internal_period_num = ${@internal_period_num} and t1.company_id IN (SELECT company_id FROM fnd_companies_vl WHERE (company_id = ${/session/@company_id} OR parent_biz_company_id = ${/session/@company_id}) AND enabled_flag = &apos;Y&apos;) and t2.data_class = &apos;NORMAL&apos; and t2.contract_status in( &apos;INCEPT&apos;,&apos;SIGN&apos;,&apos;TERMINATE&apos;,&apos;ET&apos;) and nvl(t1.unearned_finance_income,0) !=0 "/> <bm:data-filter enforceOperations="query" expression="t1.internal_period_num = ${@internal_period_num} and exists (select 1 from con_contract t where t.contract_id=t1.contract_id and t.contract_status = &apos;INCEPT&apos; and t.data_class = &apos;NORMAL&apos;) and exists (select 1 from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id and c.interest is not null)"/>
<bm:data-filter enforceOperations="query" expression="to_char(t1.calc_end_date,&apos;yyyy-mm-dd&apos;) = ${@calc_end_date} "/>
<bm:data-filter enforceOperations="query" expression="t1.cashflow_id in (select cw.cashflow_id from con_contract_cashflow cw where cw.cf_direction not in ('NONCASH'))"/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id in (select contract_id from con_contract t where nvl(t.fraud_flag,'N') !='Y')"/>-->
</bm:data-filters> </bm:data-filters>
<bm:relations>
<bm:relation name="con_ref" joinType="LEFT OUTER" refAlias="t2" refModel="cont.CON500.con_contract">
<bm:reference foreignField="contract_id" localField="contract_id"/>
</bm:relation>
</bm:relations>
<bm:ref-fields>
<bm:ref-field name="contract_number" relationName="con_ref" sourceField="contract_number"/>
<bm:ref-field name="contract_name" relationName="con_ref" sourceField="contract_name"/>
<bm:ref-field name="contract_status" relationName="con_ref" sourceField="contract_status"/>
<bm:ref-field name="data_class" relationName="con_ref" sourceField="data_class"/>
</bm:ref-fields>
</bm:model> </bm:model>
...@@ -6,30 +6,30 @@ ...@@ -6,30 +6,30 @@
$Purpose: “会计期间控制”中,用于查询没有打开的期间信息 $Purpose: “会计期间控制”中,用于查询没有打开的期间信息
--> -->
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm"> <ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm">
<ns1:operations> <ns1:operations>
<ns1:operation name="query"> <ns1:operation name="query">
<ns1:query-sql><![CDATA[ <ns1:query-sql><![CDATA[
select p.*, select p.*,
to_char(p.start_date, 'yyyy-mm-dd') start_date_c, to_char(p.start_date, 'yyyy-mm-dd') start_date_c,
to_char(p.end_date, 'yyyy-mm-dd') end_date_c, to_char(p.end_date, 'yyyy-mm-dd') end_date_c,
(select max(s.internal_period_num) (select max(s.internal_period_num)
from gld_period_status s from gld_period_status s
where s.period_set_code = p.period_set_code where s.period_set_code = p.period_set_code
and s.company_id = ${/session/@company_id}) as internal_period_num_max, and s.company_id = ${/session/@company_id}) as internal_period_num_max,
nvl((select s.period_status_code nvl((select s.period_status_code
from gld_period_status s from gld_period_status s
where s.company_id = ${/session/@company_id} where s.company_id = ${/session/@company_id}
and s.period_set_code = p.period_set_code and s.period_set_code = p.period_set_code
and s.internal_period_num = p.internal_period_num), and s.internal_period_num = p.internal_period_num),
'U') as period_status_code 'U') as period_status_code
from gld_periods p from gld_periods p
where p.period_set_code = ${@period_set_code} where p.period_set_code = ${@period_set_code}
and p.internal_period_num >= ${@internal_period_num} and p.internal_period_num >= ${@internal_period_num}
and rownum <= 3 and rownum <= 3
order by p.period_set_code,internal_period_num order by p.period_set_code,internal_period_num
]]></ns1:query-sql> ]]></ns1:query-sql>
</ns1:operation> </ns1:operation>
</ns1:operations> </ns1:operations>
</ns1:model> </ns1:model>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
${@return_value_1} := HLS_MONTHEND_PKG.TRE_ACCRUED_INTEREST_MONTHLY ${@return_value_1} := HLS_MONTHEND_NEW_PKG.TRE_ACCRUED_INTEREST_MONTHLY
( (
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num=>${@internal_period_num},
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
${@period_return_value} := HLS_MONTHEND_PKG.period_month_close ${@period_return_value} := HLS_MONTHEND_NEW_PKG.period_month_close
( (
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num=>${@internal_period_num},
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
declare declare
v_return_value varchar2(30); v_return_value varchar2(30);
begin begin
hls_monthend_pkg.tre_finance_confirm( hls_monthend_new_pkg.tre_finance_confirm(
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num=>${@internal_period_num},
p_user_id=>${/session/@user_id} p_user_id=>${/session/@user_id}
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
declare declare
v_return_value varchar2(30); v_return_value varchar2(30);
begin begin
hls_monthend_pkg.tre_finance_charge_confirm( hls_monthend_new_pkg.tre_finance_charge_confirm(
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num=>${@internal_period_num},
p_user_id=>${/session/@user_id} p_user_id=>${/session/@user_id}
......
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
declare declare
v_return_value varchar2(30); v_return_value varchar2(30);
begin begin
v_return_value := HLS_MONTHEND_PKG.tre_interest_confirm v_return_value := HLS_MONTHEND_NEW_PKG.tre_interest_confirm
( (
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num=>${@internal_period_num},
p_user_id=>${/session/@user_id} p_user_id=>${/session/@user_id}
); );
if v_return_value ='SUCCESS' then if v_return_value ='SUCCESS' then
${@confirm_return_value} := HLS_MONTHEND_PKG.tre_accrued_interest_je ${@confirm_return_value} := HLS_MONTHEND_NEW_PKG.tre_accrued_interest_je
( (
p_company_id=>${/session/@company_id}, p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num}, p_internal_period_num=>${@internal_period_num},
......
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
<bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="ID_CARD_NO" prompt="身份证号"/> <bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="ID_CARD_NO" prompt="身份证号"/>
</bm:fields> </bm:fields>
<bm:query-fields > <bm:query-fields >
<bm:query-field name="bp_name" queryExpression="hm.bp_name = ${@bp_name}" /> <bm:query-field name="bp_name" queryExpression="hm.bp_name like ${@bp_name}" />
<bm:query-field name="bp_id" queryExpression="hm.bp_id = ${@bp_id}" /> <bm:query-field name="bp_id" queryExpression="hm.bp_id = ${@bp_id}" />
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceActions="query" expression="hm.bp_class = ${@customer_type}"/> <bm:data-filter name="query" expression="hm.bp_class = ${@customer_type}"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -7,512 +7,515 @@ ...@@ -7,512 +7,515 @@
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query defaultWhereClause="t1.role_id=${/session/@role_id} and t1.company_id=${/session/@company_id}" fetchAll="true" model="hls.HLS109.hls_default_parameter" rootPath="hls_default_parameter_path"/> <a:model-query defaultWhereClause="t1.role_id=${/session/@role_id} and t1.company_id=${/session/@company_id}"
<a:model-query defaultWhereClause="fc.company_id=${/session/@company_id}" fetchAll="true" model="fnd.fnd_companies" rootPath="default_company_path"/> fetchAll="true" model="hls.HLS109.hls_default_parameter" rootPath="hls_default_parameter_path"/>
<a:model-query autoCount="false" fetchAll="true" model="gld.FND5800.gld_period_status_fieldset" rootPath="fieldset"/> <a:model-query defaultWhereClause="fc.company_id=${/session/@company_id}" fetchAll="true"
model="fnd.fnd_companies" rootPath="default_company_path"/>
<a:model-query autoCount="false" fetchAll="true" model="gld.FND5800.gld_period_status_fieldset"
rootPath="fieldset"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="con_finance_income_link" url="${/request/@context_path}/modules/cont/CON901/con_finance_income.lview"/> <a:link id="con_finance_income_link"
<a:link id="tre_accrued_interest_link" url="${/request/@context_path}/modules/hls/HLS801/tre_accrued_interest.lview"/> url="${/request/@context_path}/modules/cont/CON901/con_finance_income.lview"/>
<a:link id="con_unearned_finance_income_link" url="${/request/@context_path}/modules/hls/HLS801/con_unearned_finance_income.lview"/> <!-- <a:link id="tre_accrued_interest_link" url="${/request/@context_path}/modules/hls/HLS801/tre_accrued_interest.lview"/>
<a:link id="hls_monthly_statement_link" url="${/request/@context_path}/modules/hls/HLS801/hls_monthly_statement.lview"/> <a:link id="con_unearned_finance_income_link" url="${/request/@context_path}/modules/hls/HLS801/con_unearned_finance_income.lview"/> -->
<a:link id="hls_monthly_statement_link"
url="${/request/@context_path}/modules/hls/HLS801/hls_monthly_statement.lview"/>
<a:link id="gld_period_pkg_init_period_link" model="db.gld_period_pkg.init_period" modelaction="update"/> <a:link id="gld_period_pkg_init_period_link" model="db.gld_period_pkg.init_period" modelaction="update"/>
<a:link id="gld_period_pkg_close_period_link" model="db.gld_period_pkg.close_period" modelaction="execute"/> <a:link id="gld_period_pkg_close_period_link" model="db.gld_period_pkg.close_period" modelaction="execute"/>
<a:link id="gld_period_pkg_open_period_link" model="db.gld_period_pkg.open_period" modelaction="execute"/> <a:link id="gld_period_pkg_open_period_link" model="db.gld_period_pkg.open_period" modelaction="execute"/>
<a:link id="formula_sheets_excel_id" url="${/request/@context_path}/modules/hls/HLS801/con_unearned_finance_income_excel_sheets.lsc"/> <a:link id="formula_sheets_excel_id"
<a:link id="insert_tre_accrued_interest_link" model="hls.HLS801.insert_tre_accrued_interest" modelaction="execute"/> url="${/request/@context_path}/modules/hls/HLS801/con_unearned_finance_income_excel_sheets.lsc"/>
<a:link id="insert_con_finance_income_link" model="hls.HLS801.con_finance_income" modelaction="execute"/> <a:link id="insert_tre_accrued_interest_link" model="hls.HLS801.insert_tre_accrued_interest"
<a:link id="update_con_finance_income_link" model="hls.HLS801.con_finance_income" modelaction="update"/> modelaction="execute"/>
<a:link id="insert_con_finance_income_link" model="hls.HLS801.con_finance_income" modelaction="update"/>
<a:link id="period_month_close_link" model="hls.HLS801.period_month_close" modelaction="execute"/> <a:link id="period_month_close_link" model="hls.HLS801.period_month_close" modelaction="execute"/>
<a:link id="tre_interest_confirm_link" model="hls.HLS801.tre_interest_confirm" modelaction="execute"/> <a:link id="tre_interest_confirm_link" model="hls.HLS801.tre_interest_confirm" modelaction="execute"/>
<a:link id="main_link" url="${/request/@context_path}/welcome.lview"/> <a:link id="main_link" url="${/request/@context_path}/welcome.lview"/>
<script><![CDATA[ <script><![CDATA[
//HLS801.NEXT_STEP //HLS801.NEXT_STEP
var step = 0; var step = 0;
var g_company_id; var g_company_id;
var g_company_id_2; var g_company_id_2;
function nextStep() { function nextStep() {
var stepTabPanel = $('step'); var stepTabPanel = $('step');
step = step + 1; step = step + 1;
stepTabPanel.setEnabled(step); stepTabPanel.setEnabled(step);
stepTabPanel.selectTab(step); stepTabPanel.selectTab(step);
stepTabPanel.setDisabled(step - 1); stepTabPanel.setDisabled(step - 1);
} }
function nextStep_execute(){ //HLS801.LAST_STEP
var stepTabPanel = $('step'); function upStep() {
step = step + 1; var stepTabPanel = $('step');
stepTabPanel.setEnabled(step);
stepTabPanel.selectTab(step); step = step - 1;
stepTabPanel.setDisabled(step - 1); stepTabPanel.setEnabled(step);
var headers_ds = $('hls_monthly_statement_ds'); stepTabPanel.selectTab(step);
var record = headers_ds.getAt(0); stepTabPanel.setDisabled(step + 1);
Leaf.request({
url:$('update_con_finance_income_link').getUrl(), }
para:{
internal_period_num: record.get('internal_period_num')}, //取消
success:function(args){
var result = args.result; function cancelFun() {
if (!result) { //history.go(-1);
Leaf.showWarningMessage('', '更新失败', null, 200, 100); window.location.href = $('main_link').getUrl();
return; }
}
} function backFun() {
}); Leaf.showConfirm('${l:HLS.PROMPT}', '确定返回?', function okFun() {
} window.location.href = $('hls_monthly_statement_link').getUrl();
//HLS801.LAST_STEP }, function canFun() {
});
function upStep() { }
var stepTabPanel = $('step');
function step_0NextStep() {
step = step - 1; var headers_ds = $('hls_monthly_statement_ds');
stepTabPanel.setEnabled(step); var record = headers_ds.getAt(0);
stepTabPanel.selectTab(step); var period_name = typeof (record.get('period_name')) == 'undefined' ? 0 : record.get('period_name');
stepTabPanel.setDisabled(step + 1);
if (period_name == 0 || period_name == '') {
} Leaf.showMessage('${l:HLS.PROMPT}', '请确认期间!');
//取消 } else {
function cancelFun() {
//history.go(-1);
window.location.href = $('main_link').getUrl();
}
function backFun() {
Leaf.showConfirm('${l:HLS.PROMPT}', '确定返回?', function okFun() {
window.location.href = $('hls_monthly_statement_link').getUrl();
}, function canFun() {});
}
function step_0NextStep() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var period_name = typeof(record.get('period_name')) == 'undefined' ? 0 : record.get('period_name');
//alert(record.get('internal_period_num'));
if (period_name == 0 || period_name == '') {
Leaf.showMessage('${l:HLS.PROMPT}', '请确认期间!');
return;
} else {
nextStep();
//exchange_rate_ds
/* var ds = $('exchange_rate_ds');
ds.setQueryParameter('internal_period_num',record.get('internal_period_num'));
ds.query();*/
}
}
function step_1NextStep() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
var period_name = record.get('period_name');
nextStep();
/* year = period_name.substring(0, 4);
month = period_name.substring(5, 7);
var query_ds = $('unearned_finance_income_query_ds');
var qrecord = query_ds.getAt(0);
qrecord.set('year',year);
qrecord.set('month',month);
$('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('unearned_finance_income_ds').query(); */
}
function step_2NextStep() {
nextStep(); nextStep();
} }
}
function hls202_link_con901_fun() {
// window.location.href = $('con_finance_income_link').getUrl(); function step_1NextStep() {
new Leaf.Window({ var headers_ds = $('hls_monthly_statement_ds');
id: 'con_finance_income_window', var record = headers_ds.getAt(0);
url: $('con_finance_income_link').getUrl(), var period_name = record.get('period_name');
params: { var calc_end_date = record.get('calc_end_date');
winId: 'con_finance_income_window'
}, $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
title: '', $('unearned_finance_income_ds').query();
fullScreen: true nextStep();
}); alert(record.get('calc_end_date'));
}
/* year = period_name.substring(0, 4);
month = period_name.substring(5, 7);
var query_ds = $('unearned_finance_income_query_ds');
function accrued_interest_query() { var qrecord = query_ds.getAt(0);
var headers_ds = $('hls_monthly_statement_ds'); qrecord.set('year',year);
var record = headers_ds.getAt(0); qrecord.set('month',month);
$('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('tre_accrued_interest_ds').query(); $('unearned_finance_income_ds').query(); */
} }
function do_accrued_interest_excel() { function step_2NextStep() {
var url; nextStep();
var headers_ds = $('hls_monthly_statement_ds'); }
var record = headers_ds.getAt(0);
if (Ext.isEmpty(g_company_id)) { function hls202_link_con901_fun() {
url = $('formula_sheets_excel_id').getUrl() + '?internal_period_num=' + record.get('internal_period_num') + '&period_name='+record.get('period_name')+'&datasoure_type=accrued_interest'; // window.location.href = $('con_finance_income_link').getUrl();
} else { new Leaf.Window({
url = $('formula_sheets_excel_id').getUrl() + '?company_id=' + g_company_id + '&internal_period_num=' + record.get('internal_period_num') +'&period_name='+record.get('period_name')+ '&datasoure_type=accrued_interest'; id: 'con_finance_income_window',
} url: $('con_finance_income_link').getUrl(),
window.open(url); params: {
} winId: 'con_finance_income_window'
},
function accrued_interest_Onupdate(ds, record, name, value, oldVlaue) { title: '',
if (name == 'company_id') { fullScreen: true
g_company_id = value; });
} }
function accrued_interest_query() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
$('tre_accrued_interest_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('tre_accrued_interest_ds').query();
}
function do_accrued_interest_excel() {
var url;
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
if (Ext.isEmpty(g_company_id)) {
url = $('formula_sheets_excel_id').getUrl() + '?internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=accrued_interest';
} else {
url = $('formula_sheets_excel_id').getUrl() + '?company_id=' + g_company_id + '&internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=accrued_interest';
} }
window.open(url);
function unearned_finance_income_query() { }
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); function accrued_interest_Onupdate(ds, record, name, value, oldVlaue) {
$('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); if (name == 'company_id') {
$('unearned_finance_income_ds').query(); g_company_id = value;
} }
function do_unearned_finance_income_excel() {
var url; }
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); function unearned_finance_income_query() {
if (Ext.isEmpty(g_company_id_2)) { var headers_ds = $('hls_monthly_statement_ds');
url = $('formula_sheets_excel_id').getUrl() + '?internal_period_num=' + record.get('internal_period_num') + '&period_name='+record.get('period_name')+'&datasoure_type=unearned_finance_income'; var record = headers_ds.getAt(0);
} else { $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
url = $('formula_sheets_excel_id').getUrl() + '?company_id=' + g_company_id_2 + '&internal_period_num=' + record.get('internal_period_num') +'&period_name='+record.get('period_name')+ '&datasoure_type=unearned_finance_income'; $('unearned_finance_income_ds').query();
}
window.open(url); }
function do_unearned_finance_income_excel() {
var url;
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
if (Ext.isEmpty(g_company_id_2)) {
url = $('formula_sheets_excel_id').getUrl() + '?internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=unearned_finance_income';
} else {
url = $('formula_sheets_excel_id').getUrl() + '?company_id=' + g_company_id_2 + '&internal_period_num=' + record.get('internal_period_num') + '&period_name=' + record.get('period_name') + '&datasoure_type=unearned_finance_income';
} }
window.open(url);
function unearned_finance_income_Onupdate(ds, record, name, value, oldVlaue) { }
if (name == 'company_id') {
g_company_id_2 = value; function unearned_finance_income_Onupdate(ds, record, name, value, oldVlaue) {
} if (name == 'company_id') {
g_company_id_2 = value;
} }
}
function monthly_statement_Onupdate(ds, record, name, value, oldVlaue) {
if (name == 'period_name') { function monthly_statement_Onupdate(ds, record, name, value, oldVlaue) {
year = value.substring(0, 4); if (name == 'period_name') {
month = value.substring(5, 7); year = value.substring(0, 4);
var query_ds = $('accrued_interest_query_ds'); month = value.substring(5, 7);
var qrecord = query_ds.getAt(0); var query_ds = $('accrued_interest_query_ds');
var query_ds_1 = $('unearned_finance_income_query_ds'); var qrecord = query_ds.getAt(0);
var qrecord_1 = query_ds_1.getAt(0); var query_ds_1 = $('unearned_finance_income_query_ds');
qrecord.set('year', year); var qrecord_1 = query_ds_1.getAt(0);
qrecord.set('month', month); qrecord.set('year', year);
qrecord_1.set('year', year); qrecord.set('month', month);
qrecord_1.set('month', month); qrecord_1.set('year', year);
$('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); qrecord_1.set('month', month);
$('tre_accrued_interest_ds').query(); $('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('tre_accrued_interest_ds').query();
$('unearned_finance_income_ds').query(); $('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('close_open_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('unearned_finance_income_ds').query();
$('close_open_ds').setQueryParameter('period_set_code', '${/model/fieldset/record/@period_set_code}'); $('close_open_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('close_open_ds').query(); $('close_open_ds').setQueryParameter('period_set_code', '${/model/fieldset/record/@period_set_code}');
} $('close_open_ds').query();
record.getField('calc_end_date').setLovPara('internal_period_num', record.get('internal_period_num'));
} else if (name == 'calc_end_date') {
// day = value.substring(8, 10);
// var quer_ds_1 = $('unearned_finance_income_query_ds');
// var qrec_1 = quer_ds_1.getAt(0);
// qrec_1.set('day', day);
// qrec_1.set('calc_end_date', value);
$('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('unearned_finance_income_ds').query();
} }
}
function openPeriodDs(value, record, name) {
function openPeriodDs(value, record, name) {
var period_status_code = record.get('period_status_code');
var ds = "close_open_ds"; var period_status_code = record.get('period_status_code');
if (period_status_code == 'C' || period_status_code == 'U') { var ds = "close_open_ds";
var url = $('gld_period_pkg_open_period_link').getUrl(); if (period_status_code == 'C' || period_status_code == 'U') {
return '<a href="javascript:executeOpen(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:OPEN_PERIOD}</a>'; var url = $('gld_period_pkg_open_period_link').getUrl();
} else if (period_status_code == 'O') { return '<a href="javascript:executeOpen(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:OPEN_PERIOD}</a>';
return ''; } else if (period_status_code == 'O') {
} return '';
} }
}
function closePeriodDs(value, record, name) {
var period_status_code = record.get('period_status_code'); function closePeriodDs(value, record, name) {
var ds = "close_open_ds"; var period_status_code = record.get('period_status_code');
if (period_status_code == 'C' || period_status_code == 'U') { var ds = "close_open_ds";
return ''; if (period_status_code == 'C' || period_status_code == 'U') {
} else if (period_status_code == 'O') { return '';
var url = $('gld_period_pkg_close_period_link').getUrl(); } else if (period_status_code == 'O') {
return '<a href="javascript:executeClose(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:CLOSE_PERIOD}</a>'; var url = $('gld_period_pkg_close_period_link').getUrl();
} return '<a href="javascript:executeClose(\'' + ds + '\',\'' + url + '\',' + record.id + ')">${l:CLOSE_PERIOD}</a>';
} }
}
function statusRenderer(value, record, name) {
function statusRenderer(value, record, name) {
if (value == null || value == undefined) {
return '${l:PROMPT.NOT_OPEN}'; if (value == null || value == undefined) {
} else if (value == 'O') { return '${l:PROMPT.NOT_OPEN}';
return '${l:PROMPT.OPENED}'; } else if (value == 'O') {
} else if (value == 'C') { return '${l:PROMPT.OPENED}';
return '${l:PROMPT.CLOSED}'; } else if (value == 'C') {
} return '${l:PROMPT.CLOSED}';
} }
}
function executeOpen(ds, url, id) {
record = $(ds).findById(id); function executeOpen(ds, url, id) {
record = $(ds).findById(id);
Leaf.request({
url: url,
para: record.data,
success: function () {
record.set('period_status_code', 'O');
Leaf.SideBar.enable = true;
Leaf.SideBar.show({
msg: '打开成功',
duration: 3000
});
},
scope: this
});
}
function executeClose(ds, url, id) {
record = $(ds).findById(id);
if ($('close_open_ds').getAll().length == 0) {
Leaf.request({
url: $('gld_period_pkg_init_period_link').getUrl(),
para: record.data,
success: function () {
Leaf.showMessage('${l:PROMPT}', '${l:FND_DIMENSION_VALUES.OPR_SUC}', function (cmp) {
document.location.reload();
cmp.close();
});
},
scope: this
});
} else {
Leaf.request({ Leaf.request({
url: url, url: url,
para: record.data, para: record.data,
success: function() { success: function () {
record.set('period_status_code', 'O'); record.set('period_status_code', 'C');
Leaf.SideBar.enable = true; Leaf.SideBar.enable = true;
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '打开成功', msg: '关闭成功',
duration: 3000 duration: 3000
}); });
}, },
scope: this scope: this
}); });
} }
}
function executeClose(ds, url, id) {
record = $(ds).findById(id); function unearned_finance_income_clear() {
if ($('close_open_ds').getAll().length == 0) { $('unearned_finance_income_grid').clear();
Leaf.request({ }
url: $('gld_period_pkg_init_period_link').getUrl(),
para: record.data, function accrued_interest_clear() {
success: function() { $('tre_accrued_interest_grid').clear();
Leaf.showMessage('${l:PROMPT}', '${l:FND_DIMENSION_VALUES.OPR_SUC}', function(cmp) { }
document.location.reload();
cmp.close(); var g_return_value_1;
});
}, function accrued_interest_calculate() {
scope: this var headers_ds = $('hls_monthly_statement_ds');
}); var record = headers_ds.getAt(0);
} else { year = record.get('period_name').substring(0, 4);
Leaf.request({ month = record.get('period_name').substring(5, 7);
url: url, Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + '结算,确认计算计提利息?', function okFun() {
para: record.data, Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
success: function() { Leaf.request({
url: $('insert_tre_accrued_interest_link').getUrl(),
record.set('period_status_code', 'C'); para: {
internal_period_num: record.get('internal_period_num')
Leaf.SideBar.enable = true; },
Leaf.SideBar.show({ success: function (args) { //debugger;
msg: '关闭成功', var result = args.result;
duration: 3000 if (!result) {
}); Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
return;
}, }
scope: this g_return_value_1 = result.return_value_1;
}); if (g_return_value_1 != 'SUCCESS') {
} Leaf.showWarningMessage('', '计提利息计算出错!', null, 200, 100);
}
function unearned_finance_income_clear() {
$('unearned_finance_income_grid').clear();
}
function accrued_interest_clear() {
$('tre_accrued_interest_grid').clear();
}
var g_return_value_1;
function accrued_interest_calculate() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
year = record.get('period_name').substring(0, 4);
month = record.get('period_name').substring(5, 7);
Leaf.showConfirm('${l:HLS.PROMPT}', year+'年'+month+'月'+'结算,确认计算计提利息?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({
url: $('insert_tre_accrued_interest_link').getUrl(),
para: {
internal_period_num: record.get('internal_period_num')
},
success: function(args) {
var result = args.result;
if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
return;
}
g_return_value_1 = result.return_value_1;
if (g_return_value_1 != 'SUCCESS') {
Leaf.showWarningMessage('', '计提利息计算出错!', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody());
return;
}
Leaf.Masker.unmask(Ext.getBody());
$('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('tre_accrued_interest_ds').query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, Leaf.Masker.unmask(Ext.getBody()));
}
var g_return_value;
function unearned_finance_income_confirm() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
year = record.get('period_name').substring(0, 4);
month = record.get('period_name').substring(5, 7);
Leaf.showConfirm('${l:HLS.PROMPT}', year+'年'+month+'月'+'结算,确定执行收入确认?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({
url: $('insert_con_finance_income_link').getUrl(),
para: {
internal_period_num: record.get('internal_period_num')
},
success: function(args) {
var result = args.result;
if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
return;
}
g_return_value = result.return_value;
if (g_return_value != 'SUCCESS') {
Leaf.showWarningMessage('', '收入确认出错!', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody());
return;
}
Leaf.Masker.unmask(Ext.getBody());
$('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('unearned_finance_income_ds').query();
accrued_interest_query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, return;
scope: this }
}); Leaf.Masker.unmask(Ext.getBody());
}, Leaf.Masker.unmask(Ext.getBody())); $('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('tre_accrued_interest_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, Leaf.Masker.unmask(Ext.getBody()));
}
var g_return_value;
function unearned_finance_income_confirm() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
//add by wdd 20180514
var income_ds = $('unearned_finance_income_ds');
var income_record = income_ds.getAll();
if (income_record.length) {
for (var i = 0; i < income_record.length; i++) {
var line_income_record = income_record[i];
var finance_income_recognized = line_income_record.get('finance_income_recognized');
if (finance_income_recognized == 'Y') {
Leaf.showMessage('提示', '该日收入已确认,请勿重复确认!', null, 250, 100);
return;
}
}
} }
//end by wdd
function monthlyendFun() { year = record.get('period_name').substring(0, 4);
var headers_ds = $('hls_monthly_statement_ds'); month = record.get('period_name').substring(5, 7);
var record = headers_ds.getAt(0); day = record.get('calc_end_date').substring(8, 10);
Leaf.showConfirm('${l:HLS.PROMPT}', '本次月结结束后不可执行当月其他相关操作,是否确认结束?', function okFun() { Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + day + '日' + '结算,确定执行收入确认?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({ Leaf.request({
url: $('period_month_close_link').getUrl(), url: $('insert_con_finance_income_link').getUrl(),
para: { para: {
internal_period_num: record.get('internal_period_num') internal_period_num: record.get('internal_period_num'),
}, calc_end_date: record.get('calc_end_date')
success: function(args) { },
var result = args.result; success: function (args) {
if (!result) { // modify by wdd 20180514
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100); // 收入确认出错校验移至PKG
return; // var result = args.result;
} // if (!result) {
var period_return_value = result.period_return_value; // Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
if (period_return_value != 'SUCCESS') { // return;
Leaf.showWarningMessage('', '月结结束出错!', null, 200, 100); // }
Leaf.Masker.unmask(Ext.getBody()); // g_return_value = result.return_value;
return; // if (g_return_value != 'SUCCESS') {
} // Leaf.showWarningMessage('', '收入确认出错!', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody()); // Leaf.Masker.unmask(Ext.getBody());
// return;
}, // }
failure: function() { //end by wdd
Leaf.Masker.unmask(Ext.getBody());
$('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('unearned_finance_income_ds').query();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, Leaf.Masker.unmask(Ext.getBody()));
}
function monthlyendFun() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
Leaf.showConfirm('${l:HLS.PROMPT}', '本次月结结束后不可执行当月其他相关操作,是否确认结束?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({
url: $('period_month_close_link').getUrl(),
para: {
internal_period_num: record.get('internal_period_num'),
calc_end_date: record.get('calc_end_date')
},
success: function (args) {
var result = args.result;
if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
return;
}
var period_return_value = result.period_return_value;
if (period_return_value != 'SUCCESS') {
Leaf.showWarningMessage('', '月结结束出错!', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, return;
error: function() { }
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, Leaf.Masker.unmask(Ext.getBody()));
}
function accrued_interest_confirm() {
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
year = record.get('period_name').substring(0, 4);
month = record.get('period_name').substring(5, 7);
Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + '结算,确认计提利息?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({
url: $('tre_interest_confirm_link').getUrl(),
para: {
internal_period_num: record.get('internal_period_num'),
calc_end_date: record.get('calc_end_date')
},
success: function (args) { //debugger;
var result = args.result;
if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
return;
}
var confirm_return_value = result.confirm_return_value;
if (confirm_return_value != 'SUCCESS') {
Leaf.showWarningMessage('', '计提利息确认出错!', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, return;
scope: this }
}); Leaf.Masker.unmask(Ext.getBody());
}, Leaf.Masker.unmask(Ext.getBody()));
} },
failure: function () {
function accrued_interest_confirm() { Leaf.Masker.unmask(Ext.getBody());
var headers_ds = $('hls_monthly_statement_ds'); },
var record = headers_ds.getAt(0); error: function () {
year = record.get('period_name').substring(0, 4); Leaf.Masker.unmask(Ext.getBody());
month = record.get('period_name').substring(5, 7); },
Leaf.showConfirm('${l:HLS.PROMPT}', year+'年'+month+'月'+'结算,确认计提利息?', function okFun() { scope: this
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}'); });
Leaf.request({ }, Leaf.Masker.unmask(Ext.getBody()));
url: $('tre_interest_confirm_link').getUrl(),
para: { }
internal_period_num: record.get('internal_period_num')
}, function ratePercentRender(value, record, name) {
success: function(args) { if (!Ext.isEmpty(value)) {
var result = args.result; return parseFloat(mul(value, 100)) + '%';
if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
return;
}
var confirm_return_value = result.confirm_return_value;
if (confirm_return_value != 'SUCCESS') {
Leaf.showWarningMessage('', '计提利息确认出错!', null, 200, 100);
Leaf.Masker.unmask(Ext.getBody());
return;
}
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}, Leaf.Masker.unmask(Ext.getBody()));
}
function ratePercentRender(value, record, name) {
if (!Ext.isEmpty(value)) {
return parseFloat(mul(value, 100)) + '%';
}
}
function gridDataAdd(ds,record,index){
var headers_ds = $('hls_monthly_statement_ds');
var rec = headers_ds.getAt(0);
var num = rec.get('internal_period_num');
record.set('internal_period_num',num);
} }
}
function sum_unearned_finance_income(datas, name) {
var sum = 0;
for (var i = 0;i < datas.length;i++) {
var r = datas[i];
var d = r.get(name);
var n = parseFloat(d);
if (!isNaN(n)) {
sum += n;
}
}
return '<font color="red">' + Leaf.formatNumber(sum,2) + '</font>';
}
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="finance_income_ds" lookupCode="YES_NO"/> <a:dataSet id="yes_no_ds" lookupCode="YES_NO"/>
<a:dataSet id="hls_monthly_statement_ds" autoCreate="true"> <a:dataSet id="hls_monthly_statement_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov?monthly_closed_flag=N&amp;period_status_code=O" lovWidth="500" required="true" title="GLD_PERIODS.PERIOD_NAME"> <a:field name="period_name" lovGridHeight="300" lovHeight="500"
lovService="gld.gld_period_lov?monthly_closed_flag=N&amp;period_status_code=O"
lovWidth="500" required="true" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping> <a:mapping>
<a:map from="internal_period_num" to="internal_period_num"/> <a:map from="internal_period_num" to="internal_period_num"/>
<a:map from="period_name" to="period_name"/> <a:map from="period_name" to="period_name"/>
</a:mapping> </a:mapping>
</a:field> </a:field>
<a:field name="internal_period_num"/>
<a:field name="calc_end_date" lovGridHeight="300" lovHeight="500"
lovService="hls.HLS801.calc_end_date_ds" lovWidth="500" required="true" title="截止日查询">
<a:mapping>
<!-- <a:map from="internal_period_num" to="internal_period_num"/> -->
<a:map from="calc_end_date" to="calc_end_date"/>
</a:mapping>
</a:field>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="monthly_statement_Onupdate"/> <a:event name="update" handler="monthly_statement_Onupdate"/>
...@@ -520,7 +523,8 @@ ...@@ -520,7 +523,8 @@
</a:dataSet> </a:dataSet>
<a:dataSet id="accrued_interest_query_ds" autoCreate="true"> <a:dataSet id="accrued_interest_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="company_code" lovGridHeight="300" lovHeight="450" lovService="hls.HLS801.fnd_companies_for_lov" lovWidth="500" title=""> <a:field name="company_code" lovGridHeight="300" lovHeight="450"
lovService="hls.HLS801.fnd_companies_for_lov" lovWidth="500" title="">
<a:mapping> <a:mapping>
<a:map from="company_id" to="company_id"/> <a:map from="company_id" to="company_id"/>
<a:map from="company_code" to="company_code"/> <a:map from="company_code" to="company_code"/>
...@@ -535,14 +539,18 @@ ...@@ -535,14 +539,18 @@
<a:event name="update" handler="accrued_interest_Onupdate"/> <a:event name="update" handler="accrued_interest_Onupdate"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="tre_accrued_interest_ds" autoPageSize="true" autoQuery="false" model="hls.HLS801.tre_accrued_interest" queryDataSet="accrued_interest_query_ds" selectable="true"> <a:dataSet id="tre_accrued_interest_ds" autoPageSize="true" autoQuery="false"
model="hls.HLS801.tre_accrued_interest" queryDataSet="accrued_interest_query_ds"
selectable="true">
<a:fields> <a:fields>
<a:field name="recognized_flag" checkedValue="Y" defaultValue="Y" readOnly="true" uncheckedValue="N"/> <a:field name="recognized_flag" checkedValue="Y" defaultValue="Y" readOnly="true"
uncheckedValue="N"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="unearned_finance_income_query_ds" autoCreate="true"> <a:dataSet id="unearned_finance_income_query_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="company_code" lovGridHeight="300" lovHeight="450" lovService="hls.HLS801.fnd_companies_for_lov" lovWidth="500" title=""> <a:field name="company_code" lovGridHeight="300" lovHeight="450"
lovService="hls.HLS801.fnd_companies_for_lov" lovWidth="500" title="">
<a:mapping> <a:mapping>
<a:map from="company_id" to="company_id"/> <a:map from="company_id" to="company_id"/>
<a:map from="company_code" to="company_code"/> <a:map from="company_code" to="company_code"/>
...@@ -552,50 +560,35 @@ ...@@ -552,50 +560,35 @@
<a:field name="year" defaultValue="${/parameter/@year}"/> <a:field name="year" defaultValue="${/parameter/@year}"/>
<a:field name="month" defaultValue="${/parameter/@month}"/> <a:field name="month" defaultValue="${/parameter/@month}"/>
<a:field name="internal_period_num" defaultValue="${/parameter/@internal_period_num}"/> <a:field name="internal_period_num" defaultValue="${/parameter/@internal_period_num}"/>
<a:field name="finance_income_recognized"/> <a:field name="calc_end_date" defaultValue="${/parameter/@calc_end_date}"/>
<a:field name="finance_income_recognized_n" displayField="code_value_name" options="finance_income_ds" returnField="finance_income_recognized" valueField="code_value"/> <a:field name="finance_income_recognized" displayField="code_value_name" options="yes_no_ds"
returnField="finance_income_recognized" valueField="code_value"/>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="unearned_finance_income_Onupdate"/> <a:event name="update" handler="unearned_finance_income_Onupdate"/>
</a:events> </a:events>
</a:dataSet> </a:dataSet>
<a:dataSet id="unearned_finance_income_ds" autoPageSize="true" autoQuery="false" model="hls.HLS801.con_unearned_finance_income" queryDataSet="unearned_finance_income_query_ds" selectable="false"> <a:dataSet id="unearned_finance_income_ds" autoPageSize="true" autoQuery="false"
model="hls.HLS801.con_unearned_finance_income" queryDataSet="unearned_finance_income_query_ds"
selectable="true">
<a:fields> <a:fields>
<a:field name="finance_income_recognized" checkedValue="Y" defaultValue="Y" readOnly="true" uncheckedValue="N"/> <a:field name="finance_income_recognized" checkedValue="Y" defaultValue="Y" readOnly="true"
uncheckedValue="N"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
<a:dataSet id="close_open_ds" autoQuery="false" fetchAll="true" model="hls.HLS801.hls_current_period_query" queryUrl="${/request/@context_path}/autocrud/hls.HLS801.hls_current_period_query/query"><![CDATA[ <a:dataSet id="close_open_ds" autoQuery="false" fetchAll="true" model="hls.HLS801.hls_current_period_query"
queryUrl="${/request/@context_path}/autocrud/hls.HLS801.hls_current_period_query/query">
]]></a:dataSet>
<a:dataSet id="exchange_option_ds" autoQuery="true" fetchAll="true" model="gld.gld_currency_lov">
<a:fields>
<a:field name="currency_code"/>
<a:field name="currency_name_id"/>
<a:field name="currency_name"/>
</a:fields>
</a:dataSet> </a:dataSet>
<!-- <a:dataSet id="exchange_rate_ds" autoQuery="flase" fetchAll="true" model="hls.HLS801.sdic_monthly_exchange_rate" selectable="true">
<a:fields>
<a:field name="internal_period_num" readOnly="true"/>
<a:field name="currency_name" displayField="currency_name" options="exchange_option_ds" required="true" returnField="currency_code" valueField="currency_code"/>
<a:field name="exchange_rate" required="true"/>
</a:fields>
<a:events>
<a:event name="add" handler="gridDataAdd"/>
</a:events>
</a:dataSet>-->
<!--
<a:dataSet id="currency_option_ds" lookupCode="CURRENCY_OPTIONS"/>
-->
</a:dataSets> </a:dataSets>
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
</a:screenTopToolbar> </a:screenTopToolbar>
<a:hBox> <a:hBox>
<a:tabPanel id="step" marginHeight="120" marginWidth="50"> <a:tabPanel id="step" marginHeight="80" marginWidth="50">
<a:tabs> <a:tabs>
<a:tab id="step_0" disabled="false" prompt="GLD_PERIODS.PERIOD_NAME" selected="true" width="100"> <a:tab id="step_0" disabled="false" prompt="GLD_PERIODS.PERIOD_NAME" selected="true"
width="100">
<a:hBox height="50"> <a:hBox height="50">
<a:button disabled="true" text="HLS801.LAST_STEP"/> <a:button disabled="true" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
...@@ -603,49 +596,24 @@ ...@@ -603,49 +596,24 @@
</a:hBox> </a:hBox>
<a:hBox> <a:hBox>
<a:fieldSet height="250" title="GLD_PERIODS.PERIOD_NAME" width="300"> <a:fieldSet height="250" title="GLD_PERIODS.PERIOD_NAME" width="300">
<a:lov name="period_name" bindTarget="hls_monthly_statement_ds" prompt="GLD_PERIODS.PERIOD_NAME" width="200"/> <a:lov name="period_name" bindTarget="hls_monthly_statement_ds"
prompt="GLD_PERIODS.PERIOD_NAME" width="200"/>
<a:lov name="calc_end_date" bindTarget="hls_monthly_statement_ds" prompt="截止日"
width="200"/>
</a:fieldSet> </a:fieldSet>
</a:hBox> </a:hBox>
</a:tab> </a:tab>
<!-- <a:tab id="step_0.5" disabled="true" prompt="月末汇率" selected="false" width="100"> <!-- <a:tab id="step_1" disabled="true" prompt="HLS801.COST" selected="false" width="100">
<a:hBox height="50"> <a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/> <a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
<a:button click="nextStep" text="HLS801.NEXT_STEP"/> <a:button click="nextStep" text="HLS801.NEXT_STEP"/>
<a:label width="80"/> <a:label width="80"/>
</a:hBox>
<a:grid id="exchange_rate_grid" bindTarget="exchange_rate_ds" marginHeight="320" marginWidth="80" navBar="true" style="margin-left:3px">
<a:toolBar>
<a:button type="add"/>
<a:button type="delete"/>
<a:button type="save"/>
</a:toolBar>
<a:columns>
<a:column name="internal_period_num" align="center" editor="period_name_ed" prompt="期间" width="120"/>
<a:column name="currency_name" align="center" editor="currency_code" prompt="币种" width="120"/>
<a:column name="exchange_rate" align="center" editor="exchange_rate" prompt="汇率" width="120"/>
</a:columns>
<a:editors>-->
<!-- <a:textField name="internal_period_num" id="period_name_ed"/> -->
<!-- <a:comboBox name="currency_code" id="currency_code"/>-->
<!-- <a:textField name="currency_code" id="currency_code"/> -->
<!-- <a:numberField name="exchange_rate" id="exchange_rate" allowDecimals="true" decimalPrecision="6"/>
</a:editors>
</a:grid>
</a:tab> -->
<!-- <a:tab id="step_1" disabled="true" prompt="HLS801.COST" selected="false" width="100">
<a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button click="nextStep_execute" text="HLS801.NEXT_STEP"/>
<a:label width="80"/>
<a:button click="accrued_interest_calculate" text="HLS.CALCULATIONS"/> <a:button click="accrued_interest_calculate" text="HLS.CALCULATIONS"/>
<a:label width="5"/> <a:label width="5"/>
<a:button click="accrued_interest_confirm" text="HLS801.COST_CONFIRM"/> --> <a:button click="accrued_interest_confirm" text="HLS801.COST_CONFIRM"/>
<!-- <a:button click="accrued_interest_query" text="HLS.QUERY"/>
<a:button click="accrued_interest_clear" text="HLS.CLEAR"/> </a:hBox>
<a:button click="do_accrued_interest_excel" text="RSC_FIN_STATEMENT_TMPLT_HDS.EXCEL_OUTPUT"/> -->
<!-- </a:hBox>
<a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE"> <a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE">
<a:box column="2" labelWidth="150" style="margin-left:-80px"> <a:box column="2" labelWidth="150" style="margin-left:-80px">
<a:textField name="year" bindTarget="accrued_interest_query_ds" prompt="HLS801.YEAR" readOnly="true"/> <a:textField name="year" bindTarget="accrued_interest_query_ds" prompt="HLS801.YEAR" readOnly="true"/>
...@@ -674,7 +642,8 @@ ...@@ -674,7 +642,8 @@
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:tab> --> </a:tab> -->
<a:tab id="step_2" disabled="true" prompt="HLS801.INCOME" selected="false" width="100"> <a:tab id="step_1" disabled="true" marginHeight="20" prompt="HLS801.INCOME" selected="false"
width="100">
<a:hBox height="50"> <a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/> <a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
...@@ -684,48 +653,62 @@ ...@@ -684,48 +653,62 @@
<!-- <a:button click="unearned_finance_income_query" text="HLS.QUERY"/> <!-- <a:button click="unearned_finance_income_query" text="HLS.QUERY"/>
<a:button click="unearned_finance_income_clear" text="HLS.CLEAR"/> --> <a:button click="unearned_finance_income_clear" text="HLS.CLEAR"/> -->
<a:label width="5"/> <a:label width="5"/>
<!-- <a:button click="hls202_link_con901_fun" text="HLS801.OTHER_INCOME_CONFIRM"/> --> <!-- <a:button click="hls202_link_con901_fun" text="HLS801.OTHER_INCOME_CONFIRM"/> -->
<!-- <a:button click="do_unearned_finance_income_excel" text="RSC_FIN_STATEMENT_TMPLT_HDS.EXCEL_OUTPUT"/> --> <!-- <a:button click="do_unearned_finance_income_excel" text="RSC_FIN_STATEMENT_TMPLT_HDS.EXCEL_OUTPUT"/> -->
</a:hBox> </a:hBox>
<a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE"> <a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE">
<a:box column="2" labelWidth="150" style="margin-left:-80px"> <a:box column="2" labelWidth="150" style="margin-left:-80px">
<a:textField name="year" bindTarget="unearned_finance_income_query_ds" prompt="HLS801.YEAR" readOnly="true"/> <a:textField name="year" bindTarget="unearned_finance_income_query_ds"
<a:textField name="month" bindTarget="unearned_finance_income_query_ds" prompt="HLS801.MONTH" readOnly="true"/> prompt="HLS801.YEAR" readOnly="true"/>
</a:box> <a:textField name="month" bindTarget="unearned_finance_income_query_ds"
<a:box column="3" labelWidth="150" style="margin-left:-80px"> prompt="HLS801.MONTH" readOnly="true"/>
<a:lov name="company_code" bindTarget="unearned_finance_income_query_ds" prompt="HLS.COMPANY_CODE"/> <!-- <a:textField name="day" bindTarget="unearned_finance_income_query_ds" prompt="日" readOnly="true"/> -->
<a:textField name="company_short_name" bindTarget="unearned_finance_income_query_ds" prompt="HLS.COMPANY_NAME" readOnly="true"/> <a:lov name="company_code" bindTarget="unearned_finance_income_query_ds"
<a:comboBox name="finance_income_recognized_n" bindTarget="unearned_finance_income_query_ds" prompt="HLS801.FINANCE_INCOME_RECOGNIZED"/> prompt="HLS.COMPANY_CODE"/>
<a:textField name="company_short_name" bindTarget="unearned_finance_income_query_ds"
prompt="HLS.COMPANY_NAME" readOnly="true"/>
<a:comboBox name="finance_income_recognized"
bindTarget="unearned_finance_income_query_ds" prompt="是否确认"/>
</a:box> </a:box>
</a:form> </a:form>
<p/> <p/>
<a:grid id="unearned_finance_income_grid" bindTarget="unearned_finance_income_ds" marginHeight="200" marginWidth="80" navBar="true" style="margin-left:3px"> <a:grid id="unearned_finance_income_grid" bindTarget="unearned_finance_income_ds"
marginHeight="300" marginWidth="80" navBar="true" style="margin-left:3px">
<a:toolBar> <a:toolBar>
<a:button click="unearned_finance_income_query" icon="${/request/@context_path}/images/search.png" text="HLS.QUERY"/> <a:button click="unearned_finance_income_query"
<a:button type="clear"/> icon="${/request/@context_path}/images/search.png" text="HLS.QUERY"/>
<a:button type="excel"/> <!-- <a:button type="clear"/>-->
<a:button icon="${/request/@context_path}/images/excel_16.png" text="HLS.EXPORT"
type="excel"/>
</a:toolBar> </a:toolBar>
<a:columns> <a:columns>
<a:column name="seq" prompt="HLS801.SEQ" width="50"/> <a:column name="seq" prompt="HLS801.SEQ" width="50"/>
<a:column name="contract_number" prompt="合同号" width="150"/> <a:column name="contract_number" prompt="合同号" width="150"/>
<a:column name="contract_name" prompt="合同名称" width="150"/> <a:column name="contract_name" prompt="合同名称" width="150"/>
<!-- <a:column name="project_name" prompt="HLS.PROJECT_NAME" width="150"/> --> <a:column name="finance_amount" align="right" prompt="HLS.FINANCE_AMOUNT"
<a:column name="finance_amount" align="right" prompt="HLS.FINANCE_AMOUNT" renderer="Leaf.formatMoney" width="110"/> renderer="Leaf.formatMoney" width="110"/>
<!-- <a:column name="period" prompt="GLD_BALANCES.PERIOD_NAME" width="150"/> --> <a:column name="times" prompt="期数" width="80" align="center"/>
<!-- <a:column name="interest" align="right" prompt="HLS801.INTEREST" renderer="Leaf.formatMoney" width="100"/> --> <a:column name="period" prompt="GLD_BALANCES.PERIOD_NAME" width="150"/>
<!-- <a:column name="int_rate_implicit" align="right" prompt="HLS801.INT_RATE" renderer="ratePercentRender" width="70"/> --> <a:column name="calc_end_date" align="center" prompt="截止日"
renderer="Leaf.formatDate" width="150"/>
<a:column name="interest" align="right" prompt="HLS801.INTEREST"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="int_rate_implicit" align="right" prompt="HLS801.INT_RATE"
renderer="ratePercentRender" width="70"/>
<a:column name="calc_period" prompt="HLS801.CALC_PERIOD" width="150"/> <a:column name="calc_period" prompt="HLS801.CALC_PERIOD" width="150"/>
<a:column name="calc_date_count" prompt="HLS801.CALC_DATE_COUNT" width="100"/> <a:column name="calc_date_count" prompt="HLS801.CALC_DATE_COUNT" width="100"/>
<!-- <a:column name="vat_unearned_finance_income" align="right" prompt="HLS801.VAT_UNEARNED_FINANCE_INCOME" renderer="Leaf.formatMoney" width="110"/> --> <a:column name="vat_unearned_finance_income" align="right"
<a:column name="unearned_finance_income" align="right" footerRenderer="sum_unearned_finance_income" prompt="租息" renderer="Leaf.formatMoney" width="110"/> prompt="HLS801.VAT_UNEARNED_FINANCE_INCOME" renderer="Leaf.formatMoney"
<a:column name="vat_interest" align="right" footerRenderer="sum_unearned_finance_income" prompt="利息税额租息" renderer="Leaf.formatMoney" width="110"/> width="110"/>
<a:column name="interest" align="right" footerRenderer="sum_unearned_finance_income" prompt="(含税)租息" renderer="Leaf.formatMoney" width="110"/> <a:column name="unearned_finance_income" align="right"
<!-- <a:column name="net_unearned_finance_income" align="right" prompt="税金" renderer="Leaf.formatMoney" width="110"/> --> prompt="HLS801.UNEARNED_FINANCE_INCOME" renderer="Leaf.formatMoney"
<a:column name="finance_income_recognized" prompt="HLS801.FINANCE_INCOME_RECOGNIZED" width="80"/> width="110"/>
<a:column name="finance_income_recognized" prompt="HLS801.FINANCE_INCOME_RECOGNIZED"
width="80"/>
</a:columns> </a:columns>
</a:grid> </a:grid>
</a:tab> </a:tab>
<a:tab id="step_3" disabled="true" prompt="HLS801.MONTH_END" selected="false" width="100"> <a:tab id="step_2" disabled="true" prompt="HLS801.MONTH_END" selected="false" width="100">
<a:hBox height="50"> <a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/> <a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
...@@ -735,12 +718,14 @@ ...@@ -735,12 +718,14 @@
</a:hBox> </a:hBox>
<a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE"> <a:form column="1" marginWidth="80" style="margin-left:3px" title="HLS.QUERY_TITLE">
<a:box column="2" labelWidth="150" style="margin-left:-80px"> <a:box column="2" labelWidth="150" style="margin-left:-80px">
<a:textField name="year" bindTarget="unearned_finance_income_query_ds" prompt="HLS801.YEAR" readOnly="true"/> <a:textField name="year" bindTarget="unearned_finance_income_query_ds"
<a:textField name="month" bindTarget="unearned_finance_income_query_ds" prompt="HLS801.MONTH" readOnly="true"/> prompt="HLS801.YEAR" readOnly="true"/>
<a:textField name="month" bindTarget="unearned_finance_income_query_ds"
prompt="HLS801.MONTH" readOnly="true"/>
</a:box> </a:box>
</a:form> </a:form>
</a:tab> </a:tab>
<a:tab id="step_4" disabled="true" prompt="HLS801.PERIOD_CONTROL" selected="false" width="100"> <a:tab id="step_3" disabled="true" prompt="HLS801.PERIOD_CONTROL" selected="false" width="100">
<a:hBox height="50"> <a:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/> <a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/> <a:label width="5"/>
...@@ -749,16 +734,27 @@ ...@@ -749,16 +734,27 @@
</a:hBox> </a:hBox>
<a:grid id="close_open_grid" bindTarget="close_open_ds" marginHeight="300" marginWidth="80"> <a:grid id="close_open_grid" bindTarget="close_open_ds" marginHeight="300" marginWidth="80">
<a:columns> <a:columns>
<a:column name="period_year" align="center" prompt="GLD_PERIODS.PERIOD_YEAR" sortable="true" width="100"/> <a:column name="period_year" align="center" prompt="GLD_PERIODS.PERIOD_YEAR"
<a:column name="period_num" align="center" prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true" width="80"/> sortable="true" width="100"/>
<a:column name="start_date_c" align="center" prompt="GLD_EXCHANGE_RATE.START_DATE" sortable="true" width="150"/> <a:column name="period_num" align="center"
<a:column name="end_date_c" align="center" prompt="GLD_EXCHANGE_RATE.END_DATE" sortable="true" width="150"/> prompt="FND_DIMENSIONS.DIMENSION_SEQUENCE" sortable="true" width="80"/>
<a:column name="quarter_num" align="center" prompt="GLD_PERIOD_STATUS.QUARTER" sortable="true" width="80"/> <a:column name="start_date_c" align="center" prompt="GLD_EXCHANGE_RATE.START_DATE"
<a:column name="period_name" align="center" prompt="GLD_PERIODS.PERIOD_NAME" sortable="true" width="120"/> sortable="true" width="150"/>
<a:column name="adjustment_flag" align="center" prompt="GLD_PERIOD_STATUS.ADJUST" width="100"/> <a:column name="end_date_c" align="center" prompt="GLD_EXCHANGE_RATE.END_DATE"
<a:column name="period_status_code" align="center" prompt="GLD_PERIOD_STATUS.PERIOD_STATUS" renderer="statusRenderer" width="120"/> sortable="true" width="150"/>
<a:column name="actionOpen" align="center" prompt="HLS.OPEN_PERIOD" renderer="openPeriodDs" sortable="true" width="120"/> <a:column name="quarter_num" align="center" prompt="GLD_PERIOD_STATUS.QUARTER"
<a:column name="actionClose" align="center" prompt="HLS.CLOSE_PERIOD" renderer="closePeriodDs" sortable="true" width="120"/> sortable="true" width="80"/>
<a:column name="period_name" align="center" prompt="GLD_PERIODS.PERIOD_NAME"
sortable="true" width="120"/>
<a:column name="adjustment_flag" align="center" prompt="GLD_PERIOD_STATUS.ADJUST"
width="100"/>
<a:column name="period_status_code" align="center"
prompt="GLD_PERIOD_STATUS.PERIOD_STATUS" renderer="statusRenderer"
width="120"/>
<a:column name="actionOpen" align="center" prompt="HLS.OPEN_PERIOD"
renderer="openPeriodDs" sortable="true" width="120"/>
<a:column name="actionClose" align="center" prompt="HLS.CLOSE_PERIOD"
renderer="closePeriodDs" sortable="true" width="120"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
<a:checkBox id="closed_grid_cb"/> <a:checkBox id="closed_grid_cb"/>
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
// alert(record.get('output_id')); // alert(record.get('output_id'));
param['output_id'] = record.get('output_hd_id'); param['output_id'] = record.get('output_hd_id');
param['payment_method'] = record.get('payment_method'); param['payment_method'] = record.get('payment_method');
param['handle_flag'] = record.get('handle_flag');
// update panhong 20190702 // update panhong 20190702
if (record.get('payment_method') == 'ABC'){ if (record.get('payment_method') == 'ABC'){
param['function_code'] = 'HLS_ACR5040D'; param['function_code'] = 'HLS_ACR5040D';
......
...@@ -5,86 +5,96 @@ ...@@ -5,86 +5,96 @@
$Revision: 1.0 $Revision: 1.0
$Purpose:农行代扣数据导入明细 $Purpose:农行代扣数据导入明细
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:init-procedure outputPath="/parameter"> <a:init-procedure outputPath="/parameter">
<!-- <a:model-query model="basic.hls_fnd_attribute_sequence" rootPath="header"/> <!-- <a:model-query model="basic.hls_fnd_attribute_sequence" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="ACR_EBANK" user_id="${/session/@user_id}"/> <a:import-excel header_id="${/model/header/record/@header_id}" separator="," status_field="/parameter/@ImportSuccess" template_code="ACR_EBANK" user_id="${/session/@user_id}"/>
<a:model-query defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;ACR_EBANK&apos;" model="basic.hls_fnd_attribute_status" rootPath="status"/> --><![CDATA[ <a:model-query defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;ACR_EBANK&apos;" model="basic.hls_fnd_attribute_status" rootPath="status"/> -->
<![CDATA[
]]></a:init-procedure>
]]>
</a:init-procedure>
<a:view> <a:view>
<a:link id="acr_invoice_import_update_data_link" model="hls_acr.HLS_ACR5040.hls_acr_import_data_insert" modelaction="update"/> <a:link id="acr_invoice_import_update_data_link" model="hls_acr.HLS_ACR5040.hls_acr_import_data_insert"
<a:link id="acr_ebank_import_link" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5040/hls_acr_ebank_import_upload.lview"/> modelaction="update"/>
<a:link id="hls_acr_ebank_enter_link" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5040/hls_acr_ebank_input.lview"/> <a:link id="acr_ebank_import_link"
url="${/request/@context_path}/modules/hls_acr/HLS_ACR5040/hls_acr_ebank_import_upload.lview"/>
<a:link id="hls_acr_ebank_enter_link"
url="${/request/@context_path}/modules/hls_acr/HLS_ACR5040/hls_acr_ebank_input.lview"/>
<script><![CDATA[ <script><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var payment_method = '${/parameter/@payment_method}'; if ('${/parameter/@handle_flag}' == 'Y') {
var title = ''; Leaf.showInfoMessage("提示", "该批次已回盘并且核销,无法导入!");
if (payment_method == 'ABC'){ return;
title = '农行信息导入'; }
}else if(payment_method == 'ABC_2'){ var payment_method = '${/parameter/@payment_method}';
title = '农行(两方)信息导入'; var title = '';
} if (payment_method == 'ABC') {
var win = new Leaf.Window({ title = '农行信息导入';
id: 'upload_handle_winId', } else if (payment_method == 'ABC_2') {
params: { title = '农行(两方)信息导入';
output_id: '${/parameter/@output_id}', }
payment_method: '${/parameter/@payment_method}' var win = new Leaf.Window({
}, id: 'upload_handle_winId',
url: $('acr_ebank_import_link').getUrl(), params: {
title: title, output_id: '${/parameter/@output_id}',
width: 420, payment_method: '${/parameter/@payment_method}'
height: 275 },
}).on('close', function() { url: $('acr_ebank_import_link').getUrl(),
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_acr_ebank_output_ln_temp'); title: title,
$(ds_id).query(); width: 420,
}); height: 275
}; }).on('close', function () {
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_acr_ebank_output_ln_temp');
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); $(ds_id).query();
Leaf.request({ });
url: $('acr_invoice_import_update_data_link').getUrl(), };
para: { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
output_id: '${/parameter/@output_id}' window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
}, Leaf.request({
success: function() { url: $('acr_invoice_import_update_data_link').getUrl(),
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); para: {
window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040'; output_id: '${/parameter/@output_id}'
Leaf.SideBar.show({ },
msg: '操作成功', success: function () {
duration: 2000 window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}); window.location.href = $('hls_acr_ebank_enter_link').getUrl() + '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040';
}, Leaf.SideBar.show({
failure: function() { msg: '操作成功',
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); duration: 2000
}, });
error: function() { },
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); failure: function () {
}, window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
scope: this },
}); error: function () {
}; window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { },
// window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040'; scope: this
$('${/parameter/@winid}').close(); });
}; };
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
// window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040';
$('${/parameter/@winid}').close();
};
window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function () {
var p_sourcetype = 'hls_acr_ebank_input'; var p_sourcetype = 'hls_acr_ebank_input';
var p_pkvalue = '${/session/@session_id}'; var p_pkvalue = '${/session/@session_id}';
var url = '${/request/@context_path}/modules/hls_acr/HLS_ACR5030/hls_upload_for_attachment_db_view.lview?sourcetype=' + p_sourcetype + '&' + 'pkvalue=' + p_pkvalue; var url = '${/request/@context_path}/modules/hls_acr/HLS_ACR5030/hls_upload_for_attachment_db_view.lview?sourcetype=' + p_sourcetype + '&' + 'pkvalue=' + p_pkvalue;
wd = new Leaf.Window({ wd = new Leaf.Window({
id: 'attachment_up_window', id: 'attachment_up_window',
url: url, url: url,
title: '附件上传', title: '附件上传',
height: 350, height: 350,
width: 850 width: 850
}); });
}; };
//查询时调用(grid,table,gridBox) //查询时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function(ds, qpara, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
qpara['output_id'] = '${/parameter/@output_id}'; qpara['output_id'] = '${/parameter/@output_id}';
}; };
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view> </a:view>
......
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