Commit 223bb6e5 authored by stone's avatar stone

[fix] 修复收款功能

parent 44b8131c
...@@ -3,146 +3,152 @@ ...@@ -3,146 +3,152 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT t1.COMPANY_ID, select *
t1.PROJECT_ID, from (SELECT t1.COMPANY_ID,
t1.PROJECT_NUMBER, t1.PROJECT_ID,
t1.PROJECT_NAME, t1.PROJECT_NUMBER,
t1.CONTRACT_ID, t1.PROJECT_NAME,
t1.CONTRACT_NUMBER, t1.CONTRACT_ID,
t1.CONTRACT_NAME, t1.CONTRACT_NUMBER,
t1.INCEPTION_OF_LEASE, t1.CONTRACT_NAME,
t1.CONTRACT_STATUS, t1.INCEPTION_OF_LEASE,
t1.CONTRACT_STATUS_DESC, t1.CONTRACT_STATUS,
t1.BILLING_METHOD, t1.CONTRACT_STATUS_DESC,
t1.BILLING_METHOD_DESC, t1.BILLING_METHOD,
t1.BILLING_OBJECT_ID, t1.BILLING_METHOD_DESC,
t1.BILLING_OBJECT_CODE, t1.BILLING_OBJECT_ID,
decode(t2.cf_item, t1.BILLING_OBJECT_CODE,
301, decode(t2.cf_item,
(SELECT cc.bp_id_agent_level1_n 301,
FROM con_contract_lv cc (SELECT cc.bp_id_agent_level1_n
WHERE cc.contract_id = t1.contract_id), FROM con_contract_lv cc
nvl(t2.billing_object_name, WHERE cc.contract_id = t1.contract_id),
(SELECT cc.bp_id_tenant_n nvl(t2.billing_object_name,
FROM con_contract_lv cc (SELECT cc.bp_id_tenant_n
WHERE cc.contract_id = t1.contract_id))) BILLING_OBJECT_NAME, FROM con_contract_lv cc
decode(t2.cf_item, WHERE cc.contract_id = t1.contract_id))) BILLING_OBJECT_NAME,
301, decode(t2.cf_item,
(select h.taxpayer_type 301,
from hls_bp_master h, con_contract cc (select h.taxpayer_type
where cc.contract_id = t1.contract_id from hls_bp_master h, con_contract cc
and cc.bp_id_agent_level1 = h.bp_id), where cc.contract_id = t1.contract_id
t1.object_taxpayer_type) OBJECT_TAXPAYER_TYPE, and cc.bp_id_agent_level1 = h.bp_id),
decode(t2.cf_item, t1.object_taxpayer_type) OBJECT_TAXPAYER_TYPE,
301, decode(t2.cf_item,
(select v.code_value_name 301,
from hls_bp_master h, con_contract cc, sys_code_values_v v (select v.code_value_name
where v.code = 'HLS211_TAXPAYER_TYPE' from hls_bp_master h,
AND v.code_value = h.taxpayer_type con_contract cc,
and cc.contract_id = t1.contract_id sys_code_values_v v
and cc.bp_id_agent_level1 = h.bp_id), where v.code = 'HLS211_TAXPAYER_TYPE'
t1.object_taxpayer_type_desc) OBJECT_TAXPAYER_TYPE_DESC, AND v.code_value = h.taxpayer_type
decode(t2.cf_item, and cc.contract_id = t1.contract_id
301, and cc.bp_id_agent_level1 = h.bp_id),
(select h.tax_registry_num t1.object_taxpayer_type_desc) OBJECT_TAXPAYER_TYPE_DESC,
from hls_bp_master h, con_contract cc decode(t2.cf_item,
where cc.contract_id = t1.contract_id 301,
and cc.bp_id_agent_level1 = h.bp_id), (select h.tax_registry_num
t2.tax_registry_num) OBJECT_TAX_REGISTRY_NUM, from hls_bp_master h, con_contract cc
nvl(t2.bill_object_bp_class,t1.BILL_OBJECT_BP_CLASS) BILL_OBJECT_BP_CLASS, where cc.contract_id = t1.contract_id
nvl(t2.bill_object_bp_class_desc,t1.BILL_OBJECT_BP_CLASS_DESC) BILL_OBJECT_BP_CLASS_DESC, and cc.bp_id_agent_level1 = h.bp_id),
t1.TAX_TYPE_VAT, t2.tax_registry_num) OBJECT_TAX_REGISTRY_NUM,
t1.DESCRIPTION, nvl(t2.bill_object_bp_class, t1.BILL_OBJECT_BP_CLASS) BILL_OBJECT_BP_CLASS,
--t1.INVOICE_TITLE, nvl(t2.bill_object_bp_class_desc,
--t1.INVOICE_BP_ADDRESS_PHONE_NUM, t1.BILL_OBJECT_BP_CLASS_DESC) BILL_OBJECT_BP_CLASS_DESC,
--t1.INVOICE_BP_BANK_ACCOUNT, t1.TAX_TYPE_VAT,
-- t1.TAX_REGISTRY_NUM, t1.DESCRIPTION,
decode(t2.cf_item, --t1.INVOICE_TITLE,
301, --t1.INVOICE_BP_ADDRESS_PHONE_NUM,
(select h.invoice_title --t1.INVOICE_BP_BANK_ACCOUNT,
from hls_bp_master h, con_contract cc -- t1.TAX_REGISTRY_NUM,
where cc.contract_id = t1.contract_id decode(t2.cf_item,
and cc.bp_id_agent_level1 = h.bp_id), 301,
t2.invoice_title) invoice_title, (select h.invoice_title
decode(t2.cf_item, from hls_bp_master h, con_contract cc
301, where cc.contract_id = t1.contract_id
(select (h.invoice_bp_address || '' || h.invoice_bp_phone_num) and cc.bp_id_agent_level1 = h.bp_id),
from hls_bp_master h, con_contract cc t2.invoice_title) invoice_title,
where cc.contract_id = t1.contract_id decode(t2.cf_item,
and cc.bp_id_agent_level1 = h.bp_id), 301,
t2.invoice_bp_address_phone_num) invoice_bp_address_phone_num, (select (h.invoice_bp_address || '' ||
decode(t2.cf_item, h.invoice_bp_phone_num)
301, from hls_bp_master h, con_contract cc
(select (h.invoice_bp_bank || '' || h.invoice_bp_bank_account_id) where cc.contract_id = t1.contract_id
from hls_bp_master h, con_contract cc and cc.bp_id_agent_level1 = h.bp_id),
where cc.contract_id = t1.contract_id t2.invoice_bp_address_phone_num) invoice_bp_address_phone_num,
and cc.bp_id_agent_level1 = h.bp_id), decode(t2.cf_item,
t2.invoice_bp_bank_account) invoice_bp_bank_account, 301,
t2.TAX_REGISTRY_NUM, (select (h.invoice_bp_bank || '' ||
t1.PRJ_SEARCH_TERM_1, h.invoice_bp_bank_account_id)
t1.PRJ_SEARCH_TERM_2, from hls_bp_master h, con_contract cc
t1.CON_SEARCH_TERM_1, where cc.contract_id = t1.contract_id
t1.CON_SEARCH_TERM_2, and cc.bp_id_agent_level1 = h.bp_id),
t1.DOCUMENT_TYPE, t2.invoice_bp_bank_account) invoice_bp_bank_account,
t1.BP_NAME, t2.TAX_REGISTRY_NUM,
t2.CASHFLOW_ID, t1.PRJ_SEARCH_TERM_1,
t2.CF_ITEM, t1.PRJ_SEARCH_TERM_2,
t2.CF_ITEM_DESC, t1.CON_SEARCH_TERM_1,
t2.TIMES, t1.CON_SEARCH_TERM_2,
t2.LAST_RECEIVED_DATE, t1.DOCUMENT_TYPE,
t2.DUE_DATE, t1.BP_NAME,
t2.DUE_AMOUNT, t2.CASHFLOW_ID,
t2.PRINCIPAL, t2.CF_ITEM,
t2.INTEREST, t2.CF_ITEM_DESC,
t2.RECEIVED_AMOUNT, t2.TIMES,
t2.RECEIVED_PRINCIPAL, t2.LAST_RECEIVED_DATE,
t2.RECEIVED_INTEREST, t2.DUE_DATE,
t2.NOTRECEIVED_AMOUNT, t2.DUE_AMOUNT,
t2.NOTRECEIVED_PRINCIPAL, t2.PRINCIPAL,
t2.NOTRECEIVED_INTEREST, t2.INTEREST,
t2.BILLING_AMOUNT, t2.RECEIVED_AMOUNT,
t2.BILLING_PRINCIPAL, t2.RECEIVED_PRINCIPAL,
t2.BILLING_INTEREST, t2.RECEIVED_INTEREST,
t2.NOTBILLING_AMOUNT, t2.NOTRECEIVED_AMOUNT,
t2.NOTBILLING_PRINCIPAL, t2.NOTRECEIVED_PRINCIPAL,
t2.NOTBILLING_INTEREST, t2.NOTRECEIVED_INTEREST,
nvl(t2.VAT_DUE_AMOUNT, 0) VAT_DUE_AMOUNT, t2.BILLING_AMOUNT,
nvl(t2.VAT_PRINCIPAL, 0) VAT_PRINCIPAL, t2.BILLING_PRINCIPAL,
nvl(t2.VAT_INTEREST, 0) VAT_INTEREST, t2.BILLING_INTEREST,
nvl(t2.NET_DUE_AMOUNT, 0) NET_DUE_AMOUNT, t2.NOTBILLING_AMOUNT,
nvl(t2.NET_PRINCIPAL, 0) NET_PRINCIPAL, t2.NOTBILLING_PRINCIPAL,
nvl(t2.NET_INTEREST, 0) NET_INTEREST, t2.NOTBILLING_INTEREST,
t2.CURRENCY, nvl(t2.VAT_DUE_AMOUNT, 0) VAT_DUE_AMOUNT,
t2.CURRENCY_DESC, nvl(t2.VAT_PRINCIPAL, 0) VAT_PRINCIPAL,
t2.EXCHANGE_RATE, nvl(t2.VAT_INTEREST, 0) VAT_INTEREST,
t2.EXCHANGE_RATE_TYPE, nvl(t2.NET_DUE_AMOUNT, 0) NET_DUE_AMOUNT,
t2.EXCHANGE_RATE_TYPE_DESC, nvl(t2.NET_PRINCIPAL, 0) NET_PRINCIPAL,
t2.EXCHANGE_RATE_QUOTATION, nvl(t2.NET_INTEREST, 0) NET_INTEREST,
t2.EXCHANGE_RATE_QUOTATION_DESC, t2.CURRENCY,
t1.lease_channel_desc, t2.CURRENCY_DESC,
t1.business_type, t2.EXCHANGE_RATE,
t1.business_type_desc, t2.EXCHANGE_RATE_TYPE,
t1.division, t2.EXCHANGE_RATE_TYPE_DESC,
t1.division_desc, t2.EXCHANGE_RATE_QUOTATION,
t1.billing_frequency, t2.EXCHANGE_RATE_QUOTATION_DESC,
t1.billing_frequency_n, t1.lease_channel_desc,
t1.billing_way, t1.business_type,
t1.billing_way_n, t1.business_type_desc,
decode(t2.cf_item, t1.division,
'2', t1.division_desc,
(t2.due_amount - nvl(t2.billing_amount, 0)), t1.billing_frequency,
'3', t1.billing_frequency_n,
(t2.due_amount - nvl(t2.billing_amount, 0)), t1.billing_way,
(t2.received_amount - nvl(t2.billing_amount, 0))) need_bill_amount, t1.billing_way_n,
t1.inv_billing_object_name, decode(t2.cf_item,
t1.small_scale_taxpayer '2',
FROM ACR_INVOICE_CONTRACT_V t1, ACR_INVOICE_CONTRACT_CF_V t2 (t2.due_amount - nvl(t2.billing_amount, 0)),
WHERE t2.due_date<sysdate '3',
ORDER BY (t2.due_amount - nvl(t2.billing_amount, 0)),
t1.contract_id, (t2.received_amount - nvl(t2.billing_amount, 0))) need_bill_amount,
t2.times, t1.inv_billing_object_name,
t2.due_date, t1.small_scale_taxpayer
t2.cf_item FROM ACR_INVOICE_CONTRACT_V t1, ACR_INVOICE_CONTRACT_CF_V t2
WHERE t2.due_date < sysdate
and rownum <= 10000
ORDER BY t1.contract_id, t2.times, t2.due_date, t2.cf_item) t
#WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
...@@ -286,92 +292,91 @@ ...@@ -286,92 +292,91 @@
<bm:field name="small_scale_taxpayer"/> <bm:field name="small_scale_taxpayer"/>
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="inv_billing_object_name" queryExpression="t1.inv_billing_object_name like ${@inv_billing_object_name}"/> <bm:query-field name="inv_billing_object_name" queryExpression="t.inv_billing_object_name like ${@inv_billing_object_name}"/>
<!-- <bm:query-field name="part_bill_flag" <!-- <bm:query-field name="part_bill_flag"
queryExpression="((${@part_bill_flag} = &apos;N&apos;) or (${@part_bill_flag} = &apos;Y&apos; and (t2.billing_amount!=0 or t2.due_amount &lt; t2.received_amount)))"/>--> queryExpression="((${@part_bill_flag} = &apos;N&apos;) or (${@part_bill_flag} = &apos;Y&apos; and (t2.billing_amount!=0 or t2.due_amount &lt; t2.received_amount)))"/>-->
<bm:query-field name="project_number_from" queryExpression="t1.project_number &gt;=${@project_number_from}"/> <bm:query-field name="project_number_from" queryExpression="t.project_number &gt;=${@project_number_from}"/>
<bm:query-field name="project_number_to" queryExpression="t1.project_number &lt;=${@project_number_to}"/> <bm:query-field name="project_number_to" queryExpression="t.project_number &lt;=${@project_number_to}"/>
<bm:query-field name="contract_number_from" queryExpression="t1.contract_number &gt;=${@contract_number_from}"/> <bm:query-field name="contract_number_from" queryExpression="t.contract_number &gt;=${@contract_number_from}"/>
<bm:query-field name="contract_number_to" queryExpression="t1.contract_number &lt;=${@contract_number_to}"/> <bm:query-field name="contract_number_to" queryExpression="t.contract_number &lt;=${@contract_number_to}"/>
<bm:query-field name="contract_number" <bm:query-field name="contract_number"
queryExpression="t1.contract_number like &apos;%&apos;||${@contract_number}||&apos;%&apos; "/> queryExpression="t.contract_number like &apos;%&apos;||${@contract_number}||&apos;%&apos; "/>
<bm:query-field name="bp_code_tenant_from" <bm:query-field name="bp_code_tenant_from"
queryExpression="t1.billing_object_code &gt;=${@bp_code_tenant_from}"/> queryExpression="t.billing_object_code &gt;=${@bp_code_tenant_from}"/>
<bm:query-field name="bp_code_tenant_to" queryExpression="t1.billing_object_code &lt;=${@bp_code_tenant_to}"/> <bm:query-field name="bp_code_tenant_to" queryExpression="t.billing_object_code &lt;=${@bp_code_tenant_to}"/>
<bm:query-field name="lease_start_date_from" <bm:query-field name="lease_start_date_from"
queryExpression="t1.lease_start_date &gt;= to_date(${@lease_start_date_from},&apos;yyyy-mm-dd&apos;)"/> queryExpression="t.lease_start_date &gt;= to_date(${@lease_start_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="lease_start_date_to" <bm:query-field name="lease_start_date_to"
queryExpression="t1.lease_start_date &lt;= to_date(${@lease_start_date_to},&apos;yyyy-mm-dd&apos;)"/> queryExpression="t.lease_start_date &lt;= to_date(${@lease_start_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="document_type" queryExpression="t1.document_type=${@document_type}"/> <bm:query-field name="document_type" queryExpression="t.document_type=${@document_type}"/>
<bm:query-field name="billing_method" queryExpression="t1.billing_method=${@billing_method}"/> <bm:query-field name="billing_method" queryExpression="t.billing_method=${@billing_method}"/>
<bm:query-field name="billing_frequency" queryExpression="t1.billing_frequency=${@billing_frequency}"/> <bm:query-field name="billing_frequency" queryExpression="t.billing_frequency=${@billing_frequency}"/>
<bm:query-field name="prj_search_term_1" queryExpression="t1.prj_search_term_1=${@prj_search_term_1}"/> <bm:query-field name="prj_search_term_1" queryExpression="t.prj_search_term_1=${@prj_search_term_1}"/>
<bm:query-field name="prj_search_term_2" queryExpression="t1.prj_search_term_2=${@prj_search_term_2}"/> <bm:query-field name="prj_search_term_2" queryExpression="t.prj_search_term_2=${@prj_search_term_2}"/>
<bm:query-field name="con_search_term_1" queryExpression="t1.con_search_term_1=${@con_search_term_1}"/> <bm:query-field name="con_search_term_1" queryExpression="t.con_search_term_1=${@con_search_term_1}"/>
<bm:query-field name="con_search_term_2" queryExpression="t1.con_search_term_2=${@con_search_term_2}"/> <bm:query-field name="con_search_term_2" queryExpression="t.con_search_term_2=${@con_search_term_2}"/>
<bm:query-field name="bp_name" queryExpression="t1.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos; "/> <bm:query-field name="bp_name" queryExpression="t.bp_name like &apos;%&apos;||${@bp_name}||&apos;%&apos; "/>
<bm:query-field name="project_name" <bm:query-field name="project_name"
queryExpression="t1.project_name like &apos;%&apos;||${@project_name}||&apos;%&apos; "/> queryExpression="t.project_name like &apos;%&apos;||${@project_name}||&apos;%&apos; "/>
<bm:query-field name="contract_name" <bm:query-field name="contract_name"
queryExpression="t1.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos; "/> queryExpression="t.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos; "/>
<bm:query-field name="document_type" queryExpression="t1.document_type=${@document_type}"/> <bm:query-field name="document_type" queryExpression="t.document_type=${@document_type}"/>
<bm:query-field name="cf_item" queryExpression="t2.cf_item = ${@cf_item}"/> <bm:query-field name="cf_item" queryExpression="t.cf_item = ${@cf_item}"/>
<bm:query-field name="last_received_date_from" <bm:query-field name="last_received_date_from"
queryExpression="t2.last_received_date &gt;= to_date(${@last_received_date_from},&apos;yyyy-mm-dd&apos;)"/> queryExpression="t.last_received_date &gt;= to_date(${@last_received_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="last_received_date_to" <bm:query-field name="last_received_date_to"
queryExpression="t2.last_received_date &lt; to_date(${@last_received_date_to},&apos;yyyy-mm-dd&apos;)+1"/> queryExpression="t.last_received_date &lt; to_date(${@last_received_date_to},&apos;yyyy-mm-dd&apos;)+1"/>
<!-- <!--
<bm:query-field name="final_bill_flag" queryExpression="((${@final_bill_flag}=&apos;N&apos; and (t1.billing_method != &apos;LB_EQUIP_INT&apos; or (t1.billing_method = &apos;LB_EQUIP_INT&apos; and (t2.cf_item=1 and t2.interest &gt;nvl(billing_interest,0)or (t2.cf_item!=1))))) or (${@final_bill_flag}=&apos;Y&apos; and t1.billing_method = &apos;LB_EQUIP_INT&apos; and t2.cf_item=1 and (not exists (select 1 from con_contract_cashflow b where t1.contract_id = b.contract_id and b.cf_item = 1 and b.cf_direction = &apos;INFLOW&apos; and b.write_off_flag in (&apos;NOT&apos;,&apos;PARTIAL&apos;)) or t1.legal_status=&apos;SELL&apos;)))"/> <bm:query-field name="final_bill_flag" queryExpression="((${@final_bill_flag}=&apos;N&apos; and (t.billing_method != &apos;LB_EQUIP_INT&apos; or (t1.billing_method = &apos;LB_EQUIP_INT&apos; and (t2.cf_item=1 and t2.interest &gt;nvl(billing_interest,0)or (t2.cf_item!=1))))) or (${@final_bill_flag}=&apos;Y&apos; and t1.billing_method = &apos;LB_EQUIP_INT&apos; and t2.cf_item=1 and (not exists (select 1 from con_contract_cashflow b where t1.contract_id = b.contract_id and b.cf_item = 1 and b.cf_direction = &apos;INFLOW&apos; and b.write_off_flag in (&apos;NOT&apos;,&apos;PARTIAL&apos;)) or t1.legal_status=&apos;SELL&apos;)))"/>
--> -->
<!-- <bm:query-field name="residue_flag" <!-- <bm:query-field name="residue_flag"
queryExpression="((${@residue_flag}=&apos;N&apos; and t2.cf_item != 8) or (${@residue_flag}=&apos;Y&apos; and t2.cf_item = 8 and not exists (select 1 from con_contract_cashflow ca where ca.cf_item in (&apos;1&apos;,&apos;9&apos;) and (ca.due_amount -nvl(ca.received_amount,0)) &gt;50 and ca.contract_id=t1.contract_id and ca.write_off_flag!=&apos;FULL&apos;)))"/>--> queryExpression="((${@residue_flag}=&apos;N&apos; and t2.cf_item != 8) or (${@residue_flag}=&apos;Y&apos; and t2.cf_item = 8 and not exists (select 1 from con_contract_cashflow ca where ca.cf_item in (&apos;1&apos;,&apos;9&apos;) and (ca.due_amount -nvl(ca.received_amount,0)) &gt;50 and ca.contract_id=t1.contract_id and ca.write_off_flag!=&apos;FULL&apos;)))"/>-->
<bm:query-field name="lease_channel" queryExpression="t1.lease_channel=${@lease_channel}"/> <bm:query-field name="lease_channel" queryExpression="t.lease_channel=${@lease_channel}"/>
<bm:query-field name="business_type" queryExpression="t1.business_type=${@business_type}"/> <bm:query-field name="business_type" queryExpression="t.business_type=${@business_type}"/>
<bm:query-field name="division" queryExpression="t1.division=${@division}"/> <bm:query-field name="division" queryExpression="t.division=${@division}"/>
<!-- <bm:query-field name="serial_number" queryExpression="t1.serial_number=${@serial_number}"/>--> <!-- <bm:query-field name="serial_number" queryExpression="t.serial_number=${@serial_number}"/>-->
<bm:query-field name="termination_date_from" <bm:query-field name="termination_date_from"
queryExpression="t1.termination_date &gt;= to_date(${@termination_date_from},&apos;yyyy-mm-dd&apos;)"/> queryExpression="t.termination_date &gt;= to_date(${@termination_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="termination_date_to" <bm:query-field name="termination_date_to"
queryExpression="t1.termination_date &lt;= to_date(${@termination_date_to},&apos;yyyy-mm-dd&apos;)"/> queryExpression="t.termination_date &lt;= to_date(${@termination_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="due_date_from" <bm:query-field name="due_date_from"
queryExpression="t2.due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/> queryExpression="t.due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="due_date_to" <bm:query-field name="due_date_to"
queryExpression="t2.due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/> queryExpression="t.due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="bill_flag" <bm:query-field name="bill_flag"
queryExpression="(${@bill_flag} = 'Y' and t1.billing_frequency in (${@times_bill_flag},${@mid_bill_flag},${@final_bill_flag},${@et_bill_flag}) )"/> queryExpression="(${@bill_flag} = 'Y' and t.billing_frequency in (${@times_bill_flag},${@mid_bill_flag},${@final_bill_flag},${@et_bill_flag}) )"/>
<bm:query-field name="all_contract_number" <bm:query-field name="all_contract_number"
queryExpression="(t1.contract_number in (Select regexp_substr( replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) From dual Connect By regexp_substr(replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) Is Not Null) )"/> queryExpression="(t.contract_number in (Select regexp_substr( replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) From dual Connect By regexp_substr(replace(replace(replace(${@all_contract_number},chr(32)),chr(10)),chr(13)), '[^,]+', 1, Level) Is Not Null) )"/>
<bm:query-field name="notreceived_amount_from" <bm:query-field name="notreceived_amount_from"
queryExpression="t2.notreceived_amount &gt;=${@notreceived_amount_from}"/> queryExpression="t.notreceived_amount &gt;=${@notreceived_amount_from}"/>
<bm:query-field name="notreceived_amount_to" <bm:query-field name="notreceived_amount_to"
queryExpression="t2.notreceived_amount &lt;=${@notreceived_amount_to}"/> queryExpression="t.notreceived_amount &lt;=${@notreceived_amount_to}"/>
<bm:query-field name="notbilling_amount_from" <bm:query-field name="notbilling_amount_from"
queryExpression="t2.notbilling_amount &gt;=${@notbilling_amount_from}"/> queryExpression="t.notbilling_amount &gt;=${@notbilling_amount_from}"/>
<bm:query-field name="notbilling_amount_to" <bm:query-field name="notbilling_amount_to"
queryExpression="t2.notbilling_amount &lt;=${@notbilling_amount_to}"/> queryExpression="t.notbilling_amount &lt;=${@notbilling_amount_to}"/>
<bm:query-field name="billing_way" <bm:query-field name="billing_way"
queryExpression="t1.billing_way = ${@billing_way}"/> queryExpression="t.billing_way = ${@billing_way}"/>
<bm:query-field name="bill_object_bp_class" <bm:query-field name="bill_object_bp_class"
queryExpression="t1.bill_object_bp_class = ${@bill_object_bp_class}"/> queryExpression="t.bill_object_bp_class = ${@bill_object_bp_class}"/>
<bm:query-field name="contract_status" <bm:query-field name="contract_status"
queryExpression="t1.contract_status = ${@contract_status}"/> queryExpression="t.contract_status = ${@contract_status}"/>
<!-- <bm:query-field name="" queryExpression="t2.due_date &lt;= sysdate"/>-->
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <!-- <bm:data-filters>-->
<bm:data-filter enforceOperations="query" <!-- <bm:data-filter enforceOperations="query"-->
expression="t2.contract_id = t1.contract_id AND t1.billing_status IN (&apos;NOT&apos;, &apos;PARTIAL&apos;) AND t1.contract_status not in (&apos;CLOSED&apos;,&apos;CANCEL&apos;) AND t2.cf_status = &apos;RELEASE&apos; "/> <!-- expression="t.contract_id = t.contract_id AND t.billing_status IN (&apos;NOT&apos;, &apos;PARTIAL&apos;) AND t1.contract_status not in (&apos;CLOSED&apos;,&apos;CANCEL&apos;) AND t.cf_status = &apos;RELEASE&apos; "/>-->
<bm:data-filter enforceOperations="query" expression="t2.write_off_flag != &apos;NOT&apos;"/> <!-- <bm:data-filter enforceOperations="query" expression="t.write_off_flag != &apos;NOT&apos;"/>-->
<bm:data-filter enforceOperations="query" <!-- <bm:data-filter enforceOperations="query"-->
expression="t2.billing_status != &apos;FULL&apos; and t2.cf_direction=&apos;INFLOW&apos;"/> <!-- expression="t.billing_status != &apos;FULL&apos; and t.cf_direction=&apos;INFLOW&apos;"/>-->
<bm:data-filter enforceOperations="query" <!-- <bm:data-filter enforceOperations="query"-->
expression="t2.contract_id = t1.contract_id AND t1.billing_status IN (&apos;NOT&apos;, &apos;PARTIAL&apos;) AND t1.contract_status not in (&apos;NEW&apos;,&apos;CANCEL&apos;) AND t2.cf_status = &apos;RELEASE&apos;"/> <!-- expression="t.contract_id = t.contract_id AND t.billing_status IN (&apos;NOT&apos;, &apos;PARTIAL&apos;) AND t1.contract_status not in (&apos;NEW&apos;,&apos;CANCEL&apos;) AND t.cf_status = &apos;RELEASE&apos;"/>-->
<bm:data-filter enforceOperations="query" expression="(t2.times != 0)"/> <!-- <bm:data-filter enforceOperations="query" expression="(t.times != 0)"/>-->
<bm:data-filter enforceOperations="query" <!-- <bm:data-filter enforceOperations="query"-->
expression="not (t2.cf_item = 301 and nvl(direct_sales_agent_flag,'N') = 'Y')"/> <!-- expression="not (t.cf_item = 301 and nvl(direct_sales_agent_flag,'N') = 'Y')"/>-->
</bm:data-filters> <!-- </bm:data-filters>-->
</bm:model> </bm:model>
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