1 PACKAGE jai_ap_tds_prepayments_pkg AS
2 /* $Header: jai_ap_tds_ppay.pls 120.2 2007/05/03 13:48:05 csahoo ship $ */
3
4 /* ----------------------------------------------------------------------------
5 FILENAME : jai_ap_tds_prepayemnts_pkg_s.sql
6
7 Created By : Aparajita
8
9 Created Date : 03-mar-2005
10
11 Bug :
12
13 Purpose : Implementation of prepayment functionality for TDS.
14
15 Called from : Trigger ja_in_ap_aia_after_trg
16 Trigger ja_in_ap_aida_after_trg
17
18 CHANGE HISTORY:
19 -------------------------------------------------------------------------------
20 S.No Date Author and Details
21 -------------------------------------------------------------------------------
22 1. 03/03/2005 Aparajita for bug#4088186. version#115.0. TDS Clean Up.
23
24 Created this package for implementing the TDS prepayment
25 functionality onto AP invoice.
26 2. 08-Jun-2005 Version 116.1 jai_ap_tds_ppay -Object is Modified to refer to New DB Entity names in place of Old DB Entity Names
27 as required for CASE COMPLAINCE.
28
29 3. 03/05/2007 Bug 5722028. Added by csahoo 120.2
30 Forward porting to R12.
31 Added parameter p_creation_date for the follownig procedures
32 Process_prepayment
33 process_unapply
34 process_tds_invoices
35
36 Depedencies:
37 =============
38 jai_ap_tds_gen.pls - 120.5
39 jai_ap_tds_gen.plb - 120.19
40 jai_ap_tds_ppay.pls - 120.2
41 jai_ap_tds_ppay.plb - 120.5
42 jai_ap_tds_can.plb - 120.6
43
44 ---------------------------------------------------------------------------- */
45
46 procedure process_prepayment
47 (
48 p_invoice_id in number,
49 p_invoice_distribution_id in number,
50 p_prepay_distribution_id in number,
51 p_parent_reversal_id in number,
52 p_prepay_amount in number,
53 p_vendor_id in number,
54 p_vendor_site_id in number,
55 p_accounting_date in date,
56 p_invoice_currency_code in varchar2,
57 p_exchange_rate in number,
58 p_set_of_books_id in number,
59 p_org_id in number,
60 -- Bug 5722028. Added by CSahoo
61 p_creation_date in date,
62 p_process_flag out nocopy varchar2,
63 p_process_message out nocopy varchar2,
64 p_codepath in out nocopy varchar2
65 );
66
67
68 procedure process_unapply
69 (
70 p_invoice_id in number,
71 p_invoice_distribution_id in number, /* PREPAY UNAPPLY distribution */
72 p_parent_distribution_id in number, /* parent PREPAY APPLY distribution */
73 p_prepay_amount in number,
74 p_vendor_id in number,
75 p_vendor_site_id in number,
76 p_accounting_date in date,
77 p_invoice_currency_code in varchar2,
78 p_exchange_rate in number,
79 p_set_of_books_id in number,
80 p_org_id in number,
81 -- Bug 5722028. Added by CSahoo
82 p_creation_date in date,
83 p_process_flag out nocopy varchar2,
84 p_process_message out nocopy varchar2,
85 p_codepath in out nocopy varchar2
86 );
87
88
89 procedure allocate_prepayment
90 (
91 p_invoice_id in number,
92 p_invoice_distribution_id in number, /* Of the PREPAY line */
93 p_prepay_amount in number,
94 p_process_flag out nocopy varchar2,
95 p_process_message out nocopy varchar2,
96 p_codepath in out nocopy varchar2
97 );
98
99 procedure populate_section_tax
100 (
101 p_invoice_id in number,
102 p_invoice_distribution_id in number, /* Of the PREPAY line in the SI*/
103 p_prepay_distribution_id in number, /*Distribution id of the PP invoice */
104 p_process_flag out nocopy varchar2,
105 p_process_message out nocopy varchar2,
106 p_codepath in out nocopy varchar2
107 );
108
109 procedure process_tds_invoices
110 (
111 p_invoice_id in number,
112 p_invoice_distribution_id in number,
113 p_prepay_distribution_id in number,
114 p_prepay_amount in number,
115 p_vendor_id in number,
116 p_vendor_site_id in number,
117 p_accounting_date in date,
118 p_invoice_currency_code in varchar2,
119 p_exchange_rate in number,
120 p_set_of_books_id in number,
121 p_org_id in number,
122 -- Bug 5722028. Added by CSahoo
123 p_creation_date in date,
124 p_process_flag out nocopy varchar2,
125 p_process_message out nocopy varchar2,
126 p_codepath in out nocopy varchar2
127 );
128
129 procedure process_old_transaction
130 (
131 p_invoice_id in number,
132 p_invoice_distribution_id in number,
133 p_prepay_distribution_id in number,
134 p_amount in number,
135 p_last_updated_by in number,
136 p_last_update_date in date,
137 p_created_by in number,
138 p_creation_date in date,
139 p_org_id in number,
140 p_process_flag out nocopy varchar2,
141 p_process_message out nocopy varchar2
142 );
143
144 END jai_ap_tds_prepayments_pkg;