<bm:fieldname="due_date"datatype="java.util.Date"expression="(select a.due_date from con_contract_cashflow a where a.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="write_off_type_desc"Expression="(select v.code_value_name from sys_code_values_v v where v.code_value = t1.write_off_type and v.code = 'CSH513_WRITE_OFF_TYPE')"forInsert="false"forUpdate="false"/>
<bm:fieldname="write_off_cf_item_desc"expression="(select a.cf_item_desc from hls_cashflow_item_v a where a.cf_item = t1.write_off_cf_item)"forInsert="false"forUpdate="false"/>
<bm:fieldname="write_off_bp_name"Expression="(select a.bp_name from hls_bp_master a where a.bp_id = t1.write_off_bp_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="contract_status_desc"Expression="(select a.contract_status_n from con_contract_lv a where a.contract_id=t1.contract_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_amount"expression="(select decode(cf_item,1,ca.due_amount - nvl(ca.received_amount,0)) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<!--<bm:field name="unreceived_amount" expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)" forInsert="false" forUpdate="false"/>-->
due_amount) -nvl(received_amount,0) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_principal"expression="(select ca.principal - nvl(ca.received_principal,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="left_interest"expression="(select ca.interest - nvl(ca.received_interest,0) from con_contract_cashflow ca where ca.cashflow_id = t1.write_off_cashflow_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="unreceived_penalty"expression="(select ca.due_amount - nvl(ca.received_amount,0) from con_contract_cashflow ca where ca.contract_id = t1.contract_id and ca.times = t1.write_off_times and cf_item = 9 and cf_status = 'RELEASE')"forInsert="false"forUpdate="false"/>
<bm:fieldname="agent_id_desc"expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)"forUpdate="false"forInsert="false"/>
<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"/>
due_amount) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)"/>
<bm:fieldname="payment_deduction"expression="(select payment_deduction from con_contract c where c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>
<bm:fieldname="division"expression="(select division from con_contract c where c.contract_id = t1.contract_id)"forInsert="false"forUpdate="false"/>
queryexpression:"((${@if_history} ='N' and (t1.if_history = 'N' or t1.if_history is null)) or (${@if_history} ='Y' and (t1.if_history in ('N','Y') or t1.if_history is null)))"
queryexpression:"((${@if_history} ='N' and (t1.if_history = 'N' or t1.if_history is null)) or (${@if_history} ='Y' and (t1.if_history in ('N','Y') or t1.if_history is null)))"
queryexpression:"((${@if_history} ='N' and (t1.if_history = 'N' or t1.if_history is null)) or (${@if_history} ='Y' and (t1.if_history in ('N','Y') or t1.if_history is null)))"
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
var con_signature_info = $bm('cont.CON620.get_kinggrid_info').queryAsMap();
var con_kinggrid_data = con_signature_info.getChildren()[0];
var server_url = con_kinggrid_data.server_url;
var app_id = con_kinggrid_data.app_id;
var app_security = con_kinggrid_data.app_security;
//var status = new com.hand.kinggrid.ContractSignaturesNew.hl_contract_signatures(outputfilepath, 1,param.toArray(),server_url,app_id,app_security,datePath);
attachment_update.update({
content_id: content_id,
table_name: 'HLS_DOC_FILE_CONTENT'
});
}
}
function write_os_to_file(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_path, file_name) {
$ctx["__request_type__"] = 'file';
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());