update_receipt_number.lwm 1.41 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2015-3-4 下午2:53:05  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                BEGIN
                	yonda_acr_invoice_check_pkg.check_receipt_number(
	                     p_invoice_hd_id  =>${@invoice_hd_id},
	                     p_again_flag     =>nvl(${/parameter/@again_flag},'N'),
	                     p_user_id        =>${/session/@user_id});
                    UPDATE
                        acr_invoice_hd hd
                    SET
                        hd.receipt_number   = ${@receipt_number},
                        hd.last_updated_by  = ${/session/@user_id},
                        hd.last_update_date = SYSDATE
                    WHERE
                        hd.invoice_hd_id = ${@invoice_hd_id} AND
                        (
                            hd.receipt_number       IS NULL OR
                            ${/parameter/@again_flag}='Y'
                        );
                     yonda_acr_invoice_check_pkg.check_after_receipt_number(
	                     p_receipt_number  =>${@receipt_number},
	                     p_user_id        =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>