<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lpc 9874  
    $Date: 2017/11/24 13:52:40  
    $Revision: 1.0  
    $purpose: 
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="hls_bp_master_agent_rb_temp">
    <bm:fields>
        <bm:field name="hls_bp_master_agent_rebate_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="quarter" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="rebate_amount_vat" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="modality" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="modality_n" expression="(SELECT v.code_value_name FROM sys_code_values_v v WHERE v.code = &apos;AGENT_REBATE_MODALITY&apos;    AND v.code_enabled_flag = &apos;Y&apos; AND v.code_value_enabled_flag = &apos;Y&apos; AND v.code_value = t1.modality)" forInsert="false" forUpdate="false"/>
        <bm:field name="amount" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="rebate_date" />
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="hls_bp_master_agent_rebate_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="batch_id" queryExpression="t1.batch_id=${@batch_id}"/>
    </bm:query-fields>
</bm:model>
