Commit 6266c44d authored by Darming's avatar Darming

[feature] 核销及SBO

parent aea319ad
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num asc" needAccessControl="false">
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_id desc" needAccessControl="false">
<bm:fields>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_ID"/>
<bm:field name="transaction_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_NUM"/>
......@@ -107,7 +107,7 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.posted_flag in (&apos;N&apos;))"/>
<bm:data-filter name="query" expression="(t1.posted_flag in (&apos;N&apos;) and t1.transaction_type not in ('PAYMENT'))"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
......
......@@ -10,10 +10,12 @@
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
csh_transaction_pkg.update_confirmer_by_condition(
p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id}
);
update csh_transaction
set LAST_UPDATE_DATE = sysdate,
last_updated_by = ${/session/@user_id},
confirmed_flag = 'ACCAUDITING'
where transaction_id = ${@transaction_id}
and confirmed_flag = 'NEW';
end;
]]></bm:update-sql>
</bm:operation>
......
......@@ -42,10 +42,23 @@
li.attribute_23,
li.attribute_24,
li.attribute_25,
li.attribute_26
li.attribute_26,
t.csh_bank_account_num,
t.transaction_date,
t.bank_slip_num,
t.bp_bank_account_num,
t.bp_bank_account_name,
t.bp_bank_name,
t.transaction_amount,
t.collection_classes,
t.bp_id,
t.paid_byother_flag,
t.csh_bank_account_id bank_account_id,
FROM fnd_interface_headers hd,
fnd_interface_lines li
WHERE hd.header_id = li.header_id
fnd_interface_lines li,
csh_transaction_import_temp t
WHERE hd.header_id = li.header_id and li.line_id = t.line_id and hd.header_id = t.header_id
AND hd.template_code = 'CSH_TRX_BANK'
AND li.line_number >0
AND HD.CREATED_BY = ${/session/@user_id}
......@@ -69,13 +82,14 @@
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
delete from csh_transaction_import_temp where header_id = ${@header_id};
csh_transaction_pkg.save_receipt_import(
p_transaction_id =>${@transaction_id},
p_transaction_num =>${@transaction_num},
p_transaction_category =>'BUSINESS',
p_transaction_type =>'RECEIPT',
p_transaction_date =>to_date(${@transaction_date},'yyyy-mm-dd'),
p_penalty_calc_date =>to_date(${@transaction_date},'yyyy-mm-dd'),
p_transaction_type =>${@transaction_type},
p_transaction_date =>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_penalty_calc_date =>to_date(${@transaction_date}, 'yyyy-mm-dd'),
p_bank_slip_num =>${@bank_slip_num},
p_company_id =>${/session/@company_id},
p_internal_period_num =>${@internal_period_num},
......@@ -95,14 +109,14 @@
p_bp_bank_account_num =>${@bp_bank_account_num},
p_description =>${@description},
p_handling_charge =>${@handling_charge},
p_posted_flag =>nvl(${@posted_flag},'N'),
p_reversed_flag =>nvl(${@reversed_flag},'N'),
p_reversed_date =>to_date(${@reversed_date},'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag =>nvl(${@returned_flag},'NOT'),
p_posted_flag =>nvl(${@posted_flag}, 'N'),
p_reversed_flag =>nvl(${@reversed_flag}, 'N'),
p_reversed_date =>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag =>nvl(${@returned_flag}, 'NOT'),
p_returned_amount =>${@returned_amount},
p_write_off_flag =>nvl(${@write_off_flag},'NOT'),
p_write_off_flag =>nvl(${@write_off_flag}, 'NOT'),
p_write_off_amount =>${@write_off_amount},
p_full_write_off_date =>to_date(${@full_write_off_date},'yyyy-mm-dd 24hh:mi:ss'),
p_full_write_off_date =>to_date(${@full_write_off_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id =>${@twin_csh_trx_id},
p_return_from_csh_trx_id =>${@return_from_csh_trx_id},
p_reversed_csh_trx_id =>${@reversed_csh_trx_id},
......@@ -113,8 +127,8 @@
p_source_doc_id =>${@source_doc_id},
p_source_doc_line_id =>${@source_doc_line_id},
p_create_je_mothed =>${@create_je_mothed},
p_create_je_flag =>nvl(${@create_je_flag},'N'),
p_gld_interface_flag =>nvl(${@gld_interface_flag},'N'),
p_create_je_flag =>nvl(${@create_je_flag}, 'N'),
p_gld_interface_flag =>nvl(${@gld_interface_flag}, 'N'),
p_user_id =>${/session/@user_id},
p_ref_contract_id => ${@ref_contract_id},
p_receipt_type => ${@receipt_type},
......@@ -153,7 +167,8 @@
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="bank_account_id" dataType="java.lang.Long" output="true" outputPath="@bank_account_id"/>
<bm:parameter name="bank_account_id" dataType="java.lang.Long" output="true"
outputPath="@bank_account_id"/>
<bm:parameter name="bp_category" dataType="java.lang.String" output="true" outputPath="@bp_category"/>
<bm:parameter name="bp_id" dataType="java.lang.Long" output="true" outputPath="@bp_id"/>
<bm:parameter name="csh_bp_name" dataType="java.lang.String" output="true" outputPath="@csh_bp_name"/>
......
......@@ -14,9 +14,9 @@
p_transaction_id=>${@transaction_id},
p_transaction_num=>${@transaction_num},
p_transaction_category=>'BUSINESS',
p_transaction_type=>'RECEIPT',
p_transaction_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_transaction_type=>${@transaction_type},
p_transaction_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_bank_slip_num=>${@bank_slip_num},
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
......@@ -36,14 +36,14 @@
p_bp_bank_account_num=>${@bp_bank_account_num},
p_description=>${@description},
p_handling_charge=>${@handling_charge},
p_posted_flag=>nvl(${@posted_flag},'N'),
p_reversed_flag=>nvl(${@reversed_flag},'N'),
p_reversed_date=>to_date(${@reversed_date},'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag},'NOT'),
p_posted_flag=>nvl(${@posted_flag}, 'N'),
p_reversed_flag=>nvl(${@reversed_flag}, 'N'),
p_reversed_date=>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag}, 'NOT'),
p_returned_amount=>${@returned_amount},
p_write_off_flag=>nvl(${@write_off_flag},'NOT'),
p_write_off_flag=>nvl(${@write_off_flag}, 'NOT'),
p_write_off_amount=>${@write_off_amount},
p_full_write_off_date=>to_date(${@full_write_off_date},'yyyy-mm-dd 24hh:mi:ss'),
p_full_write_off_date=>to_date(${@full_write_off_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id=>${@twin_csh_trx_id},
p_return_from_csh_trx_id=>${@return_from_csh_trx_id},
p_reversed_csh_trx_id=>${@reversed_csh_trx_id},
......@@ -54,8 +54,8 @@
p_source_doc_id=>${@source_doc_id},
p_source_doc_line_id=>${@source_doc_line_id},
p_create_je_mothed=>${@create_je_mothed},
p_create_je_flag=>nvl(${@create_je_flag},'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag},'N'),
p_create_je_flag=>nvl(${@create_je_flag}, 'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag}, 'N'),
p_user_id=>${/session/@user_id},
p_ref_contract_id=> ${@ref_contract_id},
p_receipt_type => ${@receipt_type},
......@@ -80,7 +80,8 @@
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="transaction_id" dataType="java.lang.Long" input="false" inputPath="@transaction_id" output="true" outputPath="/parameter/@transaction_id"/>
<bm:parameter name="transaction_id" dataType="java.lang.Long" input="false" inputPath="@transaction_id"
output="true" outputPath="/parameter/@transaction_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="update">
......@@ -90,9 +91,9 @@
p_transaction_id=>${@transaction_id},
p_transaction_num=>${@transaction_num},
p_transaction_category=>'BUSINESS',
p_transaction_type=>'RECEIPT',
p_transaction_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date},'yyyy-mm-dd hh24:mi:ss'),
p_transaction_type=>${@transaction_type},
p_transaction_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_penalty_calc_date=>to_date(${@transaction_date}, 'yyyy-mm-dd hh24:mi:ss'),
p_bank_slip_num=>${@bank_slip_num},
p_company_id=>${/session/@company_id},
p_internal_period_num=>${@internal_period_num},
......@@ -112,14 +113,14 @@
p_bp_bank_account_num=>${@bp_bank_account_num},
p_description=>${@description},
p_handling_charge=>${@handling_charge},
p_posted_flag=>nvl(${@posted_flag},'N'),
p_reversed_flag=>nvl(${@reversed_flag},'N'),
p_reversed_date=>to_date(${@reversed_date},'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag},'NOT'),
p_posted_flag=>nvl(${@posted_flag}, 'N'),
p_reversed_flag=>nvl(${@reversed_flag}, 'N'),
p_reversed_date=>to_date(${@reversed_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_returned_flag=>nvl(${@returned_flag}, 'NOT'),
p_returned_amount=>${@returned_amount},
p_write_off_flag=>nvl(${@write_off_flag},'NOT'),
p_write_off_flag=>nvl(${@write_off_flag}, 'NOT'),
p_write_off_amount=>${@write_off_amount},
p_full_write_off_date=>to_date(${@full_write_off_date},'yyyy-mm-dd 24hh:mi:ss'),
p_full_write_off_date=>to_date(${@full_write_off_date}, 'yyyy-mm-dd 24hh:mi:ss'),
p_twin_csh_trx_id=>${@twin_csh_trx_id},
p_return_from_csh_trx_id=>${@return_from_csh_trx_id},
p_reversed_csh_trx_id=>${@reversed_csh_trx_id},
......@@ -130,8 +131,8 @@
p_source_doc_id=>${@source_doc_id},
p_source_doc_line_id=>${@source_doc_line_id},
p_create_je_mothed=>${@create_je_mothed},
p_create_je_flag=>nvl(${@create_je_flag},'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag},'N'),
p_create_je_flag=>nvl(${@create_je_flag}, 'N'),
p_gld_interface_flag=>nvl(${@gld_interface_flag}, 'N'),
p_user_id=>${/session/@user_id},
p_ref_contract_id=> ${@ref_contract_id},
p_ref_n01 =>${@ref_n01},
......
......@@ -44,6 +44,6 @@
queryExpression="due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="t.cf_status = 'RELEASE' and t.write_off_flag != 'FULL'"/>
<bm:data-filter name="query" expression="t.cf_status = 'RELEASE' and t.write_off_flag != 'FULL' and t.cf_direction = 'INFLOW'"/>
</bm:data-filters>
</bm:model>
......@@ -13,5 +13,12 @@
<bm:parameter name="err_count" dataType="java.lang.Long" output="true" outputPath="@err_count"/>
</bm:parameters>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
update CSH_TRANSACTION set confirmed_flag = 'WF_APPROVING' where transaction_id = ${@transaction_id};
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -100,6 +100,8 @@
<bm:field name="approving_return_amount" datatype="java.lang.Double" expression="(select nvl(sum(ctr.this_return_amount),0) from csh_transaction_return ctr where ctr.transaction_id = t1.transaction_id and ctr.status = 'APPROVING')" forInsert="false" forUpdate="false" prompt="审批中退款金额"/>
<bm:field name="created_user_name" expression="(select description from sys_user where user_id = t1.created_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirm_user_name" expression="(select description from sys_user where user_id = t1.confirmed_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirmed_flag_desc" expression="(select code_value_name from sys_code_values_v where code = 'CONFIRMED_FLAG' and code_value = t1.confirmed_flag)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirmed_flag"/>
<!--end-->
</bm:fields>
<bm:features>
......@@ -167,8 +169,6 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and nvl(t1.deposit_flag,'N')='N' and t1.confirmed_flag = 'APPROVED' "/>
<bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and nvl(t1.deposit_flag,'N')='N' and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED') "/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT sys_parameter_pkg.value('HL_SBO_JE_TIMELY_LIMIT') sbo_limit ,
sys_parameter_pkg.value('HL_SBO_JE_BATCH_LIMIT') sbo_detail_limit
FROM dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="sbo_limit"/>
<bm:field name="sbo_detail_limit"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gaoyang
$Date: 2013-4-15 下午01:13:07
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="HLS_BP_MASTER_V">
<bm:fields>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="HLS_BP_MASTER_V.BP_ID"/>
<bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="210" forDisplay="true" forQuery="true" physicalName="BP_CODE" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="210" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="HLS.BP_NAME"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="HLS_BP_MASTER_V.COMPANY_ID"/>
<bm:field name="company_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_CODE" prompt="HLS_BP_MASTER_V.COMPANY_CODE"/>
<bm:field name="company_short_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_SHORT_NAME" prompt="HLS_BP_MASTER_V.COMPANY_SHORT_NAME"/>
<bm:field name="company_full_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_FULL_NAME" prompt="HLS_BP_MASTER_V.COMPANY_FULL_NAME"/>
<bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY"/>
<bm:field name="bp_category_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY_NAME"/>
<bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS"/>
<bm:field name="bp_class_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS_NAME"/>
<bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
</bm:fields>
<bm:features>
<f:standard-who/>
<s:bm-script><![CDATA[
var cx = Packages.leaf.javascript.Context.getCurrentContext();
Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
]]></s:bm-script>
</bm:features>
<bm:query-fields>
<bm:query-field field="bp_id" queryOperator="="/>
<bm:query-field field="bp_code" queryOperator="like"/>
<bm:query-field field="bp_name" queryExpression="t1.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos;"/>
<!-- <bm:query-field field="bp_category" queryOperator="="/> -->
<!-- <bm:query-field field="bp_category" queryExpression="(t1.bp_category = ${@bp_category} or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.bp_category = ${@bp_category} and br.bp_type = ${@bp_category}))"/> -->
<!-- <bm:query-field name="contract_bp_flag" queryExpression="(exists (select 1 from con_contract_bp b where b.contract_id in (${:@contract_id}) and b.bp_id = t1.bp_id and b.bp_category in (&apos;VENDER&apos;,&apos;TENANT&apos;,&apos;TENANT_SEC&apos;) )or nvl(${@contract_bp_flag},&apos;N&apos;) != &apos;Y&apos; )"/> -->
</bm:query-fields>
<bm:data-filters>
<!-- <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/> -->
<bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos; and bp_category in (&apos;TENANT&apos;,&apos;AGENT&apos;))"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
HL_SBO_INF_PKG.create_batch_bp_sbo_info( p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -61,7 +61,9 @@
<bm:field name="re_journal_num"/>
<bm:field name="re_sap_belnr"/>
<bm:field name="created_by_n" expression="(select su.description from sys_user su where su.user_id = t1.CREATED_BY)"/>
<bm:field name="je_detail_count"/>
<bm:field name="sbo_num"/>
<bm:field name="sbo_req_number"/>
<bm:field name="reversed_19_flag"/>
</bm:fields>
......@@ -74,6 +76,8 @@
<bm:query-field field="journal_num" queryOperator="like"/>
<bm:query-field name="journal_date_from" queryExpression="t1.journal_date &gt;= to_date(${@journal_date_from},'yyyy-mm-dd')"/>
<bm:query-field name="journal_date_to" queryExpression="t1.journal_date &lt;= to_date(${@journal_date_to},'yyyy-mm-dd')"/>
<bm:query-field name="sbo_num" queryExpression="t1.sbo_num like &apos;%&apos;||${@sbo_num}||&apos;%&apos; "/>
<bm:query-field name="sbo_req_number" queryExpression="t1.sbo_req_number like &apos;%&apos;||${@sbo_req_number}||&apos;%&apos; "/>
<bm:query-field name="external_journal_num" queryExpression="t1.external_journal_num like &apos;%&apos;||${@external_journal_num}||&apos;%&apos; "/>
<bm:query-field field="je_transaction_code" queryOperator="="/>
<bm:query-field name="total_amount_dr_from" datatype="java.lang.Double" queryExpression="nvl(t1.total_amount_dr,t1.total_amount_cr) &gt;= ${@total_amount_dr_from}"/>
......@@ -89,6 +93,8 @@
<bm:query-field name="query_reversed_flag" queryExpression="(${@query_reversed_flag}=&apos;Y&apos; and nvl(t1.reversed_flag,&apos;N&apos;)=&apos;N&apos;)"/>
<bm:query-field name="status_list_flag" queryExpression="(${@status_list_flag}=&apos;Y&apos; and t1.status in (&apos;U&apos;,&apos;B&apos;))"/>
<bm:query-field name="gld_flag" queryExpression="exists (select 1 from gld_je_transaction d where d.je_transaction_code = t1.je_transaction_code and d.gld_flag = ${@gld_flag})"/>
<bm:query-field name="bp_id_tenant" queryExpression="exists (select 1 from hls_journal_detail_v dv where dv.reference1=(select a.bp_code from hls_bp_master a where a.bp_id=${@bp_id_tenant} )and dv.journal_header_id=t1.journal_header_id )"/>
<bm:query-field name="desc" queryExpression="t1.description like &apos;%&apos;||${@desc}||&apos;%&apos; "/>
<bm:query-field name="post_sap" queryExpression="(decode(t1.sap_belnr,null,'N','Y') = ${@post_sap})"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
BEGIN
HL_SBO_INF_PKG.save_sbo_temp(p_journal_header_id => ${@journal_header_id}, p_user_id => ${/session/@user_id},p_id=>${/parameter/@v_id_1});
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
HL_SBO_INF_PKG.create_sbo_inf_xml(p_journal_header_id => ${@journal_header_id}, p_user_id => ${/session/@user_id},p_batch_flag=>${@batch_flag},p_job_flag=>'N',p_id=>${/parameter/@v_id_1});
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
select SBO_TMP_S.Nextval into ${@v_id_1} from dual;
END;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="v_id_1" output="true" outputPath="/parameter/@v_id_1"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -87,7 +87,8 @@
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh510_update_bp_info_link').query();
// $('csh510_update_bp_info_link').query();
$('csh_transaction_receipt_link_winid').close();
},
scope: this
});
......
......@@ -435,7 +435,7 @@
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!-- <a:screenTitle/>-->
<!-- <a:gridButton id="csh511_receipt_save_id" click="csh511_receipt_save" text="HLS.SAVE"/>
<a:gridButton id="csh511_receipt_reset_id" click="csh511_receipt_reset" text="HLS.RESET"/>-->
<!--<a:gridButton id="csh511_receipt_posted_id" click="csh511_receipt_posted" text="HLS.POST"/>-->
......
......@@ -6,10 +6,27 @@
$Purpose: excel导入收款
-->
<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.code = &apos;CSH_TRX_IMPORT_TEMPLATE&apos;" model="sys.SYS120.hls_attachment_module" rootPath="template_path"/>
</a:init-procedure>
<a:view>
<a:link id="downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script type="text/javascript"><![CDATA[
function downloadFile() {
new Leaf.Window({
url: $('downloadFile_id').getUrl(),
title: '${l:HLS.SUPPORTING_DOCUMENT}',
params: {
'table_name': 'HLS_ATTACHMENT_MODULE',
'header_id': '${/model/template_path/record/@attachment_module_id}'
},
width: 850,
height: 400
});
}
function saveClick() {
......@@ -65,10 +82,10 @@
<a:label name="label6" bindTarget="label_ds" style="color:#055A78;font-weight:bold;margin-left:10px;" width="380"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="TMPLT_IMPORT_FILE" width="400">
<form name="upload" id="importForm" action="modules/prj/PRJ501N/prj_lease_item_trans_upload.lview?session_id=${/parameter/@session_id}&amp;project_id=${/parameter/@project_id}&amp;parent_ds_id=${/parameter/@parent_ds_id}&amp;type=${/parameter/@type}&amp;_csrf=${/session/@_csrf.token}" enctype="multipart/form-data" method="post" target="_input_window">
<form name="upload" id="importForm" enctype="multipart/form-data" method="post" target="_input_window">
<label style="margin-left:10px;margin-top:10px;font-size:13px"><![CDATA[${l:PLEASE_SELECT_A_FILE}]]></label>
<input name="CONTENT" id="importFile" style="font-size:15px" type="file"/>
<!-- <input onclick="downloadFile()" style="margin-left:10px;margin-top:10px;width:60px;height:23px" type="button" value="模板下载"/> -->
<input onclick="downloadFile()" style="margin-left:10px;margin-top:10px;width:60px;height:23px" type="button" value="模板下载"/>
<input onclick="saveClick()" style="margin-left:25px;margin-top:10px;width:60px;height:23px" type="button" value="${l:TMPLT_IMPORT}"/>
</form>
</a:fieldSet>
......
......@@ -335,12 +335,17 @@
var ds = $('csh531n_sap_bankflow_info_result_ds');
var record = ds.findById(id);
var bp_category = record.get('bp_category');
var transaction_type = record.get('transaction_type');
var depositDisplayFlag = 'N';
var advanceDisplayFlag = 'N';
if (bp_category == 'AGENT') {
depositDisplayFlag = 'Y';
}
if (transaction_type != 'ADVANCE_RECEIPT'){
advanceDisplayFlag = 'Y';
}
var win = new Leaf.Window({
id: 'csh_write_off_upload_window',
id: 'csh_write_off_window',
params: {
transaction_id: record.get('transaction_id'),
depositDisplayFlag: depositDisplayFlag,
......@@ -352,8 +357,9 @@
bp_bank_account_num: record.get('bp_bank_account_num'),
bp_bank_account_name: record.get('bp_bank_account_name'),
bp_id: record.get('bp_id'),
advanceDisplayFlag: advanceDisplayFlag,
readOnly: readOnly,
winid: 'csh_write_off_upload_window'
winid: 'csh_write_off_window'
},
url: $('batch_detail_link').getUrl(),
title: '明细',
......@@ -367,11 +373,11 @@
function csh531n_detail_renderer(value, record, name) {
var text = '';
var status = record.get('status');
var status = record.get('confirmed_flag');
var write_off_flag = record.get('write_off_flag');
var readOnly = 'Y';
if ((status == 'NEW' || status == 'RETURN') && write_off_flag != 'FULL') {
readOnly = 'N';
var readOnly = 'N';
if ((status == 'WF_APPROVING' || status == 'WF_APPROVED') && write_off_flag != 'FULL') {
readOnly = 'Y';
}
if (name == 'csh531n_detail') {
return '<a href="Javascript:csh531n_open_write_off_detail(' + record.id + ',\'' + readOnly + '\')">明细</a>';
......@@ -394,7 +400,8 @@
function seedetail_write_off(value, record, name) {
var return_value = value || 0;
return '<a href="javascript:openWindow_writeoff(' + record.id + ');">' + Leaf.formatMoney(return_value) + '</a>';
// return '<a href="javascript:openWindow_writeoff(' + record.id + ');">' + Leaf.formatMoney(return_value) + '</a>';
return '<a href="javascript:openWindow_writeoff(' + record.id + ');">明细</a>';
}
......@@ -545,7 +552,7 @@
<a:screenTitle/>
<a:gridButton click="csh531_query" text="HLS.QUERY"/>
<a:gridButton click="csh531_new_write_off" text="新增核销"/>
<a:gridButton click="csh531_new_reverse_write_off" text="新增反冲"/>
<!-- <a:gridButton click="csh531_new_reverse_write_off" text="新增反冲"/>-->
<a:gridButton click="csh531_reset" text="重置"/>
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" style="background:#f7f7f8" labelWidth="250">
......@@ -579,14 +586,15 @@
<!-- bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="对方账户账号"/>-->
<!-- </a:box>-->
<a:box column="4">
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="现金事务编号"/>
<a:lov name="bp_name"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="商业伙伴"/>
<!-- <a:comboBox name="status" bindTarget="csh_transaction_receipt_write_off_query_ds"-->
<!-- prompt="单据状态"/>-->
<a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_write_off_query_ds"
prompt="核销状态"/>
<a:comboBox name="collection_classes_desc"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="款项用途"/>
<!-- <a:comboBox name="collection_classes_desc"-->
<!-- bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="款项用途"/>-->
</a:box>
</a:fieldSet>
</a:form>
......@@ -602,8 +610,8 @@
<!-- <a:button click="csh531_data_confirm" text="审阅"/>-->
<!-- </a:toolBar>-->
<a:columns>
<a:column name="transaction_num" prompt="现金事务编号" lock="true" align="left"
renderer="csh531n_detail_renderer" width="220"/>
<a:column name="transaction_num" prompt="现金事务编号" lock="true" align="center"
renderer="csh531n_detail_renderer" width="120"/>
<a:column name="transaction_type_desc" prompt="现金事务类型" lock="true" align="center" width="120"/>
<a:column name="receipt_type_desc" prompt="收款类型" align="center" lock="true" width="120"/>
<!--<a:column name="bank_name" prompt="银行名称"/>-->
......@@ -611,13 +619,14 @@
<!-- <a:column name="bank_slip_num" prompt="银行流水号"/>-->
<!-- <a:column name="bank_account_num" prompt="收款账号"/>-->
<a:column name="transaction_amount" align="right" lock="true" footerRenderer="summary_Renderer"
renderer="Leaf.formatMoney" prompt="收款金额" width="180"/>
renderer="Leaf.formatMoney" prompt="收款金额" width="120"/>
<a:column name="transaction_date" renderer="Leaf.formatDate" align="center" lock="true"
prompt="收款日期" width="120"/>
<a:column name="collection_classes_desc" prompt="款项用途" lock="true" align="center"/>
<a:column name="description" prompt="摘要" width="180"/>
<!-- <a:column name="collection_classes_desc" prompt="款项用途" lock="true" align="center"/>-->
<a:column name="bp_name" prompt="商业伙伴" align="left" width="200"/>
<a:column name="csh531n_detail" renderer="csh531n_detail_renderer" prompt="核销明细" align="center"
width="80"/>
<!-- <a:column name="csh531n_detail" renderer="csh531n_detail_renderer" prompt="核销明细" align="center" width="80"/>-->
<a:column name="csh531n_detail" renderer="seedetail_write_off" prompt="核销明细" align="center" width="80"/>
<!-- <a:column name="bp_bank_account_name" prompt="对方账户"/>-->
<!-- <a:column name="bp_bank_account_num" prompt="对方账号"/>-->
<!-- <a:column name="description_p" prompt="摘要+用途"/>-->
......@@ -629,6 +638,7 @@
<!-- renderer="Leaf.formatMoney" prompt="未分配金额"/>-->
<!-- <a:column name="status_desc" prompt="单据状态" width="120" align="center"/>-->
<a:column name="write_off_flag_desc" prompt="核销状态" width="120" align="center"/>
<a:column name="confirmed_flag_desc" prompt="单据状态" width="120" align="center"/>
<!-- <a:column name="review_status_desc" prompt="分配状态" width="80"/>-->
<!-- <a:column name="ref_v05" prompt="备注" width="100"/>-->
<a:column name="created_user_name" prompt="制单人" width="120" align="center"/>
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<!-- <a:init-procedure>
<a:batch-apply sourcepath="/parameter">
<a:model-insert model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
<a:model-update model="hls.HLS301.hls_journal_post_to_sbo"/>
<a:batch-apply sourcepath="/parameter">
<a:batch-apply sourcepath="/@current_parameter/datas">
<a:model-insert model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
<a:model-update model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/> -->
<p:echo/>
<a:init-procedure>
<a:model-execute model="hls.HLS301.hls_journal_post_to_sbo"/>
<a:batch-apply sourcepath="/parameter/details">
<a:model-insert model="hls.HLS301.hls_journal_post_to_sbo"/>
</a:batch-apply>
<a:model-update model="hls.HLS301.hls_journal_post_to_sbo"/>
<p:echo/>
</a:init-procedure>
<p:echo/>
<a:service-output output="/parameter"/>
</a:service>
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