DBA Data[Home] [Help]

PACKAGE: APPS.ARP_PROCESS_CREDIT_UTIL

Source


1 PACKAGE ARP_PROCESS_CREDIT_UTIL AUTHID CURRENT_USER AS
2 /* $Header: ARTECMUS.pls 120.4.12010000.1 2008/07/24 16:55:43 appldev ship $ */
3 
4 FUNCTION get_commitment_adjustments(
5   p_ct_id                 IN ra_customer_trx.customer_trx_id%type,
6   p_commit_ct_id          IN ra_customer_trx.customer_trx_id%type)
7 RETURN number;
8 
9 PROCEDURE get_commitment_adj_detail(
10   p_ct_id                 IN ra_customer_trx.customer_trx_id%type,
11   p_commit_ct_id          IN ra_customer_trx.customer_trx_id%type,
12   p_amount                IN OUT NOCOPY number,
13   p_line_amount           IN OUT NOCOPY number,
14   p_tax_amount            IN OUT NOCOPY number,
15   p_freight_amount        IN OUT NOCOPY number);
16 
17 PROCEDURE get_credited_trx_details(
18   p_ct_id                 IN ra_customer_trx.customer_trx_id%type,
19   p_commit_ct_id          IN ra_customer_trx.customer_trx_id%type,
20   p_orig_line_amount     OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
21   p_orig_tax_amount      OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
22   p_orig_frt_amount      OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
26   p_bal_frt_amount       OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
23   p_orig_tot_amount      OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
24   p_bal_line_amount      OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
25   p_bal_tax_amount       OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
27   p_bal_tot_amount       OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
28   p_num_line_lines       OUT NOCOPY number,
29   p_num_tax_lines        OUT NOCOPY number,
30   p_num_frt_lines        OUT NOCOPY number,
31   p_num_installments     OUT NOCOPY number,
32   p_payment_exist_flag   OUT NOCOPY varchar2);
33 
34 
35 PROCEDURE get_credit_memo_amounts(
36   p_ct_id                 IN ra_customer_trx.customer_trx_id%type,
37   p_cm_line_amount        OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
38   p_cm_tax_amount         OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
39   p_cm_frt_amount         OUT NOCOPY ra_customer_trx_lines.extended_amount%type,
40   p_num_line_lines        OUT NOCOPY number,
41   p_num_tax_lines         OUT NOCOPY number,
42   p_num_frt_lines         OUT NOCOPY number);
43 
44 PROCEDURE get_cm_header_defaults(
45   p_trx_date                     IN
46                           ra_customer_trx.trx_date%type,
47   p_crtrx_ct_id                  IN
48                           ra_customer_trx.customer_trx_id%type,
49   p_ct_id                        IN
50                           ra_customer_trx.customer_trx_id%type,
51   p_bs_id                        IN
52                           ra_batch_sources.batch_source_id%type,
53   p_gl_date                      IN
54                           ra_cust_trx_line_gl_dist.gl_date%type,
55   p_currency_code                IN
56                           fnd_currencies.currency_code%type,
57   p_cust_trx_type_id             IN
58                           ra_cust_trx_types.cust_trx_type_id%type,
59   p_ship_to_customer_id          IN
60                           hz_cust_accounts.cust_account_id%type,
61   p_ship_to_site_use_id          IN
62                           hz_cust_site_uses.site_use_id%type,
63   p_ship_to_contact_id           IN
64                           hz_cust_account_roles.cust_account_role_id%type,
65   p_bill_to_customer_id          IN
66                           hz_cust_accounts.cust_account_id%type,
67   p_bill_to_site_use_id          IN
68                           hz_cust_site_uses.site_use_id%type,
69   p_bill_to_contact_id           IN
70                           hz_cust_account_roles.cust_account_role_id%type,
71   p_primary_salesrep_id          IN
72                           ra_salesreps.salesrep_id%type,
73   p_receipt_method_id            IN
74                           ar_receipt_methods.receipt_method_id%type,
75   p_customer_bank_account_id     IN
76                           ce_bank_accounts.bank_account_id%type,
77   p_paying_customer_id           IN
78                           hz_cust_accounts.cust_account_id%type,
79   p_paying_site_use_id           IN
80                           hz_cust_site_uses.site_use_id%type,
81   p_ship_via                     IN
82                           ra_customer_trx.ship_via%type,
83   p_fob_point                    IN
84                           ra_customer_trx.fob_point%type,
85   p_invoicing_rule_id            IN
86                           ra_customer_trx.invoicing_rule_id%type,
87   p_rev_recog_run_flag           IN
88                           varchar2,
89   p_complete_flag                IN
90                           ra_customer_trx.complete_flag%type,
91   p_salesrep_required_flag       IN
92                           ar_system_parameters.salesrep_required_flag%type,
93 --
94   p_crtrx_bs_id                  IN
95                           ra_batch_sources.batch_source_id%type,
96   p_crtrx_cm_bs_id               IN
97                           ra_batch_sources.batch_source_id%type,
98   p_batch_bs_id                  IN
99                           ra_batch_sources.batch_source_id%type,
100   p_profile_bs_id                IN
101                           ra_batch_sources.batch_source_id%type,
102   p_crtrx_type_id                IN
103                           ra_cust_trx_types.cust_trx_type_id%type,
104   p_crtrx_cm_type_id             IN
105                           ra_cust_trx_types.cust_trx_type_id%type,
106   p_crtrx_gl_date                IN
107                           ra_cust_trx_line_gl_dist.gl_date%type,
108   p_batch_gl_date                IN
109                           ra_batches.gl_date%type,
110 --
111   p_crtrx_ship_to_customer_id    IN
112                           hz_cust_accounts.cust_account_id%type,
113   p_crtrx_ship_to_site_use_id    IN
114                           hz_cust_site_uses.site_use_id%type,
115   p_crtrx_ship_to_contact_id     IN
116                           hz_cust_account_roles.cust_account_role_id%type,
117   p_crtrx_bill_to_customer_id    IN
118                           hz_cust_accounts.cust_account_id%type,
119   p_crtrx_bill_to_site_use_id    IN
120                           hz_cust_site_uses.site_use_id%type,
121   p_crtrx_bill_to_contact_id     IN
122                           hz_cust_account_roles.cust_account_role_id%type,
123   p_crtrx_primary_salesrep_id    IN
124                           ra_salesreps.salesrep_id%type,
125   p_crtrx_open_rec_flag          IN
126                           ra_cust_trx_types.accounting_affect_flag%type,
127 --
128   p_crtrx_receipt_method_id      IN
129                           ar_receipt_methods.receipt_method_id%type,
130   p_crtrx_cust_bank_account_id   IN
131                           ce_bank_accounts.bank_account_id%type,
132   p_crtrx_ship_via               IN
133                           ra_customer_trx.ship_via%type,
134   p_crtrx_ship_date_actual       IN
135                           ra_customer_trx.ship_date_actual%type,
139                           ra_customer_trx.fob_point%type,
136   p_crtrx_waybill_number         IN
137                           ra_customer_trx.waybill_number%type,
138   p_crtrx_fob_point              IN
140 --
141   p_default_bs_id                OUT NOCOPY
142                           ra_batch_sources.batch_source_id%type,
143   p_default_bs_name              OUT NOCOPY
144                           ra_batch_sources.name%type,
145   p_auto_trx_numbering_flag      OUT NOCOPY
146                           ra_batch_sources.auto_trx_numbering_flag%type,
147   p_bs_type                      OUT NOCOPY
148                           ra_batch_sources.batch_source_type%type,
149   p_copy_doc_number_flag         OUT NOCOPY
150                           ra_batch_sources.copy_doc_number_flag%type,
151   p_bs_default_cust_trx_type_id  OUT NOCOPY
152                           ra_cust_trx_types.cust_trx_type_id%type,
153   p_default_cust_trx_type_id     OUT NOCOPY
154                           ra_cust_trx_types.cust_trx_type_id%type,
155   p_default_type_name            OUT NOCOPY
156                           ra_cust_trx_types.name%type,
157   p_open_receivable_flag         OUT NOCOPY
158                           ra_cust_trx_types.accounting_affect_flag%type,
159   p_post_to_gl_flag              OUT NOCOPY
160                           ra_cust_trx_types.post_to_gl%type,
161   p_allow_freight_flag           OUT NOCOPY
162                           ra_cust_trx_types.allow_freight_flag%type,
163   p_creation_sign                OUT NOCOPY
164                           ra_cust_trx_types.creation_sign%type,
165   p_allow_overapplication_flag   OUT NOCOPY
166                           ra_cust_trx_types.allow_overapplication_flag%type,
167   p_natural_app_only_flag        OUT NOCOPY
168                           ra_cust_trx_types.natural_application_only_flag%type,
169   p_tax_calculation_flag         OUT NOCOPY
170                           ra_cust_trx_types.tax_calculation_flag%type,
171   p_default_printing_option      OUT NOCOPY
172                           ra_customer_trx.printing_option%type,
173 --
174   p_default_gl_date              OUT NOCOPY
175                           ra_cust_trx_line_gl_dist.gl_date%type,
176   p_default_ship_to_customer_id  OUT NOCOPY
177                           hz_cust_accounts.cust_account_id%type,
178   p_default_ship_to_site_use_id  OUT NOCOPY
179                           hz_cust_site_uses.site_use_id%type,
180   p_default_ship_to_contact_id   OUT NOCOPY
181                           hz_cust_account_roles.cust_account_role_id%type,
182   p_default_bill_to_customer_id  OUT NOCOPY
183                           hz_cust_accounts.cust_account_id%type,
184   p_default_bill_to_site_use_id  OUT NOCOPY
185                           hz_cust_site_uses.site_use_id%type,
186   p_default_bill_to_contact_id   OUT NOCOPY
187                           hz_cust_account_roles.cust_account_role_id%type,
188   p_default_primary_salesrep_id  OUT NOCOPY
189                           ra_salesreps.salesrep_id%type,
190   p_default_receipt_method_id    OUT NOCOPY
191                           ar_receipt_methods.receipt_method_id%type,
192   p_default_cust_bank_account_id OUT NOCOPY
193                           ce_bank_accounts.bank_account_id%type,
194   p_default_paying_customer_id   OUT NOCOPY
195                           hz_cust_accounts.cust_account_id%type,
196   p_default_paying_site_use_id   OUT NOCOPY
197                           hz_cust_site_uses.site_use_id%type,
198   p_default_ship_via             OUT NOCOPY
199                           ra_customer_trx.ship_via%type,
200   p_default_ship_date_actual     OUT NOCOPY
201                           ra_customer_trx.ship_date_actual%type,
202   p_default_waybill_number       OUT NOCOPY
203                           ra_customer_trx.waybill_number%type,
204   p_default_fob_point            OUT NOCOPY
205                           ra_customer_trx.fob_point%type);
206 
207 
208 FUNCTION check_payment_method(
209    p_trx_date               IN
210                                      ra_customer_trx.trx_date%type,
211    p_customer_id            IN
212                                      ra_customer_trx.customer_trx_id%type,
213    p_site_use_id            IN
214                                      hz_cust_site_uses.site_use_id%type,
215    p_parent_customer_id     IN
216                                      hz_cust_accounts.cust_account_id%type,
217    p_parent_site_use_id     IN
218                                      hz_cust_site_uses.site_use_id%type,
219    p_currency_code          IN
220                                      fnd_currencies.currency_code%type,
221    p_crtrx_receipt_method_id IN
222                                      ar_receipt_methods.receipt_method_id%type,
223    p_payment_method_name   OUT NOCOPY
224                                      ar_receipt_methods.name%type,
225    p_receipt_method_id     OUT NOCOPY
226                                      ar_receipt_methods.receipt_method_id%type,
227    p_creation_method_code  OUT NOCOPY
228                                    ar_receipt_classes.creation_method_code%type
229                              ) RETURN BOOLEAN;
230 
231 FUNCTION check_bank_account(
232   p_trx_date                     IN
233                           ra_customer_trx.trx_date%type,
234   p_currency_code                IN
235                           fnd_currencies.currency_code%type,
236   p_bill_to_customer_id          IN
237                           hz_cust_accounts.cust_account_id%type,
238   p_bill_to_site_use_id          IN
239                           hz_cust_site_uses.site_use_id%type,
240   p_parent_customer_id           IN
241                           hz_cust_accounts.cust_account_id%type,
242   p_parent_site_use_id           IN
243                           hz_cust_site_uses.site_use_id%type,
244   p_crtrx_cust_bank_account_id   IN
245                           ce_bank_accounts.bank_account_id%type,
246   p_cust_bank_account_id         OUT NOCOPY
247                           ce_bank_accounts.bank_account_id%type,
248   p_paying_customer_id           OUT NOCOPY
249                           hz_cust_accounts.cust_account_id%type)
250 RETURN BOOLEAN;
251 
252 FUNCTION check_cm_trxtype (
253   p_inv_trx_type_id             IN
254                           ra_cust_trx_types.cust_trx_type_id%type,
255   p_inv_open_rec_flag          IN
256                           ra_cust_trx_types.accounting_affect_flag%type,
257   p_cm_trx_type_id             IN
258                           ra_cust_trx_types.cust_trx_type_id%type
259   )
260 RETURN BOOLEAN;
261 
262 PROCEDURE init;
263 
264 END ARP_PROCESS_CREDIT_UTIL;
265