<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hty
    $Date: 2018/5/17 23:57
    $Revision: 1.0 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT overdue_amount
                from (
                       SELECT nvl(sum((nvl(cc.due_amount, 0) - nvl(cc.received_amount, 0))), 0) AS overdue_amount
                       FROM
                         con_contract_cashflow cc
                       WHERE
                         cc.overdue_status = 'Y') t1
                where overdue_amount > 0
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="overdue_amount" databaseType="NUMBER" datatype="java.lang.Double" forDisplay="true" forQuery="true" physicalName="overdueAmount" prompt="员工号"/>
    </bm:fields>
</bm:model>