<bm:fieldname="bp_tenant_name"expression="(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="seq"databaseType="NUMBER"datatype="java.lang.Long"expression="(row_number() over(order by t1.contract_id))"/>
<bm:fieldname="finance_amount"databaseType="NUMBER"datatype="java.lang.Double"expression="(select c.finance_amount from con_contract c where c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="interest"databaseType="NUMBER"datatype="java.lang.Double"expression="(select c.interest from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="int_rate_implicit"databaseType="NUMBER"datatype="java.lang.Double"expression="round((select nvl(c.int_rate,c.annual_mean_rate) from con_contract c where c.contract_id = t1.contract_id),4)"forInsert="false"forUpdate="false"/>
<bm:fieldname="vat_unearned_finance_income"databaseType="NUMBER"datatype="java.lang.Double"expression="(t1.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id))"forInsert="false"forUpdate="false"/>
<bm:fieldname="net_unearned_finance_income"expression="(t1.unearned_finance_income * (select decode(t.tax_type_id, 1, 1, 1 + (select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)-t1.unearned_finance_income)"forInsert="false"forUpdate="false"/>
<!-- <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select p.project_name from prj_project p ,con_contract c where c.contract_id = t1.contract_id and p.project_id = c.project_id)" forInsert="false" forUpdate="false"/> -->
<!-- <bm:field name="period" databaseType="VARCHAR2" datatype="java.lang.String" expression="((SELECT TO_CHAR(cf1.due_date + 1, 'yyyy/mm/dd') FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id )) || '-'||(SELECT TO_CHAR(cf.due_date, 'yyyy/mm/dd') FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id))" forInsert="false" forUpdate="false"/> -->
<!-- <bm:field name="current_month_vat_income" databaseType="NUMBER" datatype="java.lang.Double" expression="ROUND((select sum(t.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num} ),(select c.PRECISION from gld_currency c,con_contract ct where c.currency_code = ct.currency and ct.contract_id = t1.contract_id))" forInsert="false" forUpdate="false"/> -->
<!-- <bm:field name="current_month_income" databaseType="NUMBER" datatype="java.lang.Double" expression="(select sum(t.unearned_finance_income) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num})" forInsert="false" forUpdate="false"/> -->
<!-- <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/> -->
<!-- <bm:field name="search_term_1" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select t.search_term_1 from con_contract t where t.contract_id =t1.contract_id)" forInsert="false" forUpdate="false"/> -->
<bm:fieldname="vat_interest"/>
<!-- <bm:field name="interest"/>-->
<!-- <bm:field name="interest" expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )" forInsert="false" forUpdate="false"/>-->
<bm:fieldname="project_name"databaseType="VARCHAR2"datatype="java.lang.String"expression="(select p.project_name from prj_project p ,con_contract c where c.contract_id = t1.contract_id and p.project_id = c.project_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="finance_amount"databaseType="NUMBER"datatype="java.lang.Double"expression="(select c.finance_amount from con_contract c where c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="period"databaseType="VARCHAR2"datatype="java.lang.String"expression="((CASE WHEN t1.cf_item = 8 THEN (SELECT to_char(cf1.due_date,'yyyy/mm/dd') FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item)||'-'||(SELECT TO_CHAR(cf.due_date, 'yyyy/mm/dd') FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id) ELSE ( (SELECT to_char(cf1.due_date,'yyyy/mm/dd') FROM con_contract_cashflow cf1 WHERE cf1.contract_id = t1.contract_id AND cf1.cf_item = t1.cf_item AND cf1.times = (SELECT cf.times - 1 FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id)) ||'-'|| (SELECT TO_CHAR(cf.due_date -1, 'yyyy/mm/dd') FROM con_contract_cashflow cf WHERE cf.cashflow_id = t1.cashflow_id))END))"forInsert="false"forUpdate="false"/>
<bm:fieldname="interest"databaseType="NUMBER"datatype="java.lang.Double"expression="(select c.interest from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="int_rate_implicit"databaseType="NUMBER"datatype="java.lang.Double"expression="round((select c.int_rate from con_contract c where c.contract_id = t1.contract_id),4)"forInsert="false"forUpdate="false"/>
<bm:fieldname="vat_unearned_finance_income"databaseType="NUMBER"datatype="java.lang.Double"expression="(t1.unearned_finance_income*(select decode(t.tax_type_id,1,1,1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id))"forInsert="false"forUpdate="false"/>
<bm:fieldname="current_month_vat_income"databaseType="NUMBER"datatype="java.lang.Double"expression="ROUND((select sum(t.unearned_finance_income*(select decode(t.tax_type_id, 1, 1, 1+(select c.tax_type_rate from fnd_tax_type_codes c where c.tax_type_id = t.tax_type_id)) from con_contract t where t.contract_id = t1.contract_id)) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num} ),(select c.PRECISION from gld_currency c,con_contract ct where c.currency_code = ct.currency and ct.contract_id = t1.contract_id))"forInsert="false"forUpdate="false"/>
<bm:fieldname="current_month_income"databaseType="NUMBER"datatype="java.lang.Double"expression="(select sum(t.unearned_finance_income) from con_unearned_finance_income t where t.contract_id =t1.contract_id and t.internal_period_num =${@internal_period_num})"forInsert="false"forUpdate="false"/>
<bm:fieldname="contract_number"databaseType="VARCHAR2"datatype="java.lang.String"expression="(select t.contract_number from con_contract t where t.contract_id =t1.contract_id )"forInsert="false"forUpdate="false"/>
<bm:fieldname="contract_name"databaseType="VARCHAR2"datatype="java.lang.String"expression="(select t.contract_name from con_contract t where t.contract_id =t1.contract_id )"forInsert="false"forUpdate="false"/>
<bm:data-filterenforceOperations="query"expression="t1.internal_period_num = ${@internal_period_num} and t1.company_id IN (SELECT company_id FROM fnd_companies_vl WHERE (company_id = ${/session/@company_id} OR parent_biz_company_id = ${/session/@company_id}) AND enabled_flag = 'Y') and t2.data_class = 'NORMAL' and t2.contract_status in( 'INCEPT','SIGN','TERMINATE','ET') and nvl(t1.unearned_finance_income,0) !=0 "/>
<bm:data-filterenforceOperations="query"expression="t1.internal_period_num = ${@internal_period_num} and exists (select 1 from con_contract t where t.contract_id=t1.contract_id and t.contract_status = 'INCEPT' and t.data_class = 'NORMAL') and exists (select 1 from con_contract_cashflow c where c.cashflow_id = t1.cashflow_id and c.interest is not null)"/>
<bm:data-filterenforceOperations="query"expression="t1.cashflow_id in (select cw.cashflow_id from con_contract_cashflow cw where cw.cf_direction not in ('NONCASH'))"/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_id in (select contract_id from con_contract t where nvl(t.fraud_flag,'N') !='Y')"/>-->
<a:model-querydefaultWhereClause="t1.role_id=${/session/@role_id} and t1.company_id=${/session/@company_id}"fetchAll="true"model="hls.HLS109.hls_default_parameter"rootPath="hls_default_parameter_path"/>