1 PACKAGE OKL_LEASE_APP_PVT AS
2 /* $Header: OKLRLAPS.pls 120.17 2006/04/12 09:48:16 pagarg noship $ */
3
4 SUBTYPE lapv_rec_type IS OKL_LAP_PVT.LAPV_REC_TYPE;
5 SUBTYPE lsqv_rec_type IS OKL_LSQ_PVT.LSQV_REC_TYPE;
6
7 TYPE name_val_rec_type IS RECORD(
8 itm_name VARCHAR2(100)
9 ,itm_value VARCHAR2(100)
10 );
11
12 TYPE name_val_tbl_type IS TABLE OF name_val_rec_type INDEX BY BINARY_INTEGER;
13
14 ---------------------------------------------------------------------------
15 -- GLOBAL EXCEPTIONS
16 ---------------------------------------------------------------------------
17 G_EXCEPTION_HALT_VALIDATION EXCEPTION;
18
19 ---------------------------------------------------------------------------
20 -- GLOBAL VARIABLES
21 ---------------------------------------------------------------------------
22 G_PKG_NAME CONSTANT VARCHAR2(200) := 'OKL_LEASE_APP_PVT';
23 G_APP_NAME CONSTANT VARCHAR2(3) := OKL_API.G_APP_NAME;
24 G_API_TYPE CONSTANT VARCHAR2(30) := '_PVT';
25 G_INIT_VERSION CONSTANT NUMBER := 1.0;
26 G_INIT_APPL_STATUS CONSTANT VARCHAR2(100) := 'INCOMPLETE';
27 G_TEMPLATE_NUMBER CONSTANT VARCHAR2(30) := 'TEMPLATE_NUMBER';
28 G_UNEXPECTED_ERROR CONSTANT VARCHAR2(200) := 'OKL_CONTRACTS_UNEXPECTED_ERROR';
29 G_SQLCODE_TOKEN CONSTANT VARCHAR2(200) := 'OKL_SQLCODE';
30 G_SQLERRM_TOKEN CONSTANT VARCHAR2(200) := 'OKL_SQLERRM';
31
32 -------------------------------------------------------------------------------
33 -- PROCEDURE lease_app_cre
34 -------------------------------------------------------------------------------
35 -- Start of comments
36 --
37 -- Procedure Name : lease_app_cre
38 -- Description : This procedure is a wrapper that creates records for
39 -- : lease application.
40 -- Business Rules : This procedure inserts records into the
41 -- OKL_LEASE_APPLICATIONS_B and _TL table
42 -- Parameters :
43 -- Version : 1.0
44 -- History : 20-MAY-2005 PAGARG created
45 --
46 -- End of comments
47 PROCEDURE lease_app_cre(
48 p_api_version IN NUMBER,
49 p_init_msg_list IN VARCHAR2,
50 x_return_status OUT NOCOPY VARCHAR2,
51 x_msg_count OUT NOCOPY NUMBER,
52 x_msg_data OUT NOCOPY VARCHAR2,
53 p_lapv_rec IN lapv_rec_type,
54 x_lapv_rec OUT NOCOPY lapv_rec_type,
55 p_lsqv_rec IN lsqv_rec_type,
56 x_lsqv_rec OUT NOCOPY lsqv_rec_type);
57
58 ------------------------------------------------------------------------------
59 -- PROCEDURE lease_app_upd
60 ------------------------------------------------------------------------------
61 -- Start of comments
62 --
63 -- Procedure Name : lease_app_upd
64 -- Description : This procedure is a wrapper that updates records for
65 -- : lease application.
66 -- Business Rules : This procedure updates records into the
67 -- OKL_LEASE_APPLICATIONS_B and _TL table
68 -- Parameters :
69 -- Version : 1.0
70 -- History : 20-MAY-2005 PAGARG created
71 --
72 -- End of comments
73 PROCEDURE lease_app_upd(
74 p_api_version IN NUMBER,
75 p_init_msg_list IN VARCHAR2,
76 x_return_status OUT NOCOPY VARCHAR2,
77 x_msg_count OUT NOCOPY NUMBER,
78 x_msg_data OUT NOCOPY VARCHAR2,
79 p_lapv_rec IN lapv_rec_type,
80 x_lapv_rec OUT NOCOPY lapv_rec_type,
81 p_lsqv_rec IN lsqv_rec_type,
82 x_lsqv_rec OUT NOCOPY lsqv_rec_type);
83
84 ------------------------------------------------------------------------------
85 -- PROCEDURE lease_app_val
86 ------------------------------------------------------------------------------
87 -- Start of comments
88 --
89 -- Procedure Name : lease_app_val
90 -- Description : This procedure validates lease application.
91 -- Business Rules : This procedure validates lease application
92 -- Parameters :
93 -- Version : 1.0
94 -- History : 20-MAY-2005 PAGARG created
95 --
96 -- End of comments
97 PROCEDURE lease_app_val(
98 p_api_version IN NUMBER,
99 p_init_msg_list IN VARCHAR2,
100 x_return_status OUT NOCOPY VARCHAR2,
101 x_msg_count OUT NOCOPY NUMBER,
102 x_msg_data OUT NOCOPY VARCHAR2,
103 p_lapv_rec IN lapv_rec_type,
104 p_lsqv_rec IN lsqv_rec_type);
105
106 ------------------------------------------------------------------------------
107 -- PROCEDURE lease_app_accept
108 ------------------------------------------------------------------------------
109 -- Start of comments
110 --
111 -- Procedure Name : lease_app_accept
112 -- Description : This procedure accepts lease application.
113 -- Business Rules : This procedure accepts lease application
114 -- Parameters :
115 -- Version : 1.0
116 -- History : 20-MAY-2005 PAGARG created
117 --
118 -- End of comments
119 PROCEDURE lease_app_accept(
120 p_api_version IN NUMBER,
121 p_init_msg_list IN VARCHAR2,
122 x_return_status OUT NOCOPY VARCHAR2,
123 x_msg_count OUT NOCOPY NUMBER,
124 x_msg_data OUT NOCOPY VARCHAR2,
125 p_lapv_rec IN lapv_rec_type,
126 x_lapv_rec OUT NOCOPY lapv_rec_type);
127
128 ------------------------------------------------------------------------------
129 -- PROCEDURE lease_app_withdraw
130 ------------------------------------------------------------------------------
131 -- Start of comments
132 --
133 -- Procedure Name : lease_app_withdraw
134 -- Description : This procedure withdraws lease application.
135 -- Business Rules : This procedure withdraws lease application
136 -- Parameters :
137 -- Version : 1.0
138 -- History : 20-MAY-2005 PAGARG created
139 --
140 -- End of comments
141 PROCEDURE lease_app_withdraw(
142 p_api_version IN NUMBER,
143 p_init_msg_list IN VARCHAR2,
144 x_return_status OUT NOCOPY VARCHAR2,
145 x_msg_count OUT NOCOPY NUMBER,
146 x_msg_data OUT NOCOPY VARCHAR2,
147 p_lapv_rec IN lapv_rec_type,
148 x_lapv_rec OUT NOCOPY lapv_rec_type);
149
150 ------------------------------------------------------------------------------
151 -- PROCEDURE lease_app_dup
152 ------------------------------------------------------------------------------
153 -- Start of comments
154 --
155 -- Procedure Name : lease_app_dup
156 -- Description : This procedure duplicates lease application.
157 -- Business Rules : This procedure duplicates lease application
158 -- Parameters :
159 -- Version : 1.0
160 -- History : 20-MAY-2005 PAGARG created
161 --
162 -- End of comments
163 PROCEDURE lease_app_dup(
164 p_api_version IN NUMBER,
165 p_init_msg_list IN VARCHAR2,
166 x_return_status OUT NOCOPY VARCHAR2,
167 x_msg_count OUT NOCOPY NUMBER,
168 x_msg_data OUT NOCOPY VARCHAR2,
169 p_source_lap_id IN NUMBER,
170 p_lapv_rec IN lapv_rec_type,
171 x_lapv_rec OUT NOCOPY lapv_rec_type,
172 p_lsqv_rec IN lsqv_rec_type,
173 x_lsqv_rec OUT NOCOPY lsqv_rec_type,
174 p_origin IN VARCHAR2);
175
176 ------------------------------------------------------------------------------
177 -- PROCEDURE submit_for_pricing
178 ------------------------------------------------------------------------------
179 -- Start of comments
180 --
181 -- Procedure Name : submit_for_pricing
182 -- Description : This procedure submits lease application for pricing.
183 -- Business Rules : This procedure submits lease application for pricing.
184 -- Parameters :
185 -- Version : 1.0
186 -- History : 20-MAY-2005 PAGARG created
187 --
188 -- End of comments
189 PROCEDURE submit_for_pricing(
190 p_api_version IN NUMBER,
191 p_init_msg_list IN VARCHAR2,
192 x_return_status OUT NOCOPY VARCHAR2,
193 x_msg_count OUT NOCOPY NUMBER,
194 x_msg_data OUT NOCOPY VARCHAR2,
195 p_lapv_rec IN lapv_rec_type,
196 x_lapv_rec OUT NOCOPY lapv_rec_type);
197
198 ------------------------------------------------------------------------------
199 -- PROCEDURE submit_for_credit
200 ------------------------------------------------------------------------------
201 -- Start of comments
202 --
203 -- Procedure Name : submit_for_credit
204 -- Description : This procedure submits lease application for Credit Approval.
205 -- Business Rules : This procedure submits lease application for Credit Approval.
206 -- Parameters :
207 -- Version : 1.0
208 -- History : 20-MAY-2005 PAGARG created
209 --
210 -- End of comments
211 PROCEDURE submit_for_credit(
212 p_api_version IN NUMBER,
213 p_init_msg_list IN VARCHAR2,
214 x_return_status OUT NOCOPY VARCHAR2,
215 x_msg_count OUT NOCOPY NUMBER,
216 x_msg_data OUT NOCOPY VARCHAR2,
217 p_lapv_rec IN lapv_rec_type,
218 x_lapv_rec OUT NOCOPY lapv_rec_type);
219
220 ------------------------------------------------------------------------------
221 -- FUNCTION is_valid_program_agreement
222 ------------------------------------------------------------------------------
223 -- Start of comments
224 --
225 -- Function Name : is_valid_program_agreement
226 -- Description : This function returns whether Program Agreement fulfills
227 -- all eligibility criteria on Lease Application
228 -- Business Rules : This function returns whether Program Agreement fulfills
229 -- all eligibility criteria on Lease Application
230 -- Parameters :
231 -- Version : 1.0
232 -- History : 08-JUNE-2005 PAGARG created
233 --
234 -- End of comments
235 FUNCTION is_valid_program_agreement(
236 p_pgm_agr_id IN NUMBER,
237 p_lap_id IN NUMBER,
238 p_eff_from IN DATE)
239 RETURN VARCHAR2;
240
241 ------------------------------------------------------------------------------
242 -- FUNCTION is_valid_leaseapp_template
243 ------------------------------------------------------------------------------
244 -- Start of comments
245 --
246 -- Function Name : is_valid_leaseapp_template
247 -- Description : This function returns whether Lease Application Template
248 -- fulfills all eligibility criteria on Lease Application
249 -- Business Rules : This function returns whether Program Agreement fulfills
250 -- all eligibility criteria on Lease Application
251 -- Parameters :
252 -- Version : 1.0
253 -- History : 08-JUNE-2005 PAGARG created
254 --
255 -- End of comments
256 FUNCTION is_valid_leaseapp_template(
257 p_lat_id IN NUMBER,
258 p_lap_id IN NUMBER,
259 p_eff_from IN DATE)
260 RETURN VARCHAR2;
261
262 ------------------------------------------------------------------------------
263 -- FUNCTION get_credit_classfication
264 ------------------------------------------------------------------------------
265 -- Start of comments
266 --
267 -- Function Name : get_credit_classfication
268 -- Description : This function returns credit classification for given
269 -- party, customer account or customer account site use.
270 -- Business Rules : This function returns credit classification for given
271 -- party, customer account or customer account site use.
272 -- Parameters :
273 -- Version : 1.0
274 -- History : 20-JUNE-2005 PAGARG created
275 --
276 -- End of comments
277 FUNCTION get_credit_classfication(
278 p_party_id IN NUMBER,
279 p_cust_acct_id IN NUMBER,
280 p_site_use_id IN NUMBER)
281 RETURN VARCHAR2;
282
283 ------------------------------------------------------------------------------
284 -- PROCEDURE accept_counter_offer
285 ------------------------------------------------------------------------------
286 -- Start of comments
287 --
288 -- Procedure Name : accept_counter_offer
289 -- Description : This procedure accepts counter offers for Lease Application.
290 -- Business Rules : This procedure accepts counter offers for Lease Application.
291 -- Parameters :
292 -- Version : 1.0
293 -- History : 20-MAY-2005 PAGARG created
294 --
295 -- End of comments
296 PROCEDURE accept_counter_offer(
297 p_api_version IN NUMBER,
298 p_init_msg_list IN VARCHAR2,
299 x_return_status OUT NOCOPY VARCHAR2,
300 x_msg_count OUT NOCOPY NUMBER,
301 x_msg_data OUT NOCOPY VARCHAR2,
302 p_lap_id IN NUMBER,
303 p_cntr_offr IN NUMBER,
304 x_lapv_rec OUT NOCOPY lapv_rec_type,
305 x_lsqv_rec OUT NOCOPY lsqv_rec_type);
306
307 -------------------------------------------------------------------------------
308 -- PROCEDURE revert_leaseapp
309 -------------------------------------------------------------------------------
310 -- Start of comments
311 --
312 -- Procedure Name : revert_leaseapp
313 -- Description : This procedure reverts the status from CONV-K to CR-APPROVED
314 -- : This procedure is called when Contract created from
315 -- : Lease Application is cancelled
316 -- Business Rules : This procedure reverts the status from CONV-K to CR-APPROVED
317 -- : This procedure is called when Contract created from
318 -- : Lease Application is cancelled
319 -- Parameters :
320 -- Version : 1.0
321 -- History : 14-SEP-2005 PAGARG created
322 --
323 -- End of comments
324 PROCEDURE revert_leaseapp (
325 p_api_version IN NUMBER
326 ,p_init_msg_list IN VARCHAR2
327 ,p_leaseapp_id IN NUMBER
328 ,x_return_status OUT NOCOPY VARCHAR2
329 ,x_msg_count OUT NOCOPY NUMBER
330 ,x_msg_data OUT NOCOPY VARCHAR2);
331
332 -------------------------------------------------------------------------------
333 -- PROCEDURE validate_credit_results
334 -------------------------------------------------------------------------------
335 -- Start of comments
336 --
337 -- Procedure Name : validate_credit_results
338 -- Description : This procedure validates credit results
339 -- Business Rules : This procedure validates credit results
340 -- Parameters :
341 -- Version : 1.0
342 -- History : 22-SEP-2005 PAGARG created
343 --
344 -- End of comments
345 PROCEDURE validate_credit_results (
346 p_api_version IN NUMBER
347 ,p_init_msg_list IN VARCHAR2
348 ,p_leaseapp_id IN NUMBER
349 ,x_return_status OUT NOCOPY VARCHAR2
350 ,x_msg_count OUT NOCOPY NUMBER
351 ,x_msg_data OUT NOCOPY VARCHAR2);
352
353 -------------------------------------------------------------------------------
354 -- PROCEDURE lease_app_cancel
355 -------------------------------------------------------------------------------
356 -- Start of comments
357 --
358 -- Procedure Name : lease_app_cancel
359 -- Description : This procedure cancels the lease application.
360 -- Business Rules : This procedure cancels the lease application.
361 -- Parameters :
362 -- Version : 1.0
363 -- History : 26-SEP-2005 PAGARG created
364 --
365 -- End of comments
366 PROCEDURE lease_app_cancel(
367 p_api_version IN NUMBER,
368 p_init_msg_list IN VARCHAR2,
369 x_return_status OUT NOCOPY VARCHAR2,
370 x_msg_count OUT NOCOPY NUMBER,
371 x_msg_data OUT NOCOPY VARCHAR2,
372 p_lease_app_id IN NUMBER,
373 x_lapv_rec OUT NOCOPY lapv_rec_type);
374
375 -------------------------------------------------------------------------------
376 -- PROCEDURE lease_app_resubmit
377 -------------------------------------------------------------------------------
378 -- Start of comments
379 --
380 -- Procedure Name : lease_app_resubmit
381 -- Description : This procedure resubmits the lease application.
382 -- Business Rules : This procedure resubmits the lease application.
383 -- Parameters :
384 -- Version : 1.0
385 -- History : 26-SEP-2005 PAGARG created
386 --
387 -- End of comments
388 PROCEDURE lease_app_resubmit(
389 p_api_version IN NUMBER,
390 p_init_msg_list IN VARCHAR2,
391 x_return_status OUT NOCOPY VARCHAR2,
392 x_msg_count OUT NOCOPY NUMBER,
393 x_msg_data OUT NOCOPY VARCHAR2,
394 p_source_lap_id IN NUMBER,
395 p_lapv_rec IN lapv_rec_type,
396 x_lapv_rec OUT NOCOPY lapv_rec_type,
397 p_lsqv_rec IN lsqv_rec_type,
398 x_lsqv_rec OUT NOCOPY lsqv_rec_type);
399
400 -------------------------------------------------------------------------------
401 -- PROCEDURE lease_app_appeal
402 -------------------------------------------------------------------------------
403 -- Start of comments
404 --
405 -- Procedure Name : lease_app_appeal
406 -- Description : This procedure appeals the lease application.
407 -- Business Rules : This procedure appeals the lease application.
408 -- Parameters :
409 -- Version : 1.0
410 -- History : 26-SEP-2005 PAGARG created
411 --
412 -- End of comments
413 PROCEDURE lease_app_appeal(
414 p_api_version IN NUMBER,
415 p_init_msg_list IN VARCHAR2,
416 x_return_status OUT NOCOPY VARCHAR2,
417 x_msg_count OUT NOCOPY NUMBER,
418 x_msg_data OUT NOCOPY VARCHAR2,
419 p_source_lap_id IN NUMBER,
420 p_lapv_rec IN lapv_rec_type,
421 x_lapv_rec OUT NOCOPY lapv_rec_type,
422 p_lsqv_rec IN lsqv_rec_type,
423 x_lsqv_rec OUT NOCOPY lsqv_rec_type);
424
425 -------------------------------------------------------------------------------
426 -- PROCEDURE checklist_inst_cre
427 -------------------------------------------------------------------------------
428 -- Start of comments
429 --
430 -- Procedure Name : checklist_inst_cre
431 -- Description : This procedure is a wrapper that creates checklist instance
432 -- Business Rules : This procedure creates checklist instance
433 -- Parameters :
434 -- Version : 1.0
435 -- History : 24-JUNE-2005 PAGARG created
436 --
437 -- End of comments
438 PROCEDURE checklist_inst_cre(
439 p_api_version IN NUMBER,
440 p_init_msg_list IN VARCHAR2,
441 x_return_status OUT NOCOPY VARCHAR2,
442 x_msg_count OUT NOCOPY NUMBER,
443 x_msg_data OUT NOCOPY VARCHAR2,
444 p_lap_id IN NUMBER,
445 p_chklst_tmpl_id IN NUMBER);
446
447 -------------------------------------------------------------------------------
448 -- PROCEDURE check_eligibility
449 -------------------------------------------------------------------------------
450 -- Start of comments
451 --
452 -- Procedure Name : check_eligibility
453 -- Description : This procedure checks whether lease app is eligible for
454 -- given action or not.
455 -- Business Rules : This procedure checks whether lease app is eligible for
456 -- given action or not.
457 -- Parameters :
458 -- Version : 1.0
459 -- History : 06-OCT-2005 PAGARG created
460 --
461 -- End of comments
462 PROCEDURE check_eligibility(
463 p_api_version IN NUMBER,
464 p_init_msg_list IN VARCHAR2,
465 x_return_status OUT NOCOPY VARCHAR2,
466 x_msg_count OUT NOCOPY NUMBER,
467 x_msg_data OUT NOCOPY VARCHAR2,
468 p_lap_id IN NUMBER,
469 p_action IN VARCHAR2);
470
471 -------------------------------------------------------------------------------
472 -- PROCEDURE populate_lease_app
473 -------------------------------------------------------------------------------
474 -- Start of comments
475 --
476 -- Procedure Name : populate_lease_app
477 -- Description : This procedure populates lapv_rec and lsqv_rec with the
478 -- : database values for a given lease application.
479 -- Business Rules : This procedure populates lapv_rec and lsqv_rec with the
480 -- : database values for a given lease application.
481 -- Parameters :
482 -- Version : 1.0
483 -- History : 30-MAY-2005 PAGARG created
484 --
485 -- End of comments
486 PROCEDURE populate_lease_app(
487 p_api_version IN NUMBER,
488 p_init_msg_list IN VARCHAR2,
489 x_return_status OUT NOCOPY VARCHAR2,
490 x_msg_count OUT NOCOPY NUMBER,
491 x_msg_data OUT NOCOPY VARCHAR2,
492 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
493 x_lapv_rec OUT NOCOPY lapv_rec_type,
494 x_lsqv_rec OUT NOCOPY lsqv_rec_type);
495
496 -------------------------------------------------------------------------------
497 -- FUNCTION get_financed_amount
498 -------------------------------------------------------------------------------
499 -- Start of comments
500 --
501 -- Function Name : get_financed_amount
502 -- Description : This function returns the financed amount for given
503 -- Lease Quote
504 -- Business Rules : This function returns the financed amount for given
505 -- Lease Quote
506 -- Parameters :
507 -- Version : 1.0
508 -- History : 23-SEP-2005 PAGARG created
509 --
510 -- End of comments
511 FUNCTION get_financed_amount(
512 p_lease_qte_id IN NUMBER)
513 RETURN NUMBER;
514
515 ------------------------------------------------------------------------------
516 -- PROCEDURE lease_app_qa_val
517 ------------------------------------------------------------------------------
518 -- Start of comments
519 --
520 -- Procedure Name : lease_app_qa_val
521 -- Description : This procedure calls qa validation for lease application.
522 -- Business Rules : This procedure calls qa validation for lease application.
523 -- Parameters :
524 -- Version : 1.0
525 -- History : 26-Oct-2005 PAGARG created
526 --
527 -- End of comments
528 PROCEDURE lease_app_qa_val(
529 p_api_version IN NUMBER,
530 p_init_msg_list IN VARCHAR2,
531 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
532 x_return_status OUT NOCOPY VARCHAR2,
533 x_msg_count OUT NOCOPY NUMBER,
534 x_msg_data OUT NOCOPY VARCHAR2,
535 x_qa_result OUT NOCOPY VARCHAR2);
536
537 ------------------------------------------------------------------------------
538 -- PROCEDURE lease_app_price
539 ------------------------------------------------------------------------------
540 -- Start of comments
541 --
542 -- Procedure Name : lease_app_price
543 -- Description : This procedure calls api to price lease application.
544 -- Business Rules : This procedure calls api to price lease application.
545 -- Parameters :
546 -- Version : 1.0
547 -- History : 26-Oct-2005 PAGARG created
548 --
549 -- End of comments
550 PROCEDURE lease_app_price(
551 p_api_version IN NUMBER,
552 p_init_msg_list IN VARCHAR2,
553 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
554 x_return_status OUT NOCOPY VARCHAR2,
555 x_msg_count OUT NOCOPY NUMBER,
556 x_msg_data OUT NOCOPY VARCHAR2);
557
558 ------------------------------------------------------------------------------
559 -- PROCEDURE set_lease_app_status
560 ------------------------------------------------------------------------------
561 -- Start of comments
562 --
563 -- Procedure Name : set_lease_app_status
564 -- Description : This procedure sets the required lease application status.
565 -- THIS PROCEDURE IS ONLY FOR OKL INTERNAL DEVELOPMENT PURPOSE
566 -- Business Rules : This procedure sets the required lease application status.
567 -- Parameters :
568 -- Version : 1.0
569 -- History : 15-Nov-2005 PAGARG created
570 --
571 -- End of comments
572 PROCEDURE set_lease_app_status(
573 p_api_version IN NUMBER,
574 p_init_msg_list IN VARCHAR2,
575 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
576 p_lap_status IN VARCHAR2,
577 x_return_status OUT NOCOPY VARCHAR2,
578 x_msg_count OUT NOCOPY NUMBER,
579 x_msg_data OUT NOCOPY VARCHAR2);
580
581 --BEGIN -VARANGAN for bug#4747179
582 ------------------------------------------------------------------------------
583 -- PROCEDURE set_lease_app_expdays
584 ------------------------------------------------------------------------------
585 -- Start of comments
586 --
587 -- Procedure Name : set_lease_app_expdays
588 -- Description : This procedure sets the required lease application status.
589 -- THIS PROCEDURE IS ONLY FOR OKL INTERNAL DEVELOPMENT PURPOSE
590 -- Business Rules : This procedure sets the required lease application Credit expiration status.
591 -- Parameters :
592 -- Version : 1.0
593 -- History : 18-Nov-2005 VARANGAN created
594 --
595 -- End of comments
596 PROCEDURE set_lease_app_expdays(
597 p_api_version IN NUMBER,
598 p_init_msg_list IN VARCHAR2,
599 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
600 p_lap_expdays IN NUMBER,
601 x_return_status OUT NOCOPY VARCHAR2,
602 x_msg_count OUT NOCOPY NUMBER,
603 x_msg_data OUT NOCOPY VARCHAR2);
604 --END--VARANGAN for bug#4747179
605
606 --Bug 4872214 PAGARG Added two functions: one to return
607 --Start
608 -------------------------------------------------------------------------------
609 -- FUNCTION get_credit_decision
610 -------------------------------------------------------------------------------
611 -- Start of comments
612 --
613 -- Function Name : get_credit_decision
614 -- Description : This function returns the Credit Decision on the given
615 -- Lease Application
616 -- Business Rules : This function returns the Credit Decision on the given
617 -- Lease Application
618 -- Parameters :
619 -- Version : 1.0
620 -- History : 14-Dec-2005 PAGARG created
621 --
622 -- End of comments
623 FUNCTION get_credit_decision(
624 p_lease_app_id IN NUMBER)
625 RETURN VARCHAR2;
626
627 -------------------------------------------------------------------------------
628 -- FUNCTION get_approval_exp_date
629 -------------------------------------------------------------------------------
630 -- Start of comments
631 --
632 -- Function Name : get_approval_exp_date
633 -- Description : This function returns the Credit Approval Expiration Date
634 -- for the given Lease Application
635 -- Business Rules : This function returns the Credit Approval Expiration Date
636 -- for the given Lease Application
637 -- Parameters :
638 -- Version : 1.0
639 -- History : 14-Dec-2005 PAGARG created
640 --
641 -- End of comments
642 FUNCTION get_approval_exp_date(
643 p_lease_app_id IN NUMBER)
644 RETURN DATE;
645 --Bug 4872214 PAGARG End
646
647 ------------------------------------------------------------------------------
648 -- FUNCTION is_curr_conv_valid
649 ------------------------------------------------------------------------------
650 -- Start of comments
651 --
652 -- Function Name : is_curr_conv_valid
653 -- Description : This function validates Currency Conversion values and
654 -- returns Success or Error
655 -- Business Rules : This function validates Currency Conversion values and
656 -- returns Success or Error
657 -- Parameters :
658 -- Version : 1.0
659 -- History : 02-Feb-2006 PAGARG created Bug 4932155
660 --
661 -- End of comments
662 FUNCTION is_curr_conv_valid(
663 p_curr_code IN VARCHAR2,
664 p_curr_type IN VARCHAR2,
665 p_curr_rate IN NUMBER,
666 p_curr_date IN DATE)
667 RETURN VARCHAR2;
668
669 ------------------------------------------------------------------------------
670 -- PROCEDURE lease_app_unaccept
671 ------------------------------------------------------------------------------
672 -- Start of comments
673 --
674 -- Procedure Name : lease_app_unaccept
675 -- Description : This procedure unaccepts lease application.
676 -- Business Rules : This procedure unaccepts lease application
677 -- Parameters :
678 -- Version : 1.0
679 -- History : 07-Feb-2006 PAGARG created created Bug 4905274
680 --
681 -- End of comments
682 PROCEDURE lease_app_unaccept(
683 p_api_version IN NUMBER,
684 p_init_msg_list IN VARCHAR2,
685 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
686 x_return_status OUT NOCOPY VARCHAR2,
687 x_msg_count OUT NOCOPY NUMBER,
688 x_msg_data OUT NOCOPY VARCHAR2);
689
690 -------------------------------------------------------------------------------
691 -- PROCEDURE check_lease_quote_defaults
692 -------------------------------------------------------------------------------
693 -- Start of comments
694 --
695 -- Procedure Name : check_lease_quote_defaults
696 -- Description : This procedure checks the values defaulted in lease
697 -- : application from lease quote.
698 -- Business Rules : If default values from lease quote are not changed then
699 -- : return status as Success else Error
700 -- Parameters :
701 -- Version : 1.0
702 -- History : 15-Feb-2006 PAGARG exposed in spec
703 -- End of comments
704 PROCEDURE check_lease_quote_defaults(
705 p_api_version IN NUMBER,
706 p_init_msg_list IN VARCHAR2,
707 x_return_status OUT NOCOPY VARCHAR2,
708 x_msg_count OUT NOCOPY NUMBER,
709 x_msg_data OUT NOCOPY VARCHAR2,
710 p_source_lsq_id IN OKL_LEASE_QUOTES_B.ID%TYPE,
711 p_lapv_rec IN lapv_rec_type,
712 p_lsqv_rec IN lsqv_rec_type);
713
714 ------------------------------------------------------------------------------
715 -- PROCEDURE create_contract
716 ------------------------------------------------------------------------------
717 -- Start of comments
718 --
719 -- Procedure Name : create_contract
720 -- Description : This procedure calls api to create contract from lease app.
721 -- Business Rules : This procedure calls api to create contract from lease app.
722 -- Parameters :
723 -- Version : 1.0
724 -- History : 15-Feb-2006 PAGARG created
725 --
726 -- End of comments
727 PROCEDURE create_contract(
728 p_api_version IN NUMBER,
729 p_init_msg_list IN VARCHAR2,
730 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
731 x_return_status OUT NOCOPY VARCHAR2,
732 x_msg_count OUT NOCOPY NUMBER,
733 x_msg_data OUT NOCOPY VARCHAR2,
734 x_chr_id OUT NOCOPY NUMBER,
735 x_chr_number OUT NOCOPY VARCHAR2);
736
737 ------------------------------------------------------------------------------
738 -- PROCEDURE revert_to_orig_status
739 ------------------------------------------------------------------------------
740 -- Start of comments
741 --
742 -- Procedure Name : revert_to_orig_status
743 -- Description : This procedure updates the status of parent lease
744 -- application with the status stored in orig_status
745 -- THIS PROCEDURE IS ONLY FOR OKL INTERNAL DEVELOPMENT PURPOSE
746 -- Business Rules : This procedure updates the status of parent lease
747 -- application with the status stored in orig_status. It will
748 -- then clear the value in orig_status
749 -- Parameters :
750 -- Version : 1.0
751 -- History : 28-Feb-2006 PAGARG created Bug 4872271
752 --
753 -- End of comments
754 PROCEDURE revert_to_orig_status(
755 p_api_version IN NUMBER,
756 p_init_msg_list IN VARCHAR2,
757 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
758 x_return_status OUT NOCOPY VARCHAR2,
759 x_msg_count OUT NOCOPY NUMBER,
760 x_msg_data OUT NOCOPY VARCHAR2);
761
762 --Bug 4872271 PAGARG Added function to return Credit Decision Appeal Flag
763 -------------------------------------------------------------------------------
764 -- FUNCTION get_cr_dec_appeal_flag
765 -------------------------------------------------------------------------------
766 -- Start of comments
767 --
768 -- Function Name : get_cr_dec_appeal_flag
769 -- Description : This function returns the appeal flag for Credit Decision
770 -- on the given Lease Application
771 -- Business Rules : This function returns the appeal flag for Credit Decision
772 -- on the given Lease Application
773 -- Parameters :
774 -- Version : 1.0
775 -- History : 28-Mar-2006 PAGARG created
776 --
777 -- End of comments
778 FUNCTION get_cr_dec_appeal_flag(
779 p_lease_app_id IN NUMBER)
780 RETURN VARCHAR2;
781
782 --Bug 4872271 PAGARG Added function to return Expiration Date Appeal Flag
783 -------------------------------------------------------------------------------
784 -- FUNCTION get_exp_date_appeal_flag
785 -------------------------------------------------------------------------------
786 -- Start of comments
787 --
788 -- Function Name : get_exp_date_appeal_flag
789 -- Description : This function returns the appeal flag for Credit Approval
790 -- Expiration Date for the given Lease Application
791 -- Business Rules : This function returns the appeal flag for Credit Approval
792 -- Expiration Date for the given Lease Application
793 -- Parameters :
794 -- Version : 1.0
795 -- History : 28-Mar-2006 PAGARG created
796 --
797 -- End of comments
798 FUNCTION get_exp_date_appeal_flag(
799 p_lease_app_id IN NUMBER)
800 RETURN VARCHAR2;
801
802 --Bug 4872271 PAGARG Added function to set Appeal Flag for recommendations
803 ------------------------------------------------------------------------------
804 -- PROCEDURE appeal_recommendations
805 ------------------------------------------------------------------------------
806 -- Start of comments
807 --
808 -- Procedure Name : appeal_recommendations
809 -- Description : This procedure sets the appeal flag for credit recommendations
810 -- of parent lease app of given lease application
811 -- Business Rules : This procedure sets the appeal flag for credit recommendations
812 -- of parent lease app of given lease application
813 -- Parameters :
814 -- Version : 1.0
815 -- History : 28-Mar-2006 PAGARG created Bug 4872271
816 --
817 -- End of comments
818 PROCEDURE appeal_recommendations(
819 p_api_version IN NUMBER,
820 p_init_msg_list IN VARCHAR2,
821 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
822 p_cr_dec_apl_flag IN VARCHAR2,
823 p_exp_date_apl_flag IN VARCHAR2,
824 p_cr_conds IN name_val_tbl_type,
825 p_addl_rcmnds IN name_val_tbl_type,
826 x_return_status OUT NOCOPY VARCHAR2,
827 x_msg_count OUT NOCOPY NUMBER,
828 x_msg_data OUT NOCOPY VARCHAR2);
829
830 ------------------------------------------------------------------------------
831 -- PROCEDURE create_contract_val
832 ------------------------------------------------------------------------------
833 -- Start of comments
834 --
835 -- Procedure Name : create_contract_val
836 -- Description : This procedure validates the contract creation from given
837 -- lease app.
838 -- Business Rules : This procedure validates the contract creation from given
839 -- lease app.
840 -- Parameters :
841 -- Version : 1.0
842 -- History : 06-Apr-2006 PAGARG created
843 --
844 -- End of comments
845 PROCEDURE create_contract_val(
846 p_api_version IN NUMBER,
847 p_init_msg_list IN VARCHAR2,
848 p_lap_id IN OKL_LEASE_APPLICATIONS_B.ID%TYPE,
849 x_return_status OUT NOCOPY VARCHAR2,
850 x_msg_count OUT NOCOPY NUMBER,
851 x_msg_data OUT NOCOPY VARCHAR2);
852
853 END OKL_LEASE_APP_PVT;