DBA Data[Home] [Help]

APPS.OKL_AM_CALCULATE_QUOTE_PVT dependencies on DUAL

Line 45: -- SECHAWLA 14-FEB-03 - Bug 2749690 : Added code to store net investment, unbilled rec and residual value on quote lines

41: -- Business Rules :
42: -- Parameters : array of quote lines, data for new record
43: -- Version : 1.0
44: -- History : SECHAWLA 20-NOV-02 - Bug 2680542 : Added 2 optional paramaters : p_asset_qty, p_quote_qty
45: -- SECHAWLA 14-FEB-03 - Bug 2749690 : Added code to store net investment, unbilled rec and residual value on quote lines
46: -- SECHAWLA 20-FEB-03 - Bug 2757368 : Added logic to prorate the quote line amounts based upon the selected quote quantity
47: -- SECHAWLA 24-FEB-03 - Bug 2817025 : Added code to convert the repurchase quote line amount to functional currency
48: -- SECHAWLA 21-APR-03 - Bug 2925120 Modified code to fix the unit proration problem for unbiled rec, Service and Fee Lines
49: -- RMUNJULU 2757312 Added p_split_asset_number to store asset_number entered by user

Line 66: p_residual_value IN NUMBER DEFAULT NULL, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter

62: p_asset_qty IN NUMBER DEFAULT NULL,
63: p_quote_qty IN NUMBER DEFAULT NULL,
64: p_net_investment IN NUMBER DEFAULT NULL, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter
65: p_unbilled_rec IN NUMBER DEFAULT NULL, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter
66: p_residual_value IN NUMBER DEFAULT NULL, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter
67: p_split_asset_number IN VARCHAR2 DEFAULT NULL, -- RMUNJULU 2757312 Added
68: p_rule_information4 IN OKC_RULES_V.RULE_INFORMATION4%TYPE DEFAULT NULL, --SECHAWLA 20-FEB-03 2757368 : Added anothe parameter
69: p_success_yn IN VARCHAR2,
70: p_sty_id IN NUMBER,

Line 136: 'p_residual_value :'||p_residual_value);

132: 'p_net_investment :'||p_net_investment);
133: OKL_DEBUG_PUB.LOG_DEBUG(G_LEVEL_STATEMENT,L_MODULE_NAME,
134: 'p_unbilled_rec :'||p_unbilled_rec);
135: OKL_DEBUG_PUB.LOG_DEBUG(G_LEVEL_STATEMENT,L_MODULE_NAME,
136: 'p_residual_value :'||p_residual_value);
137: OKL_DEBUG_PUB.LOG_DEBUG(G_LEVEL_STATEMENT,L_MODULE_NAME,
138: 'p_split_asset_number :'||p_split_asset_number);
139: OKL_DEBUG_PUB.LOG_DEBUG(G_LEVEL_STATEMENT,L_MODULE_NAME,
140: 'p_rule_information4 :'||p_rule_information4);

Line 414: -- SECHAWLA 14-FEB-03 Bug 2749690 : Added the following code to store net investment, unbileld rec and residual value on quote lines

410: l_tqlv_rec.asset_quantity := p_asset_qty; -- added
411: l_tqlv_rec.quote_quantity := p_quote_qty; --added
412: -- end new code
413:
414: -- SECHAWLA 14-FEB-03 Bug 2749690 : Added the following code to store net investment, unbileld rec and residual value on quote lines
415: l_tqlv_rec.asset_value := p_net_investment;
416: l_tqlv_rec.unbilled_receivables := p_unbilled_rec;
417: l_tqlv_rec.residual_value := p_residual_value;
418: -- end new code

Line 417: l_tqlv_rec.residual_value := p_residual_value;

413:
414: -- SECHAWLA 14-FEB-03 Bug 2749690 : Added the following code to store net investment, unbileld rec and residual value on quote lines
415: l_tqlv_rec.asset_value := p_net_investment;
416: l_tqlv_rec.unbilled_receivables := p_unbilled_rec;
417: l_tqlv_rec.residual_value := p_residual_value;
418: -- end new code
419: l_tqlv_rec.sty_id := p_sty_id;
420: l_tqlv_rec.defaulted_yn := l_defaulted_yn;
421: l_tqlv_rec.modified_yn := 'N';

Line 513: -- Added logic to calculate Net Investment, Unbileld Receivables and Residual Value for all quote lines

509: -- History : SECHAWLA - 20-NOV-02 - Bug 2468222
510: -- Added p_asset_qty and p_quote_qty parameters in call to append_quote_lines procedure.
511: -- Changed reference p_asset_tbl(l_asset_tbl_index) to p_asset_tbl(l_asset_tbl_index).p_asset_id
512: -- SECHAWLA - 14-FEB-03 - Bug 2749690
513: -- Added logic to calculate Net Investment, Unbileld Receivables and Residual Value for all quote lines
514: -- SECHAWLA - 21-APR-03 Bug 2925120
515: -- Modified code to get the Unbilled Rec using calc quote strm API, instead of using LINE_UNBILLED_STREAMS formula
516: -- RMUNJULU 2757312 Added to store p_split_asset_number
517: -- SECHAWLA 09-AUG-05 4304230 Modified to return 0 residual value if asset status is Evergreen

Line 517: -- SECHAWLA 09-AUG-05 4304230 Modified to return 0 residual value if asset status is Evergreen

513: -- Added logic to calculate Net Investment, Unbileld Receivables and Residual Value for all quote lines
514: -- SECHAWLA - 21-APR-03 Bug 2925120
515: -- Modified code to get the Unbilled Rec using calc quote strm API, instead of using LINE_UNBILLED_STREAMS formula
516: -- RMUNJULU 2757312 Added to store p_split_asset_number
517: -- SECHAWLA 09-AUG-05 4304230 Modified to return 0 residual value if asset status is Evergreen
518: -- PRASJAIN Bug 6030917 Modified the signature of
519: -- okl_am_util_pvt.get_net_investment() and Removed the proration
520: -- after the call
521: -- End of comments

Line 540: l_residual_value NUMBER;

536:
537: --SECHAWLA 14-FEB-03 2749690 : New declarations
538: l_net_investment NUMBER;
539: --l_unbilled_rec NUMBER; --SECHAWLA 21-APR-03 Bug 2925120
540: l_residual_value NUMBER;
541: l_asset_value ak_attributes_vl.attribute_label_long%TYPE;
542:
543: -- SECHAWLA 09-AUG-05 4304230 : Modified to get line status
544: -- This cursor is used to get the residual value for an asset

Line 544: -- This cursor is used to get the residual value for an asset

540: l_residual_value NUMBER;
541: l_asset_value ak_attributes_vl.attribute_label_long%TYPE;
542:
543: -- SECHAWLA 09-AUG-05 4304230 : Modified to get line status
544: -- This cursor is used to get the residual value for an asset
545: CURSOR l_okllines_csr(p_kle_id IN NUMBER) IS
546: SELECT nvl(kle.residual_value,0), cle.sts_code
547: FROM okl_k_lines kle, okc_k_lines_b cle
548: WHERE kle.id = p_kle_id

Line 546: SELECT nvl(kle.residual_value,0), cle.sts_code

542:
543: -- SECHAWLA 09-AUG-05 4304230 : Modified to get line status
544: -- This cursor is used to get the residual value for an asset
545: CURSOR l_okllines_csr(p_kle_id IN NUMBER) IS
546: SELECT nvl(kle.residual_value,0), cle.sts_code
547: FROM okl_k_lines kle, okc_k_lines_b cle
548: WHERE kle.id = p_kle_id
549: AND kle.id = cle.id;
550:

Line 583: --SECHAWLA 14-FEB-03 2749690 : Calculate Asset Value, Unbilled Receivables and Residual Value for each

579: l_asset_tbl_index := p_asset_tbl.FIRST;
580:
581: LOOP
582:
583: --SECHAWLA 14-FEB-03 2749690 : Calculate Asset Value, Unbilled Receivables and Residual Value for each
584: --quote line
585:
586: -- Start : Bug 6030917 : prasjain
587: l_proration_factor := p_asset_tbl(l_asset_tbl_index).p_quote_qty/p_asset_tbl(l_asset_tbl_index).p_asset_qty;

Line 675: --Get the Residual value

671: IF l_total_line_unbilled_rec <> 0 THEN
672: l_total_line_unbilled_rec := (l_total_line_unbilled_rec/p_asset_tbl(l_asset_tbl_index).p_asset_qty)*(p_asset_tbl(l_asset_tbl_index).p_quote_qty);
673: END IF;
674:
675: --Get the Residual value
676: OPEN l_okllines_csr( p_asset_tbl(l_asset_tbl_index).p_asset_id);
677: FETCH l_okllines_csr INTO l_residual_value, l_asset_status; -- SECHAWLA 09-AUG-05 4304230 : added asset status
678: IF l_okllines_csr%NOTFOUND THEN
679: OKC_API.set_message( p_app_name => 'OKC',

Line 677: FETCH l_okllines_csr INTO l_residual_value, l_asset_status; -- SECHAWLA 09-AUG-05 4304230 : added asset status

673: END IF;
674:
675: --Get the Residual value
676: OPEN l_okllines_csr( p_asset_tbl(l_asset_tbl_index).p_asset_id);
677: FETCH l_okllines_csr INTO l_residual_value, l_asset_status; -- SECHAWLA 09-AUG-05 4304230 : added asset status
678: IF l_okllines_csr%NOTFOUND THEN
679: OKC_API.set_message( p_app_name => 'OKC',
680: p_msg_name => G_INVALID_VALUE,
681: p_token1 => G_COL_NAME_TOKEN,

Line 683: l_residual_value := 0;

679: OKC_API.set_message( p_app_name => 'OKC',
680: p_msg_name => G_INVALID_VALUE,
681: p_token1 => G_COL_NAME_TOKEN,
682: p_token1_value => 'KLE_ID');
683: l_residual_value := 0;
684: END IF;
685: CLOSE l_okllines_csr;
686:
687: --Prorate Residual Value

Line 687: --Prorate Residual Value

683: l_residual_value := 0;
684: END IF;
685: CLOSE l_okllines_csr;
686:
687: --Prorate Residual Value
688: IF l_residual_value <> 0 THEN
689: IF l_asset_status <> 'EVERGREEN' THEN -- SECHAWLA 09-AUG-05 4304230 : added this condition
690: l_residual_value := (l_residual_value/p_asset_tbl(l_asset_tbl_index).p_asset_qty)*(p_asset_tbl(l_asset_tbl_index).p_quote_qty);
691: ELSE

Line 688: IF l_residual_value <> 0 THEN

684: END IF;
685: CLOSE l_okllines_csr;
686:
687: --Prorate Residual Value
688: IF l_residual_value <> 0 THEN
689: IF l_asset_status <> 'EVERGREEN' THEN -- SECHAWLA 09-AUG-05 4304230 : added this condition
690: l_residual_value := (l_residual_value/p_asset_tbl(l_asset_tbl_index).p_asset_qty)*(p_asset_tbl(l_asset_tbl_index).p_quote_qty);
691: ELSE
692: l_residual_value := 0; -- SECHAWLA 09-AUG-05 4304230 : added

Line 690: l_residual_value := (l_residual_value/p_asset_tbl(l_asset_tbl_index).p_asset_qty)*(p_asset_tbl(l_asset_tbl_index).p_quote_qty);

686:
687: --Prorate Residual Value
688: IF l_residual_value <> 0 THEN
689: IF l_asset_status <> 'EVERGREEN' THEN -- SECHAWLA 09-AUG-05 4304230 : added this condition
690: l_residual_value := (l_residual_value/p_asset_tbl(l_asset_tbl_index).p_asset_qty)*(p_asset_tbl(l_asset_tbl_index).p_quote_qty);
691: ELSE
692: l_residual_value := 0; -- SECHAWLA 09-AUG-05 4304230 : added
693: END IF;
694: END IF;

Line 692: l_residual_value := 0; -- SECHAWLA 09-AUG-05 4304230 : added

688: IF l_residual_value <> 0 THEN
689: IF l_asset_status <> 'EVERGREEN' THEN -- SECHAWLA 09-AUG-05 4304230 : added this condition
690: l_residual_value := (l_residual_value/p_asset_tbl(l_asset_tbl_index).p_asset_qty)*(p_asset_tbl(l_asset_tbl_index).p_quote_qty);
691: ELSE
692: l_residual_value := 0; -- SECHAWLA 09-AUG-05 4304230 : added
693: END IF;
694: END IF;
695: --SECHAWLA 14-FEB-03 2749690 : End new code
696:

Line 717: p_residual_value => l_residual_value, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter

713: p_quote_qty => p_asset_tbl(l_asset_tbl_index).p_quote_qty, -- added
714: p_net_investment => l_net_investment, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter
715: p_split_asset_number => p_asset_tbl(l_asset_tbl_index).p_split_asset_number, -- RMUNJULU 2757312 Added to store p_split_asset_number
716: p_unbilled_rec => l_total_line_unbilled_rec, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter
717: p_residual_value => l_residual_value, -- SECHAWLA 14-FEB-03 2749690 :Added another parameter
718: p_success_yn => OKL_API.G_RET_STS_SUCCESS,
719: p_sty_id => NULL,
720: p_formula_name => NULL,
721: p_sub_tqlv_tbl => G_EMPTY_TQLV_TBL,

Line 6303: SELECT sysdate INTO G_SYSDATE from dual;

6299: RAISE OKL_API.G_EXCEPTION_ERROR;
6300: END IF;
6301:
6302: -- SECHAWLA 24-FEB-03 Bug # 2817025 : Get sysdate
6303: SELECT sysdate INTO G_SYSDATE from dual;
6304:
6305: --SECHAWLA 21-APR-03 Bug 2925120 : Store the asset table in a global variable
6306: G_ASSET_TBL := p_asset_tbl;
6307: