Commit eaf7429f authored by Darming's avatar Darming

Merge branch 'features/csh_write_off' into develop

parents 814b4b50 a2397a9a
<?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 t.attribute_1,
t.attribute_2,
t.attribute_3,
t.attribute_4,
t.attribute_5,
t.attribute_6,
t.attribute_7,
t.attribute_8,
TRIM(REPLACE(SUBSTR(t.attribute_9, 2), ',', '')) attribute_9,
t.attribute_10,
t.attribute_11,
t.attribute_12,
t.attribute_13,
t.attribute_14,
t.attribute_15,
TRIM(REPLACE(SUBSTR(t.attribute_16, 2), ',', '')) attribute_16
FROM
fnd_interface_lines t
WHERE
t.header_id =${@header_id} AND
t.line_number > 5
order by line_number
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hls_ebank_abc_new_pkg.save_import_data(p_header_id => ${@header_id},
p_batch_id => ${@batch_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
t.attribute_1,
t.attribute_2,
t.attribute_3,
t.attribute_4,
t.attribute_5,
t.attribute_6,
t.attribute_7,
t.attribute_8,
t.attribute_9,
t.attribute_10,
t.attribute_11,
t.attribute_12,
t.attribute_13,
t.attribute_14,
t.attribute_15
FROM
fnd_interface_lines t
WHERE
t.header_id = ${@header_id} AND
t.line_number > 0
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hls_ebank_ccb_new_pkg.save_import_data(p_header_id => ${@header_id},
p_batch_id => ${@batch_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id},
p_transaction_date => to_date(${@transaction_date}, 'yyyy-mm-dd'));
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT c.contract_id,
ccc.cashflow_id,
c.contract_number,
to_char(ccc.due_date,'yyyy-mm-dd') due_date,
c.contract_name,
c.bp_id_tenant,
(select bp_id from sys_user where bp_category = 'AGENT' and user_id = c.OWNER_USER_ID) bp_id_agent,
(SELECT bp_name FROM hls_bp_master h WHERE c.bp_id_tenant = h.bp_id) bp_tenant_name,
ccc.times,
ccc.cf_item,
(SELECT description
FROM hls_cashflow_item
WHERE cf_item = ccc.cf_item) cf_item_desc,
c.pay_method,
(ccc.due_amount-nvl(ccc.received_amount,0)) due_amount,
(ccc.due_amount-nvl(ccc.received_amount,0)) manual_amount
FROM con_contract c, con_contract_cashflow ccc
#WHERE_CLAUSE#
order by contract_id,times,cf_item desc
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="pay_method" queryExpression="(c.pay_method = ${@pay_method})"/>
<bm:query-field name="due_date_from" queryExpression="(ccc.due_date &gt;= to_date(${@due_date_from},'yyyy-mm-dd'))"/>
<bm:query-field name="due_date_to" queryExpression="(ccc.due_date &lt;= to_date(${@due_date_to},'yyyy-mm-dd'))"/>
<bm:query-field name="contract_id" queryExpression="(c.contract_id = ${@contract_id})"/>
<bm:query-field name="cf_item" queryExpression="(ccc.cf_item = ${@cf_item})"/>
<bm:query-field name="bp_id_tenant" queryExpression="(bp_id_tenant = ${@bp_id_tenant})"/>
<bm:query-field name="bp_id_agent" queryExpression="(bp_id_agent = ${@bp_id_agent})"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query"
expression="c.contract_id = ccc.contract_id and ccc.due_date &lt;= trunc(sysdate) and c.data_class = 'NORMAL' and ccc.write_off_flag != 'FULL' and c.contract_status in ('SIGN','INCEPT') and ccc.cf_status = 'RELEASE' and ccc.cf_direction = 'INFLOW' and c.pay_method is not null and ccc.cf_item in (1,9)"/>
<bm:data-filter name="query"
expression="not exists(select 1 from hls_ebank_batch_group g,hls_ebank_batch_ln l where g.status in ('NEW','DEAL') and g.group_id = l.group_id and l.cashflow_id = ccc.cashflow_id)"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="cont.CON500.con_contract" extendMode="reference" needAccessControl="false">
<ns1:fields>
<ns1:field name="contract_id" forInsert="true"/>
<ns1:field name="contract_number" displayWidth="218" forDisplay="true" forQuery="true" prompt="合同编号"/>
<ns1:field name="contract_name" displayWidth="218" forDisplay="true" forQuery="true" prompt="合同名称"/>
<ns1:field name="pay_method" forDisplay="false"/>
</ns1:fields>
<ns1:query-fields>
<ns1:query-field field="contract_number" queryOperator="like"/>
<ns1:query-field field="contract_name" queryOperator="like"/>
<ns1:query-field name="pay_method" queryExpression="(t1.pay_method = ${@pay_method})"/>
</ns1:query-fields>
<ns1:data-filters>
<ns1:data-filter name="query" enforceOperations="t1.due_date is not null"/>
</ns1:data-filters>
</ns1:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: hc
$Date: 2015-8-13 上午10:30:25
$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 fnd_interface_headers_s.nextval header_id from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -16,7 +16,8 @@
cba.bank_account_name,
cb.bank_short_name,
cbb.bank_branch_name,
cba.currency_code
cba.currency_code,
(select code_value_name from sys_code_values_v where code = 'CURRENCY' and code_value = cba.currency_code and CODE_VALUE_ENABLED_FLAG = 'Y') currency_name
FROM csh_bank cb, csh_bank_branch cbb, csh_bank_account cba
WHERE cb.bank_id = cbb.bank_id
AND cba.bank_branch_id = cbb.bank_branch_id
......@@ -34,7 +35,8 @@
<bm:field name="bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="银行账户"/>
<bm:field name="bank_short_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="银行"/>
<bm:field name="bank_branch_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="支行名"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="币种"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="false" prompt="币种"/>
<bm:field name="currency_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="币种"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="bank_account_name" queryExpression="t1.bank_account_name like &apos;%&apos; || ${@bank_account_name} || &apos;%&apos; "/>
......
......@@ -30,12 +30,15 @@
(select a.bank_account_num from csh_bank_account a where a.bank_account_id = t1.bank_account_id)bank_account_num,
(select a.bank_account_name from csh_bank_account a where a.bank_account_id = t1.bank_account_id)bank_account_name,
(select a.currency_code from csh_bank_account a where a.bank_account_id = t1.bank_account_id)currency,
(select code_value_name from sys_code_values_v scv,csh_bank_account ca where code = 'CURRENCY' and ca.bank_account_id = t1.BANK_ACCOUNT_ID
and ca.currency_code = scv.code_value) currency_name,
(select v.code_value_name from sys_code_values_v v where v.code ='CCB600_EBANK_STATUS' and v.code_value = t1.status)status_desc,
(select sum(g.real_amount) from hls_ebank_batch_group g where g.batch_id = t1.batch_id and g.status = 'SUCCESS')total_real_amount,
(select count(1) from hls_ebank_batch_group g where g.batch_id = t1.batch_id and g.status = 'SUCCESS')total_success_count,
(select code_value_name from SYS_CODE_VALUES_V where code = 'PAY_METHODS' and code_value = t1.pay_method) pay_method_desc,
(select u.description
from sys_user u
......@@ -45,14 +48,13 @@
order by t.batch_date desc,t.batch_id desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
hls_ebank_batch_pkg.create_ebank_batch(
hls_ebank_batch_pkg.create_ebank_batch_new(
p_bank_account_id =>${@bank_account_id},
p_merger_rules =>${@merger_rules},
p_payment_amount_from =>${@payment_amount_from},
p_payment_amount_to =>${@payment_amount_to},
p_pay_method =>${@pay_method},
p_due_date =>to_date(${@due_date},'yyyy-mm-dd'),
p_user_id =>${/session/@user_id},
p_batch_id =>${@batch_id});
......@@ -79,6 +81,7 @@
<bm:field name="due_date" databaseType="DATE" datatype="java.util.Date"/>
<bm:field name="bank_name"/>
<bm:field name="bank_code"/>
<bm:field name="currency_name"/>
<bm:field name="bank_branch_name"/>
<bm:field name="bank_account_id"/>
<bm:field name="bank_account_num"/>
......@@ -92,6 +95,8 @@
<bm:field name="message"/>
<bm:field name="total_real_amount"/>
<bm:field name="total_success_count"/>
<bm:field name="pay_method"/>
<bm:field name="pay_method_desc"/>
<bm:field name="created_by_n"/>
</bm:fields>
<bm:query-fields>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: leaf Generator
$Date: Wed Oct 09 11:00:38 CST 2019
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:e="leaf.service.exception"
xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" alias="t1"
baseTable="HLS_EBANK_BATCH_LN">
<bm:fields>
<bm:field name="ln_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LN_ID"
prompt="HLS_EBANK_BATCH_LN.LN_ID"/>
<bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID"
prompt="HLS_EBANK_BATCH_LN.HD_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID"
prompt="HLS_EBANK_BATCH_LN.BATCH_ID"/>
<bm:field name="group_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GROUP_ID"
prompt="HLS_EBANK_BATCH_LN.GROUP_ID"/>
<bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID"
prompt="HLS_EBANK_BATCH_LN.CASHFLOW_ID"/>
<bm:field name="amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AMOUNT"
prompt="HLS_EBANK_BATCH_LN.AMOUNT"/>
<bm:field name="manual_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MANUAL_AMOUNT"
prompt="HLS_EBANK_BATCH_LN.MANUAL_AMOUNT"/>
<bm:field name="write_off_flag" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="WRITE_OFF_FLAG" prompt="HLS_EBANK_BATCH_LN.WRITE_OFF_FLAG"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION"
prompt="HLS_EBANK_BATCH_LN.DESCRIPTION"/>
<bm:field name="contract_number" forInsert="false" forceUpdate="false" expression="(select contract_number from con_contract c,con_contract_cashflow cf where c.contract_id = cf.contract_id and cf.cashflow_id = t1.cashflow_id)"/>
<bm:field name="cf_item_desc" forInsert="false" forceUpdate="false" expression="(select description from hls_cashflow_item hi,con_contract_cashflow cc where hi.cf_item = cc.cf_item and cc.cashflow_id = t1.cashflow_id)"/>
<bm:field name="bp_tenant_name" forInsert="false" forceUpdate="false" expression="(select h.bp_name from hls_bp_master h,con_contract c,con_contract_cashflow cf where c.contract_id = cf.contract_id and cf.cashflow_id = t1.cashflow_id and c.bp_id_tenant = h.bp_id)"/>
<bm:field name="times" forceUpdate="false" forInsert="false" expression="(select times from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
<bm:field name="due_date" forceUpdate="false" forInsert="false" expression="(select to_char(due_date,'yyyy-mm-dd') from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
<bm:field name="due_amount" forceUpdate="false" forInsert="false" expression="(select due_amount - nvl(received_amount,0) from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="batch_id" queryExpression="t1.batch_id = ${@batch_id}"/>
</bm:query-fields>
<bm:primary-key>
<bm:pk-field name="ln_id"/>
</bm:primary-key>
<bm:features>
<f:standard-who xmlns:f="leaf.database.features"/>
<o:sequence-pk sequenceName="hls_ebank_batch_ln_s"/>
</bm:features>
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
hls_ebank_batch_pkg.insert_hls_ebank_batch_ln_new(p_ln_id => hls_ebank_batch_ln_s.nextval,
p_hd_id => '',
p_manual_amount => ${@manual_amount},
p_batch_id => ${../../@batch_id},
p_cashflow_id => ${@cashflow_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="p_ln_id" dataType="java.lang.Long" input="false" output="true"
outputPath="/parameter/@p_ln_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
hls_ebank_batch_pkg.contract_merge_by_rules(p_batch_id => ${@batch_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="p_ln_id" dataType="java.lang.Long" input="false" output="true"
outputPath="/parameter/@p_ln_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: leaf Generator
$Date: Thu Oct 10 13:51:22 CST 2019
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_EBANK_BATCH_GROUP">
<bm:fields>
<bm:field name="group_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GROUP_ID" prompt="HLS_EBANK_BATCH_GROUP.GROUP_ID"/>
<bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID" prompt="HLS_EBANK_BATCH_GROUP.HD_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="HLS_EBANK_BATCH_GROUP.BATCH_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="HLS_EBANK_BATCH_GROUP.CONTRACT_ID"/>
<bm:field name="apply_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPLY_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.APPLY_AMOUNT"/>
<bm:field name="actual_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ACTUAL_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.ACTUAL_AMOUNT"/>
<bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="HLS_EBANK_BATCH_GROUP.STATUS"/>
<bm:field name="real_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REAL_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.REAL_AMOUNT"/>
<bm:field name="res_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RES_CODE" prompt="HLS_EBANK_BATCH_GROUP.RES_CODE"/>
<bm:field name="res_msg" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RES_MSG" prompt="HLS_EBANK_BATCH_GROUP.RES_MSG"/>
<bm:field name="interface_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERFACE_ID" prompt="HLS_EBANK_BATCH_GROUP.INTERFACE_ID"/>
<bm:field name="receive_date" databaseType="DATE" datatype="java.util.Date" physicalName="RECEIVE_DATE" prompt="HLS_EBANK_BATCH_GROUP.RECEIVE_DATE"/>
<bm:field name="deal_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEAL_FLAG" prompt="HLS_EBANK_BATCH_GROUP.DEAL_FLAG"/>
<bm:field name="bank_account_num" expression="(select bank_branch_num from con_contract where contract_id = t1.contract_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="bank_account_name" expression="(select bank_account_name from con_contract where contract_id = t1.contract_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="sequence_num" expression="(rownum)" forInsert="false" forceUpdate="false"/>
<bm:field name="abc_sequence_num" expression="(lpad(ROWNUM,'4','0'))" forceUpdate="false" forInsert="false"/>
<bm:field name="csh_bank_account_num" expression="(select bank_account_num from csh_bank_account cba,hls_ebank_batch heb where cba.bank_account_id = heb.bank_account_id and heb.batch_id = t1.batch_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="csh_bank_account_name" expression="(select bank_account_name from csh_bank_account cba,hls_ebank_batch heb where cba.bank_account_id = heb.bank_account_id and heb.batch_id = t1.batch_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="abc_pay_type" expression="7" defaultValue="7"/>
<bm:field name="abc_transaction_type" expression="1" defaultValue="1"/>
<bm:field name="abc_usage" expression="'代收用途'" defaultValue="代收用途"/>
<bm:field name="abc_fen_code" expression="'01'" defaultValue="01"/>
<bm:field name="abc_curr_flag" expression="0" defaultValue="0"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="batch_id" queryExpression="t1.batch_id = ${@batch_id}"/>
</bm:query-fields>
<bm:features>
<f:standard-who xmlns:f="leaf.database.features"/>
</bm:features>
</bm:model>
\ No newline at end of file
......@@ -76,6 +76,7 @@
<bm:field name="auto_filt_prinicipal_interest" expression="&apos;Y&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PRINICIPAL_INTEREST"/>
<bm:field name="returned_flag_desc" forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="receipt_type"/>
<bm:field name="paid_byother_flag"/>
<bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/>
<bm:field name="ref_n01"/>
</bm:fields>
......
......@@ -5,90 +5,183 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_TRANSACTION">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1"
baseTable="CSH_TRANSACTION">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
update CSH_TRANSACTION
set ref_v05 = ${@ref_v05},
LAST_UPDATE_DATE = sysdate,
last_updated_by = ${/session/@user_id}
where transaction_id = ${@transaction_id}
]]></bm:update-sql>
update CSH_TRANSACTION
set ref_v05 = ${@ref_v05},
LAST_UPDATE_DATE = sysdate,
last_updated_by = ${/session/@user_id}
where transaction_id = ${@transaction_id}
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
<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"/>
<bm:field name="transaction_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_CATEGORY" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_CATEGORY"/>
<bm:field name="transaction_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="CSH511_TRANSACTION_TYPE" lookupField="transaction_type_desc" physicalName="TRANSACTION_TYPE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_TYPE"/>
<bm:field name="receivables_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="RECEIVABLES_TYPE" lookupField="receivables_type_desc" physicalName="RECEIVABLES_TYPE" prompt="收款类型"/>
<bm:field name="transaction_date" databaseType="DATE" datatype="java.util.Date" physicalName="TRANSACTION_DATE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_DATE"/>
<bm:field name="penalty_calc_date" databaseType="DATE" datatype="java.util.Date" physicalName="PENALTY_CALC_DATE" prompt="CSH511.CSH_TRANSACTION.PENALTY_CALC_DATE"/>
<bm:field name="bank_slip_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_SLIP_NUM" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CSH511.CSH_TRANSACTION.COMPANY_ID"/>
<bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="CSH511.CSH_TRANSACTION.INTERNAL_PERIOD_NUM"/>
<bm:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME" prompt="HLS.ACCOUNT_PERIOD_NAME"/>
<bm:field name="payment_method_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PAYMENT_METHOD_ID" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="distribution_set_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISTRIBUTION_SET_ID" prompt="CSH511.CSH_TRANSACTION.DISTRIBUTION_SET_ID"/>
<bm:field name="cashflow_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CASHFLOW_AMOUNT" prompt="CSH511.CSH_TRANSACTION.CASHFLOW_AMOUNT"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="HLS.CURRENCY"/>
<bm:field name="transaction_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TRANSACTION_AMOUNT" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT"/>
<bm:field name="exchange_rate_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="exchange_rate_quotation" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_QUOTATION" prompt="CSH511.CSH_TRANSACTION.EXCHANGE_RATE_QUOTATION"/>
<bm:field name="exchange_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EXCHANGE_RATE" prompt="HLS.EXCHANGE_RATE"/>
<bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID" prompt="CSH511.CSH_TRANSACTION.BANK_ACCOUNT_ID"/>
<bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="CSH511.CSH_TRANSACTION.BP_ID"/>
<bm:field name="bp_bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_BANK_ACCOUNT_ID" prompt="CSH511.CSH_TRANSACTION.BP_BANK_ACCOUNT_ID"/>
<bm:field name="bp_bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_BANK_ACCOUNT_NUM" prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.NOTE"/>
<bm:field name="handling_charge" databaseType="NUMBER" datatype="java.lang.Double" physicalName="HANDLING_CHARGE" prompt="CSH511.CSH_TRANSACTION.HANDLING_CHARGE"/>
<bm:field name="posted_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSTED_FLAG" prompt="CSH511.CSH_TRANSACTION.POSTED_FLAG"/>
<bm:field name="reversed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REVERSED_FLAG" prompt="CSH511.CSH_TRANSACTION.REVERSED_FLAG"/>
<bm:field name="reversed_date" databaseType="DATE" datatype="java.util.Date" physicalName="REVERSED_DATE" prompt="CSH511.CSH_TRANSACTION.REVERSED_DATE"/>
<bm:field name="returned_flag" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="CSH510_RETURN_SELECT" lookupField="returned_flag_desc" physicalName="RETURNED_FLAG" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="returned_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RETURNED_AMOUNT" prompt="CSH511.CSH_TRANSACTION.RETURNED_AMOUNT"/>
<bm:field name="write_off_flag" lookupCode="CON_WRITE_OFF_FLAG" lookupField="write_off_flag_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WRITE_OFF_FLAG" prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_FLAG"/>
<bm:field name="write_off_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="WRITE_OFF_AMOUNT" prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_AMOUNT"/>
<bm:field name="full_write_off_date" databaseType="DATE" datatype="java.util.Date" physicalName="FULL_WRITE_OFF_DATE" prompt="CSH511.CSH_TRANSACTION.FULL_WRITE_OFF_DATE"/>
<bm:field name="twin_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TWIN_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.TWIN_CSH_TRX_ID"/>
<bm:field name="return_from_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RETURN_FROM_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.RETURN_FROM_CSH_TRX_ID"/>
<bm:field name="reversed_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REVERSED_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.REVERSED_CSH_TRX_ID"/>
<bm:field name="source_csh_trx_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_CSH_TRX_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_TYPE"/>
<bm:field name="source_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_ID"/>
<bm:field name="source_doc_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_DOC_CATEGORY"/>
<bm:field name="source_doc_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_DOC_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_TYPE"/>
<bm:field name="source_doc_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_DOC_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_ID"/>
<bm:field name="source_doc_line_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_DOC_LINE_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_LINE_ID"/>
<bm:field name="create_je_mothed" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_MOTHED"/>
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG"/>
<bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLD_INTERFACE_FLAG" prompt="CSH511.CSH_TRANSACTION.GLD_INTERFACE_FLAG"/>
<bm:field name="bp_code" expression="(select d.bp_code from hls_bp_master d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" expression="(select d.bp_name from hls_bp_master d where d.bp_id=t1.bp_id)" forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="payment_method_display" expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)" forInsert="false" forUpdate="false" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="currency_name" expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)" forInsert="false" forUpdate="false" prompt="HLS.CURRENCY"/>
<bm:field name="bp_category_display" expression="(select b.description from hls_bp_category b where b.bp_category=t1.bp_category)" forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:field name="exchange_rate_type_display" expression="(select tv.type_name from gld_exchangerate_types_vl tv where tv.type_code=t1.exchange_rate_type)" forInsert="false" forUpdate="false" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="transaction_functional_amount" expression="gld_exchange_rate_pkg.get_currency_exchange(t1.transaction_amount,t1.exchange_rate,t1.exchange_rate_quotation)" forInsert="false" forUpdate="false" prompt="HLS.FUNCTIONAL_AMOUNT"/>
<bm:field name="bank_account_code" expression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_CODE"/>
<bm:field name="bank_account_name" expression="(select a.bank_account_name from csh_bank_account a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NAME"/>
<bm:field name="bank_account_num" expression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:field name="bp_bank_account_code" expression="(select a.bank_account_code from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BP_BANK_ACCOUNT_CODE"/>
<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"/>
<bm:field name="transaction_category" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="TRANSACTION_CATEGORY" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_CATEGORY"/>
<bm:field name="transaction_type" databaseType="VARCHAR2" datatype="java.lang.String"
lookupCode="CSH511_TRANSACTION_TYPE" lookupField="transaction_type_desc"
physicalName="TRANSACTION_TYPE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_TYPE"/>
<bm:field name="receivables_type" databaseType="VARCHAR2" datatype="java.lang.String"
lookupCode="RECEIVABLES_TYPE" lookupField="receivables_type_desc" physicalName="RECEIVABLES_TYPE"
prompt="收款类型"/>
<bm:field name="transaction_date" databaseType="DATE" datatype="java.util.Date" physicalName="TRANSACTION_DATE"
prompt="CSH511.CSH_TRANSACTION.TRANSACTION_DATE"/>
<bm:field name="penalty_calc_date" databaseType="DATE" datatype="java.util.Date"
physicalName="PENALTY_CALC_DATE" prompt="CSH511.CSH_TRANSACTION.PENALTY_CALC_DATE"/>
<bm:field name="bank_slip_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_SLIP_NUM"
prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"
prompt="CSH511.CSH_TRANSACTION.COMPANY_ID"/>
<bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="INTERNAL_PERIOD_NUM" prompt="CSH511.CSH_TRANSACTION.INTERNAL_PERIOD_NUM"/>
<bm:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME"
prompt="HLS.ACCOUNT_PERIOD_NAME"/>
<bm:field name="payment_method_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="PAYMENT_METHOD_ID" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="distribution_set_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="DISTRIBUTION_SET_ID" prompt="CSH511.CSH_TRANSACTION.DISTRIBUTION_SET_ID"/>
<bm:field name="cashflow_amount" databaseType="NUMBER" datatype="java.lang.Double"
physicalName="CASHFLOW_AMOUNT" prompt="CSH511.CSH_TRANSACTION.CASHFLOW_AMOUNT"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE"
prompt="HLS.CURRENCY"/>
<bm:field name="transaction_amount" databaseType="NUMBER" datatype="java.lang.Double"
physicalName="TRANSACTION_AMOUNT" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT"/>
<bm:field name="exchange_rate_type" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="EXCHANGE_RATE_TYPE" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="exchange_rate_quotation" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="EXCHANGE_RATE_QUOTATION" prompt="CSH511.CSH_TRANSACTION.EXCHANGE_RATE_QUOTATION"/>
<bm:field name="exchange_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EXCHANGE_RATE"
prompt="HLS.EXCHANGE_RATE"/>
<bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID"
prompt="CSH511.CSH_TRANSACTION.BANK_ACCOUNT_ID"/>
<bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY"
prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID"
prompt="CSH511.CSH_TRANSACTION.BP_ID"/>
<bm:field name="bp_bank_account_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="BP_BANK_ACCOUNT_ID" prompt="CSH511.CSH_TRANSACTION.BP_BANK_ACCOUNT_ID"/>
<bm:field name="bp_bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="BP_BANK_ACCOUNT_NUM" prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION"
prompt="HLS.NOTE"/>
<bm:field name="handling_charge" databaseType="NUMBER" datatype="java.lang.Double"
physicalName="HANDLING_CHARGE" prompt="CSH511.CSH_TRANSACTION.HANDLING_CHARGE"/>
<bm:field name="posted_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSTED_FLAG"
prompt="CSH511.CSH_TRANSACTION.POSTED_FLAG"/>
<bm:field name="reversed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REVERSED_FLAG"
prompt="CSH511.CSH_TRANSACTION.REVERSED_FLAG"/>
<bm:field name="reversed_date" databaseType="DATE" datatype="java.util.Date" physicalName="REVERSED_DATE"
prompt="CSH511.CSH_TRANSACTION.REVERSED_DATE"/>
<bm:field name="returned_flag" databaseType="VARCHAR2" datatype="java.lang.String"
lookupCode="CSH510_RETURN_SELECT" lookupField="returned_flag_desc" physicalName="RETURNED_FLAG"
prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="returned_amount" databaseType="NUMBER" datatype="java.lang.Double"
physicalName="RETURNED_AMOUNT" prompt="CSH511.CSH_TRANSACTION.RETURNED_AMOUNT"/>
<bm:field name="write_off_flag" lookupCode="CON_WRITE_OFF_FLAG" lookupField="write_off_flag_desc"
databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WRITE_OFF_FLAG"
prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_FLAG"/>
<bm:field name="write_off_amount" databaseType="NUMBER" datatype="java.lang.Double"
physicalName="WRITE_OFF_AMOUNT" prompt="CSH511.CSH_TRANSACTION.WRITE_OFF_AMOUNT"/>
<bm:field name="full_write_off_date" databaseType="DATE" datatype="java.util.Date"
physicalName="FULL_WRITE_OFF_DATE" prompt="CSH511.CSH_TRANSACTION.FULL_WRITE_OFF_DATE"/>
<bm:field name="twin_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TWIN_CSH_TRX_ID"
prompt="CSH511.CSH_TRANSACTION.TWIN_CSH_TRX_ID"/>
<bm:field name="return_from_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="RETURN_FROM_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.RETURN_FROM_CSH_TRX_ID"/>
<bm:field name="reversed_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="REVERSED_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.REVERSED_CSH_TRX_ID"/>
<bm:field name="source_csh_trx_type" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="SOURCE_CSH_TRX_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_TYPE"/>
<bm:field name="source_csh_trx_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="SOURCE_CSH_TRX_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_CSH_TRX_ID"/>
<bm:field name="source_doc_category" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="SOURCE_DOC_CATEGORY"/>
<bm:field name="source_doc_type" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="SOURCE_DOC_TYPE" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_TYPE"/>
<bm:field name="source_doc_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_DOC_ID"
prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_ID"/>
<bm:field name="source_doc_line_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="SOURCE_DOC_LINE_ID" prompt="CSH511.CSH_TRANSACTION.SOURCE_DOC_LINE_ID"/>
<bm:field name="create_je_mothed" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="CREATE_JE_MOTHED"/>
<bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="CREATE_JE_FLAG"/>
<bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="GLD_INTERFACE_FLAG" prompt="CSH511.CSH_TRANSACTION.GLD_INTERFACE_FLAG"/>
<bm:field name="bp_code" expression="(select d.bp_code from hls_bp_master d where d.bp_id=t1.bp_id)"
forInsert="false" forUpdate="false" prompt="HLS.BP_CODE"/>
<bm:field name="bp_name" expression="(select d.bp_name from hls_bp_master d where d.bp_id=t1.bp_id)"
forInsert="false" forUpdate="false" prompt="HLS.BP_NAME"/>
<bm:field name="payment_method_display"
expression="(select cp.description from csh_payment_method cp where cp.payment_method_id=t1.payment_method_id)"
forInsert="false" forUpdate="false" prompt="HLS.PAYMENT_METHOD"/>
<bm:field name="currency_name"
expression="(select gc.currency_name from gld_currency_vl gc where gc.currency_code=t1.currency_code)"
forInsert="false" forUpdate="false" prompt="HLS.CURRENCY"/>
<bm:field name="bp_category_display"
expression="(select b.description from hls_bp_category b where b.bp_category=t1.bp_category)"
forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.BP_CATEGORY"/>
<bm:field name="exchange_rate_type_display"
expression="(select tv.type_name from gld_exchangerate_types_vl tv where tv.type_code=t1.exchange_rate_type)"
forInsert="false" forUpdate="false" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
<bm:field name="transaction_functional_amount"
expression="gld_exchange_rate_pkg.get_currency_exchange(t1.transaction_amount,t1.exchange_rate,t1.exchange_rate_quotation)"
forInsert="false" forUpdate="false" prompt="HLS.FUNCTIONAL_AMOUNT"/>
<bm:field name="bank_account_code"
expression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"
forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_CODE"/>
<bm:field name="bank_account_name"
expression="(select a.bank_account_name from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"
forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NAME"/>
<bm:field name="bank_account_num"
expression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id)"
forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NUM"/>
<bm:field name="bp_bank_account_code"
expression="(select a.bank_account_code from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)"
forInsert="false" forUpdate="false" prompt="CSH511.BP_BANK_ACCOUNT_CODE"/>
<bm:field name="bp_bank_account_name" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NAME"/>
<bm:field name="functional_currency_code" expression="(select gb.functional_currency_code from fnd_companies fc, gld_set_of_books gb where fc.company_id = ${/session/@company_id} and fc.set_of_books_id = gb.set_of_books_id)" forInsert="false" forUpdate="false"/>
<bm:field name="rate_method_code" expression="(select t.rate_method_code from gld_exchangerate_types t where t.type_code=t1.exchange_rate_type)" forInsert="false" forUpdate="false"/>
<bm:field name="zero_amounts_allowed" expression="(select d.zero_amounts_allowed from csh_bank_account_v d where d.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false"/>
<bm:field name="functional_currency_code"
expression="(select gb.functional_currency_code from fnd_companies fc, gld_set_of_books gb where fc.company_id = ${/session/@company_id} and fc.set_of_books_id = gb.set_of_books_id)"
forInsert="false" forUpdate="false"/>
<bm:field name="rate_method_code"
expression="(select t.rate_method_code from gld_exchangerate_types t where t.type_code=t1.exchange_rate_type)"
forInsert="false" forUpdate="false"/>
<bm:field name="zero_amounts_allowed"
expression="(select d.zero_amounts_allowed from csh_bank_account_v d where d.bank_account_id=t1.bank_account_id)"
forInsert="false" forUpdate="false"/>
<bm:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE"/>
<bm:field name="receivables_type_desc" expression="decode(t1.receivables_type,null,&apos;其他&apos;,t1.receivables_type)" forInsert="false" forUpdate="false" prompt="收款类型"/>
<bm:field name="unwrite_off_amount" datatype="java.lang.Double" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)-(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="HLS.UNWRITEOFF_AMOUNT"/>
<bm:field name="precision" expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)" forInsert="false" forUpdate="false"/>
<bm:field name="reverse_amount" expression="(-1*t1.transaction_amount)" forInsert="false" forUpdate="false" prompt="CSH511.REVERSE_AMOUNT"/>
<bm:field name="user_desc" expression="(select su.description from sys_user su where su.user_id=t1.created_by)" forInsert="false" forUpdate="false"/>
<bm:field name="auto_filt_penalty" expression="&apos;N&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PENALTY"/>
<bm:field name="auto_filt_prinicipal_interest" expression="&apos;Y&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PRINICIPAL_INTEREST"/>
<bm:field name="returned_flag_desc" forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="unallocate_amount" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)-nvl((select sum(i.write_off_amount) from csh_write_off_interface i where i.trx_interface_id = t1.transaction_id and i.record_type is not null),0))"
<bm:field name="receivables_type_desc"
expression="decode(t1.receivables_type,null,&apos;其他&apos;,t1.receivables_type)" forInsert="false"
forUpdate="false" prompt="收款类型"/>
<bm:field name="unwrite_off_amount" datatype="java.lang.Double"
expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)-(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="HLS.UNWRITEOFF_AMOUNT"/>
<bm:field name="returning_amount" databasetype="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" forceUpdate="false"/>
<bm:field name="precision"
expression="(select g.precision from gld_currency g where g.currency_code =t1.currency_code)"
forInsert="false" forUpdate="false"/>
<bm:field name="reverse_amount" expression="(-1*t1.transaction_amount)" forInsert="false" forUpdate="false"
prompt="CSH511.REVERSE_AMOUNT"/>
<bm:field name="user_desc" expression="(select su.description from sys_user su where su.user_id=t1.created_by)"
forInsert="false" forUpdate="false"/>
<bm:field name="auto_filt_penalty" expression="&apos;N&apos;" forInsert="false" forUpdate="false"
prompt="CSH513.AUTO_FILT_PENALTY"/>
<bm:field name="auto_filt_prinicipal_interest" expression="&apos;Y&apos;" forInsert="false" forUpdate="false"
prompt="CSH513.AUTO_FILT_PRINICIPAL_INTEREST"/>
<bm:field name="returned_flag_desc" forInsert="false" forUpdate="false"
prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="unallocate_amount"
expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)-nvl((select sum(i.write_off_amount) from csh_write_off_interface i where i.trx_interface_id = t1.transaction_id and i.record_type is not null),0))"
forInsert="false" forUpdate="false"/>
<bm:field name="status" expression="nvl(t1.status,&apos;NEW&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="ref_contract_id"/>
......@@ -96,19 +189,33 @@ where transaction_id = ${@transaction_id}
<bm:field name="ref_v01"/>
<bm:field name="ref_v05"/>
<bm:field name="purpose"/>
<bm:field name="paid_byother_flag_n" expression="(select code_value_name from sys_code_values_v where code = 'PAID_BYOTHER_FLAG' and code_value = t1.paid_byother_flag)"/>
<bm:field name="contract_number" expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="opposite_band_na"/>
<bm:field name="bank_branch_name"
expression="(select a.bank_branch_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)"
forInsert="false" forUpdate="false" prompt="CSH511.BANK_BRANCH_NAME"/>
<bm:field name="paid_byother_flag_n"
expression="(select code_value_name from sys_code_values_v where code = 'PAID_BYOTHER_FLAG' and code_value = t1.paid_byother_flag)"/>
<bm:field name="contract_number"
expression="(select cc.contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<!--add by chenlingfeng-->
<bm:field name="write_off_flag_desc" forInsert="false" forUpdate="false"/>
<bm:field name="review_status" lookupCode="DS_CSH_REVIEW_STATUS" lookupField="review_status_desc" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="review_status" lookupCode="DS_CSH_REVIEW_STATUS" lookupField="review_status_desc"
databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="review_status_desc" forInsert="false" forUpdate="false"/>
<bm:field name="collection_classes"/>
<bm:field name="collection_classes_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_COLLECTION_CLASSES' and v.code_value =t1.collection_classes)" forInsert="false" forUpdate="false"/>
<bm:field name="collection_classes_desc"
expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_COLLECTION_CLASSES' and v.code_value =t1.collection_classes)"
forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type"/>
<bm:field name="paid_byother_flag"/>
<bm:field name="exists_advance_flag" forceUpdate="false" forInsert="false" expression="nvl((select 'Y' from dual where exists(SELECT 1 FROM csh_transaction t WHERE t.source_csh_trx_id = t1.transaction_id AND transaction_type = 'ADVANCE_RECEIPT' AND confirmed_flag != 'CANCELLED')),'N')"/>
<bm:field name="exists_deposit_flag" forceUpdate="false" forInsert="false" expression="nvl((select 'Y' from dual where exists(SELECT 1 FROM csh_transaction t WHERE t.source_csh_trx_id = t1.transaction_id AND transaction_type = 'DEPOSIT' AND confirmed_flag != 'CANCELLED')),'N')"/>
<!--end-->
<!--add by lisitong-->
<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="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="审批中退款金额"/>
<!--end-->
</bm:fields>
<bm:features>
......@@ -118,6 +225,7 @@ where transaction_id = ${@transaction_id}
<bm:pk-field name="transaction_id"/>
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.transaction_id=${@transaction_id} and t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query"
expression="(t1.transaction_id=${@transaction_id} and t1.company_id=${/session/@company_id})"/>
</bm:data-filters>
</bm:model>
......@@ -96,7 +96,7 @@
t1.WRITE_OFF_DUE_AMOUNT write_off_amount,
t1.WRITE_OFF_PRINCIPAL,
t1.WRITE_OFF_INTEREST,
(select bp_name from hls_bp_master where bp_id = t1.bp_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
#WHERE_CLAUSE#
]]></bm:query-sql>
......
......@@ -113,7 +113,7 @@ end;
<bm:field name="agent_id_desc" expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)" forUpdate="false" forInsert="false"/>
<bm:field name="write_off_classification" lookupField="write_off_classification_desc" lookupCode="DS_CSH_WRITE_OFF_CLASSIFICATION" databaseType="VARCHAR2" datatype="java.lang.String" />
<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 where bp_id = t1.write_off_bp_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:fields>
<bm:features>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-query model="ccb.CCB600.get_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator=","
status_field="/parameter/@ImportSuccess" template_code="ABC_MANUAL_IMPORT"
user_id="${/session/@user_id}"/>
<!-- <a:model-query-->
<!-- defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;ABC_MANUAL_IMPORT&apos;"-->
<!-- model="ccb.CCB503.ccb503_import_get_status" rootPath="status"/>-->
</a:init-procedure>
<a:view>
<a:link id="import_interface_write_off_link" model="ccb.CCB600.abc_import_ln" modelaction="update"/>
<script type="text/javascript"><![CDATA[
function backBtn() {
history.go(-1);
}
var import_flag = 0;
function import_confirm() {
$('import_confirm_id').disable();
var ds = $('abc_import_grid_ds');
record = ds.getAll();
if (import_flag == 0) {
for (i = 0;i < record.length;i++) {
if (record[i].get('status') == 'ERROR') {
Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!');
return;
}
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('import_interface_write_off_link').getUrl(),
para: {
header_number:'${/parameter/@header_number}',
header_id: '${/model/header/record/@header_id}',
batch_id: '${/parameter/@batch_id}'
},
scope: this,
success: function() {
import_flag = import_flag + 1;
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
},
error: function(){
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
}
});
} else {
Leaf.showMessage('${l:PROMPT}', '已导入的数据不能重复导入!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="abc_import_grid_ds" autoPageSize="true" autoQuery="true" model="ccb.CCB600.abc_import_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.abc_import_ln/query?header_id=${/model/header/record/@header_id}" selectable="true"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="backBtn" text="HLS.EXIT"/>
<a:gridButton id="import_confirm_id" click="import_confirm" text="确认导入"/>
</a:screenTopToolbar>
<a:grid bindTarget="abc_import_grid_ds" marginHeight="230" marginWidth="50" navBar="true">
<a:columns>
<a:column name="attribute_1" prompt="交易日期" renderer="Leaf.formatDate" />
<a:column name="attribute_2" prompt="记账日期" renderer="Leaf.formatDate" />
<a:column name="attribute_3" prompt="收款账号" />
<a:column name="attribute_4" prompt="批号" />
<a:column name="attribute_5" prompt="批量扣款账号" />
<a:column name="attribute_6" prompt="经销商代号" />
<a:column name="attribute_7" prompt="经销商名" />
<a:column name="attribute_8" prompt="户名" />
<a:column name="attribute_9" prompt="批量扣款金额" renderer="Leaf.formatMoney" />
<a:column name="attribute_10" prompt="输入员姓名" />
<a:column name="attribute_11" prompt="审核员姓名" />
<a:column name="attribute_12" prompt="路线结帐中心" />
<a:column name="attribute_13" prompt="备注" />
<a:column name="attribute_14" prompt="状态" />
<a:column name="attribute_15" prompt="错误描述" />
<a:column name="attribute_16" prompt="实际扣款金额" renderer="Leaf.formatMoney" />
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:view>
<script type="text/javascript"><![CDATA[
function saveClick() {
if (document.getElementById('general_importFile').value) {
var fileName = document.getElementById('general_importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf("."));
if (fileType != '.xls' && fileType != '.xlsx' && fileType != '.csv') {
Leaf.showInfoMessage("提示",'请选择正确的导入文件!');
} else {
if ('${/parameter/@bank_type}' == 'ABC') {
$jq('#general_importForm').attr('action',
'${/request/@context_path}/modules/ccb/CCB600/abc_upload.lview?batch_id=${/parameter/@batch_id}&user_id=${/session/@user_id}&_csrf=${/session/@_csrf.token}');
} else if ('${/parameter/@bank_type}' == 'CCB') {
$jq('#general_importForm').attr('action',
'${/request/@context_path}/modules/ccb/CCB600/ccb_upload.lview?batch_id=${/parameter/@batch_id}&user_id=${/session/@user_id}&_csrf=${/session/@_csrf.token}');
}
document.getElementById('general_importForm').submit();
}
}
}
]]></script>
<a:dataSets>
<a:dataSet id="hcl032_label_ds" autoCreate="true">
<a:fields>
<a:field name="label2" defaultValue="1、请严格按照导入模板整理数据,检查必输项是否缺失。"/>
<a:field name="label3" defaultValue="2、目前仅支持 MS Excel。"/>
<a:field name="label4" defaultValue="3、执行导入前,请先关闭Excel文件。"/>
<a:field name="label6" defaultValue="4、导入完毕后,请在系统中核对数据。"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="注意事项" width="400">
<!--<a:label name="label1" bindTarget="label_ds" width="380"/>-->
<a:label name="label2" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label3" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label4" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label6" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
<form name="upload" id="general_importForm"
action="abc_upload.lview?batch_id=${/parameter/@batch_id}&amp;user_id=${/session/@user_id}&amp;_csrf=${/session/@_csrf.token}"
enctype="multipart/form-data" method="post">
<input name="CONTENT" id="general_importFile" style="margin-bottom:4px;width:250px;height:22px;"
type="file"/>
<input onclick="saveClick()" style="margin-left:10px;margin-top:10px;width:60px;" type="button"
value="导入"/>
</form>
</a:fieldSet>
</a:view>
</a:screen>
<?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>
<p:switch test="parameter/@_status">
<p:case value="insert">
<a:model-insert model="ccb.CCB600.hls_ebank_batch"/>
</p:case>
</p:switch>
<a:batch-apply sourcepath="/parameter/details">
<p:switch test="@current_parameter/@_status">
<p:case value="insert">
<a:model-insert model="ccb.CCB600.hls_ebank_batch_ln"/>
</p:case>
</p:switch>
</a:batch-apply>
<a:model-execute model="ccb.CCB600.hls_ebank_batch_ln"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
\ No newline at end of file
......@@ -12,31 +12,51 @@
</a:init-procedure>
<a:view>
<a:link id="hls_ebank_create_link" model="ccb.CCB600.hls_ebank_batch" modelaction="execute"/>
<a:link id="hls_ebank_create_lsc_link" url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_create.lsc" modelaction="insert"/>
<a:link id="ebank_detail_link" url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_detail.lview"/>
<script type="text/javascript"><![CDATA[
function create_batch() {
var ds = $('hls_ccb_form_create_ds');
if (ds.validate()) {
var ln_ds = $('hls_ccb_grid_ln_ds');
if(ln_ds.getAll().length == 0){
Leaf.showInfoMessage("提示","请先查询需要扣款的合同");
return;
}
if (ds.validate() && ln_ds.validate()) {
var record = $('hls_ccb_form_create_ds').getAt(0);
var params = {};
params._status = 'insert';
params.bank_account_id = record.get('bank_account_id');
params.merger_rules = record.get('merger_rules');
params.pay_method = record.get('pay_method');
params.due_date = record.get('due_date');
//处理行
var details = [];
var ln_r = ln_ds.getAll();
for(var i=0;i<ln_r.length;i++){
var r = ln_r[i].data;
r._status = 'insert';
details.push(r);
}
params.details = details;
Leaf.Masker.mask(Ext.getBody(), '生成中...'); //锁屏
Leaf.request({
url: $('hls_ebank_create_link').getUrl(),
para: {
bank_account_id: record.get('bank_account_id'),
merger_rules: record.get('merger_rules'),
payment_amount_from: record.get('payment_amount_from'),
payment_amount_to: record.get('payment_amount_to'),
due_date: record.get('due_date')
},
url: $('hls_ebank_create_lsc_link').getUrl(),
para: params,
success: function (res) {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody()); //解锁
$('hls_ccb_grid_create_ds').setQueryParameter('batch_id', res.result.batch_id);
$('hls_ccb_grid_create_ds').query();
$('create_ebank_link_winId').close();
// $('hls_ccb_grid_create_ds').setQueryParameter('batch_id', res.result.batch_id);
// $('hls_ccb_grid_create_ds').query();
},
failure: function () {
},
......@@ -74,8 +94,100 @@
height: 680
});
}
function ccb_form_update_fun(ds,record,name,value,oldvalue){
if(name == "pay_method"){
if(value){
$('hls_ccb_form_query_ds').getField('contract_number').setLovPara("pay_method",value);
$('hls_ccb_grid_ln_ds').setQueryParameter("pay_method",value);
}
}
}
function hls_ccb_grid_ln_query(){
$('hls_ccb_grid_ln_ds').query();
}
function colum_caculateTotal(data, name) {
var total = 0;
var length = data.length;
var value = 0;
for (var i = 0;i < length;i++) {
if (Ext.isEmpty(data[i].get(name))) {
value = 0;
} else {
value = data[i].get(name);
}
total = plus(total, value);
}
return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
}
function sumAmount(record,name){
if(name == 'cf_item_desc'){
return '<font color=red>合计:</font>';
}
if(name == 'due_amount' || name == 'manual_amount'){
return '<font color=red>' + colum_caculateTotal(record,name) + '</font>';
}
}
function check_manual_amount(record, name, value){
if(value > record.get('due_amount')){
Leaf.showInfoMessage("提示","扣款金额不能大于应付金额");
return false;
}
return true;
}
]]></script>
<a:dataSets>
<a:dataSet id="pay_methods_ds">
<a:datas>
<a:record code_value="AGRI_THREE" code_value_name="农行扣款(三方)"/>
<a:record code_value="CCB_THREE" code_value_name="建行扣款(三方)"/>
<a:record code_value="AGRI_TWO" code_value_name="农行扣款(两方)"/>
</a:datas>
</a:dataSet>
<a:dataSet id="hls_ccb_form_query_ds">
<a:fields>
<a:field name="due_date_from" />
<a:field name="due_date_to" />
<a:field name="bp_agent_name" lovGridHeight="350" lovHeight="550" lovLabelWidth="50" lovWidth="550"
autoComplete="true" autoCompleteField="bp_agent_name"
lovService="basic.hls_bp_master_v_for_lov?bp_category=AGENT"
title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_agent"/>
<a:map from="bp_name" to="bp_agent_name"/>
</a:mapping>
</a:field>
<a:field name="bp_tenant_name" lovGridHeight="350" lovHeight="550" lovLabelWidth="50" lovWidth="550"
autoComplete="true" autoCompleteField="bp_agent_name"
lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT"
title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_tenant"/>
<a:map from="bp_name" to="bp_tenant_name"/>
</a:mapping>
</a:field>
<a:field name="bp_id_agent" />
<a:field name="bp_id_tenant"/>
<a:field name="contract_number" lovGridHeight="350" lovHeight="500" lovService="ccb.CCB600.con_contract_lov" lovWidth="470" title="合同">
<a:mapping>
<a:map from="contract_id" to="contract_id"/>
<a:map from="contract_number" to="contract_number"/>
</a:mapping>
</a:field>
<a:field name="contract_id"/>
<a:field name="cf_item_desc" lovGridHeight="300" lovHeight="500" lovService="hls.HLS005.hls_cashflow_item_v_lov" lovWidth="850" title="HLS005.HLS_CASHFLOW_ITEM.CF_ITEM">
<a:mapping>
<a:map from="cf_item" to="cf_item"/>
<a:map from="cf_item_desc" to="cf_item_desc"/>
</a:mapping>
</a:field>
<a:field name="cf_item"/>
</a:fields>
</a:dataSet>
<a:dataSet id="hls_ccb_form_create_ds" autoCreate="true">
<a:fields>
<a:field name="bank_account_num" autoComplete="true" lovGridHeight="350" lovHeight="550"
......@@ -87,16 +199,22 @@
<a:map from="bank_short_name" to="bank_name"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="currency_code" to="currency"/>
<a:map from="currency_name" to="currency_name"/>
</a:mapping>
</a:field>
<a:field name="currency_name" readOnly="true"/>
<a:field name="pay_method_desc" required="true" prompt="支付方式" displayField="code_value_name" options="pay_methods_ds" returnField="pay_method" valueField="code_value"/>
<a:field name="pay_method"/>
<a:field name="bank_account_name" readOnly="true"/>
<a:field name="bank_name" readOnly="true"/>
<a:field name="currency" readOnly="true"/>
<a:field name="due_date" datatype="date" defaultValue="${/model/create_date_path/record/@now_date}" required="true" prompt="应收日期"/>
<!--<a:field name="merger_rules" defaultValue="NONE"/>-->
<a:field name="merger_rules" defaultValue="CONTRACT"/>
<a:field name="merger_rules" defaultValue="NONE"/>
<!-- <a:field name="merger_rules" defaultValue="CONTRACT"/>-->
</a:fields>
<a:events>
<a:event name="update" handler="ccb_form_update_fun"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_ccb_grid_create_ds" model="ccb.CCB600.hls_ebank_batch_hd" pageSize="15"
......@@ -104,39 +222,77 @@
selectable="true">
</a:dataSet>
<a:dataSet id="hls_ccb_grid_ln_ds" fetchAll="true" queryDataSet="hls_ccb_form_query_ds" model="ccb.CCB600.hls_ebank_batch_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.con_contract_cashflow_query/query">
<a:fields>
<a:field name="cashflow_id"/>
<a:field name="bp_tenant_name" readOnly="true"/>
<a:field name="contract_id"/>
<a:field name="contract_number" readOnly="true"/>
<a:field name="times" readOnly="true"/>
<a:field name="cf_item" readOnly="true"/>
<a:field name="due_amount" readOnly="true"/>
<a:field name="manual_amount" required="true" prompt="扣款金额" validator="check_manual_amount"/>
<a:field name="description"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar height="29">
<a:gridButton click="hls_ccb_grid_ln_query" text="查询"/>
<a:gridButton click="create_batch" text="指令生成"/>
<a:gridButton click="reset_batch" text="重置"/>
<a:gridButton click="return_batch" text="返回"/>
</a:screenTopToolbar>
<a:fieldSet title="本方账户" column="2">
<a:fieldSet title="本方账户" column="3">
<a:lov name="bank_account_num" bindTarget="hls_ccb_form_create_ds" prompt="银行账户"/>
<a:textField name="bank_account_name" bindTarget="hls_ccb_form_create_ds" prompt="账户名"/>
<a:textField name="bank_name" bindTarget="hls_ccb_form_create_ds" prompt="银行"/>
<a:textField name="currency" bindTarget="hls_ccb_form_create_ds" prompt="币种"/>
<a:comboBox name="pay_method_desc" bindTarget="hls_ccb_form_create_ds" prompt="支付方式"/>
<a:textField name="currency_name" bindTarget="hls_ccb_form_create_ds" prompt="币种"/>
</a:fieldSet>
<a:fieldSet title="合并规则" column="2">
<a:radio name="merger_rules" bindTarget="hls_ccb_form_create_ds" layout="horizontal" width="600">
<a:items>
<!--<a:item label="不合并" value="NONE"/>-->
<a:item label="按合同" value="CONTRACT"/>
<a:item label="按期数" value="TIMES"/>
<a:item label="不合并" value="NONE"/>
</a:items>
</a:radio>
</a:fieldSet>
<a:fieldSet title="筛选条件" column="2">
<a:numberField name="payment_amount_from" bindTarget="hls_ccb_form_create_ds" prompt="付款金额从"/>
<a:numberField name="payment_amount_to" bindTarget="hls_ccb_form_create_ds" prompt="付款金额到"/>
<a:fieldSet title="查询条件" column="3">
<a:datePicker name="due_date_from" bindTarget="hls_ccb_form_query_ds" prompt="付款日期从"/>
<a:datePicker name="due_date_to" bindTarget="hls_ccb_form_query_ds" prompt="付款日期到"/>
<a:lov name="bp_agent_name" bindTarget="hls_ccb_form_query_ds" prompt="代理店"/>
<a:lov name="bp_tenant_name" bindTarget="hls_ccb_form_query_ds" prompt="客户名称"/>
<a:lov name="contract_number" bindTarget="hls_ccb_form_query_ds" prompt="合同号"/>
<a:lov name="cf_item_desc" bindTarget="hls_ccb_form_query_ds" prompt="现金流类型"/>
<!-- <a:numberField name="payment_amount_from" bindTarget="hls_ccb_form_create_ds" prompt="付款金额从"/>-->
<!-- <a:numberField name="payment_amount_to" bindTarget="hls_ccb_form_create_ds" prompt="付款金额到"/>-->
</a:fieldSet>
<a:grid id="hls_ccb_create_grid" bindTarget="hls_ccb_grid_create_ds" height="200" width="800" navBar="true">
<!-- <a:grid id="hls_ccb_create_grid" bindTarget="hls_ccb_grid_create_ds" height="300" width="800" navBar="true">-->
<!-- <a:columns>-->
<!-- <a:column name="num" align="left" prompt="序号" width="80"/>-->
<!-- <a:column name="detail" align="center" prompt="明细" renderer="batch_detail_renderer" width="100"/>-->
<!-- </a:columns>-->
<!-- </a:grid>-->
<a:grid id="hls_ccb_ln_grid" bindTarget="hls_ccb_grid_ln_ds" height="300" width="800" navBar="true">
<a:columns>
<a:column name="num" align="left" prompt="序号" width="80"/>
<a:column name="detail" align="center" prompt="明细" renderer="batch_detail_renderer" width="100"/>
<a:column name="bp_tenant_name" prompt="客户名称" align="center" />
<a:column name="contract_number" prompt="合同号" align="center" />
<a:column name="times" prompt="期数" align="center"/>
<a:column name="due_date" prompt="应付日期" align="center" renderer="Leaf.formatDate"/>
<a:column name="cf_item_desc" prompt="现金流类型" align="center" footerRenderer="sumAmount"/>
<a:column name="due_amount" prompt="应收金额" align="right" renderer="Leaf.formatMoney" footerRenderer="sumAmount"/>
<a:column name="manual_amount" prompt="扣款金额" editor="hls_ccb_ln_grid_nf" align="right" renderer="Leaf.formatMoney" footerRenderer="sumAmount"/>
<a:column name="description" prompt="备注" editor="hls_ccb_ln_grid_tf" width="200" />
</a:columns>
<a:editors>
<a:numberField id="hls_ccb_ln_grid_nf"/>
<a:textField id="hls_ccb_ln_grid_tf"/>
</a:editors>
</a:grid>
<a:fieldSet title="应收日期" column="2">
<a:datePicker name="due_date" bindTarget="hls_ccb_form_create_ds" prompt="应收日期"/>
......
......@@ -15,8 +15,10 @@
<a:link id="delete_ebank_link" model="ccb.CCB600.hls_ebank_batch" modelaction="delete"/>
<a:link id="create_abc_ebank_link" model="ccb.CCB600.hls_ebank_batch_hd" modelaction="execute"/>
<a:link id="query_abc_ebank_link" model="ccb.CCB600.hls_ebank_batch_hd" modelaction="update"/>
<a:link id="withhold_ebank_link" url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_withhold_manager.lview"/>
<a:link id="withhold_ebank_link"
url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_withhold_manager.lview"/>
<a:link id="ccb_abc_upload_link"
url="${/request/@context_path}/modules/ccb/CCB600/ccb_abc_import.lview"/>
<script type="text/javascript"><![CDATA[
var header = $jq('meta[name=_csrf_header]').attr('content');
var token = $jq('meta[name=_csrf]').attr('content');
......@@ -111,11 +113,10 @@
var batch_id = record.get("batch_id");
var bank_code = record.get("bank_code");
var status_desc = record.get("status_desc");
if(status_desc == '新建'){
if (status_desc == '新建') {
alert('新建状态无法回传!');
$('hls_ccb_batch_result_ds').query();
}
else{
} else {
Leaf.Masker.mask(Ext.getBody(), '核销代扣信息中...'); //锁屏
if (bank_code == '008') {
Leaf.request({
......@@ -234,7 +235,7 @@
}
function withhold_list(){
function withhold_list() {
var win = new Leaf.Window({
id: 'withhold_ebank_link_winId',
url: $('withhold_ebank_link').getUrl(),
......@@ -248,6 +249,55 @@
});
}
function export_batch() {
var r = $('hls_ccb_batch_result_ds').getCurrentRecord();
if (r) {
if (r.get('pay_method') == 'CCB_THREE') {//建行
$('hls_ccb_batch_merge_result_grid')._export();
} else if (r.get('pay_method') == 'AGRI_TWO' || r.get('pay_method') == 'AGRI_THREE') {
$('hls_abc_batch_merge_result_grid')._export();
}
}
}
function ccb_abc_import() {
var record = $('hls_ccb_batch_result_ds').getCurrentRecord();
if (record.get('status') != 'NEW') {
Leaf.showMessage('提示', '该数据不是新建状态,不可操作');
return;
}
var str;
var pay_method = record.get('pay_method');
var bank_type;
if (pay_method == 'CCB_THREE') {
bank_type = 'CCB';
str = '建行';
} else if (pay_method == 'AGRI_TWO' || pay_method == 'AGRI_THREE') {
bank_type = 'ABC';
str = '农行';
} else {
Leaf.showInfoMessage("提示", "未知错误,请联系管理员");
return;
}
Leaf.showConfirm("提示", "该批次为<font color=red>" + str + "</font>划扣批次,是否导入<font color=red>" + str + "</font>回盘文件", function () {
var win = new Leaf.Window({
id: 'ccb_abc_upload_link_winId',
url: $('ccb_abc_upload_link').getUrl() + '?batch_id=' + record.get('batch_id') + '&bank_type=' + bank_type,
params: {
winId: 'ccb_abc_upload_link_winId'
},
title: '回盘文件导入',
width: 420,
height: 275
});
win.on('close', function () {
$('hls_ccb_batch_result_ds').query();
});
});
}
]]></script>
<a:dataSets>
<a:dataSet id="bank_name_combobox_ds">
......@@ -273,6 +323,9 @@
</a:fields>
</a:dataSet>
<a:dataSet id="hls_ccb_batch_merge_result_ds" model="ccb.CCB600.hls_ebank_batch_ln_group"
bindName="merge_result" bindTarget="hls_ccb_batch_result_ds">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar height="29">
......@@ -280,9 +333,11 @@
<a:gridButton click="query_batch" text="查询"/>
<a:gridButton click="open_batch" text="生成代扣指令"/>
<a:gridButton click="delete_batch" text="删除代扣指令"/>
<a:gridButton click="post_batch" text="发送代扣指令"/>
<a:gridButton click="write_off_batch" text="刷新代扣信息"/>
<a:gridButton click="withhold_list" text="手工代扣单"/>
<a:gridButton click="export_batch" text="导出划扣单"/>
<a:gridButton click="ccb_abc_import" text="导入回盘文件"/>
<!-- <a:gridButton click="post_batch" text="发送代扣指令"/>-->
<!-- <a:gridButton click="write_off_batch" text="刷新代扣信息"/>-->
<!-- <a:gridButton click="withhold_list" text="手工代扣单"/>-->
</a:screenTopToolbar>
<a:form column="3">
<a:comboBox name="bank_name" bindTarget="hls_ccb_batch_query_ds" prompt="银行名称"/>
......@@ -293,6 +348,7 @@
navBar="true">
<a:columns>
<a:column name="batch_id" align="left" prompt="序号" width="100"/>
<a:column name="pay_method_desc" align="center" prompt="支付方式" width="120"/>
<a:column name="batch_date" align="center" prompt="创建日期" renderer="Leaf.formatDate" width="150"/>
<a:column name="bank_name" align="left" prompt="银行" width="150"/>
<a:column name="bank_branch_name" align="left" prompt="支行" width="200"/>
......@@ -300,11 +356,45 @@
<a:column name="status_desc" align="center" prompt="状态" width="100"/>
<a:column name="detail" align="center" prompt="明细" renderer="detail_renderer" width="100"/>
<a:column name="created_by_n" align="center" prompt="制单人" width="150"/>
<a:column name="total_real_amount" align="right" prompt="实扣总金额" renderer="Leaf.formatMoney" width="100"/>
<a:column name="total_real_amount" align="right" prompt="实扣总金额" renderer="Leaf.formatMoney"
width="100"/>
<a:column name="total_success_count" align="right" prompt="扣款成功合同" width="100"/>
<a:column name="message" align="right" prompt="错误消息" width="150"/>
</a:columns>
</a:grid>
<a:grid hidden="true" width="1" height="1" id="hls_ccb_batch_merge_result_grid"
bindTarget="hls_ccb_batch_merge_result_ds">
<a:columns>
<a:column name="sequence_num" prompt="序号(必填)"/>
<a:column name="bank_account_num" prompt="账号(必填)"/>
<a:column name="bank_account_name" prompt="户名(必填)"/>
<a:column name="actual_amount" align="right" renderer="Leaf.formatMoney" prompt="金额(必填)"/>
<a:column prompt="跨行标识(选填 建行填0 他行填1)"/>
<a:column prompt="行名(跨行业务与联行行号不能同时为空)"/>
<a:column prompt="联行行号(跨行业务与行名不能同时为空)"/>
<a:column prompt="多方协议号(跨行代收必填)"/>
<a:column prompt="标识号(选填)"/>
<a:column prompt="摘要(选填 显示在收款账户流水明细中)"/>
<a:column prompt="备注(选填)"/>
</a:columns>
</a:grid>
<a:grid hidden="true" width="1" height="1" id="hls_abc_batch_merge_result_grid"
bindTarget="hls_ccb_batch_merge_result_ds">
<a:columns>
<a:column name="abc_sequence_num" prompt="serial-no"/>
<a:column name="abc_pay_type" prompt="pay-type"/>
<a:column name="abc_transaction_type" prompt="transaction-type"/>
<a:column name="csh_bank_account_num" prompt="account-no"/>
<a:column name="csh_bank_account_name" prompt="account-name"/>
<a:column name="bank_account_num" prompt="payee-account-to"/>
<a:column name="bank_account_name" prompt="payee-name"/>
<a:column name="abc_payee_bank" prompt="payee-bank"/>
<a:column name="abc_usage" prompt="usage"/>
<a:column name="abc_fen_code" prompt="fen-code"/>
<a:column name="abc_curr_flag" prompt="curr-flag"/>
<a:column name="actual_amount" align="right" renderer="Leaf.formatMoney" prompt="amount"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
......@@ -8,23 +8,34 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view>
<a:link id="hls_ebank_create_link" model="ccb.CCB600.hls_ebank_batch" modelaction="execute"/>
<a:link id="query_ebank_detail_link" url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_detail_query.lview"/>
<a:link id="modify_ebank_detail_link" url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_detail.lview"/>
<a:link id="query_ebank_detail_link"
url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_detail_query.lview"/>
<a:link id="modify_ebank_detail_link"
url="${/request/@context_path}/modules/ccb/CCB600/ccb_ebank_detail.lview"/>
<script type="text/javascript"><![CDATA[
function return_batch() {
$('${/parameter/@winid}').close();
}
function batch_detail_renderer(value,record,name){
if('${/parameter/@status}' == 'NEW') {
function batch_detail_renderer(value, record, name) {
if ('${/parameter/@status}' == 'NEW') {
return '<a href="javascript:open_batch_detail_modify_window(' + record.get('hd_id') + ')">' + '${l:PROMPT.DETAIL}' + '</a>';
}else{
} else {
return '<a href="javascript:open_batch_detail_query_window(' + record.get('hd_id') + ')">' + '${l:PROMPT.DETAIL}' + '</a>';
}
}
function open_batch_detail_query_window(hd_id){
function hls_ccb_merge_result() {
var hd_id = $('hls_ccb_grid_ln_ds').getAt(0).get('hd_id') || -1;
if ('${/parameter/@status}' == 'NEW') {
open_batch_detail_modify_window(hd_id);
} else {
open_batch_detail_query_window(hd_id);
}
}
function open_batch_detail_query_window(hd_id) {
var win = new Leaf.Window({
id: 'batch_link_query_winId',
url: $('query_ebank_detail_link').getUrl(),
......@@ -40,7 +51,7 @@
}
function open_batch_detail_modify_window(hd_id){
function open_batch_detail_modify_window(hd_id) {
var win = new Leaf.Window({
id: 'batch_modify_link_winId',
url: $('modify_ebank_detail_link').getUrl(),
......@@ -55,13 +66,42 @@
});
}
function colum_caculateTotal(data, name) {
var total = 0;
var length = data.length;
var value = 0;
for (var i = 0; i < length; i++) {
if (Ext.isEmpty(data[i].get(name))) {
value = 0;
} else {
value = data[i].get(name);
}
total = plus(total, value);
}
return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
}
function sumAmount(record, name) {
if (name == 'cf_item_desc') {
return '<font color=red>合计:</font>';
}
if (name == 'due_amount' || name == 'manual_amount') {
return '<font color=red>' + colum_caculateTotal(record, name) + '</font>';
}
}
]]></script>
<a:dataSets>
<a:dataSet id="rates_type_combobox_ds">
<a:datas dataSource="/model/ratesType"/>
</a:dataSet>
<a:dataSet id="pay_methods_ds">
<a:datas>
<a:record code_value="AGRI_THREE" code_value_name="农行扣款(三方)"/>
<a:record code_value="CCB_THREE" code_value_name="建行扣款(三方)"/>
<a:record code_value="AGRI_TWO" code_value_name="农行扣款(两方)"/>
</a:datas>
</a:dataSet>
<a:dataSet id="hls_ccb_form_create_ds" autoQuery="true" model="ccb.CCB600.hls_ebank_batch"
queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.hls_ebank_batch/query?batch_id=${/parameter/@batch_id}">
<a:fields>
......@@ -76,9 +116,11 @@
<a:map from="currency_code" to="currency"/>
</a:mapping>
</a:field>
<a:field name="currency_name" readOnly="true"/>
<a:field name="bank_account_name" readOnly="true"/>
<a:field name="bank_name" readOnly="true"/>
<a:field name="pay_method_desc" readOnly="true" prompt="支付方式" displayField="code_value_name" options="pay_methods_ds" returnField="pay_method" valueField="code_value"/>
<a:field name="pay_method"/>
<a:field name="currency" readOnly="true"/>
<a:field name="due_date" required="true" prompt="应收日期" readOnly="true"/>
<a:field name="merger_rules" defaultValue="NONE" prompt="" readOnly="true"/>
......@@ -97,37 +139,72 @@
</a:dataSet>
</a:dataSets>
<a:dataSet id="hls_ccb_grid_ln_ds" fetchAll="true" autoQuery="true" model="ccb.CCB600.hls_ebank_batch_ln"
queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.hls_ebank_batch_ln/query?batch_id=${/parameter/@batch_id}">
<a:fields>
<a:field name="cashflow_id"/>
<a:field name="bp_tenant_name" readOnly="true"/>
<a:field name="contract_id"/>
<a:field name="contract_number" readOnly="true"/>
<a:field name="times" readOnly="true"/>
<a:field name="cf_item" readOnly="true"/>
<a:field name="due_amount" readOnly="true"/>
<a:field name="manual_amount" required="true" prompt="扣款金额"/>
<a:field name="description"/>
</a:fields>
</a:dataSet>
<a:screenBody>
<a:screenTopToolbar height="29">
<a:gridButton click="return_batch" text="返回"/>
</a:screenTopToolbar>
<a:fieldSet title="本方账户" column="2">
<a:fieldSet title="本方账户" column="3">
<a:lov name="bank_account_num" bindTarget="hls_ccb_form_create_ds" prompt="银行账户"/>
<a:textField name="bank_account_name" bindTarget="hls_ccb_form_create_ds" prompt="账户名"/>
<a:textField name="bank_name" bindTarget="hls_ccb_form_create_ds" prompt="银行"/>
<a:textField name="currency" bindTarget="hls_ccb_form_create_ds" prompt="币种"/>
<a:textField name="currency_name" bindTarget="hls_ccb_form_create_ds" prompt="币种"/>
<a:comboBox name="pay_method_desc" bindTarget="hls_ccb_form_create_ds" prompt="支付方式"/>
</a:fieldSet>
<a:fieldSet title="合并规则" column="2">
<a:radio name="merger_rules" bindTarget="hls_ccb_form_create_ds" layout="horizontal" width="600">
<a:items>
<!--<a:item label="不合并" value="NONE"/>-->
<a:item label="按合同" value="CONTRACT"/>
<a:item label="按期数" value="TIMES"/>
<a:item label="不合并" value="NONE"/>
</a:items>
</a:radio>
</a:fieldSet>
<a:fieldSet title="筛选条件" column="2">
<a:numberField name="payment_amount_from" bindTarget="hls_ccb_form_create_ds" prompt="付款金额从"/>
<a:numberField name="payment_amount_to" bindTarget="hls_ccb_form_create_ds" prompt="付款金额到"/>
</a:fieldSet>
<!-- <a:fieldSet title="筛选条件" column="2">-->
<!-- <a:numberField name="payment_amount_from" bindTarget="hls_ccb_form_create_ds" prompt="付款金额从"/>-->
<!-- <a:numberField name="payment_amount_to" bindTarget="hls_ccb_form_create_ds" prompt="付款金额到"/>-->
<!-- </a:fieldSet>-->
<a:grid id="hls_ccb_create_grid" bindTarget="hls_ccb_grid_create_ds" height="200" width="800" navBar="true">
<!-- <a:grid id="hls_ccb_create_grid" bindTarget="hls_ccb_grid_create_ds" height="200" width="800" navBar="true">-->
<!-- <a:columns>-->
<!-- <a:column name="num" align="left" prompt="序号" width="80"/>-->
<!-- <a:column name="detail" align="center" prompt="明细" renderer="batch_detail_renderer" width="100"/>-->
<!-- </a:columns>-->
<!-- </a:grid>-->
<a:grid id="hls_ccb_ln_grid" bindTarget="hls_ccb_grid_ln_ds" height="300" width="800" navBar="true">
<a:toolBar>
<a:button click="hls_ccb_merge_result" text="合并结果"/>
</a:toolBar>
<a:columns>
<a:column name="num" align="left" prompt="序号" width="80"/>
<a:column name="detail" align="center" prompt="明细" renderer="batch_detail_renderer" width="100"/>
<a:column name="bp_tenant_name" prompt="客户名称" align="center"/>
<a:column name="contract_number" prompt="合同号" align="center"/>
<a:column name="times" prompt="期数" align="center"/>
<a:column name="due_date" prompt="应付日期" align="center" renderer="Leaf.formatDate"/>
<a:column name="cf_item_desc" prompt="现金流类型" align="center" footerRenderer="sumAmount"/>
<a:column name="due_amount" prompt="应收金额" align="right" renderer="Leaf.formatMoney"
footerRenderer="sumAmount"/>
<a:column name="manual_amount" prompt="扣款金额" align="right" renderer="Leaf.formatMoney"
footerRenderer="sumAmount"/>
<a:column name="description" prompt="备注" width="200"/>
</a:columns>
</a:grid>
<a:fieldSet title="应收日期" column="2">
<a:datePicker name="due_date" bindTarget="hls_ccb_form_create_ds" prompt="应收日期"/>
</a:fieldSet>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-query model="ccb.CCB600.get_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator=","
status_field="/parameter/@ImportSuccess" template_code="CCB_MANUAL_IMPORT"
user_id="${/session/@user_id}"/>
<!-- <a:model-query-->
<!-- defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;CCB_MANUAL_IMPORT&apos;"-->
<!-- model="ccb.CCB503.ccb503_import_get_status" rootPath="status"/>-->
</a:init-procedure>
<a:view>
<a:link id="import_interface_write_off_link" model="ccb.CCB600.ccb_import_ln" modelaction="update"/>
<script type="text/javascript"><![CDATA[
function backBtn() {
history.go(-1);
}
var import_flag = 0;
function import_confirm() {
if(!$('ccb_form_ds').validate()){
return;
}
var transaction_date = $('ccb_form_ds').getCurrentRecord().get('transaction_date');
$('import_confirm_id').disable();
var ds = $('ccb_import_grid_ds');
record = ds.getAll();
if (import_flag == 0) {
for (i = 0;i < record.length;i++) {
if (record[i].get('status') == 'ERROR') {
Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!');
return;
}
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('import_interface_write_off_link').getUrl(),
para: {
/*'header_id': '${/parameter/@header_id}'*/
header_id: '${/model/header/record/@header_id}',
batch_id: '${/parameter/@batch_id}',
transaction_date: transaction_date
},
scope: this,
success: function() {
import_flag = import_flag + 1;
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
},
error: function(){
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
}
});
} else {
Leaf.showMessage('${l:PROMPT}', '已导入的数据不能重复导入!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="ccb_import_grid_ds" autoPageSize="true" autoQuery="true" model="ccb.CCB600.ccb_import_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.ccb_import_ln/query?header_id=${/model/header/record/@header_id}" selectable="true"/>
</a:dataSets>
<a:dataSets>
<a:dataSet id="ccb_form_ds" autoCreate="true">
<a:fields>
<a:field name="transaction_date" required="true" prompt="建行划扣交易日期"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="backBtn" text="HLS.EXIT"/>
<a:gridButton id="import_confirm_id" click="import_confirm" text="确认导入"/>
</a:screenTopToolbar>
<a:form column="1" labelWidth="120" marginWidth="30">
<a:datePicker name="transaction_date" bindTarget="ccb_form_ds" prompt="建行划扣交易日期"/>
</a:form>
<a:grid bindTarget="ccb_import_grid_ds" marginHeight="230" marginWidth="50" navBar="true">
<a:columns>
<a:column name="attribute_1" prompt="序号" width="80"/>
<a:column name="attribute_2" prompt="账号"/>
<a:column name="attribute_3" prompt="户名" width="150"/>
<a:column name="attribute_4" align="right" prompt="发起金额" renderer="Leaf.formatMoney"/>
<a:column name="attribute_5" align="right" prompt="成功金额" renderer="Leaf.formatMoney"/>
<a:column name="attribute_6" align="center" prompt="跨行标识"/>
<a:column name="attribute_7" align="center" prompt="行名" width="170"/>
<a:column name="attribute_8" align="center" prompt="行号" width="170"/>
<a:column name="attribute_9" align="center" prompt="多方协议号" width="150"/>
<a:column name="attribute_10" align="center" prompt="标识号" width="150"/>
<a:column name="attribute_11" align="center" prompt="摘要" width="150"/>
<a:column name="attribute_12" align="center" prompt="备注" width="150"/>
<a:column name="attribute_13" align="center" prompt="银行卡类型" width="150"/>
<a:column name="attribute_14" align="center" prompt="成功标志" width="150"/>
<a:column name="attribute_15" align="center" prompt="失败原因" width="150"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
......@@ -11,14 +11,15 @@
</a:init-procedure>
<a:view>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_write_off_reverse_detail_link" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/>
<a:link id="csh_write_off_reverse_detail_link"
url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_receipt_write_off_reverse_detail.lview"/>
<a:link id="create_je_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" modelaction="execute"/>
<script type="text/javascript"><![CDATA[
function dateValidator(record, name, value) { //日期校验方法
if (name == 'transaction_date_from' || name == 'transaction_date_to') {
var start_date = Leaf.formatDate(record.get('transaction_date_from'));
var end_date = Leaf.formatDate(record.get('transaction_date_to'));
if ( !! end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!!end_date) { //由于结束日期非必填,只有在结束日期填了才进行比较
if (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
}
......@@ -44,9 +45,9 @@
}
}
if (dirty_flag == 'N') {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function() {
Leaf.showConfirm('${l:PROMPT}', '${l:CSH510.CSH_RECEIPT_QUERY_INFORMATION}', function () {
return;
}, function() {
}, function () {
$('csh_transaction_receipt_write_off_reverse_result_ds').query();
}, null, null);
} else {
......@@ -73,7 +74,7 @@
function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) {
url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01');
url = $('csh_write_off_reverse_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_type=' + record.get('transaction_type') + '&ref_n01=' + record.get('ref_n01') + '&receipt_type=' + record.get('receipt_type') + '&bp_category=' + record.get('bp_category') + '&paid_byother_flag=' + record.get('paid_byother_flag');
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
}
}
......@@ -95,9 +96,9 @@
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length;i < j;i++) {
j = config.length; i < j; i++) {
for (var m = 0,
n = pattern.length;m < n;m++) {
n = pattern.length; m < n; m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
......@@ -115,7 +116,7 @@
}
}
function csh514_create_je(){
function csh514_create_je() {
var ds = $('csh_transaction_receipt_write_off_reverse_result_ds');
var record = ds.getCurrentRecord();
......@@ -126,7 +127,7 @@
para: {
transaction_id: transaction_id
},
success: function() {
success: function () {
ds.query();
Leaf.SideBar.show({
msg: '操作成功',
......@@ -137,6 +138,7 @@
});
}
]]></script>
<a:dataSets>
<a:dataSet id="currency_ds">
......@@ -144,7 +146,8 @@
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_query_ds" autoCreate="true">
<a:fields>
<a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov" lovWidth="500" title="HLS_BP_TYPE.BP_TYPE">
<a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov"
lovWidth="500" title="HLS_BP_TYPE.BP_TYPE">
<a:mapping>
<a:map from="description" to="bp_type_desc"/>
<a:map from="bp_type" to="bp_type"/>
......@@ -156,7 +159,8 @@
<a:field name="bp_type_desc" readOnly="true"/>
<a:field name="bp_category" readOnly="true"/>
<a:field name="bp_category_desc" readOnly="true"/>
<a:field name="bp_code" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:field name="bp_code" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
......@@ -171,18 +175,26 @@
<a:field name="bank_slip_num_to"/>
<a:field name="transaction_date_from" validator="dateValidator"/>
<a:field name="transaction_date_to" validator="dateValidator"/>
<a:field name="bank_account_code_from" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="bank_account_code_from" autoCompleteField="bank_account_num" lovGridHeight="350"
lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov"
lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code_from"/>
</a:mapping>
</a:field>
<a:field name="bank_account_from_id"/>
<a:field name="bank_account_code_to" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="bank_account_code_to" autoComplete="true" autoCompleteField="bank_account_num"
lovGridHeight="350" lovHeight="550" lovLabelWidth="90"
lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580"
title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_code" to="bank_account_code_to"/>
</a:mapping>
</a:field>
<a:field name="bank_account_name" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="bank_account_name" autoComplete="true" autoCompleteField="bank_account_num"
lovGridHeight="350" lovHeight="550" lovLabelWidth="90"
lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580"
title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_num" to="bank_account_num"/>
......@@ -192,24 +204,29 @@
<a:field name="transaction_amount_from"/>
<a:field name="transaction_amount_to"/>
<a:field name="posted_flag" defaultValue="Y"/>
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds" returnField="currency_code_from" valueField="currency_code"/>
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds"
returnField="currency_code_from" valueField="currency_code"/>
<a:field name="currency_code_from"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds"
returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/>
<a:field name="receipt" checkedValue="RECEIPT" defaultValue="RECEIPT" uncheckedValue="N"/>
<a:field name="advance_receipt" checkedValue="ADVANCE_RECEIPT" defaultValue="ADVANCE_RECEIPT" uncheckedValue="N"/>
<a:field name="advance_receipt" checkedValue="ADVANCE_RECEIPT" defaultValue="ADVANCE_RECEIPT"
uncheckedValue="N"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="not_write_off_flag" defaultValue="NOT"/>
<a:field name="reversed_flag" defaultValue="N"/>
<a:field name="reverse_write_off_amount_flag" defaultValue="Y"/>
<a:field name="bp_code_from" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:field name="bp_code_from" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_from"/>
<a:map from="bp_name" to="bp_name_from"/>
<a:map from="bp_code" to="bp_code_from"/>
</a:mapping>
</a:field>
<a:field name="bp_code_to" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:field name="bp_code_to" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="500" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id_to"/>
<a:map from="bp_name" to="bp_name_to"/>
......@@ -221,7 +238,9 @@
<a:event name="update" handler="csh514_receipt_write_off_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_result_ds" model="csh.CSH510.csh_transaction_query" queryDataSet="csh_transaction_receipt_write_off_reverse_query_ds" selectable="true" selectionModel="single"/>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_result_ds" model="csh.CSH510.csh_transaction_query"
queryDataSet="csh_transaction_receipt_write_off_reverse_query_ds" selectable="true"
selectionModel="single"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -231,9 +250,10 @@
<!-- <a:gridButton click="csh514_receipt_quit" text="HLS.EXIT"/> -->
<a:gridButton click="csh514_receipt_query" text="HLS.QUERY"/>
<a:gridButton click="csh514_receipt_reset" text="HLS.RESET"/>
<a:gridButton click="csh514_create_je" text="补生成凭证"/>
<!-- <a:gridButton click="csh514_create_je" text="补生成凭证"/>-->
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" column="4" labelWidth="120" marginWidth="35" title="CSH514.RECEIPT_WRITE_OFF_REVERSE">
<a:form bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" column="4" labelWidth="120"
marginWidth="35" title="CSH514.RECEIPT_WRITE_OFF_REVERSE">
<!-- <a:lov name="bp_type" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="CSH513.CSH_BP_TYPE"/>
<a:textField name="bp_type_desc" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="CSH513.CSH_BP_TYPE_NAME"/>
<a:textField name="bp_category" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="CSH513.CSH_BP_CATEGORY"/>
......@@ -260,25 +280,40 @@
<!--<a:textField name="bp_name_to" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="HLS.BP_NAME_TO" readOnly="true"/>-->
<!--<a:textField name="transaction_num_from" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="HLS.RECEIPT_TRANSACTION_NUMBER_FROM"/>-->
<!--<a:textField name="transaction_num_to" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="HLS.RECEIPT_TRANSACTION_NUMBER_TO"/>-->
<a:datePicker name="transaction_date_from" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/>
<a:numberField name="transaction_amount_from" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="收款金额从"/>
<a:numberField name="transaction_amount_to" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="收款金额到"/>
<a:datePicker name="transaction_date_from"
bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/>
<a:numberField name="transaction_amount_from"
bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="收款金额从"/>
<a:numberField name="transaction_amount_to"
bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="收款金额到"/>
<!--<a:comboBox name="currency_name_from_display" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="HLS.CURRENCY_FROM"/>-->
<!--<a:comboBox name="currency_name_to_display" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="HLS.CURRENCY_TO"/>-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="对方账户名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="对方账号"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="我方账户名称"/>
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="对方账户名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="对方账号"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="我方账户名称"/>
<!-- <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="我方账号" readOnly="true"/>-->
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="现金事务编号"/>
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="现金事务编号"/>
<!--<a:lov name="bank_account_code_to" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="CSH510.CSH_TRANSACTION.BANK_ACCOUNT_CODE_TO"/>-->
<a:checkBox name="receipt" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="HLS.RECEIPT"/>
<a:checkBox name="advance_receipt" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="HLS.ADVANCE_RECEIPT"/>
<a:textField name="contract_number_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="合同编号"/>
<a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds" prompt="客户名称"/>
<a:checkBox name="receipt" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="HLS.RECEIPT"/>
<a:checkBox name="advance_receipt" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="HLS.ADVANCE_RECEIPT"/>
<a:textField name="contract_number_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="合同编号"/>
<a:textField name="bp_name_r" bindTarget="csh_transaction_receipt_write_off_reverse_query_ds"
prompt="客户名称"/>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_grid_ds" bindTarget="csh_transaction_receipt_write_off_reverse_result_ds" marginHeight="260" marginWidth="35" navBar="true">
<a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_result_ds" marginHeight="260" marginWidth="35"
navBar="true">
<!-- <a:columns>
<a:column name="transaction_num" align="center" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_NUM" renderer="seedetail_transaction_num" width="120"/>
<a:column name="transaction_date" align="center" renderer="Leaf.formatDate" width="120"/>
......@@ -290,11 +325,12 @@
<a:column name="bp_name" align="center" width="120"/>
<a:column name="transaction_type_desc" align="center" width="120"/>
</a:columns> -->
<a:toolBar>
<a:button type="excel"/>
</a:toolBar>
<!-- <a:toolBar>-->
<!-- <a:button type="excel"/>-->
<!-- </a:toolBar>-->
<a:columns>
<a:column name="transaction_num" align="center" renderer="seedetail_transaction_num" prompt="现金事务编号" width="120"/>
<a:column name="transaction_num" align="center" renderer="seedetail_transaction_num" prompt="现金事务编号"
width="120"/>
<a:column name="transaction_date" align="center" renderer="Leaf.formatDate" width="120"/>
<!--<a:column name="bp_code" align="center" width="120"/>-->
<!--<a:column name="bp_name" align="center" width="120"/>-->
......@@ -306,6 +342,7 @@
<a:column name="bank_account_num" width="120"/>
<a:column name="bank_account_name" width="120"/>
<a:column name="transaction_type_desc" align="center" prompt="事务类型" width="120"/>
<a:column name="receipt_type_des" align="center" prompt="收款类型" width="120"/>
</a:columns>
<a:editors>
<a:checkBox id="receipt_write_off_checkbox_id"/>
......
......@@ -11,8 +11,10 @@
<a:model-query fetchAll="true" model="csh.CSH510.csh_transaction_query" rootPath="csh_value"/>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_write_off_reverse_link_id" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse_new.lsc"/>
<a:link id="csh514_write_off_reverse_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" modelaction="batch_update"/>
<a:link id="csh_transaction_write_off_reverse_link_id"
url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse_new.lsc"/>
<a:link id="csh514_write_off_reverse_link_id" model="csh.CSH514.csh_transaction_write_off_reverse"
modelaction="batch_update"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script type="text/javascript"><![CDATA[
......@@ -23,12 +25,13 @@
if ($('csh_transaction_receipt_write_off_reverse_detail_head_ds').validate()) {
var head_record = $('csh_transaction_receipt_write_off_reverse_detail_head_ds').getAt(0);
var records = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getSelected();
var all = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
//var records = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
if (!records.length) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH514.SELECT_REVERSE_RECORD}');
return;
}
if (records[0].get('history_flag') ==='Y') {
if (records[0].get('history_flag') === 'Y') {
Leaf.showConfirm('${l:PROMPT}', '该事务是历史事务,请检查是否进行了补生成凭证', function () {
var saveData = [];
for (var i = 0; i < records.length; i++) {
......@@ -72,10 +75,24 @@
Leaf.Masker.unmask(win_body);
return;
}, null, null);
},null)
}, null)
}else{
} else {
var saveData = [];
var receipt_type = '${/parameter/@receipt_type}';
var paid_byother_flag = '${/parameter/paid_byother_flag}';
var bp_category = '${/parameter/bp_category}';
if (receipt_type == 'WITHHOLD') { //划扣
if (all.length != records.length) {
Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
return;
}
} else {
if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
return;
}
}
for (var i = 0; i < records.length; i++) {
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
......@@ -177,9 +194,12 @@
<a:dataSets>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_head_ds" autoCreate="true">
<a:fields>
<a:field name="reversed_date" defaultValue="${/model/default_value/record/@now_time}" required="true"/>
<a:field name="reversed_period_name" defaultValue="${/model/default_value/record/@now_period_name}" readOnly="true" required="true"/>
<a:field name="transaction_date" defaultValue="${/model/csh_value/record/@transaction_date}" readOnly="true"/>
<a:field name="reversed_date" defaultValue="${/model/default_value/record/@now_time}"
required="true"/>
<a:field name="reversed_period_name" defaultValue="${/model/default_value/record/@now_period_name}"
readOnly="true" required="true"/>
<a:field name="transaction_date" defaultValue="${/model/csh_value/record/@transaction_date}"
readOnly="true"/>
<a:field name="description" defaultValue="${l:HLS.REVERSE}"/>
</a:fields>
<a:events>
......@@ -187,8 +207,10 @@
<a:event name="add" handler="on_write_off_reverse_detail_add"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_result_ds" autoQuery="true" fetchAll="true" model="csh.CSH514.csh_write_off" pageSize="15"
queryUrl="${/request/@context_path}/autocrud/csh.CSH514.csh_write_off/query?csh_transaction_id=${/parameter/@transaction_id}&amp;reversed_flag=N&amp;reverse_detail_flag=Y" selectable="true">
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_result_ds" autoQuery="true" fetchAll="true"
model="csh.CSH514.csh_write_off" pageSize="15"
queryUrl="${/request/@context_path}/autocrud/csh.CSH514.csh_write_off/query?csh_transaction_id=${/parameter/@transaction_id}&amp;reversed_flag=N&amp;reverse_detail_flag=Y"
selectable="true">
<a:fields>
<a:field name="due_date" datatype="java.util.Date"/>
</a:fields>
......@@ -200,12 +222,19 @@
<a:gridButton click="csh514_write_off_reverse" text="HLS.REVERSE"/>
</a:screenTopToolbar>
<a:form column="4" title="CSH514.CSH_WRITE_OFF_DETAIL">
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="HLS.REVERSE_DATE"/>
<a:textField name="reversed_period_name" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="HLS.REVERSE_PERIOD"/>
<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/>
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="HLS.NOTE" width="300"/>
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.REVERSE_DATE"/>
<a:textField name="reversed_period_name"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.REVERSE_PERIOD"/>
<a:datePicker name="transaction_date"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/>
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.NOTE" width="300"/>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_reverse_detail_grid_ds" bindTarget="csh_transaction_receipt_write_off_reverse_detail_result_ds" marginHeight="170" marginWidth="50" navBar="true">
<a:grid id="csh_transaction_receipt_write_off_reverse_detail_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_result_ds" marginHeight="170"
marginWidth="50" navBar="true">
<a:columns>
<a:column name="write_off_type_name"/>
<a:column name="write_off_date" renderer="Leaf.formatDate"/>
......
......@@ -370,7 +370,7 @@
var status = record.get('status');
var write_off_flag = record.get('write_off_flag');
var readOnly = 'Y';
if ((status == 'NEW' || status == 'RETURN') && write_off_flag == 'NOT') {
if ((status == 'NEW' || status == 'RETURN') && write_off_flag != 'FULL') {
readOnly = 'N';
}
if (name == 'csh531n_detail') {
......@@ -451,8 +451,13 @@
function csh531_new_reverse_write_off() {
var record = $('csh531n_sap_bankflow_info_result_ds').getSelected()[0];
if (record && record.get('write_off_flag') == 'FULL') {
var returned_amount = record.get('returned_amount') || 0;
if (returned_amount > 0) {
Leaf.showInfoMessage("提示", "该事务存在收款退款,不允许反冲");
} else {
if (record && record.get('write_off_flag') != 'NOT') {
Leaf.showConfirm("提示", "您确定反冲现金事务<span style='color:red'>" + record.get('transaction_num') + "</span>吗", function () {
csh531n_lock_current_window();
Leaf.request({
url: $('csh_reverse_write_off_link').getUrl(),
para: record.data,
......@@ -472,6 +477,7 @@
Leaf.showInfoMessage("提示", "只能反冲已经核销的现金事务");
}
}
}
]]></script>
<a:dataSets>
......@@ -489,7 +495,7 @@
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="csh_transaction_receipt_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="write_off_flag" />
<a:field name="write_off_flag"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="con_write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
<a:field name="status" displayField="code_value_name" options="status_ds"
......
......@@ -10,7 +10,7 @@
<a:link id="transaction_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
var submit_flag = 'N';
function csh531n_detail_win_close() {
$('${/parameter/@winid}').close();
}
......@@ -25,12 +25,6 @@
function init() {
var record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var deposit_ds = $('csh_transaction_deposit_ds');
var advanced_ds = $('csh_transaction_advanced_ds');
if (advanced_ds.getAll().length == 0) {
}
if ('${/parameter/@depositDisplayFlag}' == 'Y') {
document.getElementById('write_off_deposit').style.display = 'block';
......@@ -145,25 +139,25 @@
var left_interest = record.get('left_interest');
var x_amount;
if (value) {
if (value <= left_interest) {
if (left_interest > 0) {
record.set('write_off_interest', value);
if (value <= left_principal) {
if (left_principal > 0) {
record.set('write_off_principal', value);
} else {
record.set('write_off_interest', null);
}
record.set('write_off_principal', null);
} else if (value > left_interest) {
if (left_interest > 0) {
record.set('write_off_interest', left_interest);
} else {
record.set('write_off_interest', null);
}
x_amount = value - left_interest;
record.set('write_off_interest', null);
} else if (value > left_principal) {
if (left_principal > 0) {
record.set('write_off_principal', x_amount);
record.set('write_off_principal', left_principal);
} else {
record.set('write_off_principal', null);
}
x_amount = value - left_principal;
if (left_interest > 0) {
record.set('write_off_interest', x_amount);
} else {
record.set('write_off_interest', null);
}
}
} else {
record.set('write_off_interest', null);
......@@ -279,10 +273,25 @@
}
function csh531n_write_off() {
var returning_amount = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('returning_amount') || 0;
if (returning_amount > 0) {
Leaf.showInfoMessage("提示", "该收款单存在审批中的退款流程,无法进行核销操作!");
}
var interfaceRs = $('csh_write_off_interface_ds').getAll();
var depositRs = $('csh_transaction_deposit_ds').getAll();
var advancedRs = $('csh_transaction_advanced_ds').getAll();
var allRs = [...interfaceRs,...depositRs,...advancedRs];
for (var i = 0; i < allRs.length; i++) {
if (allRs[i].dirty) {
Leaf.showInfoMessage("提示", "存在未保存数据,请先保存再进行核销操作!");
return;
}
}
if (checkAmount('WRITE_OFF')) {
if(submit_flag == 'Y'){
var record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
if (record) {
csh531d_lock_current_window();
var transaction_id = record.get('transaction_id');
......@@ -304,17 +313,12 @@
scope: this
});
}
}else{
Leaf.showInfoMessage("提示","请先保存");
}
}
}
function csh531_beforesubmit_fun(ds) {
var records = ds.getAll();
var total = 0;
var head_record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var unwrite_off_amount = head_record.get('unwrite_off_amount');
for (var i = 0; i < records.length; i++) {
......@@ -335,12 +339,10 @@
}
function csh531_submitsuccess(ds) {
submit_flag = 'Y';
ds.query();
}
function csh531_submitfailed(ds){
submit_flag = 'N';
function csh531_submitfailed(ds) {
}
function compareDate(start, end) {
......@@ -434,19 +436,62 @@
}
}
var header_rec = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
if (sum > header_rec.get('transaction_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不能大于可核销金额');
if (sum > header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不能大于剩余可核销金额');
return false;
}
var receipt_type = header_rec.get('receipt_type');
var bp_category = header_rec.get('bp_category');
var paid_byother_flag = header_rec.get('paid_byother_flag');
if (type == 'WRITE_OFF') {
if (sum != header_rec.get('transaction_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不等于可核销金额');
var check_flag = 'N';
if (receipt_type == 'WITHHOLD') { //划扣
check_flag = 'Y';
} else {
if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
check_flag = 'Y';
}
}
if (check_flag == 'Y' && sum != header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不等于可核销金额,该现金事务不支持部分核销!');
return false;
}
}
return true;
}
function csh_deposit_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
} else {
if (name == 'write_off_amount') {
return 'csh_transaction_deposit_grid_nf';
}
}
}
function csh_advance_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
} else {
if (name == 'write_off_amount') {
var r = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var deposit_ds = $('csh_transaction_deposit_ds');
var advanced_ds = $('csh_transaction_advanced_ds');
var current_deposit_r = deposit_ds.getAt(0);
var current_advance_r = advanced_ds.getAt(0);
if(r.get('exists_deposit_flag') == 'Y' && current_deposit_r){
return;
}
if(r.get('exists_advance_flag') == 'Y' && current_advance_r){
return;
}
return 'csh_transaction_advanced_grid_nf';
}
}
}
]]></script>
<a:dataSets>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
......@@ -479,6 +524,8 @@
<a:field name="write_off_flag_desc" readOnly="true"/>
<a:field name="review_status_desc" readOnly="true"/>
<a:field name="bank_account_num" readOnly="true"/>
<a:field name="opposite_band_na" readOnly="true"/>
<a:field name="bank_branch_name" readOnly="true"/>
<a:field name="collection_classes_desc" readOnly="true" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="ref_v01"/>
......@@ -536,7 +583,7 @@
</a:fields>
<a:events>
<a:event name="update" handler="csh531_update_fun"/>
<a:event name="beforesubmit" handler="csh531_beforesubmit_fun"/>
<!-- <a:event name="beforesubmit" handler="csh531_beforesubmit_fun"/>-->
<a:event name="load" handler="csh531_load_fun"/>
<a:event name="submitsuccess" handler="csh531_submitsuccess"/>
<a:event name="submitfailed" handler="csh531_submitfailed"/>
......@@ -627,14 +674,18 @@
<!-- bindTarget="csh_transaction_receipt_write_off_detail_ds"-->
<!-- prompt="CSH513.REMAINING_WRITEOFF_AMOUNT"/>-->
</a:box>
<a:box column="2" labelWidth="100">
<a:box column="3" labelWidth="100">
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="摘要"
readOnly="true" colspan="2" width="370"/>
<a:numberField name="unwrite_off_amount" prompt="剩余可核销金额"
bindTarget="csh_transaction_receipt_write_off_detail_ds" readOnly="true"/>
</a:box>
<a:box column="2" labelWidth="100">
<a:box column="3" labelWidth="100">
<a:textField colspan="2" name="ref_v05" bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="备注" width="370" readOnly="true"/>
<a:numberField name="returned_amount" prompt="已退款金额"
bindTarget="csh_transaction_receipt_write_off_detail_ds" readOnly="true"/>
</a:box>
<a:box column="2" labelWidth="100">
<a:label prompt="附件上传" bindTarget="csh_transaction_receipt_write_off_detail_ds"
......@@ -663,13 +714,29 @@
<!--</a:box>-->
</a:fieldSet>
<a:fieldSet labelWidth="250" title="账户信息">
<a:box column="2" labelWidth="100">
<a:textField name="bp_bank_account_name" prompt="对方账户"
bindTarget="csh_transaction_receipt_write_off_detail_ds"/>
<a:textField name="bp_bank_account_num" prompt="对方账号"
bindTarget="csh_transaction_receipt_write_off_detail_ds"/>
<a:textField name="write_off_flag_desc" prompt="核销状态"
bindTarget="csh_transaction_receipt_write_off_detail_ds"/>
<a:box column="3" labelWidth="100">
<!-- <a:textField name="bp_bank_account_name" prompt="对方账户"-->
<!-- bindTarget="csh_transaction_receipt_write_off_detail_ds"/>-->
<!-- <a:textField name="bp_bank_account_num" prompt="对方账号"-->
<!-- bindTarget="csh_transaction_receipt_write_off_detail_ds"/>-->
<!-- <a:textField name="write_off_flag_desc" prompt="核销状态"-->
<!-- bindTarget="csh_transaction_receipt_write_off_detail_ds"/>-->
<a:textField name="bank_account_name" bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME"/>
<!--对方账户户名-->
<a:textField name="bp_bank_account_name"
bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称-->
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_write_off_detail_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
</a:box>
</a:fieldSet>
</a:form>
......@@ -754,9 +821,10 @@
<a:columns>
<a:column name="bp_agent_name" prompt="代理店" width="180" align="center"
editor="csh_transaction_deposit_grid_lv"/>
<a:column name="write_off_amount" prompt="核销金额" renderer="Leaf.formatMoney"
<a:column name="write_off_amount" prompt="核销金额"
editorFunction="csh_deposit_edit_function" renderer="Leaf.formatMoney"
width="180"
align="right" editor="csh_transaction_deposit_grid_nf"
align="right"
footerRenderer="summaryRenderer"/>
<a:column name="write_off_date" prompt="核销日期" width="180" align="center"
renderer="Leaf.formatDate" editor="csh_transaction_deposit_grid_dp"/>
......@@ -779,9 +847,10 @@
<a:columns>
<a:column name="bp_name" prompt="商业伙伴" width="180" align="center"
editor="csh_transaction_advanced_grid_lv"/>
<a:column name="write_off_amount" prompt="核销金额" renderer="Leaf.formatMoney"
<a:column name="write_off_amount" prompt="核销金额"
editorFunction="csh_advance_edit_function" renderer="Leaf.formatMoney"
width="180"
align="right" editor="csh_transaction_advanced_grid_nf"
align="right"
footerRenderer="summaryRenderer"/>
<a:column name="write_off_date" prompt="核销日期" width="180" align="center"
renderer="Leaf.formatDate" editor="csh_transaction_advanced_grid_dp"/>
......
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