1 PACKAGE ARP_COLL_IND AUTHID CURRENT_USER AS
2 /* $Header: ARCOLINS.pls 115.3 1999/11/11 15:33:38 pkm ship $ */
3
4
5
6 /*========================================================================
7 | PRIVATE PROCEDURE Get_Curency_Details
8 |
9 | DESCRIPTION
10 | Retrieves Currency, precision and min acct unit
11 | -----------------------------------------------------------
12 |
13 | PARAMETERS
14 | NONE
15 =======================================================================*/
16 --
17 --System parameter record can be modified based on info required
18 --
19 TYPE curr_rec_type IS RECORD (
20 set_of_books_id ar_system_parameters.set_of_books_id%TYPE ,
21 base_currency gl_sets_of_books.currency_code%TYPE ,
22 base_precision fnd_currencies.precision%type ,
23 base_min_acc_unit fnd_currencies.minimum_accountable_unit%type
24 );
25
26 curr_rec curr_rec_type;
27
28 /*-------------------------------------------------------------------------+
29 | PUBLIC FUNCTION |
30 | |
31 | comp_tot_rec |
32 | |
33 | DESCRIPTION |
34 | Given a date range, this function will compute the total original |
35 | receivables within the date range |
36 | |
37 | REQUIRES |
38 | start_date |
39 | end_date |
40 | set_of_books_id |
41 | call_from |
42 | |
43 | OPTIONAL |
44 | customer_id |
45 | site_id |
46 | |
47 | RETURNS |
48 | total original receivables |
49 | |
50 | NOTES |
51 | |
52 | EXAMPLE |
53 | |
54 | MODIFICATION HISTORY |
55 | 05-Aug-98 Victoria Smith Created. |
56 | |
57 +-------------------------------------------------------------------------*/
58
59 FUNCTION comp_tot_rec(pstart_date IN DATE,
60 pend_date IN DATE,
61 psob_id IN NUMBER,
62 pcall_from IN NUMBER DEFAULT 222,
63 pcust_id IN NUMBER DEFAULT -1,
64 psite_id IN NUMBER DEFAULT -1)
65 RETURN NUMBER;
66
67 /*-------------------------------------------------------------------------+
68 | PUBLIC FUNCTION |
69 | |
70 | comp_rem_rec |
71 | |
72 | DESCRIPTION |
73 | Given a date range, this function will compute the total remaining |
74 | receivables within the date range |
75 | |
76 | REQUIRES |
77 | start_date |
78 | end_date |
79 | set_of_books_id |
80 | call_from |
81 | |
82 | OPTIONAL |
83 | customer_id |
84 | site_id |
85 | |
86 | RETURNS |
87 | total remaining receivables |
88 | |
89 | NOTES |
90 | |
91 | EXAMPLE |
92 | |
93 | MODIFICATION HISTORY |
94 | 05-Aug-98 Victoria Smith Created. |
95 | |
96 +-------------------------------------------------------------------------*/
97
98 FUNCTION comp_rem_rec(pstart_date IN DATE,
99 pend_date IN DATE,
100 psob_id IN NUMBER,
101 pcall_from IN NUMBER DEFAULT 222,
102 pcust_id IN NUMBER DEFAULT -1,
103 psite_id IN NUMBER DEFAULT -1)
104 RETURN NUMBER;
105
106
107 /*-------------------------------------------------------------------------+
108 | PUBLIC FUNCTION |
109 | |
110 | comp_dso |
111 | |
112 | DESCRIPTION |
113 | Given a date range, this function will compute DSO |
114 | |
115 | REQUIRES |
116 | start_date |
117 | as_of_date |
118 | set_of_books_id |
119 | call_from |
120 | |
121 | OPTIONAL |
122 | customer_id |
123 | site_id |
124 | |
125 | RETURNS |
126 | Days Sales Outstanding |
127 | |
128 | NOTES |
129 | |
130 | EXAMPLE |
131 | |
132 | MODIFICATION HISTORY |
133 | 05-Aug-98 Victoria Smith Created. |
134 | |
135 +-------------------------------------------------------------------------*/
136
137 FUNCTION comp_dso(pstart_date IN DATE,
138 pas_of_date IN DATE,
139 psob_id IN NUMBER,
140 pcall_from IN NUMBER DEFAULT 222,
141 pcust_id IN NUMBER DEFAULT -1,
142 psite_id IN NUMBER DEFAULT -1)
143 RETURN NUMBER;
144
145
146 /*-------------------------------------------------------------------------+
147 | PUBLIC FUNCTION |
148 | |
149 | comp_dso_gl |
150 | |
151 | DESCRIPTION |
152 | This is a cover function for use in the GL Summary report, it is |
153 | basically a call to comp_dso with 2 additional parameters |
154 | preport_name, preport_params |
155 | Given a date range, this function will compute DSO |
156 | |
157 | REQUIRES |
158 | start_date |
159 | as_of_date |
160 | set_of_books_id |
161 | preport_name |
162 | preport_params |
163 | |
164 | OPTIONAL |
165 | customer_id |
166 | site_id |
167 | |
168 | RETURNS |
169 | Days Sales Outstanding |
170 | |
171 | NOTES |
172 | |
173 | EXAMPLE |
174 | |
175 | MODIFICATION HISTORY |
176 | 11-Sep-98 Victoria Smith Created. |
177 | |
178 +-------------------------------------------------------------------------*/
179
180 FUNCTION comp_dso_gl(pstart_date IN DATE,
181 pas_of_date IN DATE,
182 psob_id IN NUMBER,
183 preport_name OUT VARCHAR2,
184 preport_params OUT VARCHAR2,
185 pcust_id IN NUMBER DEFAULT -1,
186 psite_id IN NUMBER DEFAULT -1)
187 RETURN NUMBER;
188
189
190 /*-------------------------------------------------------------------------+
191 | PUBLIC FUNCTION |
192 | |
193 | comp_turnover |
194 | |
195 | DESCRIPTION |
196 | Given a date range, this function will compute AR Turnover |
197 | |
198 | REQUIRES |
199 | start_date |
200 | end_date |
201 | set_of_books_id |
202 | call_from |
203 | |
204 | OPTIONAL |
205 | customer_id |
206 | site_id |
207 | |
208 | RETURNS |
209 | AR Turnover |
210 | |
211 | NOTES |
212 | |
213 | EXAMPLE |
214 | |
215 | MODIFICATION HISTORY |
216 | 05-Aug-98 Victoria Smith Created. |
217 | |
218 +-------------------------------------------------------------------------*/
219
220 FUNCTION comp_turnover(pstart_date IN DATE,
221 pend_date IN DATE,
222 psob_id IN NUMBER,
223 pcall_from IN NUMBER DEFAULT 222,
224 pcust_id IN NUMBER DEFAULT -1,
225 psite_id IN NUMBER DEFAULT -1)
226 RETURN NUMBER;
227
228
229 /*-------------------------------------------------------------------------+
230 | PUBLIC FUNCTION |
231 | |
232 | comp_turnover_gl |
233 | |
234 | DESCRIPTION |
235 | This is a cover function for use in the GL Summary report, it is |
236 | basically a call to comp_turnover with 2 additional parameters |
237 | preport_name, preport_params |
238 | Given a date range, this function will compute AR Turnover |
239 | |
240 | REQUIRES |
241 | start_date |
242 | end_date |
243 | set_of_books_id |
244 | preport_name |
245 | preport_params |
246 | |
247 | OPTIONAL |
248 | customer_id |
249 | site_id |
250 | |
251 | RETURNS |
252 | AR Turnover |
253 | |
254 | NOTES |
255 | |
256 | EXAMPLE |
257 | |
258 | MODIFICATION HISTORY |
259 | 11-Sep-98 Victoria Smith Created. |
260 | |
261 +-------------------------------------------------------------------------*/
262
263 FUNCTION comp_turnover_gl(pstart_date IN DATE,
264 pend_date IN DATE,
265 psob_id IN NUMBER,
266 preport_name OUT VARCHAR2,
267 preport_params OUT VARCHAR2,
268 pcust_id IN NUMBER DEFAULT -1,
269 psite_id IN NUMBER DEFAULT -1)
270 RETURN NUMBER;
271
272 /*========================================================================
273 | PRIVATE FUNCTION Get_Adj_For_Tot_Rec
274 |
275 | DESCRIPTION
276 | Calculates the total applications against a payment_schedule
277 | when calculating comp_tot_rec. We need this because, Get_Adj_Total
278 | is used to calculate adjustments to subtract from amount_due_rem
279 | to arrive at the correct remaning receipts; while this function is
280 | is used to calculate adjustments to calculate the correct amount_due_original
281 *=======================================================================*/
282
283
284 FUNCTION Get_Adj_For_Tot_Rec(pay_sched_id IN NUMBER,
285 pto_date IN DATE)
286 RETURN NUMBER;
287
291 | DESCRIPTION
288 /*========================================================================
289 | PRIVATE FUNCTION Get_Adj_For_Tot_Rec_GL
290 |
292 | Calculates the total applications against a payment_schedule
293 |
294 *=======================================================================*/
295
296
297 FUNCTION Get_Adj_For_Tot_Rec_GL(pay_sched_id IN NUMBER,
298 pto_date IN DATE)
299 RETURN NUMBER;
300
301 /*========================================================================
302 | PRIVATE FUNCTION Get_Adj_Total
303 |
304 | DESCRIPTION
305 | Calculates the total adjustments against a payment_schedule
306 |
307 *=======================================================================*/
308 FUNCTION Get_Adj_Total(pay_sched_id IN NUMBER,
309 pto_date IN DATE)
310 RETURN NUMBER;
311
312 /*========================================================================
313 | PRIVATE FUNCTION Get_Adj_Total_GL
314 |
315 | DESCRIPTION
316 | Cover routine for GL to Calculate the total adjustments against a
317 | payment_schedule . This routine is called from comp_rem_rec function
318 |
319 *=======================================================================*/
320 FUNCTION Get_Adj_Total_GL(pay_sched_id IN NUMBER,
321 pto_date IN DATE)
322 RETURN NUMBER;
323
324 /*========================================================================
325 | PRIVATE FUNCTION Get_Apps_Total
326 |
327 | DESCRIPTION
328 | Calculates the total applications against a payment_schedule
329 |
330 *=======================================================================*/
331 FUNCTION Get_Apps_Total(pay_sched_id IN NUMBER,
332 pto_date IN DATE)
333 RETURN NUMBER;
334
335 /*========================================================================
336 | PRIVATE FUNCTION Get_Apps_Total_GL
337 |
338 | DESCRIPTION
339 | Cover routine for GL to calculate the total applications against
340 | a payment_schedule . This routine is called from comp_rem_rec function
341 |
342 *=======================================================================*/
343 FUNCTION Get_Apps_Total_GL(pay_sched_id IN NUMBER,
344 pto_date IN DATE)
345 RETURN NUMBER;
346
347
348
349 /*-------------------------------------------------------------------------+
350 | PUBLIC FUNCTION |
351 | |
352 | comp_wtd_days |
353 | |
354 | DESCRIPTION |
355 | Given an as of date, this function will compute for weighted average |
356 | days late |
357 | |
358 | REQUIRES |
359 | start_date |
360 | as_of_date |
361 | set_of_books_id |
362 | |
363 | OPTIONAL |
364 | customer_id |
365 | |
366 | RETURNS |
367 | Weighted Average Days Late |
368 | |
369 | NOTES |
370 | |
371 | EXAMPLE |
372 | |
373 | MODIFICATION HISTORY |
374 | 19-Aug-98 Victoria Smith Created. |
375 | |
376 +-------------------------------------------------------------------------*/
377
378 FUNCTION comp_wtd_days(pstart_date IN DATE,
379 pas_of_date IN DATE,
380 psob_id IN NUMBER,
381 pcust_id IN NUMBER DEFAULT -1)
382 RETURN NUMBER;
383
384
385 /*-------------------------------------------------------------------------+
386 | PUBLIC FUNCTION |
387 | |
388 | comp_wtd_bal |
389 | |
390 | DESCRIPTION |
391 | Given an as of date, this function will compute for weighted average |
392 | balance |
393 | |
394 | REQUIRES |
395 | start_date |
396 | as_of_date |
397 | set_of_books_id |
398 | |
399 | OPTIONAL |
400 | customer_id |
404 | |
401 | |
402 | RETURNS |
403 | Weighted Average Balance |
405 | NOTES |
406 | |
407 | EXAMPLE |
408 | |
409 | MODIFICATION HISTORY |
410 | 19-Aug-98 Victoria Smith Created. |
411 | |
412 +-------------------------------------------------------------------------*/
413
414 FUNCTION comp_wtd_bal(pstart_date IN DATE,
415 pas_of_date IN DATE,
416 psob_id IN NUMBER,
417 pcust_id IN NUMBER DEFAULT -1)
418 RETURN NUMBER;
419
420
421 /*-------------------------------------------------------------------------+
422 | PUBLIC FUNCTION |
423 | |
424 | comp_above_amount |
425 | |
426 | DESCRIPTION |
427 | Given an as of date, this function will compute for total amount |
428 | above the split amount |
429 | |
430 | REQUIRES |
431 | start_date |
432 | as_of_date |
433 | set_of_books_id |
434 | split_amount |
435 | |
436 | OPTIONAL |
437 | customer_id |
438 | |
439 | RETURNS |
440 | Total Amount of transaction amounts over the split amount |
441 | |
442 | NOTES |
443 | |
444 | EXAMPLE |
445 | |
446 | MODIFICATION HISTORY |
447 | 28-Aug-98 Victoria Smith Created. |
448 | |
449 +-------------------------------------------------------------------------*/
450
451 FUNCTION comp_above_amount(pstart_date IN DATE,
452 pas_of_date IN DATE,
453 psob_id IN NUMBER,
454 psplit IN NUMBER,
455 pcust_id IN NUMBER DEFAULT -1)
456 RETURN NUMBER;
457
458
459 /*-------------------------------------------------------------------------+
460 | PUBLIC FUNCTION |
461 | |
462 | comp_above_count |
463 | |
464 | DESCRIPTION |
465 | Given an as of date, this function will compute for total number |
466 | of transactions with transaction amounts above the split amount |
467 | |
468 | REQUIRES |
469 | start_date |
470 | as_of_date |
471 | set_of_books_id |
472 | split_amount |
473 | |
474 | OPTIONAL |
475 | customer_id |
476 | |
477 | RETURNS |
478 | Total Count of transaction with amounts over the split amount |
479 | |
480 | NOTES |
481 | |
482 | EXAMPLE |
483 | |
484 | MODIFICATION HISTORY |
485 | 28-Aug-98 Victoria Smith Created. |
486 | |
487 +-------------------------------------------------------------------------*/
488
489 FUNCTION comp_above_count(pstart_date IN DATE,
490 pas_of_date IN DATE,
491 psob_id IN NUMBER,
495
492 psplit IN NUMBER,
493 pcust_id IN NUMBER DEFAULT -1)
494 RETURN NUMBER;
496
497 /*-------------------------------------------------------------------------+
498 | PUBLIC FUNCTION |
499 | |
500 | comp_below_amount |
501 | |
502 | DESCRIPTION |
503 | Given an as of date, this function will compute for total amount |
504 | below the split amount |
505 | |
506 | REQUIRES |
507 | start_date |
508 | as_of_date |
509 | set_of_books_id |
510 | split_amount |
511 | |
512 | OPTIONAL |
513 | customer_id |
514 | |
515 | RETURNS |
516 | Total Amount of transaction amounts under the split amount |
517 | |
518 | NOTES |
519 | |
520 | EXAMPLE |
521 | |
522 | MODIFICATION HISTORY |
523 | 28-Aug-98 Victoria Smith Created. |
524 | |
525 +-------------------------------------------------------------------------*/
526
527 FUNCTION comp_below_amount(pstart_date IN DATE,
528 pas_of_date IN DATE,
529 psob_id IN NUMBER,
530 psplit IN NUMBER,
531 pcust_id IN NUMBER DEFAULT -1)
532 RETURN NUMBER;
533
534
535 /*-------------------------------------------------------------------------+
536 | PUBLIC FUNCTION |
537 | |
538 | comp_below_count |
539 | |
540 | DESCRIPTION |
541 | Given an as of date, this function will compute for total number |
542 | of transactions with transaction amounts below the split amount |
543 | |
544 | REQUIRES |
545 | start_date |
546 | as_of_date |
547 | set_of_books_id |
548 | split_amount |
549 | |
550 | OPTIONAL |
551 | customer_id |
552 | |
553 | RETURNS |
554 | Total Count of transaction with amounts under the split amount |
555 | |
556 | NOTES |
557 | |
558 | EXAMPLE |
559 | |
560 | MODIFICATION HISTORY |
561 | 28-Aug-98 Victoria Smith Created. |
562 | |
563 +-------------------------------------------------------------------------*/
564
565 FUNCTION comp_below_count(pstart_date IN DATE,
566 pas_of_date IN DATE,
567 psob_id IN NUMBER,
568 psplit IN NUMBER,
569 pcust_id IN NUMBER DEFAULT -1)
570 RETURN NUMBER;
571
572
573 END ARP_COLL_IND;
574
|
|
|