Commit ca6d5023 authored by lizhe's avatar lizhe

日立返还金相关修改

parent 7056617a
......@@ -4,7 +4,7 @@
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
SELECT vv.*,(select v.code_value_name value_name from sys_code_values_v v where v.code ='YES_NO' and v.code_value = vv.rl_flag) rl_flag_n
FROM (select t2.journal_line_id,
t2.journal_header_id,
cc.company_id,
......@@ -78,7 +78,15 @@
cc.termination_date,
cc.lease_channel,
t2.cf_direction,
t2.billing_status,
nvl(t2.billing_status,'NOT') billing_status,
(select v.code_value_name value_name from sys_code_values_v v where v.code ='CON_BILLING_STATUS' and v.code_value = nvl(t2.billing_status,'NOT')) billing_status_n,
case when acr_invoice_pkg.check_rl_cf_flag(cc.contract_id,t2.cf_item,t2.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'Y'
then
'Y'
else
''
end rl_flag,
t2.cf_status,
cc.business_type,
(SELECT bt.description
......@@ -324,7 +332,8 @@
<bm:query-field name="invoice_method" queryExpression="vv.invoice_method = ${@invoice_method}"/>
<bm:query-field name="division" queryExpression="vv.division = ${@division}"/>
<bm:query-field name="invoice_type" queryExpression="vv.invoice_type = ${@invoice_type}"/>
<bm:query-field name="rl_flag" queryExpression="vv.rl_flag = ${@rl_flag}"/>
<bm:query-field name="billing_status" queryExpression="vv.billing_status = ${@billing_status}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="vv.contract_status not in ('CANCEL')"/>
......
......@@ -39,7 +39,7 @@
<bm:field name="cf_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="rl_flag"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -56,12 +56,13 @@
where m.bp_id =t.bp_id) billing_object_name,
t.due_amount,
-- t.billing_amount,
/*-- t.billing_amount,
(case when cf.cf_item= 1 and cf.cf_status='BLOCK' then
t.received_amount-nvl(t.cf_billing_amount,0)
else
t.due_amount-nvl(t.cf_billing_amount,0)
end )billing_amount,
end )billing_amount,*/
t.billing_amount,
t.cf_billing_amount,
t.received_amount,
t.contract_id,
......@@ -101,6 +102,13 @@
from sys_code_values_v v
where v.code = 'ACR512_INVOICE_KIND_TYPE'
and v.code_value = t.invoice_kind_type) invoice_kind_type_n
, case when acr_invoice_pkg.check_rl_cf_flag(con.contract_id,cf.cf_item,cf.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(con.contract_id) = 'Y'
then
'Y'
else
''
end rl_flag
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf,
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="contract_id"/>
<bm:field name="contract_number" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NUMBER"/>
<bm:field name="contract_name" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NAME" displayWidth="350"/>
<bm:field name="bp_id_tenant"/>
<bm:field name="bp_name"/>
<bm:field name="bp_id_agent_level1"/>
<bm:field name="bp_id_agent_level1_n"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select cc.contract_id,
cc.contract_number,
cc.contract_name,
cc.bp_id_agent_level1,
(SELECT hb.bp_name
FROM hls_bp_master hb
WHERE hb.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.bp_id_tenant,
(SELECT hb.bp_name
FROM hls_bp_master hb
WHERE hb.bp_id = cc.bp_id_tenant) bp_name
from con_contract cc
where cc.data_class = 'NORMAL'
and acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'Y') t1
#WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field field="contract_number" queryOperator="like"/>
<!--<bm:query-field name="bp_id_agent_level1" queryExpression="((t1.bp_id_agent_level1=${@bp_id_agent_level1}) or exists (select 1 from con_contract_lease_item ccli,hls_lease_item hli where ccli.lease_item_id=hli.lease_item_id and hli.vender_id=${@bp_id_agent_level1} and t1.contract_id=ccli.contract_id))"/>-->
<bm:query-field field="bp_id_tenant" queryExpression="t1.bp_id_tenant=${@bp_id_tenant}" />
<bm:query-field name="contract_name" queryExpression="t1.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sf
$Date: 2019-9-9 下午01:23:36
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_TRANSACTION" defaultOrderBy="t1.transaction_num" needAccessControl="false">
<bm:fields>
<bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_ID"/>
<bm:field name="transaction_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRANSACTION_NUM" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_NUM"/>
<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="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" 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_v 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_v 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" expression="(select a.bank_account_name from hls_bp_master_bank_account a where a.bank_account_id = t1.bp_bank_account_id)" forInsert="false" forUpdate="false" prompt="CSH511.BANK_ACCOUNT_NAME"/>-->
<bm:field name="bp_bank_account_name" 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="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE"/>
<bm:field name="unwrite_off_amount" expression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))" 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="receipt_type"/>
<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_contract_id"/>
<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="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="confirmed_flag_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CONFIRMED_FLAG' and v.code_value =t1.confirmed_flag)" forInsert="false" forUpdate="false"/>
<bm:field name="written_off_flag_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'WRITE_OFF_FLAG' and v.code_value =t1.WRITE_OFF_FLAG)" forInsert="false" forUpdate="false"/>
<bm:field name="bank_branch_name" expression="(select bank_branch_name from csh_bank_branch where bank_branch_id = (select bank_branch_id from csh_bank_account where bank_account_id = t1.bank_account_id))" forInsert="false" forUpdate="false"/>
<bm:field name="use_money_amount" expression="(select t1.transaction_amount-t1.returned_amount from dual)" forInsert="false" forUpdate="false"/>
<bm:field name="opposite_band_na"/>
<bm:field name="banka"/>
<bm:field name="purpose"/>
<bm:field name="gsber"/>
<bm:field name="sus_belnr"/>
<bm:field name="bp_virtual_bank_account"/>
<bm:field name="confirmed_flag" />
<bm:field name="debt_confirmed_by"/>
<bm:field name="debt_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.debt_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="transaction_id"/>
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.collection_classes = &apos;REFUND&apos;)"/>
<bm:data-filter name="query" expression="(t1.ref_contract_id is null)"/>
<bm:data-filter name="query" expression="(nvl(t1.reversed_flag,'N') = 'N')"/>
<bm:data-filter name="query" expression="(t1.confirmed_flag not in('ACCAUDITING','NEW','CT_REJECTED'))"/>
<bm:data-filter name="query" expression="((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0)"/>
<bm:data-filter name="query" expression="(t1.returned_flag = 'NOT')"/>
<bm:data-filter name="query" expression="(t1.source_csh_trx_id is null)"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
<bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/>
<bm:query-field field="bp_bank_account_name" queryOperator="like"/>
<bm:query-field field="receipt_type" queryOperator="like"/>
<bm:query-field field="opposite_band_na" queryOperator="like"/>
<bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/>
<bm:query-field name="transaction_num_to" queryExpression="t1.transaction_num &lt;= ${@transaction_num_to}"/>
<bm:query-field name="bank_slip_num" queryExpression="t1.bank_slip_num like &apos;%&apos;||${@bank_slip_num}||&apos;%&apos;"/>
<!-- <bm:query-field name="bank_slip_num_to" queryExpression="t1.bank_slip_num &lt;= ${@bank_slip_num_to}"/>-->
<bm:query-field name="transaction_amount_from" queryExpression="t1.transaction_amount &gt;= ${@transaction_amount_from}"/>
<bm:query-field name="transaction_amount_to" queryExpression="t1.transaction_amount &lt;= ${@transaction_amount_to}"/>
<bm:query-field name="currency_code_from" queryExpression="t1.currency_code &gt;= ${@currency_code_from}"/>
<bm:query-field name="currency_code_to" queryExpression="t1.currency_code &lt;= ${@currency_code_to}"/>
<bm:query-field name="bank_account_code" queryExpression="exists (select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id and a.bank_account_code = ${@bank_account_code})"/>
<bm:query-field name="bank_account_code_from" queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) &gt;= ${@bank_account_code_from}"/>
<bm:query-field name="bank_account_code_to" queryExpression="(select a.bank_account_code from csh_bank_account a where a.bank_account_id=t1.bank_account_id) &lt;= ${@bank_account_code_to}"/>
<bm:query-field name="transaction_date_from" queryExpression="transaction_date &gt;= to_date(${@transaction_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="transaction_date_to" queryExpression="transaction_date &lt;= to_date(${@transaction_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="user_id" queryExpression="t1.created_by=${@user_id}"/>
<bm:query-field name="receipt" queryExpression="(t1.transaction_type=${@receipt} or t1.transaction_type=${@advance_receipt})"/>
<bm:query-field name="full_write_off_flag" queryExpression="t1.write_off_flag!=${@full_write_off_flag}"/>
<bm:query-field name="full_returned_flag" queryExpression="t1.returned_flag!=${@full_returned_flag}"/>
<bm:query-field name="not_write_off_flag" queryExpression="t1.write_off_flag!=${@not_write_off_flag}"/>
<bm:query-field name="not_reversed_flag_r" queryExpression="t1.reversed_flag!=${@not_reversed_flag_r}"/>
<bm:query-field name="bp_id_from" queryExpression="t1.bp_id&gt;=${@bp_id_from}"/>
<bm:query-field name="bp_id_to" queryExpression="t1.bp_id&lt;=${@bp_id_to}"/>
<bm:query-field field="write_off_flag" queryOperator="="/>
<bm:query-field field="posted_flag" queryOperator="="/>
<bm:query-field field="returned_flag" queryOperator="="/>
<bm:query-field field="reversed_flag" queryOperator="="/>
<bm:query-field field="period_name" queryOperator="="/>
<bm:query-field field="payment_method_id" queryOperator="="/>
<bm:query-field field="bp_bank_account_num" queryOperator="like"/>
<!-- <bm:query-field field="posted_flag" queryOperator="="/> -->
<bm:query-field field="transaction_category" queryOperator="="/>
<bm:query-field field="transaction_type" queryOperator="="/>
<bm:query-field field="transaction_id" queryOperator="="/>
<bm:query-field field="collection_classes" queryOperator="="/>
<bm:query-field name="bp_id_from" queryExpression="t1.bp_id &gt;= ${@bp_id_from}"/>
<bm:query-field name="bp_id_to" queryExpression="t1.bp_id &lt;= ${@bp_id_to}"/>
<bm:query-field name="reverse_write_off_amount_flag" queryExpression="t1.write_off_amount &gt; 0 and ${@reverse_write_off_amount_flag}=&apos;Y&apos;"/>
<bm:query-field field="bp_id" queryOperator="="/>
<bm:query-field name="description" queryExpression="t1.description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
<bm:query-field name="bank_account_num" queryExpression="(select a.bank_account_num from csh_bank_account a where a.bank_account_id=t1.bank_account_id) like &apos;%&apos;||upper(${@bank_account_num})||&apos;%&apos;"/>
<bm:query-field name="contract_number" queryExpression="(SELECT cc.contract_number FROM con_contract cc WHERE cc.contract_id = t1.ref_contract_id) like &apos;%&apos;||upper(${@contract_number})||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -100,6 +100,13 @@
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from csh_write_off cw, hls_journal_header h where cw.write_off_type = 'REFUND_ENTRY' and cw.csh_transaction_id = h.source_id and h.source_table = 'CSH_TRANSACTION' and t1.source_doc_type = cw.write_off_type and t1.source_doc_id = cw.write_off_id and exists (select 1 from hls_journal_detail d where h.journal_header_id = d.journal_header_id and cw.write_off_id = d.cashflow_id))"/>
<bm:field name="return_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from hls_journal_header h,csh_transaction ct where h.source_table = 'CSH_TRANSACTION' and h.source_id = ct.transaction_id and ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
<bm:field name="tenant_account_id" forInsert="false" forUpdate="false" expression="(select cc.bank_account_id from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="tenant_account_num" forInsert="false" forUpdate="false" expression="(select ha.bank_account_num from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_account_name" forInsert="false" forUpdate="false" expression="(select ha.bank_account_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_bank_name" forInsert="false" forUpdate="false" expression="(select ha.bank_full_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="return_date" forInsert="false" forUpdate="false" expression="(select listagg(to_char(ct.transaction_date,'yyyy-mm-dd'), ',') WITHIN group(order by ct.transaction_date) from csh_transaction ct where ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -17,7 +17,22 @@
(select u.employee_name
from sys_user_v u
where u.user_id = r.created_by) user_desc,
t.transaction_num
t.transaction_num,
(SELECT listagg(h.sbo_num,',') within group (order by h.source_id)
from hls_journal_header h
WHERE r.return_transaction_id = h.source_id
and h.source_table = 'CSH_TRANSACTION') sbo_num,
(SELECT h.sbo_num
from csh_transaction ct, csh_write_off cw, hls_journal_header h
WHERE r.transaction_id = ct.transaction_id
and ct.source_doc_type = cw.write_off_type
and ct.source_doc_id = cw.write_off_id
and h.source_table = 'CSH_TRANSACTION'
and h.source_id = cw.csh_transaction_id
and exists (select 1
from hls_journal_detail d
where h.journal_header_id = d.journal_header_id
and cw.write_off_id = d.cashflow_id)) receipt_sbo_num
FROM csh_transaction_return r,
csh_transaction t
--hls_bp_master_bank_account v
......
......@@ -174,5 +174,6 @@
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/>
<bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -759,6 +759,7 @@
and ccc.times > 1
and rownum = 1),
'否') cf_9_notfirsttime_exists_flag
,decode(acr_invoice_pkg.check_rl_flag(ct.contract_id), 'N', '否', 'Y', '是') rl_flag_n
FROM con_contract ct
WHERE ct.contract_status NOT IN ('CANCEL')
AND ct.data_class = 'NORMAL'
......@@ -838,7 +839,7 @@
<bm:field name="cf_9_exists_flag"/>
<bm:field name="cf_9_notfirsttime_exists_flag"/>
<bm:field name="secondary_lease_n"/>
<bm:field name="rl_flag_n"/>
</bm:fields>
<!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
......
......@@ -143,6 +143,13 @@
};
function onUpdate_selectedDs(ds,record,name,value,oldvalue){
if(name == 'billing_amount' && record.get('rl_flag') == 'Y'){
Leaf.showConfirm('提示', '此现金流为日立返还金现金流,请确认是否修改?', null, function() {
//record.set('billing_amount', oldvalue);
}, 400);
}
}
]]></script>
<style><![CDATA[
.item-radio-option {
......@@ -182,6 +189,7 @@
<a:event name="load" handler="onLoad_selectedDs"/>
<a:event name="select" handler="onSelect_selectedDs"/>
<a:event name="unselect" handler="unSelect_selectedDs"/>
<a:event name="update" handler="onUpdate_selectedDs"/>
</a:events>
</a:dataSet>
</a:dataSets>
......
......@@ -239,6 +239,7 @@
]]></script>
<a:dataSets>
<a:dataSet id="billing_status_ds" lookupCode="CON_BILLING_STATUS"/>
<a:dataSet id="acr510_bp_class" lookupCode="HLS211_BP_CLASS"/>
<a:dataSet id="taxpayer_type_ds" lookupCode="HLS211_TAXPAYER_TYPE"/>
<a:dataSet id="acr510_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>
......@@ -438,7 +439,12 @@
</a:mapping>
</a:field>
<a:field name="bp_id_agent_level1"/>
<a:field name="rl_flag"/>
<a:field name="rl_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="rl_flag" valueField="code_value"/>
<a:field name="billing_status"/>
<a:field name="billing_status_n" displayField="code_value_name" options="billing_status_ds"
returnField="billing_status" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="queryUpdateFunction"/>
......@@ -510,6 +516,10 @@
<a:comboBox bindTarget="allConditionDs" name="invoice_method_n" prompt="开票方式"/>
<a:comboBox bindTarget="allConditionDs" name="division_n" prompt="租赁物"/>
<a:comboBox bindTarget="allConditionDs" name="invoice_type_n" prompt="开票类型"/>
<a:comboBox bindTarget="allConditionDs" name="rl_flag_n" prompt="是否日立返还金"/>
</a:hBox>
<a:hBox>
<a:comboBox bindTarget="allConditionDs" name="billing_status_n" prompt="开票状态"/>
</a:hBox>
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
......@@ -577,7 +587,8 @@
<a:column name="invoice_method_n" prompt="开票方式" width="100"/>
<a:column name="division_n" prompt="租赁物" width="100"/>
<a:column name="write_off_flag_desc" width="100" align="center" prompt="核销标记" />
<a:column name="rl_flag_n" width="100" align="center" prompt="是否日立返还金" />
<a:column name="billing_status_n" width="100" align="center" prompt="开票状态" />
</a:columns>
</a:grid>
</a:tab>
......
......@@ -35,6 +35,8 @@
<a:link id="${/parameter/@layout_code}_contract_seal_link_id" url="${/request/@context_path}/modules/cont/CON301N/con_contract_finish_seal_info.lview"/>
<a:link id="con_contract_finish_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<!-- <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>-->
<a:link id="rl_notice_print_link"
url="${/request/@context_path}/modules/cont/CON301N/rl_notice_print.lsc"/>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
......@@ -87,6 +89,12 @@
}
}
var role_code = '${/model/role_info/record/@role_code}';
if(role_code!="0008"&&role_code!="0017"&&role_code!="HAND") {
document.getElementById("CONTRACT_QUERY_ENTRANCE_user_button9").style.display = "none";
} else {
document.getElementById("CONTRACT_QUERY_ENTRANCE_user_button9").style.display = "";
}
});
function open_contract_win(ds_id, record_id) {
......@@ -269,6 +277,24 @@
//window.location.href='${/request/@context_path}/con/contract/conExportExcel?contractId='+record.get('contract_id');
};
//返还金通知打印
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function () {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cur_record = $(ds_id).getSelected()[0];
var rl_flag = cur_record.get("rl_flag");
if(rl_flag == 'Y'){
var document_id = cur_record.get("contract_id");
var to_file_name = '返还租金通知'+ cur_record.get("contract_number") + '.docx'
var url = $('rl_notice_print_link').getUrl() + '?document_id=' + document_id + '&document_table=CON_RL_NOTICE&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON&to_file_name='+to_file_name;
window.open(href = url, target = "_blank");
}else if(rl_flag == 'N'){
Leaf.showMessage('提示', '请选择是日立为优质客户付租金的合同!');
return;
}
};
]]></script>
<a:screen-include
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON501"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-update model="hls.HLS811.hls_doc_file_templet_get_atm"/>
<s:server-script import="contract_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.leaf.plugin.word2pdf);
importPackage(Packages.org.apache.commons.io);
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
//生成pdf
function wordToPdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.19-x64.dll");
wordToPdf.word2pdf(word_file_path, pdf_file_path_new);
//删除word文件
//deleteFile(word_file_path);
return pdf_file_path_new;
}
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
function transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function write_os_to_file(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
//transfer(file_path, os);
write_os_to_file(file_path, os);
os.flush();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.pdf_path; //file_path = c:/hls_test_files/content_files/
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
m = m < 10 ? "0" + m : m
var datePath = file_path + y + "/" + m + "/";
return datePath; //datePath = d:/hls_test_files/fileupload/2018/04/
}
function collection_create_content() {
try {
var datePath = getDatePath();
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
//if (record_data.file_exists_flag != 'Y') {
var to_file_name = record_data.to_file_name;
var from_file_path = record_data.file_path;
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = datePath + guid_file_name_tables[0].guid_file_name + 'doc' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table
});
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
} catch (e) {
raise_app_error(e);
}
// word转pdf
var pdf_file_path=to_file_path;
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
//var outputfilename= record_data.to_file_name +'.pdf';
var filename_str = record_data.to_file_name;
var outputfilename= filename_str.substr(0, filename_str.length - 5) +'.pdf';
var pdf_file = new File(outputfilepath);
var file_size = 0;
if (pdf_file.exists()) {
file_size = pdf_file.length();
}
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: outputfilename.toString(),
file_path: outputfilepath.toString(),
source_type: $ctx.parameter.source_type
});
//var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
//HlsFileUtil.downloadFile(encodeURI(to_file_path,'utf-8'),encodeURI(to_file_name,'utf-8'),resp);
//print(outputfilepath.toString());
//print(outputfilename.toString());
download_file(outputfilename.toString(),outputfilepath.toString());
}
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = $ctx.get('/error/@message') || String(e);
raise_app_error(e);
}
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
collection_create_content();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: niminmin
$Date: 2019-10-29 上午09:19:57
$Revision: 1.0
$Purpose: 日立为优质客户付租金入账详情
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query fetchAll="true" model="gld.gld_exchangerate_type_lov" rootPath="exchangerate_type_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.fnd_financial_option" rootPath="fnd_financial_option_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type"
rootPath="default_exchange_rate_type_path"/>
</a:init-procedure>
<a:view>
<a:link id="hn2050_upload_win_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_receipt_import_link"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate"
modelaction="query"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<a:link id="csh510_update_bp_info_link" model="csh.CSH510.csh_transaction_update_bp_info" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_transaction_deposit_write_off_link_id"
url="${/request/@context_path}/modules/cus_deposit/CUS_DEPOSIT100/csh_transaction_deposit_write_off.lsc"/>
<script type="text/javascript"><![CDATA[
function csh1300_receipt_exit() {
$('${/parameter/@winId}').close();
}
function csh1300_receipt_submit() {
if ($('refund_ertry_detail_result_ds').validate()) {
var head_record = $('csh_transaction_receipt_head_ds').getAt(0);
var deposit_records = $('refund_ertry_detail_result_ds').getAll();
var param = {};
var saveData = [];
debugger;
param['transaction_id'] = '${/parameter/@transaction_id}';
param['bp_id'] = head_record.get('bp_id');
param['bp_category'] = head_record.get('bp_category');
if (deposit_records.length < 1) {
Leaf.showMessage('提示', '请先新增日立为优质客户付租金入账明细!');
return;
}
for (var i = 0; i < deposit_records.length; i++) {
var deposit_record;
deposit_record = deposit_records[i];
deposit_record.set('_status', 'insert');
deposit_record.set('write_off_date', head_record.get('transaction_date'));
deposit_record.set('transaction_id', '${/parameter/@transaction_id}');
deposit_record.set('bp_id_agent_level1', '${/parameter/@bp_id}');
saveData.push(deposit_record.data);
}
param['details'] = saveData;
Leaf.showConfirm('${l:PROMPT}', '确定进行日立为优质客户付租金入账?', function () {
Leaf.Masker.mask($('${/parameter/@winId}').wrap, "正在执行。。。");
Leaf.request({
url: $('csh_transaction_deposit_write_off_link_id').getUrl(),
para: param,
success: function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
csh1300_receipt_exit();
},
failure: function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
},
error: function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
},
scope: this
});
}, function () {
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
return;
}, null, null);
}
}
function get_current_amount(amt) {
if (!Ext.isEmpty(amt)) {
return amt;
} else {
return 0;
}
}
function get_minus_amount(amt1, amt2) {
var value1 = get_current_amount(amt1),
value2 = get_current_amount(amt2);
var value = minus(value1, value2);
return value;
}
function get_min_amount(amt1, amt2) {
if (!Ext.isEmpty(amt1) && !Ext.isEmpty(amt2)) {
if (amt1 > amt2) {
return amt2;
} else {
return amt1;
}
} else if (Ext.isEmpty(amt1)) {
return amt2;
} else if (Ext.isEmpty(amt2)) {
return amt1;
} else {
return null;
}
}
function on_csh_trx_deposit_write_off_update(ds, record, name, value, oldvalue) {
debugger;
var head_record = $('csh_transaction_receipt_head_ds').getAt(0);
var unwrite_off_amount = head_record.get("unwrite_off_amount") || 0;
if (name == 'deposit_amount') {
// if (value) {
// record.getField('write_off_due_amount').setRequired(false);
// }
// if (!value) {
// record.getField('write_off_due_amount').setRequired(true);
// }
if (value && value != oldvalue) {
oldvalue = oldvalue || 0;
var change_value = get_minus_amount(value, oldvalue);
var current_apply_amount = get_current_amount(head_record.get('current_apply_amount') || 0);
if (((current_apply_amount - oldvalue + (value || 0))) < 0) {
Leaf.showMessage('${l:PROMPT}', "本次入账金额不能为负!");
setTimeout(function () {
record.set('deposit_amount', '');
}, 10);
head_record.set('current_apply_amount', 0);
return;
}
if ((current_apply_amount - oldvalue + (value || 0)) <= unwrite_off_amount && (current_apply_amount - oldvalue + (value || 0)) >= 0) {
head_record.set('current_apply_amount', current_apply_amount - oldvalue + (value || 0));
} else {
Leaf.showMessage('${l:PROMPT}', "本次入账金额小于剩余可入账金额!");
head_record.set('current_apply_amount', 0);
setTimeout(function () {
record.set('deposit_amount', '');
}, 10);
return;
}
}
}
}
function on_csh_trx_deposit_write_off_remove(ds, record, index) {
var head_record = $('csh_transaction_receipt_head_ds').getAt(0);
var change_value = record.get('deposit_amount') || 0,
current_apply_amount = head_record.get('current_apply_amount') || 0;
setTimeout(function () {
head_record.set('current_apply_amount', current_apply_amount - change_value);
}, 10);
}
function on_csh_trx_deposit_write_off_add(ds, record, index) {
var head_record = $('csh_transaction_receipt_head_ds').getAt(0);
if (head_record.data.bp_category == 'TENANT' && head_record.data.collection_classes == 'DEPOSIT') {
$('refund_ertry_detail_result_ds').fields.contract_number.pro.lovservice = 'cus_deposit.CUS_DEPOSIT100.con_deposit100_v?bp_id_tenant=${/parameter/@bp_id}';
}
record.set('je_date', head_record.get('transaction_date'));
record.set('write_off_type', 'REFUND_ENTRY');
}
]]></script>
<a:dataSets>
<a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/>
<a:dataSet id="DEPOSIT_TRANS_TYPE_DS" lookupCode="DEPOSIT_TRANS_TYPE"/>
<a:dataSet id="exchangerate_type_ds">
<a:datas dataSource="/model/exchangerate_type_path"/>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true"
model="csh.CSH511.csh_transaction">
<a:fields>
<a:field name="current_apply_amount" defaultValue="0"/>
<a:field name="transaction_date" required="true"/>
<a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true"
required="true" returnField="currency_code" valueField="currency_code">
<a:mapping>
<a:map from="precision" to="precision"/>
</a:mapping>
</a:field>
<a:field name="currency_code"/>
<a:field name="precision"/>
<a:field name="functional_currency_code"
defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_name" to="csh_bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_name" to="bp_category_display"/>
</a:mapping>
</a:field>
<a:field name="bp_category_display" readOnly="true"/>
<a:field name="transaction_num" readOnly="true"/>
<a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds"
readOnly="true" returnField="exchange_rate_type" valueField="type_code">
<a:mapping>
<a:map from="type_code" to="exchange_rate_type"/>
<a:map from="rate_method_code" to="rate_method_code"/>
</a:mapping>
</a:field>
<a:field name="exchange_rate_type"/>
<a:field name="exchange_rate" readOnly="true" required="true"/>
<a:field name="rate_method_code"/>
<a:field name="transaction_amount" required="true"/>
<a:field name="transaction_functional_amount" readOnly="true"/>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"
required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="zero_amounts_allowed"/>
<a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y"
lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_id" to="bp_bank_account_id"/>
<a:map from="bank_account_num" to="bp_bank_account_num"/>
<a:map from="bank_account_name" to="bp_bank_account_name"/>
<a:map from="bank_account_code" to="bp_bank_account_code"/>
<a:map from="bank_branch_name" to="bp_bank_branch_name"/>
<a:map from="bank_full_name" to="bp_bank_name"/>
</a:mapping>
</a:field>
<a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530"
lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_category" to="bp_category"/>
<a:map from="bp_category_n" to="bp_category_display"/>
<a:map from="contract_id" to="ref_contract_id"/>
<a:map from="contract_number" to="ref_contract_number"/>
<a:map from="bp_id_agent_level1_n" to="bp_id_agent_level1_n"/>
</a:mapping>
</a:field>
<a:field name="bp_bank_account_num"/>
<a:field name="bp_bank_account_name" required="true"/>
</a:fields>
<a:events>
<!--<a:event name="update" handler="onUpdate_csh511_receipt"/>
<a:event name="add" handler="onAdd_csh511_receipt"/>
<a:event name="load" handler="onAdd_csh511_receipt"/>-->
</a:events>
</a:dataSet>
<a:dataSet id="refund_ertry_detail_result_ds" loadData="true" selectable="true">
<a:fields>
<a:field name="deposit_amount" required="true"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="transaction_type" defaultValue="RECEIPT"/>
<a:field name="document_category" defaultValue="CONTRACT"/>
<a:field name="contract_id"/>
<a:field name="bp_id_agent_level1"/>
<a:field name="bp_id_agent_level1_n"/>
<a:field name="bp_name"/>
<a:field name="bp_id_tenant"/>
<a:field name="deposit_trans_type"/>
<!--<a:field name="je_date"/>-->
<!-- lovService="csh.CSH1300.con_refund_lov?bp_id_agent_level1=${/parameter/@bp_id}"-->
<a:field name="contract_number" lovGridHeight="300" lovHeight="430"
lovService="csh.CSH1300.con_refund_lov"
lovWidth="500" required="true">
<a:mapping>
<a:map from="contract_number" to="contract_number"/>
<a:map from="contract_id" to="contract_id"/>
<a:map from="bp_id_agent_level1" to="bp_id_agent_level1"/>
<a:map from="bp_id_agent_level1_n" to="bp_id_agent_level1_n"/>
<a:map from="bp_name" to="bp_name"/>
<a:map from="bp_id_tenant" to="bp_id_tenant"/>
</a:mapping>
</a:field>
<!-- <a:field name="deposit_trans_type_desc" options="DEPOSIT_TRANS_TYPE_DS"-->
<!-- returnField="deposit_trans_type" displayField="code_value_name" valueField="code_value"-->
<!-- required="true"/>-->
</a:fields>
<a:events>
<a:event name="update" handler="on_csh_trx_deposit_write_off_update"/>
<a:event name="remove" handler="on_csh_trx_deposit_write_off_remove"/>
<a:event name="add" handler="on_csh_trx_deposit_write_off_add"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton id="csh1300_receipt_submit_id" click="csh1300_receipt_submit" text="提交"/>
<a:gridButton id="csh1300_receipt_exit_id" click="csh1300_receipt_exit" text="返回"/>
</a:screenTopToolbar>
<a:fieldSet title="日立为优质客户付租金入账信息">
<a:box column="3" labelWidth="100">
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true"
allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" readOnly="true"/>
<a:numberField name="unwrite_off_amount" bindTarget="csh_transaction_receipt_head_ds"
prompt="剩余可用金额" readOnly="true"/>
<a:numberField name="current_apply_amount" bindTarget="csh_transaction_receipt_head_ds"
prompt="当前申请金额" readOnly="true" renderer="Leaf.formatMoney"/>
</a:box>
</a:fieldSet>
<!--添加两方的账户信息和附件-->
<a:fieldSet title="账户信息">
<a:box column="3" labelWidth="100">
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME" readOnly="true"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
<!--对方账户-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME" readOnly="true"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME" readOnly="true"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME" readOnly="true"/>
</a:box>
</a:fieldSet>
<a:grid id="deposit_ertry_detail_result_grid" bindTarget="refund_ertry_detail_result_ds" height="200"
navBar="false" width="800">
<a:toolBar>
<a:button type="add"/>
<a:button type="delete"/>
</a:toolBar>
<a:columns>
<a:column name="contract_number" align="center" editor="contract_number_lov" prompt="合同编号"
width="150"/>
<a:column name="bp_id_agent_level1_n" align="center" prompt="代理店" width="180"/>
<a:column name="bp_name" align="center" prompt="承租人" width="180"/>
<!-- <a:column name="deposit_trans_type_desc" align="center" editor="deposit_type_box" prompt="保证金类型"-->
<!-- width="124"/>-->
<a:column name="deposit_amount" align="right" editor="deposit_amount_nb" prompt="分配金额"
renderer="Leaf.formatMoney" width="120"/>
<a:column name="je_date" align="center" prompt="经济业务发生日" renderer="Leaf.formatDate" width="120"/>
</a:columns>
<a:editors>
<a:datePicker id="je_date_picker"/>
<a:comboBox id="deposit_type_box"/>
<a:lov id="contract_number_lov"/>
<a:numberField id="deposit_amount_nb"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: niminmin
$Date: 2019-10-28 上午11:10:33
$Revision: 1.0
$Purpose:日立为优质客户付租金入账
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:view>
<a:link id="csh_transaction_receipt_link"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
<a:link id="csh_transaction_receipt_update_link"
url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_receipt_update.lview"/>
<a:link id="csh_transaction_receipt_maintain_link"
url="${/request/@context_path}/modules/csh/CSH1300/csh_refund_entry_detail.lview"/>
<a:link id="csh510_csh_transaction_batch_update" model="csh.CSH510.csh_transaction_delete"
modelaction="batch_update"/>
<a:link id="csh511_csh_transaction_batch_post_link" model="csh.CSH511.csh_transaction_post"
modelaction="batch_update"/>
<!--更新收款单据的状态-->
<a:link id="csh509N_batch_update_confirmed_flag" model="csh.CSH509.query_roles_info"
modelaction="batch_update"/>
<a:link id="csh510N_csh_transaction_batch_update_confirmed_flag" model="csh.CSH510.csh_transaction_update"
modelaction="batch_update"/>
<a:link id="csh510_csh_transaction_import_link"
url="${/request/@context_path}/modules/csh/CSH510N/csh_transaction_import.lview"/>
<script type="text/javascript"><![CDATA[
//锁表
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
//解锁
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
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 (!compareDate(start_date, end_date)) {
return '${l:CSH510.CSH_RECEIPT_DATE_CHECK}'; //校验不通过返回字符串
}
}
return true; //校验通过返回true
}
}
function compareDate(start, end) {
if (start > end) {
return false;
}
return true;
}
function cus100_receipt_reset() {
$('csh_transaction_receipt_maintain_query_ds').reset();
}
function cus100_receipt_query() {
$('csh_transaction_receipt_maintain_result_ds').query();
}
function seedetail_transaction_num(value, record, name) {
if (record.get('transaction_id')) {
var url;
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&bp_id=' + record.get('bp_id');
return '<a href="javascript:openWindow(\'' + url + '\');">' + value + '</a>';
}
}
function openWindow(url) {
new Leaf.Window({
id: 'csh_transaction_refund_link_winid',
params: {
winId: 'csh_transaction_refund_link_winid'
},
url: url,
title: '日立为优质客户付租金入账详情',
fullScreen: true
}).on('close', function () {
cus100_receipt_query();
});
}
function construct_from_to() {
var config = ['transaction_num', 'bank_slip_num', 'transaction_amount', 'currency_code', 'bank_account_code'];
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length; i < j; i++) {
for (var m = 0,
n = pattern.length; m < n; m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
return obj;
}
function csh510_receipt_maintain_update(ds, record, name, value, oldvalue) {
var from_to = construct_from_to();
var opposite_name = from_to[name];
if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name);
if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
record.set(opposite_name, value);
}
}
}
function csh1300_refund_entry() {
var ds_id = 'csh_transaction_receipt_maintain_result_ds';
var ds = $(ds_id)
var record = ds.getSelected()[0];
var url;
url = $('csh_transaction_receipt_maintain_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&bp_id=' + record.get('bp_id');
new Leaf.Window({
id: 'csh_transaction_refund_link_winid',
params: {
winId: 'csh_transaction_refund_link_winid'
},
url: url,
title: '日立为优质客户付租金入账详情',
fullScreen: true
}).on('close', function () {
cus100_receipt_query();
});
}
]]></script>
<a:dataSets>
<a:dataSet id="write_off_flag_ds" lookupCode="WRITE_OFF_FLAG"/>
<a:dataSet id="bp_category_ds" lookupCode="BP_CATEGORY">
</a:dataSet>
<a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">
</a:dataSet>
<a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>
<a:dataSet id="transaction_type_ds">
<a:datas dataSource="/model/transaction_type"/>
</a:dataSet>
<a:dataSet id="posted_flag_ds" lookupCode="CSH510_POST_SELECT"/>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="csh510_collection_classes_batch_update_ds">
<a:fields>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"
title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_branch_name" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"
title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="bank_account_num" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"
title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
<a:map from="bank_account_id" to="bank_account_id"/>
<a:map from="bank_account_num" to="bank_account_num"/>
<a:map from="bank_account_name" to="bank_account_name"/>
<a:map from="bank_account_code" to="bank_account_code"/>
<a:map from="currency_code" to="currency_code"/>
<a:map from="currency_name" to="currency_name"/>
<a:map from="bank_account_type" to="bank_account_type"/>
<a:map from="bank_account_type_name" to="bank_account_type_name"/>
<a:map from="bank_branch_name" to="bank_branch_name"/>
</a:mapping>
</a:field>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="confirmed_flag"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds"
returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_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:mapping>
</a:field>
<a:field name="bp_id_from"/>
<a:field name="bp_name_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"/>
</a:mapping>
</a:field>
<a:field name="bp_id_to"/>
<a:field name="transaction_num_from"/>
<a:field name="transaction_num_to"/>
<a:field name="bank_slip_num_from"/>
<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" 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"/>
</a:mapping>
</a:field>
<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:mapping>
<a:map from="bank_account_code" to="bank_account_code_to"/>
</a:mapping>
</a:field>
<a:field name="transaction_amount_from"/>
<a:field name="transaction_amount_to"/>
<a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds"
returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag"/>
<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov"
lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
<a:mapping>
<a:map from="period_name" to="period_name"/>
</a:mapping>
</a:field>
<a:field name="user_desc" autoComplete="true" lovGridHeight="300" lovHeight="450"
lovService="basic.sys_user_for_lov" lovWidth="500" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID"
title="员工选择">
<a:mapping>
<a:map from="description" to="user_desc"/>
<a:map from="user_id" to="user_id"/>
</a:mapping>
</a:field>
<a:field name="transaction_type_display" displayField="code_value_name"
options="transaction_type_ds" returnField="transaction_type" valueField="code_value"/>
<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_code_to"/>
<a:field name="transaction_type"/>
<a:field name="transaction_category"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
<a:field name="not_reversed_flag_r"/>
<a:field name="receipt_type"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds"
returnField="receipt_type" valueField="code_value"/>
<a:field name="description"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500"
lovService="basic.hls_bp_master_v_for_lov?bp_category=AGENT" lovWidth="500"
title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
</a:mapping>
</a:field>
<a:field name="collection_classes_n" options="ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_maintain_result_ds" autoPageSize="true" autoQuery="true"
model="csh.CSH1300.csh_transaction_miantain_query"
queryDataSet="csh_transaction_receipt_maintain_query_ds" selectable="true"
selectionModel="single">
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="csh1300_refund_entry" text="入账" id="csh1300_refund_entry"/>
<a:gridButton click="cus100_receipt_query" text="HLS.QUERY" id="cus100_receipt_query"/>
<a:gridButton click="cus100_receipt_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form labelWidth="120" marginWidth="80"
title="日立为优质客户付租金入账" style="margin-left:20px">
<a:hBox>
<a:fieldSet column="4" labelWidth="150" title="HLS.QUERY_TITLE">
<a:datePicker name="transaction_date_from"
bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_FROM"/>
<a:datePicker name="transaction_date_to" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.TRANSACTION_DATE_TO"/>
<a:numberField name="transaction_amount_from"
bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_FROM" align="right"/>
<a:numberField name="transaction_amount_to"
bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.TRANSACTION_AMOUNT_TO" align="right"/>
<!--我方账户户名-->
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:lov name="bank_branch_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME"/>
<a:lov name="bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME"/>
<!--银行流水号-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE"/>
<!--对方账户户名-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<!--对方银行名称-->
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<!--对方账户账号-->
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="代理店"/>
</a:fieldSet>
</a:hBox>
</a:form>
<a:fieldSet labelWidth="150" style="margin-left:20px">
<a:grid id="csh_transaction_receipt_maintain_grid_ds"
bindTarget="csh_transaction_receipt_maintain_result_ds" marginHeight="200" marginWidth="80"
navBar="true">
<a:columns>
<a:column name="transaction_num" prompt="CSH510.CSH_TRANSACTION.CSH_TRANSACTION_NUM"
renderer="seedetail_transaction_num" width="110" align="center"/>
<a:column name="bp_name" prompt="代理店/厂商/客户" align="center"/>
<a:column name="transaction_amount" align="right" prompt="CSH510.CSH_TRANSACTION.RECEIPT_AMOUNT"
width="100" renderer="Leaf.formatMoney"/>
<a:column name="transaction_date" renderer="Leaf.formatDate" align="center"/>
<a:column name="unwrite_off_amount" prompt="剩余可用金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"
forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name" align="center"
forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="bank_branch_name" align="center"
forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bank_account_num" align="center"
forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bp_bank_account_name"
align="center" forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_BANK" name="opposite_band_na" align="center"
forExport="false"/>
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NUM" name="bp_bank_account_num" align="center"
forExport="false"/>
</a:columns>
</a:grid>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
......@@ -125,6 +125,20 @@
win.on('close', function() {});
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
if (return_ds == ds.id) {
if (name == 'return_bp_type' && value == 'OTHER') {
record.getField('return_bp_code').setRequired(true);
record.getField('bp_bank_account_name').setReadOnly(false);
}else if(name == 'return_bp_type' && value != 'OTHER'){
record.getField('return_bp_code').setRequired(false);
record.getField('bp_bank_account_name').setReadOnly(true);
}
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -10,6 +10,7 @@
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
......@@ -187,6 +188,13 @@
var bp_id = record.get('bp_id');
var remain_total_amount = record.get('remain_total_amount');
var bank_slip_num = record.get('bank_slip_num');
//20220412新增校验
var collection_classes = record.get('collection_classes');
var source_csh_trx_id = record.get('source_csh_trx_id');
if (collection_classes != 'REFUND' || Ext.isEmpty(source_csh_trx_id)){
Leaf.showMessage('提示','该功能只适用日立返还金退款');
return;
}
Leaf.request({
url: $('csh560_check_wfl_link').getUrl(),
para: {
......@@ -265,6 +273,7 @@
<a:dataSet id="posted_flag_ds" lookupCode="CSH510_POST_SELECT"/>
<a:dataSet id="returned_flag_ds" lookupCode="CSH510_RETURN_SELECT"/>
<a:dataSet id="reversed_flag_ds" lookupCode="CSH510_REVERSE_SELECT"/>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
......@@ -382,6 +391,10 @@
<a:field name="currency_code_to"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag"/>
<a:field name="collection_classes"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds"
prompt="款项用途"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/>
......@@ -423,8 +436,8 @@
<a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> -->
<a:gridButton click="csh510_receipt_query" text="HLS.QUERY"/>
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<a:gridButton click="csh515_receipt_return" text="CSH515.CSH_REFUND" id="csh515_receipt_return"/>
<a:gridButton click="csh515_receipt_return_list" text="CSH515.CSH_REFUND_DETAILS"/>
<a:gridButton click="csh515_receipt_return" text="CSH515.CSH_REFUND" id="csh515_receipt_return_but"/>
<a:gridButton click="csh515_receipt_return_list" text="CSH515.CSH_REFUND_DETAILS" id="csh515_return_list_but"/>
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80"
title="收款退款" style="margin-left:20px">
......@@ -449,6 +462,8 @@
<!--对方账户账号-->
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:textField name="contract_number" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="合同编号"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="款项用途"/>
</a:fieldSet>
......@@ -460,7 +475,11 @@
<a:column name="receipt_type_n" align="center" prompt="CSH510.CSH_TRANSACTION.RECEIPT_TYPE" width="100"/>
<a:column name="transaction_amount" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT" renderer="Leaf.formatMoney" align="right"/>
<a:column name="transaction_date" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_DATE" renderer="Leaf.formatDate" align="center"/>
<a:column name="return_date" prompt="退款日期" align="center"/>
<a:column name="can_returned_amount" prompt="可退款金额" renderer="Leaf.formatMoney" align="right"/>
<a:column name="contract_number" prompt="合同编号" width="120" align="center"/>
<a:column name="receipt_sbo" prompt="收款凭证SBO编号" width="120" align="center"/>
<a:column name="return_sbo" prompt="应付凭证SBO编号" width="120" align="center"/>
<a:column name="bp_name" prompt="HLS.BP_NAME" align="center"/>
<a:column name="bank_slip_num" prompt="银行流水号" align="center"/>
<a:column name="this_return_amount" prompt="退款中金额" align="right" renderer="Leaf.formatMoney"/>
......@@ -490,5 +509,16 @@
</a:grid>
</a:screenBody>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<script>
Leaf.onReady(function () {
// 会计担当(0014)不展示退款按钮
var role_code = '${/model/role_info/record/@role_code}';
if (role_code == '0009') {
if (document.getElementById('csh515_receipt_return_but')) {
document.getElementById('csh515_receipt_return_but').style.display = "none";
}
}
})
</script>
</a:view>
</a:screen>
......@@ -6,7 +6,9 @@
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<div/>
<a:link id="csh_transaction_return_detail_link"
......@@ -36,10 +38,15 @@
$L.showWarningMessage("提示",'只能选择一条退款记录进行打印!');
return;
}
var cur_record = records[0];
if(Ext.isEmpty(cur_record.get('sbo_num'))||Ext.isEmpty(cur_record.get('receipt_sbo_num'))){
$L.showWarningMessage("提示",'SBO凭证号未生成,无法打印!');
return;
}
var templet_code = 'CSH_RETURN_INFO';
// var document_id = record.get('ast_car_insurance_records_id');
var url_l = $('assignment_agreement_print_link').getUrl() + '?document_id=' + records[0].get("return_id") + '&document_table=CSH_TRANSACTION_RETURN&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
window.open(href = url_l, target = "_blank");
}
function openWindow1(url) {
new Leaf.Window({
......@@ -83,7 +90,7 @@
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton id="csh515_returned_list_back_id" click="csh515_returned_list_back" text="HLS.EXIT"/>
<a:gridButton id="csh515_returned_apply_print" click="csh_transaction_print" text="退款申请书打印"/>
<a:gridButton id="csh515_returned_apply_print" click="csh_transaction_print" text="退款申请书打印" />
</a:screenTopToolbar>
<a:grid bindTarget="csh_transaction_returned_list_ds" marginHeight="130" marginWidth="30" navBar="true">
<a:columns>
......@@ -104,5 +111,16 @@
</a:columns>
</a:grid>
</a:screenBody>
<script>
Leaf.onReady(function () {
// 债权内勤(0009), 宏菱管理员(0017),宏菱管理员(HAND) 才展示打印按钮
var role_code = '${/model/role_info/record/@role_code}';
if (!(role_code == '0009' || role_code =='0017' || role_code =='HAND')) {
if (document.getElementById('csh515_returned_apply_print')) {
document.getElementById('csh515_returned_apply_print').style.display = "none";
}
}
})
</script>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -98,10 +98,22 @@
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record) {
//0017 宏菱管理员 HAND HAND管理员
var role_code = '${/model/user_name_path/record/@role_code}';
if(role_code == '0017' || role_code == 'HAND'){
record.getField('ref_n01').setReadOnly(false);
}else {
record.getField('ref_n01').setReadOnly(true);
}
};
//新增时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
record.set("created_by_n",'${/model/user_name_path/record/@user_name}');
record.set("created_by",'${/session/@user_id}');
record.getField('ref_n01').setReadOnly(false);
};
//更新机型信息
......
......@@ -134,6 +134,7 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var bp_info_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
if( Ext.isEmpty(record.get('journal_header_id'))){
record.set('je_company_id', 1);
record.set('je_company_id_n', '宏菱租赁');
record.set('currency_code', 'CNY');
......@@ -149,6 +150,7 @@
record.set('reversed_flag', 'N');
record.set('source_table', 'hls_journal_header');
record.set('company_id', 1);
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -230,6 +230,7 @@
<a:column name="rental_12_pay_flag" align="center" prompt="是否已履约12期及以上" width="160"/>
<a:column name="cf_9_exists_flag" align="center" prompt="是否有违约金记录产生" width="160"/>
<a:column name="cf_9_notfirsttime_exists_flag" align="center" prompt="除第1期外是否有违约金记录产生" width="160"/>
<a:column name="rl_flag_n" align="center" prompt="是否日立返还金" width="100"/>
</a:columns>
</a:grid>
</a:tab>
......
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