1 PACKAGE BODY user_pkg_lot AS
2 /* $Header: INVUDLGB.pls 120.4 2011/09/19 12:38:53 kbavadek ship $ */
3
4 -- OPM Convergence - added parent lot number
5 -- Bug#4145437 - Increased length of uesr lot number.
6
7 -- Fix for Bug#12925054. Added p_transaction_source_id and p_transaction_source_line_id
8 -- so that batch or wip job information can be included
9
10 FUNCTION generate_lot_number(p_org_id IN NUMBER,
11 p_inventory_item_id IN NUMBER,
12 p_transaction_date IN DATE,
13 p_revision IN VARCHAR2,
14 p_subinventory_code IN VARCHAR2,
15 p_locator_id IN NUMBER,
16 p_transaction_type_id IN NUMBER,
17 p_transaction_action_id IN NUMBER,
18 p_transaction_source_type_id IN NUMBER,
19 p_transaction_source_id IN NUMBER,
20 p_transaction_source_line_id IN NUMBER,
21 p_lot_number IN VARCHAR2,
22 p_parent_lot_number IN VARCHAR2,
23 x_return_status OUT NOCOPY VARCHAR2)
24 RETURN VARCHAR2
25 IS
26 l_user_lot_number VARCHAR2(300);
27 BEGIN
28 x_return_status := FND_API.G_RET_STS_SUCCESS;
29 RETURN (l_user_lot_number);
30 END;
31
32 -- Bug6836808 to allow New Lots Based on custom code
33
34 FUNCTION Allow_New_Lots( p_transaction_type_id IN NUMBER
35 ) RETURN BOOLEAN IS
36 Begin
37 /* Custom code starts for user */
38
39 /* Custom code Ends */
40 RETURN(TRUE);
41 END Allow_New_Lots;
42
43 --Expired lots custom hook
44 FUNCTION use_expired_lots(p_organization_id IN NUMBER
45 , p_inventory_item_id IN NUMBER
46 , p_demand_source_type_id IN NUMBER
47 , p_demand_source_line_id IN NUMBER
48 )
49 RETURN BOOLEAN
50 IS
51
52 l_debug NUMBER;
53 BEGIN
54
55 l_debug := NVL (fnd_profile.VALUE ('INV_DEBUG_TRACE'), 0);
56 IF (l_debug = 1) THEN
57 inv_trx_util_pub.TRACE('Entered use_expired_lots', 'use_expired_lots', 9);
58 END IF;
59
60 /* Space for custom logic. Please ensure return values are correct */
61 ------------------------------------
62 ------------------------------------
63
64 IF (l_debug = 1 ) THEN
65 inv_trx_util_pub.TRACE('returning FALSE', 'use_expired_lots', 9);
66 END IF;
67 RETURN FALSE;
68
69 EXCEPTION
70 WHEN OTHERS THEN
71 IF (l_debug = 1 ) THEN
72 inv_trx_util_pub.TRACE('Exception:'||SQLERRM, 'use_expired_lots', 9);
73 END IF;
74 RETURN FALSE;
75 END use_expired_lots;
76
77 End user_pkg_lot;