1 PACKAGE AP_PREPAY_UTILS_PKG AS
2 /*$Header: apprutls.pls 120.4.12000000.2 2007/06/28 15:19:06 gagrawal ship $*/
3
4 FUNCTION Get_Line_Prepay_AMT_Remaining (
5 P_invoice_id IN NUMBER,
6 P_line_number IN NUMBER) RETURN NUMBER;
7
8 --Contract Payments
9 FUNCTION Get_Ln_Prep_AMT_Remain_Recoup (
10 P_invoice_id IN NUMBER,
11 P_line_number IN NUMBER) RETURN NUMBER;
12
13 FUNCTION Lock_Line (
14 P_invoice_id IN NUMBER,
15 P_line_number IN NUMBER,
16 P_request_id IN NUMBER) RETURN BOOLEAN;
17
18 FUNCTION Unlock_Line (
19 P_invoice_id IN NUMBER,
20 P_line_number IN NUMBER) RETURN BOOLEAN;
21
22 FUNCTION Unlock_Locked_Lines (
23 P_request_id IN NUMBER) RETURN BOOLEAN;
24
25 FUNCTION IS_Line_Locked (
26 P_invoice_id IN NUMBER,
27 P_line_number IN NUMBER,
28 P_request_id IN NUMBER) RETURN VARCHAR2;
29
30 FUNCTION Get_Prepay_Number (
31 l_prepay_dist_id IN NUMBER) RETURN VARCHAR2 ;
32
33 FUNCTION Get_Prepay_Dist_Number (
34 l_prepay_dist_id IN NUMBER) RETURN VARCHAR2;
35
36 FUNCTION Get_Prepaid_Amount(
37 l_invoice_id IN NUMBER) RETURN NUMBER ;
38
39 FUNCTION Get_Total_Prepays(
40 l_vendor_id IN NUMBER,
41 l_org_id IN NUMBER) RETURN NUMBER ;
42
43 FUNCTION Get_Available_Prepays(
44 l_vendor_id IN NUMBER,
45 l_org_id IN NUMBER) RETURN NUMBER ;
46
47 FUNCTION Get_Prepay_Amount_Applied (
48 P_invoice_id IN number) RETURN NUMBER;
49
50 FUNCTION Get_Prepay_Amount_Remaining (
51 P_invoice_id IN number) RETURN NUMBER;
52
53 FUNCTION Get_Prepayments_Applied_Flag (
54 P_invoice_id IN number) RETURN VARCHAR2;
55
56 FUNCTION Get_Prepayment_Type (
57 P_invoice_id IN number) RETURN VARCHAR2;
58
59 FUNCTION Get_Pp_Amt_Applied_On_Date (
60 P_invoice_id IN NUMBER,
61 P_prepay_id IN NUMBER,
62 P_application_date IN DATE) RETURN NUMBER;
63
64 FUNCTION Get_Amt_Applied_Per_Prepay (
65 P_invoice_id IN NUMBER,
66 P_prepay_id IN NUMBER) RETURN NUMBER;
67
68 PROCEDURE Get_Prepay_Amount_Available(
69 X_Invoice_ID IN NUMBER,
70 X_Prepay_ID IN NUMBER,
71 X_Sob_Id IN NUMBER,
72 X_Balancing_Segment OUT NOCOPY VARCHAR2,
73 X_Prepay_Amount OUT NOCOPY NUMBER,
74 X_Invoice_Amount OUT NOCOPY NUMBER);
75
76 -- This function will return the prepayment remaining amount
77 -- exclusive of tax for a line of the prepayment invoice
78 FUNCTION Get_Ln_Pp_AMT_Remaining_No_Tax(
79 P_invoice_id IN NUMBER,
80 P_line_number IN NUMBER) RETURN NUMBER;
81
82 -- This fucntion will return the prepay remaining amount for
83 -- inclusive taxes for a line of the prepayment invoice
84 FUNCTION Get_Inc_Tax_PP_Amt_Remaining (
85 P_invoice_id IN NUMBER,
86 P_line_number IN NUMBER) RETURN NUMBER;
87
88 -- This function will return the Exclusive tax amount
89 -- created for a prepayment application
90 FUNCTION Get_Exc_Tax_Amt_Applied (
91 X_Invoice_Id IN NUMBER,
92 X_prepay_invoice_id IN NUMBER,
93 X_prepay_Line_Number IN NUMBER) RETURN NUMBER;
94
95 -- This function will return the total of the invoice
96 -- unpaid amount not including exclusive taxes
97 FUNCTION Get_Invoice_Unpaid_Amount (
98 X_Invoice_Id IN NUMBER) RETURN NUMBER;
99
100 -- This function will return the total of the invoice
101 -- unpaid amount including exclusive taxes added for
102 -- bug6149363
103 FUNCTION Get_Inv_Tot_Unpaid_Amt (
104 X_Invoice_Id IN NUMBER) RETURN NUMBER;
105
106 -- This function will return the total of the invoice
107 -- unpaid amount not including exclusive taxes
108 FUNCTION Get_Inclusive_Tax_Unpaid_Amt (
109 X_Invoice_Id IN NUMBER) RETURN NUMBER;
110
111 -- This function will return the total of the remaining
112 -- inclusive tax amount for a distribution
113 FUNCTION Get_Dist_Inclusive_Tax_Amt (
114 X_Invoice_Id IN NUMBER,
115 X_Line_Number IN NUMBER,
116 X_Invoice_Dist_Id IN NUMBER) RETURN NUMBER;
117
118 PRAGMA RESTRICT_REFERENCES(get_prepay_number, WNDS, WNPS, RNPS);
119 PRAGMA RESTRICT_REFERENCES(get_prepay_dist_number, WNDS, WNPS, RNPS);
120 PRAGMA RESTRICT_REFERENCES(get_prepaid_amount, WNDS, WNPS, RNPS);
121 PRAGMA RESTRICT_REFERENCES(get_prepay_amount_applied, WNDS, WNPS, RNPS);
122 PRAGMA RESTRICT_REFERENCES(get_prepay_amount_remaining, WNDS, WNPS, RNPS);
123 PRAGMA RESTRICT_REFERENCES(get_prepayment_type, WNDS, WNPS, RNPS);
124 PRAGMA RESTRICT_REFERENCES(get_prepayments_applied_flag, WNDS, WNPS, RNPS);
125 PRAGMA RESTRICT_REFERENCES(get_pp_amt_applied_on_date, WNDS, WNPS, RNPS);
126 PRAGMA RESTRICT_REFERENCES(get_amt_applied_per_prepay, WNDS, WNPS, RNPS);
127
128
129 END AP_PREPAY_UTILS_PKG;
130