<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hty
    $Date: 2018/5/18 0:13
    $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'
                         AND cc.due_date = (trunc(sysdate) - 1)) 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>
