DBA Data[Home] [Help]

PACKAGE: APPS.OE_ACCEPTANCE_UTIL

Source


1 PACKAGE OE_ACCEPTANCE_UTIL AUTHID CURRENT_USER AS
2 /* $Header: OEXUACCS.pls 120.4.12010000.2 2009/04/15 12:56:52 srsunkar ship $ */
3 
4 --Table of records to capture changed lines so that contingencies can be defaulted for all these lines at the time of saving
5 --extending the record structure for batch_source_id, cust_trx_type_id, invoice_to_customer so that we can bulk insert into AR temp table
6 TYPE line_index_Rec IS RECORD
7 (   line_id         NUMBER
8   , line_index      NUMBER
9 );
10 
11 TYPE line_index_Tbl       IS TABLE OF line_index_Rec INDEX BY BINARY_INTEGER;
12 
13 TYPE NUMBER_TYPE          IS TABLE OF NUMBER         INDEX BY BINARY_INTEGER;
14 TYPE VARCHAR1_TYPE        IS TABLE OF VARCHAR(1)     INDEX BY BINARY_INTEGER;
15 
16 G_line_index_Rec          line_index_Rec;
17 G_line_index_Tbl          line_index_Tbl;
18 G_line_id_tbl             number_type;
19 G_header_id_tbl           number_type;
20 G_line_type_id_tbl        number_type;
21 G_sold_to_org_id_tbl      number_type;
22 G_invoice_to_org_id_tbl   number_type;
23 G_inventory_item_id_tbl   number_type;
24 G_org_id_tbl              number_type;
25 G_batch_source_id_tbl     number_type;
26 G_cust_trx_type_id_tbl    number_type;
27 G_invoice_to_customer_tbl number_type;
28 G_invoice_to_site_tbl     number_type;
29 G_shippable_flag_tbl      varchar1_type;
30 G_accounting_rule_id_tbl     number_type;
31 --For Bug#8262992
32 G_ship_to_org_id_tbl       number_type;
33 G_ship_to_customer_tbl     number_type;
34 G_ship_to_site_tbl         number_type;
35 
36 --This procedure will register all the changed lines
37 PROCEDURE Register_Changed_Lines(
38   p_line_id           IN  NUMBER
39 , p_header_id         IN  NUMBER
40 , p_line_type_id      IN  NUMBER
41 , p_sold_to_org_id    IN  NUMBER
42 , p_invoice_to_org_id IN  NUMBER
43 , p_inventory_item_id IN  NUMBER
44 , p_shippable_flag    IN  VARCHAR2
45 , p_org_id            IN  NUMBER
46 , p_accounting_rule_id IN NUMBER
47 , p_operation         IN  VARCHAR2
48 , p_ship_to_org_id      IN NUMBER  DEFAULT NULL --For bug#8262992
49 );
50 
51 --This procedure will delete the changed lines table once the lines are processed
52 PROCEDURE Delete_Changed_Lines_Tbl;
53 
54 --Function returns batch_source_ID and name for the given batch_source_name.
55 FUNCTION Get_batch_source_ID (p_batch_source_name VARCHAR2) RETURN NUMBER;
56 
57 --This procedure is called to default acceptance attributes for standard lines, PTO, ATO models.
58 --Acceptance attributes are not defaulted for internal order lines, retrobill lines, return lines,
59 --child lines( under ATO, PTO), and service lines.
60 PROCEDURE Default_Contingency_Attributes;
61 
62 --This procedure is called to default acceptance details for service line if the parent is already accepted
63 PROCEDURE Default_Parent_Accept_Details
64 ( p_line_rec IN OUT NOCOPY OE_Order_PUB.Line_Rec_Type);
65 
66 --This procedure is called to get contingency attributes of a given line.
67 PROCEDURE Get_Contingency_attributes
68 (p_line_rec                 IN OE_ORDER_PUB.Line_Rec_Type
69 ,X_contingency_id           OUT NOCOPY NUMBER
70 ,X_revrec_event_code        OUT NOCOPY VARCHAR2
71 ,X_revrec_expiration_days   OUT NOCOPY NUMBER);
72 
73 --Function returns TRUE if pre-billing acceptance is enabled for the given line.
74 Function Pre_billing_acceptance_on (p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN BOOLEAN;
75 
76 -- Over Loaded
77 Function Pre_billing_acceptance_on (p_line_id IN NUMBER) RETURN BOOLEAN;
78 
79 --Function returns TRUE if post-billing acceptance is enabled for the given line.
80 Function Post_billing_acceptance_on (p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN BOOLEAN;
81 
82 -- Over Loaded
83 Function Post_billing_acceptance_on (p_line_id IN NUMBER) RETURN BOOLEAN;
84 
85 --This function checks if acceptance is allowed for the given line.
86 Function Customer_acceptance_eligible (p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN BOOLEAN;
87 
88 -- Over Loaded
89 Function Customer_acceptance_eligible (p_line_id IN NUMBER) RETURN BOOLEAN;
90 
91 --Function returns 'ACCEPTED'/'REJECTED'/'NOT_ACCEPTED'
92 Function Acceptance_status(p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN VARCHAR2;
93 
94 -- Over Loaded
95 Function Acceptance_Status(p_line_id IN NUMBER) RETURN VARCHAR2;
96 
97 END OE_ACCEPTANCE_UTIL;