Commit 95fe9a83 authored by gzj34291's avatar gzj34291

Merge remote-tracking branch 'origin/develop' into develop

parents 16933bb4 d14f555b
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select nvl((select ep.employee_type_code
from exp_employees e, exp_employee_types_vl ep
where e.employee_id = su.employee_id
and e.employee_type_id = ep.employee_type_id),'NULL') employee_type_code
from sys_user su
where su.user_id = ${/session/@user_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
con_contract_workflow_pkg.insert_into_attachment_bmp(
p_file_path =>${@p_file_path},
p_file_name =>${@p_file_name},
p_file_size =>${@p_file_size},
p_user_id =>${@p_user_id},
p_check_id =>${@p_check_id}
);
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sc
$Date: 2022年12月2日13:51:11
$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" defaultOrderBy="t1.transaction_date desc,t1.transaction_num desc">
<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" physicalName="TRANSACTION_TYPE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_TYPE"/>
<bm:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH511_TRANSACTION_TYPE' and v.code_value =t1.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" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="write_off_flag_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CON_WRITE_OFF_FLAG' and v.code_value =t1.write_off_flag)" forUpdate="false" forInsert="false"/>
<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" 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="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))" 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))" forInsert="false" forUpdate="false" />
<bm:field name="status" expression="nvl(t1.status,&apos;NEW&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="status_desc" expression="(select code_value_name from sys_code_values_v where code = 'CSH_WRITE_OFF_STATUS' and code_value = nvl(t1.status,'NEW'))" />
<bm:field name="ref_contract_id"/>
<bm:field name="csh_bp_name"/>
<bm:field name="receipt_type_desc" expression="(select code_value_name from sys_code_values_v where code = 'RECEIPT_TYPE' and code_value = t1.receipt_type)"/>
<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="bank_name" expression="(select a.bank_short_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false"/>
<bm:field name="ref_v05"/>
<bm:field name="purpose"/>
<bm:field name="description_p" expression="(t1.description || t1.purpose)" forUpdate="false" forInsert="false" />
<bm:field name="review_status" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="review_status_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_CSH_REVIEW_STATUS' and v.code_value =t1.review_status)" forInsert="false" forUpdate="false" />/>
<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="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)" forceUpdate="false" forInsert="false" />
<!--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="created_user_name" expression="(select description from sys_user where user_id = t1.created_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirm_user_name" expression="(select description from sys_user where user_id = t1.confirmed_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirmed_flag"/>
<bm:field name="import_source"/>
<bm:field name="import_source_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH510_IMPORT_SOURCE' and v.code_value =t1.import_source)" forInsert="false" forUpdate="false"/>
<bm:field name="recoi_status" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECOI_FLAG' and v.code_value =t1.recoi_status)" forInsert="false" forUpdate="false"/>
<bm:field name="recoi_status_n" expression="(select v.code_value from sys_code_values_v v where v.code = 'RECOI_FLAG' and v.code_value =t1.recoi_status)" forInsert="false" forUpdate="false"/>
<!--end-->
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:primary-key>
<bm:pk-field name="transaction_id"/>
</bm:primary-key>
<bm:query-fields>
<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_from" queryExpression="t1.bank_slip_num &gt;= ${@bank_slip_num_from}"/>
<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_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="trunc(transaction_date, &apos;fmdd&apos;) &gt;= to_date(${@transaction_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="transaction_date_to" queryExpression="trunc(transaction_date, &apos;fmdd&apos;) &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} or t1.transaction_type=${@deposit} or t1.transaction_type=${@risk})"/>
<!--<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_reversed_flag_r" queryExpression="t1.reversed_flag!=${@not_reversed_flag_r}"/>
<bm:query-field name="bp_id_from" queryExpression="t1.bp_id=${@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="confirmed_flag" queryOperator="="/>
<bm:query-field field="period_name" queryOperator="="/>
<bm:query-field field="payment_method_id" 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 field="csh_bp_name" queryOperator="like"/>
<bm:query-field name="description" queryExpression="t1.description like &apos;%&apos;||${@description}||&apos;%&apos;"/>
<!-- <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="status" queryExpression="nvl(t1.status,&apos;NEW&apos;) = ${@status}"/>
<!-- <bm:query-field name="bp_name" queryExpression="t1.bp_id in (select d.bp_id from hls_bp_master d where d.bp_name like &apos;%&apos;||${@bp_name_from}||&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;"/>
<!--add by chenlingfeng-->
<bm:query-field name="full_write_off_flag" queryExpression="(t1.write_off_flag = ${@full_write_off_flag} or t1.write_off_flag = ${@partial_write_off_flag} or t1.write_off_flag = ${@not_write_off_flag})"/>
<bm:query-field name="full_review_status" queryExpression="(nvl(t1.review_status,'NOT') = ${@full_review_status} or nvl(t1.review_status,'NOT') = ${@partial_review_status} or nvl(t1.review_status,'NOT') = ${@not_review_status})"/>
<bm:query-field name="unwrite_off_amount_from" queryExpression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))&gt;=${@unwrite_off_amount_from}"/>
<bm:query-field name="unwrite_off_amount_to" queryExpression="(nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0))&lt;=${@unwrite_off_amount_from}"/>
<bm:query-field name="bank_slip_num" queryExpression="t1.bank_slip_num like ${@bank_slip_num}"/>
<bm:query-field name="transaction_num" queryExpression="t1.transaction_num like ${@transaction_num}"/>
<bm:query-field name="bp_bank_account_name" queryExpression="t1.bp_bank_account_name like ${@bp_bank_account_name}"/>
<bm:query-field name="bp_bank_account_num" queryExpression="t1.bp_bank_account_num like ${@bp_bank_account_num}"/>
<bm:query-field name="bank_name" queryExpression="(select a.bank_short_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id) like ${@bank_name}"/>
<bm:query-field name="bank_branch_name" queryExpression="(select a.bank_branch_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id) like ${@bank_branch_name}"/>
<bm:query-field field="import_source" queryOperator="="/>
<!--end-->
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id} AND t1.reversed_flag = 'N' and t1.returned_flag != 'FULL')"/>
<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="(((${@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-filter name="write_off_flag_desc" expression="(t1.write_off_flag not in('FULL','PARTIAL'))"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sc
$Date: 2022年12月2日11:26:37
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
cm_sh_transaction_reverse_pkg.csh_bank_recoin_submit(
p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
cm_sh_transaction_reverse_pkg.csh_check_reverse(
p_transaction_id =>${@transaction_id},
p_user_id =>${/session/@user_id}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sc
$Date: 2022年12月3日21:18:18
$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" defaultOrderBy="t1.transaction_date desc,t1.transaction_num desc">
<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" physicalName="TRANSACTION_TYPE" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_TYPE"/>
<bm:field name="transaction_type_desc" forInsert="false" forUpdate="false" prompt="HLS.TRANSACTION_TYPE" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH511_TRANSACTION_TYPE' and v.code_value =t1.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" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="write_off_flag_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CON_WRITE_OFF_FLAG' and v.code_value =t1.write_off_flag)" forUpdate="false" forInsert="false"/>
<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" 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="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))" 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))" forInsert="false" forUpdate="false" />
<bm:field name="status" expression="nvl(t1.status,&apos;NEW&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="status_desc" expression="(select code_value_name from sys_code_values_v where code = 'CSH_WRITE_OFF_STATUS' and code_value = nvl(t1.status,'NEW'))" />
<bm:field name="ref_contract_id"/>
<bm:field name="csh_bp_name"/>
<bm:field name="receipt_type_desc" expression="(select code_value_name from sys_code_values_v where code = 'RECEIPT_TYPE' and code_value = t1.receipt_type)"/>
<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="bank_name" expression="(select a.bank_short_name from csh_bank_account_v a where a.bank_account_id=t1.bank_account_id)" forInsert="false" forUpdate="false"/>
<bm:field name="ref_v05"/>
<bm:field name="purpose"/>
<bm:field name="description_p" expression="(t1.description || t1.purpose)" forUpdate="false" forInsert="false" />
<bm:field name="review_status" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="review_status_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_CSH_REVIEW_STATUS' and v.code_value =t1.review_status)" forInsert="false" forUpdate="false" />/>
<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="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)" forceUpdate="false" forInsert="false" />
<!--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="created_user_name" expression="(select description from sys_user where user_id = t1.created_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirm_user_name" expression="(select description from sys_user where user_id = t1.confirmed_by)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirmed_flag_desc" expression="(select code_value_name from sys_code_values_v where code = 'CONFIRMED_FLAG' and code_value = t1.confirmed_flag)" forceUpdate="false" forInsert="false"/>
<bm:field name="confirmed_flag"/>
<bm:field name="import_source"/>
<bm:field name="import_source_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'CSH510_IMPORT_SOURCE' and v.code_value =t1.import_source)" forInsert="false" forUpdate="false"/>
<bm:field name="recoi_status" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECOI_FLAG' and v.code_value =t1.recoi_status)" forInsert="false" forUpdate="false"/>
<!--end-->
</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="transaction_id" expression="(t1.transaction_id=${@transaction_id})"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -73,7 +73,7 @@
begin
prj_project_lease_import_pkg.prj_lease_item_import_check(p_header_id => ${/model/header/record/@header_id},
p_user_id => ${/session/@user_id},
p_set_number=>${/parameter/@set_number});
p_project_lease_item_id=>${/parameter/@project_lease_item_id});
end;
]]></bm:update-sql>
</bm:operation>
......
......@@ -23,8 +23,6 @@
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.insert_lease_item_list(
p_session_id=>${/session/@session_id},
p_user_id=>${/session/@user_id},
p_project_lease_item_id=>${@project_lease_item_id});
end;
]]></bm:update-sql>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: SC
$Date: 2022年12月6日19:08:18
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
prj_project_lease_import_pkg.delete_lease_success_after(
p_project_lease_item_id=>${@project_lease_item_id},
p_count =>${@count}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -328,5 +328,7 @@ var enableLayoutConfig = {
'modules/hsbc/HSBC120/hsbc_paying_batch_query.lview':true,
'modules/hsbc/HSBC130/pingan_account_hisbalance_query.lview':true,
'modules/prj/PRJ501N/prj_project_lease_import_details.lview':true,
'modules/prj/PRJ501N/prj_project_lease_import.lview:':true
'modules/prj/PRJ501N/prj_project_lease_import.lview:':true,
'modules/csh/CSH531F/csh_bank_recoi_processing.lview':true,
'modules/csh/CSH531F/csh_bank_recoi_processing_workflow.lview':true
};
\ No newline at end of file
......@@ -9,6 +9,7 @@
dynamiccreateenabled="true" trace="true">
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query model="cont.CON3200.get_user_employee_type" rootPath="employee_info"/>
<a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
......@@ -761,5 +762,15 @@
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<script type="text/javascript"><![CDATA[
Leaf.onReady(init);
function init() {
//用户对应员工不是员工 就不显示该附件组件
if("${/model/employee_info/record/@employee_type_code}" != 'STAFF'){
document.getElementById('${/parameter/@layout_code}_C_ATTCH_2_con_contract_grid_id_wrap').style.display = 'none';
}
}
]]></script>
</a:view>
</a:screen>
<?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:service xmlns:ns1="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script ><![CDATA[
importPackage(Packages.java.util);
importPackage(Packages.java.lang);
importPackage(Packages.com.hand.hl);
importPackage(Packages.java.io);
importPackage(java.io);
try{
var sys_url_bm=$bm('cont.CON4000.get_sys_url');
var parameter_code='HLS_SYSTEM_URL';
var SysurlQuery = sys_url_bm.queryAsMap({
parameter_code: parameter_code
});
var sys_url = SysurlQuery.getChildren()[0].parameter_value;
var down_url =sys_url+'modules/cont/CON3200/contract_receipt_detail_print.lsc?template_name='+'aa.xls'
+ '&contract_id=' +$ctx.parameter.p_contract_id
+ '&file_name=' + encodeURI('应收明细表','utf-8');
var now = new Date();
y = now.getFullYear();
m = now.getMonth() + 1;
m = m < 10 ? "0" + m : m;
d = now.getDate();
d = d < 10 ? "0" + d : d;
var fileDir_bm=$bm('cont.CON4000.get_sys_url');
var parameter_code='HLCM_EMAIL_URL'; //存放文件路径 待修改
var fileDirQuery = fileDir_bm.queryAsMap({
parameter_code: parameter_code
});
var f_fileDir = fileDirQuery.getChildren()[0].parameter_value;
var filePath = (f_fileDir + y + "\\" + m + "\\").toString();
var tranfer_dir= new File(String(filePath));
if(!tranfer_dir.exists()){//如果文件夹不存在,创建文件夹
tranfer_dir.mkdirs();//创建文件夹
}
var contract_number = $ctx.parameter.p_contract_number;
var f_fileName = (contract_number+'应收明细表'+y+m+d+'.xlsx').toString();
var result_flag=DoloadFileByUrl.downloadFile(down_url, filePath, f_fileName);
file_size=get_file_length(filePath+f_fileName);
if(result_flag=true){
var business_daily_email=$bm('cont.CON3200.receipt_detail_insert_atm').update({
p_file_path :(filePath+f_fileName).toString(),
p_file_name :f_fileName,
p_file_size :file_size,
p_user_id :1,
p_check_id :$ctx.parameter.p_check_id
});
}
}catch(e){
raise_app_error(e.message);
}
function get_file_length(path){
var file=new File(String(path));
if(file.exists() && file.isFile()){
//println(f.length());
length=file.length();
return length;}
else{
return 0 ;}
}
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sc
$Date: 2022年12月2日10:15:43
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<a:model-query model="csh.CSH531N.csh_query_position" rootPath="result_position"/>
<a:model-query
defaultWhereClause="v.code=&apos;CSH511_TRANSACTION_TYPE&apos; and v.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)"
fetchAll="true" model="basic.sys_code_default_value" rootPath="sys_code_default_value_path"/>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_recoi_maintain_readonly_link"
url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/>
<a:link id="csh531F_bank_recoin_processing_link" model="csh.CSH531F.csh_transaction_recoi_submit" modelaction="update"/>
<script type="text/javascript"><![CDATA[
function csh531_reset() {
$('csh_transaction_receipt_write_off_query_ds').reset();
}
function csh531_query() {
$('csh531n_sap_bankflow_info_result_ds').query();
}
function summary_Renderer(data, name) {
if (name == 'transaction_num') {
return '<font color=red>' + '合计' + '</font>';
} else if (name == 'transaction_amount') {
return colum_caculateTotal(data, name);
} else if (name == 'unwrite_off_amount') {
return colum_caculateTotal(data, name);
}
}
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 csh531n_open_write_off_detail(id) {
var ds = $('csh531n_sap_bankflow_info_result_ds');
var record = ds.findById(id);
if (record.get('transaction_id')) {
var url;
url = $('csh_transaction_recoi_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
}
var win = new Leaf.Window({
id: 'csh_transaction_recoi_link_winid',
params: {
winId: 'csh_transaction_recoi_link_winid'
},
url: url,
title: '收款维护',
fullScreen: true
});
win.on('close', function () {
$('csh531n_sap_bankflow_info_result_ds').query();
});
}
function csh531n_detail_renderer(value, record, name) {
if (name == 'transaction_num') {
return '<a href="Javascript:csh531n_open_write_off_detail(\'' + record.id + '\')">' + value + '</a>';
}
}
function csh531f_new_write_off() {
var record = $('csh531n_sap_bankflow_info_result_ds').getSelected()[0];
if (record) {
var recoi_status=record.get('recoi_status_n');
if(recoi_status=='RECOIING'){
Leaf.showMessage('${l:PROMPT}','反冲中状态不能提交!');
return;
}
Leaf.showConfirm('提示', '您确认提交吗', function() {
Leaf.Masker.mask(Ext.getBody());
var transaction_id=record.get('transaction_id');
Leaf.request({
url: $('csh531F_bank_recoin_processing_link').getUrl(),
para:{
transaction_id:transaction_id
},
success: function() {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
$('csh531n_sap_bankflow_info_result_ds').query();
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
});
} else {
Leaf.showErrorMessage('提示', '请先选择一条数据');
}
}
]]></script>
<a:dataSets>
<a:dataSet id="import_source_ds" lookupCode="CSH510_IMPORT_SOURCE"/>
<a:dataSet id="batch_status_ds" lookupCode="CSH531_BATCH_STATUS"/>
<a:dataSet id="csh531n_ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>
<a:dataSet id="csh_transaction_type_ds">
<a:datas dataSource="/model/sys_code_default_value_path"/>
</a:dataSet>
<a:dataSet id="status_ds" lookupCode="CSH_WRITE_OFF_STATUS"/>
<a:dataSet id="con_write_off_flag_ds">
<a:datas>
<a:record code_value="NOT" code_value_name="未核销"/>
<!-- <a:record code_value="PARTIAL" code_value_name="部分核销"/>-->
</a:datas>
</a:dataSet>
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="recoi_flag_ds" lookupCode="RECOI_FLAG"/>
<a:dataSet id="csh_transaction_receipt_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="write_off_flag"/>
<a:field name="reversed_flag" defaultValue="N"/>
<a:field name="cw_flag" defaultValue="Y"/>
<a:field name="recoi_status_n"/>
<a:field name="recoi_status" options="recoi_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="recoi_status" defaultValue="未反冲"/>
<!-- <a:field name="confirmed_flag" defaultValue="ACCAUDITED"/>-->
<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"
returnField="status" valueField="code_value"/>
<a:field name="collection_classes_desc" options="csh531n_ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="transaction_type_desc" options="csh_transaction_type_ds"
returnField="transaction_type" valueField="code_value" displayField="code_value_name"
defaultValue="收款"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="550" lovLabelWidth="50" lovWidth="550"
lovService="basic.hls_bp_master_v_for_lov" 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="position_code" defaultValue="${/model/result_position/record/@position_code}"/>
<a:field name="receipt_type_desc" options="receipt_type_ds" valueField="code_value"
defaultValue="code_value_name" returnField="receipt_type"/>
<a:field name="import_source_desc" options="import_source_ds" valueField="code_value" displayField="code_value_name" returnField="import_source"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh531n_sap_bankflow_info_result_ds" autoPageSize="true" autoQuery="true"
model="csh.CSH531F.csh_transaction_recoi_query"
queryDataSet="csh_transaction_receipt_write_off_query_ds" selectable="true"
selectionModel="single">
<a:fields>
<a:field name="auto_filt_penalty" checkedValue="Y" uncheckedValue="N"/>
<a:field name="auto_filt_prinicipal_interest" checkedValue="Y" uncheckedValue="N"/>
<a:field name="status_n" displayField="code_value_name" options="status_ds" returnField="status"
valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="auto_write_off_ds" autoCreate="true">
<a:fields>
<a:field name="bank_account_num" checkedValue="Y" uncheckedValue="N"/>
<a:field name="bp_bank_account_num" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
<a:field name="bp_bank_account_name" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
<a:field name="trx_amount" checkedValue="Y" uncheckedValue="N"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="csh531_query" text="HLS.QUERY"/>
<a:gridButton click="csh531_reset" text="重置"/>
<a:gridButton id="csh531_new_write_off_btn_id" click="csh531f_new_write_off" text="反冲"/>
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" style="background:#f7f7f8" labelWidth="250">
<a:fieldSet labelWidth="250" title="HLS.QUERY_TITLE">
<a:box column="4">
<a:datePicker name="transaction_date_from"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="收款日期从"/>
<a:datePicker name="transaction_date_to"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="收款日期到"/>
<a:numberField name="transaction_amount_from"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="收款金额从"/>
<a:numberField name="transaction_amount_to"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="收款金额到"/>
</a:box>
<a:box column="4">
<a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_query_ds"
prompt="现金事务编号"/>
<a:lov name="bp_name"
bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="商业伙伴"/>
<a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="核销状态"/>
<a:comboBox name="import_source_desc" bindTarget="csh_transaction_receipt_write_off_query_ds" prompt="新增路径"/>
</a:box>
</a:fieldSet>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh531n_sap_bankflow_info_result_ds" marginHeight="210" marginWidth="30"
navBar="true">
<a:columns>
<a:column name="transaction_num" prompt="现金事务编号" lock="true" align="center"
renderer="csh531n_detail_renderer" width="120"/>
<a:column name="transaction_type_desc" prompt="现金事务类型" lock="true" align="center" width="120"/>
<a:column name="receipt_type_desc" prompt="收款类型" align="center" lock="true" width="120"/>
<a:column name="transaction_amount" align="right" lock="true" footerRenderer="summary_Renderer"
renderer="Leaf.formatMoney" prompt="收款金额" width="120"/>
<a:column name="transaction_date" renderer="Leaf.formatDate" align="center" lock="true"
prompt="收款日期" width="120"/>
<a:column name="description" prompt="摘要" width="180"/>
<a:column name="bp_name" prompt="商业伙伴" align="left" width="200"/>
<a:column name="write_off_flag_desc" prompt="核销状态" width="120" align="center"/>
<a:column name="import_source_desc" prompt="新增路径" align="center"/>
<a:column name="created_user_name" prompt="制单人" width="120" align="center"/>
<a:column name="recoi_status" prompt="反冲状态" width="90" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: sc
$Date: 2022年12月2日10:15:43
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure>
<a:model-query model="csh.CSH531N.csh_query_position" rootPath="result_position"/>
<a:model-query
defaultWhereClause="v.code=&apos;CSH511_TRANSACTION_TYPE&apos; and v.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)"
fetchAll="true" model="basic.sys_code_default_value" rootPath="sys_code_default_value_path"/>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_recoi_maintain_readonly_link"
url="${/request/@context_path}/modules/csh/CSH510/csh_transaction_hand_receipt_update_readonly.lview"/>
<script type="text/javascript"><![CDATA[
function summary_Renderer(data, name) {
if (name == 'transaction_num') {
return '<font color=red>' + '合计' + '</font>';
} else if (name == 'transaction_amount') {
return colum_caculateTotal(data, name);
} else if (name == 'unwrite_off_amount') {
return colum_caculateTotal(data, name);
}
}
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 csh531n_open_write_off_detail(id) {
var ds = $('csh531n_sap_bankflow_info_result_ds');
var record = ds.findById(id);
if (record.get('transaction_id')) {
var url;
url = $('csh_transaction_recoi_maintain_readonly_link').getUrl() + '?transaction_id=' + record.get('transaction_id');
}
var win = new Leaf.Window({
id: 'csh_transaction_recoi_link_winid',
params: {
winId: 'csh_transaction_recoi_link_winid'
},
url: url,
title: '收款维护',
fullScreen: true
});
win.on('close', function () {
$('csh531n_sap_bankflow_info_result_ds').query();
});
}
function csh531n_detail_renderer(value, record, name) {
if (name == 'transaction_num') {
return '<a href="Javascript:csh531n_open_write_off_detail(\'' + record.id + '\')">' + value + '</a>';
}
}
]]></script>
<a:dataSets>
<a:dataSet id="import_source_ds" lookupCode="CSH510_IMPORT_SOURCE"/>
<a:dataSet id="batch_status_ds" lookupCode="CSH531_BATCH_STATUS"/>
<a:dataSet id="confirmed_flag_ds">
<a:datas>
<a:record code_value="ACCAUDITED" code_value_name="收款已确认"/>
<a:record code_value="WF_APPROVING" code_value_name="核销确认中"/>
<a:record code_value="APPROVED" code_value_name="核销已确认"/>
<a:record code_value="WF_REJECTED" code_value_name="核销退回"/>
</a:datas>
</a:dataSet>
<a:dataSet id="csh531n_ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>
<a:dataSet id="csh_transaction_type_ds">
<a:datas dataSource="/model/sys_code_default_value_path"/>
</a:dataSet>
<a:dataSet id="status_ds" lookupCode="CSH_WRITE_OFF_STATUS"/>
<a:dataSet id="con_write_off_flag_ds" lookupCode="CON_WRITE_OFF_FLAG"/>
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="recoi_flag_ds" lookupCode="RECOI_FLAG"/>
<a:dataSet id="csh_transaction_receipt_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="transaction_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="write_off_flag"/>
<a:field name="reversed_flag" defaultValue="N"/>
<a:field name="cw_flag" defaultValue="Y"/>
<a:field name="recoi_status" options="recoi_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="recoi_status" defaultValue="未反冲"/>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="confirmed_flag" defaultValue="收款已确认"/>
<a:field name="confirmed_flag" defaultValue="ACCAUDITED"/>
<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"
returnField="status" valueField="code_value"/>
<a:field name="collection_classes_desc" options="csh531n_ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="transaction_type_desc" options="csh_transaction_type_ds"
returnField="transaction_type" valueField="code_value" displayField="code_value_name"
defaultValue="收款"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="550" lovLabelWidth="50" lovWidth="550"
lovService="basic.hls_bp_master_v_for_lov" 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="position_code" defaultValue="${/model/result_position/record/@position_code}"/>
<a:field name="receipt_type_desc" options="receipt_type_ds" valueField="code_value"
defaultValue="code_value_name" returnField="receipt_type"/>
<a:field name="import_source_desc" options="import_source_ds" valueField="code_value" displayField="code_value_name" returnField="import_source"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh531n_sap_bankflow_info_result_ds" autoPageSize="true" autoQuery="true"
model="csh.CSH531F.csh_transaction_recoi_wfl_query"
queryDataSet="csh_transaction_receipt_write_off_query_ds" selectable="true"
selectionModel="single">
<a:fields>
<a:field name="auto_filt_penalty" checkedValue="Y" uncheckedValue="N"/>
<a:field name="auto_filt_prinicipal_interest" checkedValue="Y" uncheckedValue="N"/>
<a:field name="status_n" displayField="code_value_name" options="status_ds" returnField="status"
valueField="code_value"/>
</a:fields>
</a:dataSet>
<a:dataSet id="auto_write_off_ds" autoCreate="true">
<a:fields>
<a:field name="bank_account_num" checkedValue="Y" uncheckedValue="N"/>
<a:field name="bp_bank_account_num" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
<a:field name="bp_bank_account_name" checkedValue="Y" defaultValue="Y" uncheckedValue="N"/>
<a:field name="trx_amount" checkedValue="Y" uncheckedValue="N"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh531n_sap_bankflow_info_result_ds" marginHeight="210" marginWidth="30"
navBar="true">
<a:columns>
<a:column name="transaction_id" hidden="true" width="180"/>
<a:column name="transaction_num" prompt="现金事务编号" lock="true" align="center"
renderer="csh531n_detail_renderer" width="120"/>
<a:column name="transaction_type_desc" prompt="现金事务类型" lock="true" align="center" width="120"/>
<a:column name="receipt_type_desc" prompt="收款类型" align="center" lock="true" width="120"/>
<a:column name="transaction_amount" align="right" lock="true" footerRenderer="summary_Renderer"
renderer="Leaf.formatMoney" prompt="收款金额" width="120"/>
<a:column name="transaction_date" renderer="Leaf.formatDate" align="center" lock="true"
prompt="收款日期" width="120"/>
<a:column name="description" prompt="摘要" width="180"/>
<a:column name="bp_name" prompt="商业伙伴" align="left" width="200"/>
<a:column name="write_off_flag_desc" prompt="核销状态" width="120" align="center"/>
<a:column name="import_source_desc" prompt="新增路径" align="center"/>
<a:column name="created_user_name" prompt="制单人" width="120" align="center"/>
<a:column name="recoi_status" prompt="反冲状态" width="90" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
......@@ -5,6 +5,7 @@
<a:model-query fetchAll="true" model="csh.CSH531N.csh_transaction" rootPath="csh_transaction_path"/>
</a:init-procedure>
<a:view>
<a:link id="csh531n_submit_check_reverse_link_id" model="csh.CSH531F.csh_transaction_recoi_submit" modelaction="execute"/>
<a:link id="csh531n_csh_confirm_data_link" model="csh.CSH531N.csh_data_confirm" modelaction="update"/>
<a:link id="csh531n_submit_link_id" model="csh.CSH531N.csh_data_confirm" modelaction="execute"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
......@@ -698,6 +699,24 @@
var createConfirm = Leaf.showConfirm('提示', '确认提交复核吗', function () {
$('csh531n_write_off_submit_btn_id').disable();
var transaction_id ='${/parameter/@transaction_id}';
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh531n_submit_check_reverse_link_id').getUrl(),
para:{
transaction_id:transaction_id
},
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
csh511_save_all();
});
}
......
......@@ -35,10 +35,10 @@
}
}
Leaf.showConfirm('提示', '确定要导入信息吗?', function() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('import_prj_lease_item_list_link_id').getUrl(),
para: {
batch_id: '${/parameter/@batch_id}',
header_id: '${/model/header/record/@header_id}',
lease_item_id:'${/parameter/@lease_item_id}',
project_lease_item_id:'${/parameter/@project_lease_item_id}'
......@@ -50,6 +50,7 @@
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody(), '${l:HLS.EXECUTING}');
import_exit();
}
});
......@@ -82,17 +83,17 @@
<a:gridButton click="import_exit" text="退出"/>
<a:gridButton click="import_btn" text="导入"/>
</a:screenTopToolbar>
<a:grid id="grid_ds_id" bindTarget="prj_lease_item_list_improt_ds" height="340" navBar="true" width="980">
<a:grid id="grid_ds_id" bindTarget="prj_lease_item_list_improt_ds" marginWidth="50" marginHeight="100" navBar="true">
<a:columns>
<a:column name="attribute_1" prompt="序号" width="80"/>
<a:column name="attribute_2" prompt="租赁物名称" width="80"/>
<a:column name="attribute_3" prompt="型号" width="80"/>
<a:column name="attribute_4" prompt="设备编号" width="80"/>
<a:column name="attribute_5" prompt="设备类型" width="80"/>
<a:column name="attribute_6" prompt="出厂日期" width="80"/>
<a:column name="attribute_7" prompt="设备单价(总)" width="80"/>
<a:column name="attribute_8" prompt="制造商(全称)" width="80"/>
<a:column name="error_message" editor="textArea_e" prompt="错误信息" width="120"/>
<a:column name="attribute_1" prompt="序号" width="120"/>
<a:column name="attribute_2" prompt="租赁物名称" width="160"/>
<a:column name="attribute_3" prompt="型号" width="160"/>
<a:column name="attribute_4" prompt="设备编号" width="160"/>
<a:column name="attribute_5" prompt="设备类型" width="160"/>
<a:column name="attribute_6" prompt="出厂日期" width="160"/>
<a:column name="attribute_7" prompt="设备单价(总)" width="160"/>
<a:column name="attribute_8" prompt="制造商(全称)" width="160"/>
<a:column name="error_message" editor="textArea_e" prompt="错误信息" width="200"/>
</a:columns>
<a:editors>
<a:textArea id="textArea_e" height="50" width="240"/>
......
......@@ -7,13 +7,23 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
<a:view>
<a:link id="prj501N_lease_item_list_delete_link" model="prj.PRJ500N.prj_project_lease_item_delete" modelaction="update"/>
<a:link id="prj501N_lease_item_list_update_link" model="prj.PRJ500N.prj_project_lease_import_temp" modelaction="batch_update"/>
<a:link id="prj501N_lease_item_temp_batch_update_link" model="prj.PRJ500N.prj_project_lease_update_temp" modelaction="batch_update"/>
<a:link id="prj501N_lease_item_list_save_link" model="prj.PRJ500N.prj_project_lease_import_temp" modelaction="execute"/>
<a:link id="prj501N_lease_import_upload_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_upload.lview"/>
<a:link id="prj501N_lease_exit_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<script><![CDATA[
Leaf.onReady(function() {
var status='${/parameter/@project_status}';
if ('${/parameter/@hide_flag}' == 'Y' || status=='APPROVING' || status=='CLOSED' || status=='CONTRACT_CREATED') {
$('PROJECT_LEASE_IMPORT_user_button1').hide();
$('PROJECT_LEASE_IMPORT_user_button2').hide();
$('PROJECT_LEASE_IMPORT_user_button4').hide();
}
});
//导入
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_lease_item_list');
......@@ -35,14 +45,15 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, record, config_records, bp_seq) {
if(record!=''){
record.getField('asset_num').setReadOnly(false);
record.getField('asset_type').setReadOnly(false);
record.getField('asset_name').setReadOnly(false);
record.getField('specification').setReadOnly(false);
record.getField('posted_date').setReadOnly(false);
record.getField('price').setReadOnly(false);
record.getField('manufacturer').setReadOnly(false);
if('${/parameter/@project_status}'!='NEW' && record!=''){
record.getField('seq').setReadOnly(true);
record.getField('asset_num').setReadOnly(true);
record.getField('asset_type').setReadOnly(true);
record.getField('asset_name_n').setReadOnly(true);
record.getField('specification').setReadOnly(true);
record.getField('posted_date').setReadOnly(true);
record.getField('price').setReadOnly(true);
record.getField('manufacturer').setReadOnly(true);
}
}
......@@ -57,7 +68,9 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item_list');
var record = $(ds_id);
var records = record.getSelected();
var datas= record.getAll();
var len = records.length;
var lens = datas.length;
if (len == 0) {
Leaf.showMessage('${l:PROMPT}','请选择一条记录!');
return;
......@@ -78,7 +91,12 @@
msg: '操作成功',
duration: 2000
});
$(ds_id).query();
var count=(lens-len);
if(count==0){
success_delete_after(count);
}else{
success_delete_after(count);
}
},
error: function() {
},
......@@ -88,6 +106,25 @@
});
};
function success_delete_after(count){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item_list');
Leaf.request({
url: $('prj501N_lease_item_list_delete_link').getUrl(),
para:{
project_lease_item_id:'${/parameter/@project_lease_item_id}',
count:count
},
success: function() {
$(ds_id).query();
},
error: function() {
},
failure: function() {},
scope: this
});
}
//保存
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_lease_item_list');
......@@ -144,14 +181,12 @@
function submit_success_lease(){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'prj_project_lease_item_list');
var param = {};
param['session_id'] = '${/session/@session_id}';
param['user_id'] = '${/session/@user_id}';
param['project_lease_item_id']='${/parameter/@project_lease_item_id}';
if($(ds_id).validate()){
Leaf.request({
url: $('prj501N_lease_item_list_save_link').getUrl(),
para:param,
para:{
project_lease_item_id:'${/parameter/@project_lease_item_id}'
},
success: function() {
$(ds_id).query();
},
......
......@@ -126,7 +126,7 @@
//add by zhuxianfei
window['${/parameter/@layout_code}_quote_layout_dynamic_click'] = function () {
debugger;
var url;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
......@@ -444,8 +444,10 @@
}
function prj501n_lease_number_renderer(record_id, ds_id){
var prj_quotation_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var record = $(ds_id).findById(record_id);
var param = {};
param['project_status'] = '${/parameter/@project_status}';
param['project_lease_item_id'] = record.get('project_lease_item_id');
param['lease_item_id'] = record.get('lease_item_id');
param['set_number'] = record.get('set_number');
......@@ -454,7 +456,7 @@
param['function_usage'] = 'UPDATE';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '租赁物清单';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_number_query_link','PROJECT_CREATE_NP_F_QUOTATION_N_prj_quotation_ds', '${/parameter/@layout_code}','${/parameter/@winid}','Y');
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_number_query_link',prj_quotation_ds, '${/parameter/@layout_code}','${/parameter/@winid}','Y');
}
//超链接渲染
......
......@@ -38,6 +38,9 @@
url="${/request/@context_path}/modules/hls/HLS500/hls_fin_doc_quotation.lsc"/>
<a:link id="${/parameter/@layout_code}lease_number_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<a:link id="${/parameter/@layout_code}hls_bp_master_query_link"
url="${/request/@context_path}/modules/hls/HLS215N/hls_bp_master_query.lview"/>
......@@ -436,6 +439,21 @@
}
function prj501n_lease_number_renderer(record_id, ds_id){
debugger;
var record = $(ds_id).findById(record_id);
var param = {};
param['project_lease_item_id'] = record.get('project_lease_item_id');
param['lease_item_id'] = record.get('lease_item_id');
param['set_number'] = record.get('set_number');
param['document_id'] = record.get('project_id');
param['hide_flag'] ='Y';
param['function_code'] = 'PRJ501INC';
param['function_usage'] = 'QUERY';
param['winid'] = '${/parameter/@layout_code}_project_number_win_id';
param['url_title'] = '租赁物清单';
hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}lease_number_query_link', record.ds.id, '${/parameter/@layout_code}');
}
//超链接渲染
......@@ -507,6 +525,9 @@
} else if (name == 'contract_number') {
link_function = 'prj501n_contract_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + value + '</a>';
}else if(name=='machine_number_n' && record.get('project_lease_item_id')!=null){
link_function = 'prj501n_lease_number_renderer';
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.ds.id + '\')">' + '查看明细' + '</a>';
}
};
......@@ -561,8 +582,10 @@
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
if(lease_item_ds_id == ds.id &&lease_item_ds_id){
var gridId= ds.bindname+'_layout_grid_id';
if(division!='30' && division!='50'){
$(gridId).hideColumn('machine_number_n');
}
if(division=='70'&&division!=''){
debugger;
if(record!=''){
record.getField('lease_name_n').setRequired(true);
record.getField('brand_value').setRequired(true);
......
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