DBA Data[Home] [Help]

PACKAGE: APPS.OE_ACCEPTANCE_UTIL

Source


1 PACKAGE OE_ACCEPTANCE_UTIL AS
2 /* $Header: OEXUACCS.pls 120.4 2006/05/08 04:15:46 serla noship $ */
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 
32 --This procedure will register all the changed lines
33 PROCEDURE Register_Changed_Lines(
34   p_line_id           IN  NUMBER
35 , p_header_id         IN  NUMBER
36 , p_line_type_id      IN  NUMBER
37 , p_sold_to_org_id    IN  NUMBER
38 , p_invoice_to_org_id IN  NUMBER
39 , p_inventory_item_id IN  NUMBER
40 , p_shippable_flag    IN  VARCHAR2
41 , p_org_id            IN  NUMBER
42 , p_accounting_rule_id IN NUMBER
43 , p_operation         IN  VARCHAR2);
44 
45 --This procedure will delete the changed lines table once the lines are processed
46 PROCEDURE Delete_Changed_Lines_Tbl;
47 
48 --Function returns batch_source_ID and name for the given batch_source_name.
49 FUNCTION Get_batch_source_ID (p_batch_source_name VARCHAR2) RETURN NUMBER;
50 
51 --This procedure is called to default acceptance attributes for standard lines, PTO, ATO models.
52 --Acceptance attributes are not defaulted for internal order lines, retrobill lines, return lines,
53 --child lines( under ATO, PTO), and service lines.
54 PROCEDURE Default_Contingency_Attributes;
55 
56 --This procedure is called to default acceptance details for service line if the parent is already accepted
57 PROCEDURE Default_Parent_Accept_Details
58 ( p_line_rec IN OUT NOCOPY OE_Order_PUB.Line_Rec_Type);
59 
60 --This procedure is called to get contingency attributes of a given line.
61 PROCEDURE Get_Contingency_attributes
62 (p_line_rec                 IN OE_ORDER_PUB.Line_Rec_Type
63 ,X_contingency_id           OUT NOCOPY NUMBER
64 ,X_revrec_event_code        OUT NOCOPY VARCHAR2
65 ,X_revrec_expiration_days   OUT NOCOPY NUMBER);
66 
67 --Function returns TRUE if pre-billing acceptance is enabled for the given line.
68 Function Pre_billing_acceptance_on (p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN BOOLEAN;
69 
70 -- Over Loaded
71 Function Pre_billing_acceptance_on (p_line_id IN NUMBER) RETURN BOOLEAN;
72 
73 --Function returns TRUE if post-billing acceptance is enabled for the given line.
74 Function Post_billing_acceptance_on (p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN BOOLEAN;
75 
76 -- Over Loaded
77 Function Post_billing_acceptance_on (p_line_id IN NUMBER) RETURN BOOLEAN;
78 
79 --This function checks if acceptance is allowed for the given line.
80 Function Customer_acceptance_eligible (p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN BOOLEAN;
81 
82 -- Over Loaded
83 Function Customer_acceptance_eligible (p_line_id IN NUMBER) RETURN BOOLEAN;
84 
85 --Function returns 'ACCEPTED'/'REJECTED'/'NOT_ACCEPTED'
86 Function Acceptance_status(p_line_rec IN OE_Order_PUB.Line_Rec_Type) RETURN VARCHAR2;
87 
88 -- Over Loaded
89 Function Acceptance_Status(p_line_id IN NUMBER) RETURN VARCHAR2;
90 
91 END OE_ACCEPTANCE_UTIL;