[Home] [Help]
PACKAGE BODY: APPS.ICX_PO_RCV_QTY
Source
1 PACKAGE BODY ICX_PO_RCV_QTY as
2 /* $Header: ICXRCQTB.pls 115.1 99/07/17 03:21:47 porting ship $*/
3
4 /*===========================================================================
5
6 FUNCTION NAME: get_net_qty
7
8 ===========================================================================*/
9 FUNCTION get_net_qty (x_parent_trx_id IN NUMBER,
10 x_primary_qty IN NUMBER
11 ) RETURN NUMBER is
12
13
14 x_correct_qty number;
15 x_net_qty number;
16
17
18 BEGIN
19
20 SELECT nvl(sum(rt.primary_quantity), 0)
21 INTO x_correct_qty
22 FROM rcv_transactions rt
23 WHERE rt.parent_transaction_id = x_parent_trx_id
24 AND rt.transaction_type = 'CORRECT';
25
26 x_net_qty := x_primary_qty - x_correct_qty;
27
28 return (x_net_qty);
29
30 END get_net_qty;
31
32 end icx_po_rcv_qty;