Commit 94a7af6c authored by 18083's avatar 18083

经租收付款及报表调整

parent 837c0f49
......@@ -41,7 +41,8 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.enabled_flag = 'Y' and br.bp_category in('TENANT','AGENT','RENTER','MAN_FACTURER') and br.bp_type in('TENANT','AGENT','RENTER','MAN_FACTURER')))"/>
<bm:data-filter name="query" expression="(exists (select 1 from con_contract_bp bp, con_contract cc where bp.contract_id = cc.contract_id and bp.bp_id = t1.bp_id and cc.data_class = 'NORMAL' ))"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT','RENTER','MAN_FACTURER') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.enabled_flag = 'Y' and br.bp_category in('TENANT','AGENT','RENTER','MAN_FACTURER') and br.bp_type in('TENANT','AGENT','RENTER','MAN_FACTURER')))"/>
<!--<bm:data-filter name="query" expression="(exists (select 1 from con_contract_bp bp, con_contract cc where bp.contract_id = cc.contract_id and bp.bp_id = t1.bp_id and cc.data_class = 'NORMAL' ))"/>-->
<bm:data-filter name="query" expression="(t1.sbo_bp_status=&apos;Y&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -41,7 +41,7 @@
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>
<bm:data-filter name="query" expression="(t1.bp_category in ('TENANT','AGENT','VENDER','RENTER','MAN_FACTURER') or exists(select 1 from hls_bp_master_role br where br.bp_id = t1.bp_id and br.enabled_flag = 'Y' and br.bp_category in('TENANT','AGENT','VENDER','RENTER','MAN_FACTURER') and br.bp_type in('TENANT','AGENT','VENDER','RENTER','MAN_FACTURER')))"/>
<bm:data-filter name="query" expression="(exists (select 1 from con_contract_bp bp, con_contract cc where bp.contract_id = cc.contract_id and bp.bp_id = t1.bp_id and cc.data_class = 'NORMAL' ))"/>
<!--<bm:data-filter name="query" expression="(exists (select 1 from con_contract_bp bp, con_contract cc where bp.contract_id = cc.contract_id and bp.bp_id = t1.bp_id and cc.data_class = 'NORMAL' ))"/>-->
<bm:data-filter name="query" expression="(t1.sbo_bp_status=&apos;Y&apos;)"/>
</bm:data-filters>
</bm:model>
......@@ -188,6 +188,7 @@
AND f.write_off_flag <> 'FULL'
AND f.cf_status IN ('RELEASE', 'BLOCK')
AND f.cf_direction = 'OUTFLOW'
and t.business_type<>'LEASEOPERAT'
AND NOT EXISTS (
SELECT 1
FROM csh_payment_req_ln l,csh_payment_req_hd hd
......
......@@ -101,6 +101,7 @@
<bm:field name="paid_byother_flag" />
<bm:field name="guarantor_name_duty_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t1.guarantor_name_duty)" forInsert="false" forUpdate="false" prompt="担保人履行担保义务" />
<bm:field name="guarantor_name_duty" />
<bm:field name="operat_flag" />
</bm:fields>
......
......@@ -174,8 +174,8 @@
<!-- <bm:data-filter name="query" expression="(not exists(select 1 from csh_transaction t where t.transaction_type = 'RECEIPT' and t.paid_byother_flag = 'T' and t.write_off_flag = 'FULL' and t.transaction_id = t1.transaction_id))"/>-->
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,'DEPOSIT','DEPOSIT'))) and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} in ('1','11097','10422','11099'))) 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} in ('1','11097','10422','11099')))))"/>
<!-- <bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category in ('TENANT','RENTER') and t1.paid_byother_flag = 'N') or ((${@position_code} = '014' and t1.bp_category not in ('TENANT','RENTER')) or (${@position_code} = '014' and t1.paid_byother_flag != 'N')) and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />-->
<bm:data-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category in ('TENANT','RENTER') and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} in ('1','11097','10422','11099'))) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category not in ('TENANT','RENTER') )) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} in ('1','11097','10422','11099')))))"/>
<bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -108,16 +108,63 @@
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type" expression="decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
'vender_deposit',
t1.deposit_trans_type),
t1.deposit_trans_type)" forInsert="false" forUpdate="false" />
<bm:field name="deposit_trans_type_desc" expression="decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
(select v.code_value_name value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = 'vender_deposit'),
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = t1.deposit_trans_type)),
(select v.code_value_name
from sys_code_values_v v
where v.code = 'DEPOSIT_TRANS_TYPE'
and v.code_value = t1.deposit_trans_type))" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="source_type"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="vender_contract_number" expression="(select cc.search_term_1 vender_contract_number from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="vender_project_number" expression="(select p.project_number vender_project_number from prj_project_lease_item pi, prj_project p, con_contract_lease_item ci where pi.source_project_id = p.project_id and pi.project_lease_item_id = ci.project_lease_item_id and ci.contract_id=t1.ref_contract_id)"/>
<bm:field name="business_type" expression="(select cc.business_type from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type_desc" expression="(select hb.description from con_contract cc,hls_business_type_v hb where cc.business_type= hb.business_type and hb.enabled_flag = 'Y' and cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="business_type" expression=" decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
'LEASEOPERAT',
(select cc.business_type
from con_contract cc
where cc.contract_id = t1.ref_contract_id)),
(select cc.business_type
from con_contract cc
where cc.contract_id = t1.ref_contract_id))"/>
<bm:field name="business_type_desc" expression="decode(t1.ref_contract_id,
null,
decode(t1.collection_classes,
'OPERAT_DEPOSIT',
(select ht.description
from hls_business_type ht
where ht.business_type = 'LEASEOPERAT'),
(select hb.description
from con_contract cc, hls_business_type_v hb
where cc.business_type = hb.business_type
and hb.enabled_flag = 'Y'
and cc.contract_id = t1.ref_contract_id)),
(select hb.description
from con_contract cc, hls_business_type_v hb
where cc.business_type = hb.business_type
and hb.enabled_flag = 'Y'
and cc.contract_id = t1.ref_contract_id))"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -28,7 +28,9 @@
(SELECT ccli.modelcd
FROM con_contract_lease_item ccli
WHERE ccli.contract_id =
ct.contract_id) modelcd,
ct.contract_id
AND ccli.equipment_type ='MAIN') modelcd,
--机型
(SELECT nvl(i.machine_number,i.machine_number_70)
FROM con_contract_lease_item i
......@@ -785,6 +787,7 @@
FROM con_contract ct
WHERE ct.contract_status NOT IN ('CANCEL')
AND ct.data_class = 'NORMAL'
and ct.document_type not in('PUR_ORDER')
ORDER BY ct.bp_id_agent_level1
]]></bm:query-sql>
</bm:operation>
......
......@@ -137,7 +137,8 @@
queryExpression="t1.plan_order_date &lt;= ${@plan_order_date_to}"/>
<bm:query-field name="lease_item_amount"
queryExpression="t1.due_amount&gt;=${@lease_item_amount}"/>
<bm:query-field name="vender_con_number" queryExpression="t1.vender_con_number=${@vender_con_number}"/>
<bm:query-field name="bp_id_agent_n" queryExpression="t1.vender_name_n=${@bp_id_agent_n}"/>
<bm:query-field name="vender_name_n" queryExpression="t1.vender_name_n=${@vender_name_n}"/>
<bm:query-field name="invoice_status_n"
queryExpression="t1.invoice_status_n like &apos;%&apos;||${@invoice_status_n}||&apos;%&apos;"/>
<bm:query-field name="contract_number" queryExpression="t1.contract_number=${@contract_number}"/>
......
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