Commit 63e02b32 authored by Darming's avatar Darming

Merge branch 'feature/Optimization' into develop

parents 0a25cc98 20d54f2e
Pipeline #3870 canceled with stages
...@@ -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>
...@@ -8,26 +8,18 @@ ...@@ -8,26 +8,18 @@
<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>
...@@ -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,22 +7,28 @@ ...@@ -7,22 +7,28 @@
--> -->
<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"/>
...@@ -40,28 +46,6 @@ ...@@ -40,28 +46,6 @@
stepTabPanel.setDisabled(step - 1); stepTabPanel.setDisabled(step - 1);
} }
function nextStep_execute(){
var stepTabPanel = $('step');
step = step + 1;
stepTabPanel.setEnabled(step);
stepTabPanel.selectTab(step);
stepTabPanel.setDisabled(step - 1);
var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0);
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;
if (!result) {
Leaf.showWarningMessage('', '更新失败', null, 200, 100);
return;
}
}
});
}
//HLS801.LAST_STEP //HLS801.LAST_STEP
function upStep() { function upStep() {
...@@ -73,6 +57,7 @@ ...@@ -73,6 +57,7 @@
stepTabPanel.setDisabled(step + 1); stepTabPanel.setDisabled(step + 1);
} }
//取消 //取消
function cancelFun() { function cancelFun() {
...@@ -83,27 +68,20 @@ ...@@ -83,27 +68,20 @@
function backFun() { function backFun() {
Leaf.showConfirm('${l:HLS.PROMPT}', '确定返回?', function okFun() { Leaf.showConfirm('${l:HLS.PROMPT}', '确定返回?', function okFun() {
window.location.href = $('hls_monthly_statement_link').getUrl(); window.location.href = $('hls_monthly_statement_link').getUrl();
}, function canFun() {}); }, function canFun() {
});
} }
function step_0NextStep() { function step_0NextStep() {
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
var period_name = typeof(record.get('period_name')) == 'undefined' ? 0 : record.get('period_name'); 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 == '') { if (period_name == 0 || period_name == '') {
Leaf.showMessage('${l:HLS.PROMPT}', '请确认期间!'); Leaf.showMessage('${l:HLS.PROMPT}', '请确认期间!');
return;
} else { } else {
nextStep(); nextStep();
//exchange_rate_ds
/* var ds = $('exchange_rate_ds');
ds.setQueryParameter('internal_period_num',record.get('internal_period_num'));
ds.query();*/
} }
} }
...@@ -111,16 +89,20 @@ ...@@ -111,16 +89,20 @@
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
var period_name = record.get('period_name'); var period_name = record.get('period_name');
var calc_end_date = record.get('calc_end_date');
$('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('unearned_finance_income_ds').query();
nextStep(); nextStep();
alert(record.get('calc_end_date'));
/* year = period_name.substring(0, 4); /* year = period_name.substring(0, 4);
month = period_name.substring(5, 7); month = period_name.substring(5, 7);
var query_ds = $('unearned_finance_income_query_ds'); var query_ds = $('unearned_finance_income_query_ds');
var qrecord = query_ds.getAt(0); var qrecord = query_ds.getAt(0);
qrecord.set('year',year); qrecord.set('year',year);
qrecord.set('month',month); qrecord.set('month',month);
$('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('unearned_finance_income_ds').query(); */ $('unearned_finance_income_ds').query(); */
} }
...@@ -143,11 +125,10 @@ ...@@ -143,11 +125,10 @@
} }
function accrued_interest_query() { function accrued_interest_query() {
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
$('tre_accrued_interest_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('tre_accrued_interest_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('tre_accrued_interest_ds').query(); $('tre_accrued_interest_ds').query();
} }
...@@ -157,9 +138,9 @@ ...@@ -157,9 +138,9 @@
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
if (Ext.isEmpty(g_company_id)) { 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'; 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 { } 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'; 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); window.open(url);
} }
...@@ -175,7 +156,7 @@ ...@@ -175,7 +156,7 @@
function unearned_finance_income_query() { function unearned_finance_income_query() {
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
$('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('unearned_finance_income_ds').query(); $('unearned_finance_income_ds').query();
} }
...@@ -185,9 +166,9 @@ ...@@ -185,9 +166,9 @@
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
if (Ext.isEmpty(g_company_id_2)) { 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'; 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 { } 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'; 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); window.open(url);
} }
...@@ -217,6 +198,15 @@ ...@@ -217,6 +198,15 @@
$('close_open_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('close_open_ds').setQueryParameter('internal_period_num', record.get('internal_period_num'));
$('close_open_ds').setQueryParameter('period_set_code', '${/model/fieldset/record/@period_set_code}'); $('close_open_ds').setQueryParameter('period_set_code', '${/model/fieldset/record/@period_set_code}');
$('close_open_ds').query(); $('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();
} }
} }
...@@ -261,7 +251,7 @@ ...@@ -261,7 +251,7 @@
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', 'O');
Leaf.SideBar.enable = true; Leaf.SideBar.enable = true;
...@@ -281,8 +271,8 @@ ...@@ -281,8 +271,8 @@
Leaf.request({ Leaf.request({
url: $('gld_period_pkg_init_period_link').getUrl(), url: $('gld_period_pkg_init_period_link').getUrl(),
para: record.data, para: record.data,
success: function() { success: function () {
Leaf.showMessage('${l:PROMPT}', '${l:FND_DIMENSION_VALUES.OPR_SUC}', function(cmp) { Leaf.showMessage('${l:PROMPT}', '${l:FND_DIMENSION_VALUES.OPR_SUC}', function (cmp) {
document.location.reload(); document.location.reload();
cmp.close(); cmp.close();
}); });
...@@ -293,7 +283,7 @@ ...@@ -293,7 +283,7 @@
Leaf.request({ Leaf.request({
url: url, url: url,
para: record.data, para: record.data,
success: function() { success: function () {
record.set('period_status_code', 'C'); record.set('period_status_code', 'C');
...@@ -316,6 +306,7 @@ ...@@ -316,6 +306,7 @@
function accrued_interest_clear() { function accrued_interest_clear() {
$('tre_accrued_interest_grid').clear(); $('tre_accrued_interest_grid').clear();
} }
var g_return_value_1; var g_return_value_1;
function accrued_interest_calculate() { function accrued_interest_calculate() {
...@@ -323,14 +314,14 @@ ...@@ -323,14 +314,14 @@
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
year = record.get('period_name').substring(0, 4); year = record.get('period_name').substring(0, 4);
month = record.get('period_name').substring(5, 7); month = record.get('period_name').substring(5, 7);
Leaf.showConfirm('${l:HLS.PROMPT}', year+'年'+month+'月'+'结算,确认计算计提利息?', function okFun() { Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + '结算,确认计算计提利息?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({ Leaf.request({
url: $('insert_tre_accrued_interest_link').getUrl(), url: $('insert_tre_accrued_interest_link').getUrl(),
para: { para: {
internal_period_num: record.get('internal_period_num') internal_period_num: record.get('internal_period_num')
}, },
success: function(args) { success: function (args) { //debugger;
var result = args.result; var result = args.result;
if (!result) { if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100); Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
...@@ -347,53 +338,73 @@ ...@@ -347,53 +338,73 @@
$('tre_accrued_interest_ds').query(); $('tre_accrued_interest_ds').query();
}, },
failure: function() { failure: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
error: function() { error: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
}); });
}, Leaf.Masker.unmask(Ext.getBody())); }, Leaf.Masker.unmask(Ext.getBody()));
} }
var g_return_value; var g_return_value;
function unearned_finance_income_confirm() { function unearned_finance_income_confirm() {
var headers_ds = $('hls_monthly_statement_ds'); var headers_ds = $('hls_monthly_statement_ds');
var record = headers_ds.getAt(0); 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
year = record.get('period_name').substring(0, 4); year = record.get('period_name').substring(0, 4);
month = record.get('period_name').substring(5, 7); month = record.get('period_name').substring(5, 7);
Leaf.showConfirm('${l:HLS.PROMPT}', year+'年'+month+'月'+'结算,确定执行收入确认?', function okFun() { day = record.get('calc_end_date').substring(8, 10);
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: $('insert_con_finance_income_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) { success: function (args) {
// modify by wdd 20180514
var result = args.result; // 收入确认出错校验移至PKG
if (!result) { // var result = args.result;
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100); // if (!result) {
return; // Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
} // return;
g_return_value = result.return_value; // }
if (g_return_value != 'SUCCESS') { // g_return_value = result.return_value;
Leaf.showWarningMessage('', '收入确认出错!', null, 200, 100); // if (g_return_value != 'SUCCESS') {
Leaf.Masker.unmask(Ext.getBody()); // Leaf.showWarningMessage('', '收入确认出错!', null, 200, 100);
return; // Leaf.Masker.unmask(Ext.getBody());
} // return;
// }
//end by wdd
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
$('unearned_finance_income_ds').setQueryParameter('internal_period_num', record.get('internal_period_num')); $('unearned_finance_income_ds').setQueryParameter('calc_end_date', record.get('calc_end_date'));
$('unearned_finance_income_ds').query(); $('unearned_finance_income_ds').query();
accrued_interest_query();
}, },
failure: function() { failure: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
error: function() { error: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
...@@ -409,9 +420,10 @@ ...@@ -409,9 +420,10 @@
Leaf.request({ Leaf.request({
url: $('period_month_close_link').getUrl(), url: $('period_month_close_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) { success: function (args) {
var result = args.result; var result = args.result;
if (!result) { if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100); Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
...@@ -426,10 +438,10 @@ ...@@ -426,10 +438,10 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
failure: function() { failure: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
error: function() { error: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
...@@ -442,14 +454,15 @@ ...@@ -442,14 +454,15 @@
var record = headers_ds.getAt(0); var record = headers_ds.getAt(0);
year = record.get('period_name').substring(0, 4); year = record.get('period_name').substring(0, 4);
month = record.get('period_name').substring(5, 7); month = record.get('period_name').substring(5, 7);
Leaf.showConfirm('${l:HLS.PROMPT}', year+'年'+month+'月'+'结算,确认计提利息?', function okFun() { Leaf.showConfirm('${l:HLS.PROMPT}', year + '年' + month + '月' + '结算,确认计提利息?', function okFun() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}'); Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
Leaf.request({ Leaf.request({
url: $('tre_interest_confirm_link').getUrl(), url: $('tre_interest_confirm_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) { success: function (args) { //debugger;
var result = args.result; var result = args.result;
if (!result) { if (!result) {
Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100); Leaf.showWarningMessage('', '${l:PRJ509.DATA_NOT_BACK}', null, 200, 100);
...@@ -464,10 +477,10 @@ ...@@ -464,10 +477,10 @@
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
failure: function() { failure: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
error: function() { error: function () {
Leaf.Masker.unmask(Ext.getBody()); Leaf.Masker.unmask(Ext.getBody());
}, },
scope: this scope: this
...@@ -482,37 +495,27 @@ ...@@ -482,37 +495,27 @@
} }
} }
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:hBox height="50">
<a:button click="upStep" text="HLS801.LAST_STEP"/>
<a:label width="5"/>
<a:button click="nextStep" text="HLS801.NEXT_STEP"/>
<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: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_execute" text="HLS801.NEXT_STEP"/> <a:button click="nextStep" text="HLS801.NEXT_STEP"/>
<a:label width="80"/> <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"/>
...@@ -689,43 +658,57 @@ ...@@ -689,43 +658,57 @@
</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,24 +5,34 @@ ...@@ -5,24 +5,34 @@
$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 () {
if ('${/parameter/@handle_flag}' == 'Y') {
Leaf.showInfoMessage("提示", "该批次已回盘并且核销,无法导入!");
return;
}
var payment_method = '${/parameter/@payment_method}'; var payment_method = '${/parameter/@payment_method}';
var title = ''; var title = '';
if (payment_method == 'ABC'){ if (payment_method == 'ABC') {
title = '农行信息导入'; title = '农行信息导入';
}else if(payment_method == 'ABC_2'){ } else if (payment_method == 'ABC_2') {
title = '农行(两方)信息导入'; title = '农行(两方)信息导入';
} }
var win = new Leaf.Window({ var win = new Leaf.Window({
...@@ -35,41 +45,41 @@ ...@@ -35,41 +45,41 @@
title: title, title: title,
width: 420, width: 420,
height: 275 height: 275
}).on('close', function() { }).on('close', function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_acr_ebank_output_ln_temp'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_acr_ebank_output_ln_temp');
$(ds_id).query(); $(ds_id).query();
}); });
}; };
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('acr_invoice_import_update_data_link').getUrl(), url: $('acr_invoice_import_update_data_link').getUrl(),
para: { para: {
output_id: '${/parameter/@output_id}' output_id: '${/parameter/@output_id}'
}, },
success: function() { success: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); 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'; window.location.href = $('hls_acr_ebank_enter_link').getUrl() + '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040';
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '操作成功', msg: '操作成功',
duration: 2000 duration: 2000
}); });
}, },
failure: function() { failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
error: function() { error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, },
scope: this scope: this
}); });
}; };
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { 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'; // window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040';
$('${/parameter/@winid}').close(); $('${/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;
...@@ -82,7 +92,7 @@ ...@@ -82,7 +92,7 @@
}); });
}; };
//查询时调用(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>
......
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