<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Clocc  
    $Date: 2015-9-11 下午2:36:27  
    $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
                    a.je_transaction_code,
                    t.je_transaction_desc,
                    COUNT(1) seq
                FROM
                    hls_journal_header a,
                    gld_je_transaction t
                WHERE
                    a.je_company_id                = ${/session/@company_id} AND
                    a.status                       = 'C' AND
                    a.post_gl_status               = 'N' AND
                    TO_CHAR(journal_date,'YYYYMM') = TO_CHAR(TO_DATE(${/parameter/@calc_date},'YYYY-MM-DD'),'YYYYMM') AND
                    a.je_transaction_code          = t.je_transaction_code
                GROUP BY
                    a.je_transaction_code,
                    t.je_transaction_desc,
                    t.order_seq
                ORDER BY
                    t.order_seq
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
