<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: 18083
    $Date:  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[

Select decode(cc.division,'70',nvl(had.division_detail,'01'),'') division_detail
      From csh_payment_req_ln t, con_contract cc,hls_bp_master_agent_division had
     Where t.payment_req_id = ${/parameter/@payment_req_id}
       And t.ref_doc_category = 'CONTRACT'
       and t.ref_doc_id = cc.contract_id
       and cc.division= had.division
       and cc.bp_id_agent_level1= had.bp_id
       and rownum = 1

            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
