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>
...@@ -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>
...@@ -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