DBA Data[Home] [Help]

APPS.LNS_FEE_ENGINE dependencies on LNS_FEE_ENGINE

Line 1: PACKAGE BODY LNS_FEE_ENGINE AS

1: PACKAGE BODY LNS_FEE_ENGINE AS
2: /* $Header: LNS_FEE_ENGINE_B.pls 120.3.12010000.3 2008/11/05 16:23:38 gparuchu ship $ */
3:
4: --------------------------------------------
5: -- declaration of global variables and types

Line 2: /* $Header: LNS_FEE_ENGINE_B.pls 120.3.12010000.3 2008/11/05 16:23:38 gparuchu ship $ */

1: PACKAGE BODY LNS_FEE_ENGINE AS
2: /* $Header: LNS_FEE_ENGINE_B.pls 120.3.12010000.3 2008/11/05 16:23:38 gparuchu ship $ */
3:
4: --------------------------------------------
5: -- declaration of global variables and types
6: --------------------------------------------

Line 9: G_FILE_NAME CONSTANT VARCHAR2(30) := 'LNS_FEE_ENGINE_B.pls';

5: -- declaration of global variables and types
6: --------------------------------------------
7: G_DEBUG_COUNT NUMBER := 0;
8: G_DEBUG BOOLEAN := FALSE;
9: G_FILE_NAME CONSTANT VARCHAR2(30) := 'LNS_FEE_ENGINE_B.pls';
10:
11: G_PKG_NAME CONSTANT VARCHAR2(30) := 'LNS_FEE_ENGINE';
12: -- G_AF_DO_DEBUG VARCHAR2(1) := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
13: G_DAYS_COUNT NUMBER;

Line 11: G_PKG_NAME CONSTANT VARCHAR2(30) := 'LNS_FEE_ENGINE';

7: G_DEBUG_COUNT NUMBER := 0;
8: G_DEBUG BOOLEAN := FALSE;
9: G_FILE_NAME CONSTANT VARCHAR2(30) := 'LNS_FEE_ENGINE_B.pls';
10:
11: G_PKG_NAME CONSTANT VARCHAR2(30) := 'LNS_FEE_ENGINE';
12: -- G_AF_DO_DEBUG VARCHAR2(1) := NVL(FND_PROFILE.value('AFLOG_ENABLED'), 'N');
13: G_DAYS_COUNT NUMBER;
14: G_DAYS_IN_YEAR NUMBER;
15:

Line 109: l_write_fee_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

105: ,x_msg_count out nocopy number
106: ,x_msg_data out nocopy varchar2)
107: is
108: l_api_name varchar2(25);
109: l_write_fee_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
110: l_fee_id number;
111: l_fee_basis varchar2(25);
112: l_fee_amount number;
113: l_fee_description varchar2(60);

Line 120: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

116: l_msg_count NUMBER;
117: l_msg_data VARCHAR2(32767);
118: l_BILL_HEADERS_TBL LNS_BILLING_BATCH_PUB.BILL_HEADERS_TBL;
119: l_BILL_LINES_TBL LNS_BILLING_BATCH_PUB.BILL_LINES_TBL;
120: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
121: i number;
122:
123: -- get disbursement fees
124: cursor c_DisbursementFees(p_disb_head_id number) is

Line 271: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list

267: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - i ' || i);
268: if l_write_fee_tbl.count > 0 then
269: -- 3. writeFees to the fee schedule
270: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - writing fees schedule');
271: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list
272: ,p_commit => p_commit
273: ,p_loan_id => p_loan_id
274: ,p_fees_tbl => l_write_fee_tbl
275: ,x_return_status => l_return_status

Line 413: l_write_fee_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

409: ,x_msg_data out nocopy varchar2)
410: is
411:
412: l_api_name varchar2(15);
413: l_write_fee_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
414: l_fee_id number;
415: l_fee_amount number;
416: l_fee_description varchar2(250);
417: l_return_status VARCHAR2(1);

Line 474: lns_fee_engine.processLateFees(p_loan_id => p_loan_id

470: i := 0;
471:
472: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - about to reprocess late fees');
473: -- processing late fees will rewrite them to fee_schedules
474: lns_fee_engine.processLateFees(p_loan_id => p_loan_id
475: ,p_init_msg_list => p_init_msg_list
476: ,p_commit => p_commit
477: ,x_return_status => l_return_status
478: ,x_msg_count => l_msg_count

Line 493: l_fee_amount := lns_fee_engine.calculateFee(p_fee_id => l_fee_id

489: --,l_fee_amount
490: ,l_fee_description;
491: EXIT WHEN c_manual_fees%NOTFOUND;
492:
493: l_fee_amount := lns_fee_engine.calculateFee(p_fee_id => l_fee_id
494: ,p_loan_id => p_loan_id);
495: l_write_fee_tbl(i).fee_id := l_fee_id;
496: l_write_fee_tbl(i).fee_amount := l_fee_amount;
497: l_write_fee_tbl(i).fee_installment := p_installment_number;

Line 506: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list

502: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - fee amount: ' || l_fee_amount);
503: END LOOP;
504:
505: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - writing fees schedule');
506: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list
507: ,p_commit => p_commit
508: ,p_loan_id => p_loan_id
509: ,p_fees_tbl => l_write_fee_tbl
510: ,x_return_status => l_return_status

Line 574: function getFeeStructures (p_fee_id in number) return LNS_FEE_ENGINE.FEE_STRUCTURE_TBL

570: || Date Author Description of Changes
571: || 1/20/2005 GWBush2 Created
572: ||
573: *=======================================================================*/
574: function getFeeStructures (p_fee_id in number) return LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
575:
576: is
577:
578: l_fee_id number;

Line 593: l_fee_struct_tbl LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

589: l_end_installment_number number;
590: l_fee_editable_flag varchar2(1);
591: l_fee_waivable_flag varchar2(1);
592: i number := 0;
593: l_fee_struct_tbl LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
594: l_api_name varchar2(25);
595:
596: cursor c_fees (fee_id number) is
597: SELECT fees.fee_id

Line 686: ,p_fee_id in number) return LNS_FEE_ENGINE.FEE_STRUCTURE_TBL

682: function getFeeStructures(p_loan_id in number
683: ,p_fee_category in varchar2
684: ,p_fee_type in varchar2
685: ,p_installment in number
686: ,p_fee_id in number) return LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
687:
688: is
689:
690: l_fee_id number;

Line 706: l_fee_struct_tbl LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

702: l_end_installment_number number;
703: l_fee_editable_flag varchar2(1);
704: l_fee_waivable_flag varchar2(1);
705: i number := 0;
706: l_fee_struct_tbl LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
707: --vPLSQL varchar2(2000);
708: --Type refCur is ref cursor;
709: --sql_Cur refCur;
710: l_api_name varchar2(25);

Line 826: ,p_fee_id in number) return LNS_FEE_ENGINE.FEE_STRUCTURE_TBL

822: ,p_fee_type in varchar2
823: ,p_from_date in date
824: ,p_to_date in date
825: ,p_disb_header_id in number
826: ,p_fee_id in number) return LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
827: is
828:
829: l_fee_id number;
830: l_fee_name varchar2(50);

Line 838: l_fee_struct_tbl LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

834: l_fee_basis varchar2(30);
835: l_billing_option varchar2(30);
836: l_rate_type varchar2(30);
837: i number := 0;
838: l_fee_struct_tbl LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
839: l_api_name varchar2(50);
840: l_begin_installment_number number;
841: l_end_installment_number number;
842: l_disbursement_date date;

Line 969: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

965: from lns_disb_headers
966: where disb_header_id = p_disb_header_id;
967:
968: l_original_loan_amount number;
969: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
970: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
971: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
972: l_api_name varchar2(25);
973: l_return_status VARCHAR2(1);

Line 970: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

966: where disb_header_id = p_disb_header_id;
967:
968: l_original_loan_amount number;
969: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
970: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
971: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
972: l_api_name varchar2(25);
973: l_return_status VARCHAR2(1);
974: l_msg_count NUMBER;

Line 971: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;

967:
968: l_original_loan_amount number;
969: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
970: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
971: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
972: l_api_name varchar2(25);
973: l_return_status VARCHAR2(1);
974: l_msg_count NUMBER;
975: l_msg_data VARCHAR2(32767);

Line 995: l_orig_fee_structures := lns_fee_engine.getDisbursementFeeStructures(p_loan_id => null

991:
992: elsif p_disb_header_id is not null then
993:
994: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - getting DIsb fee structures');
995: l_orig_fee_structures := lns_fee_engine.getDisbursementFeeStructures(p_loan_id => null
996: ,p_fee_category => 'EVENT'
997: ,p_fee_type => 'EVENT_ORIGINATION'
998: ,p_from_date => null
999: ,p_to_date => null

Line 1088: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

1084: l_msg_count NUMBER;
1085: l_msg_data VARCHAR2(32767);
1086: l_calc_fee number;
1087: i number;
1088: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1089: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
1090: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
1091: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
1092: l_installment Number;

Line 1089: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;

1085: l_msg_data VARCHAR2(32767);
1086: l_calc_fee number;
1087: i number;
1088: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1089: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
1090: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
1091: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
1092: l_installment Number;
1093:

Line 1091: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

1087: i number;
1088: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1089: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
1090: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
1091: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
1092: l_installment Number;
1093:
1094: cursor c_from_installment(p_fee_id number, p_loan_id number) is
1095: select nvl(BEGIN_INSTALLMENT_NUMBER,0)

Line 1106: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id

1102: l_calc_fee := 0;
1103:
1104: l_api_name := 'calculateFee';
1105: -- compute the installment based on p_fee_assignment_id
1106: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id
1107: ,p_fee_category => null
1108: ,p_fee_type => null
1109: ,p_installment => null
1110: ,p_fee_id => p_fee_id);

Line 1209: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL

1205: || 12/16/2004 8:40PM raverma Created
1206: ||
1207: *=======================================================================*/
1208: procedure calculateFees(p_loan_id in number
1209: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
1210: ,p_installment in number
1211: ,p_fee_structures IN LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
1212: ,x_fees_tbl OUT nocopy LNS_FEE_ENGINE.FEE_CALC_TBL
1213: ,x_return_status out nocopy varchar2

Line 1211: ,p_fee_structures IN LNS_FEE_ENGINE.FEE_STRUCTURE_TBL

1207: *=======================================================================*/
1208: procedure calculateFees(p_loan_id in number
1209: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
1210: ,p_installment in number
1211: ,p_fee_structures IN LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
1212: ,x_fees_tbl OUT nocopy LNS_FEE_ENGINE.FEE_CALC_TBL
1213: ,x_return_status out nocopy varchar2
1214: ,x_msg_count out nocopy number
1215: ,x_msg_data out nocopy varchar2)

Line 1212: ,x_fees_tbl OUT nocopy LNS_FEE_ENGINE.FEE_CALC_TBL

1208: procedure calculateFees(p_loan_id in number
1209: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
1210: ,p_installment in number
1211: ,p_fee_structures IN LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
1212: ,x_fees_tbl OUT nocopy LNS_FEE_ENGINE.FEE_CALC_TBL
1213: ,x_return_status out nocopy varchar2
1214: ,x_msg_count out nocopy number
1215: ,x_msg_data out nocopy varchar2)
1216: is

Line 1220: l_fees_tbl lns_fee_engine.fee_calc_tbl;

1216: is
1217: l_api_name varchar2(25);
1218: l_basis_amount number;
1219: l_total_fees number;
1220: l_fees_tbl lns_fee_engine.fee_calc_tbl;
1221: k number;
1222: l_fee number;
1223: l_precision number;
1224: l_intervals number;

Line 1361: ,x_fees_tbl OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL

1357: procedure getFeeSchedule(p_init_msg_list in varchar2
1358: ,p_loan_id in number
1359: ,p_installment_number in number
1360: ,p_disb_header_id in number
1361: ,x_fees_tbl OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL
1362: ,x_return_status out nocopy varchar2
1363: ,x_msg_count out nocopy number
1364: ,x_msg_data out nocopy varchar2)
1365: is

Line 1594: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL

1590: *=======================================================================*/
1591: procedure getFeeDetails(p_init_msg_list in varchar2
1592: ,p_loan_id in number
1593: ,p_installment in number
1594: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
1595: ,p_based_on_terms in varchar2
1596: ,p_phase in varchar2
1597: ,x_fees_tbl out nocopy LNS_FEE_ENGINE.FEE_CALC_TBL
1598: ,x_return_status out nocopy varchar2

Line 1597: ,x_fees_tbl out nocopy LNS_FEE_ENGINE.FEE_CALC_TBL

1593: ,p_installment in number
1594: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
1595: ,p_based_on_terms in varchar2
1596: ,p_phase in varchar2
1597: ,x_fees_tbl out nocopy LNS_FEE_ENGINE.FEE_CALC_TBL
1598: ,x_return_status out nocopy varchar2
1599: ,x_msg_count out nocopy number
1600: ,x_msg_data out nocopy varchar2)
1601:

Line 1610: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for recurring

1606: l_msg_data VARCHAR2(32767);
1607: iFeeCount number;
1608: l_last_installment number;
1609: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
1610: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for recurring
1611: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for origination
1612: l_conv_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for conversion
1613: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1614: l_virtual_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

Line 1611: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for origination

1607: iFeeCount number;
1608: l_last_installment number;
1609: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
1610: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for recurring
1611: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for origination
1612: l_conv_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for conversion
1613: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1614: l_virtual_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1615: i number;

Line 1612: l_conv_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for conversion

1608: l_last_installment number;
1609: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
1610: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for recurring
1611: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for origination
1612: l_conv_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for conversion
1613: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1614: l_virtual_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1615: i number;
1616:

Line 1613: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

1609: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
1610: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for recurring
1611: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for origination
1612: l_conv_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for conversion
1613: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1614: l_virtual_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1615: i number;
1616:
1617: -- for disbursement phase

Line 1614: l_virtual_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

1610: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for recurring
1611: l_orig_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for origination
1612: l_conv_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL; --use for conversion
1613: l_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1614: l_virtual_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1615: i number;
1616:
1617: -- for disbursement phase
1618: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;

Line 1618: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;

1614: l_virtual_fees_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
1615: i number;
1616:
1617: -- for disbursement phase
1618: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
1619: l_payment_tbl LNS_FIN_UTILS.PAYMENT_SCHEDULE_TBL;
1620:
1621: -- conversion fees
1622: cursor c_conv_fees(p_loan_id number) is

Line 1683: l_fee_structures := lns_fee_engine.getDisbursementFeeStructures(p_loan_id => p_loan_id

1679: ,p_interval_type => l_loan_details.payment_frequency
1680: ,p_pay_in_arrears => l_loan_details.pay_in_arrears_boolean);
1681:
1682: -- fetch all disbursement_ids for given period
1683: l_fee_structures := lns_fee_engine.getDisbursementFeeStructures(p_loan_id => p_loan_id
1684: ,p_fee_category => null
1685: ,p_fee_type => null
1686: ,p_from_date => l_payment_tbl(p_installment).period_begin_date
1687: ,p_to_date => l_payment_tbl(p_installment).period_end_date

Line 1704: lns_fee_engine.calculateFees(p_loan_id => p_loan_id

1700: l_fee_basis_tbl(1).fee_basis_amount := l_fee_structures(j).disbursement_amount;
1701: l_fee_basis_tbl(2).fee_basis_name := 'ORIG_LOAN';
1702: l_fee_basis_tbl(2).fee_basis_amount := l_loan_details.funded_amount;
1703: l_orig_fee_structures(1) := l_fee_structures(j);
1704: lns_fee_engine.calculateFees(p_loan_id => p_loan_id
1705: ,p_installment => 0
1706: ,p_fee_basis_tbl => l_fee_basis_tbl
1707: ,p_fee_structures => l_fee_structures
1708: ,x_fees_tbl => l_virtual_fees_tbl

Line 1732: lns_fee_engine.getFeeSchedule(p_init_msg_list => p_init_msg_list

1728:
1729: -- this installment is actual installment on current amortization
1730: if p_installment <= l_last_installment and p_based_on_terms = 'CURRENT' then
1731:
1732: lns_fee_engine.getFeeSchedule(p_init_msg_list => p_init_msg_list
1733: ,p_loan_id => p_loan_id
1734: ,p_installment_number => p_installment
1735: ,p_disb_header_id => null
1736: ,x_fees_tbl => l_fees_tbl

Line 1751: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id

1747: iFeeCount := l_fees_tbl.count;
1748: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - found real fees ' || l_fees_tbl.count);
1749:
1750: -- get any recurring fees yet to be placed on the fee schedule
1751: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id
1752: ,p_fee_category => 'RECUR'
1753: ,p_fee_type => null
1754: ,p_installment => p_installment
1755: ,p_fee_id => null);

Line 1758: lns_fee_engine.calculateFees(p_loan_id => p_loan_id

1754: ,p_installment => p_installment
1755: ,p_fee_id => null);
1756:
1757: if l_fee_structures.count > 0 then
1758: lns_fee_engine.calculateFees(p_loan_id => p_loan_id
1759: ,p_installment => p_installment
1760: ,p_fee_basis_tbl => p_fee_basis_tbl
1761: ,p_fee_structures => l_fee_structures
1762: ,x_fees_tbl => l_virtual_fees_tbl

Line 1800: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id

1796: end loop;
1797: end if;
1798: -- get all recurring fees yet to be placed on the fee schedule
1799: -- project amounts according to amortization schedule amounts
1800: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id
1801: ,p_fee_category => 'RECUR'
1802: ,p_fee_type => null
1803: ,p_installment => p_installment
1804: ,p_fee_id => null);

Line 1808: lns_fee_engine.calculateFees(p_loan_id => p_loan_id

1804: ,p_fee_id => null);
1805: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - fee structures ' || l_fee_structures.count);
1806:
1807: if l_fee_structures.count > 0 then
1808: lns_fee_engine.calculateFees(p_loan_id => p_loan_id
1809: ,p_installment => p_installment
1810: ,p_fee_basis_tbl => p_fee_basis_tbl
1811: ,p_fee_structures => l_fee_structures
1812: ,x_fees_tbl => l_virtual_fees_tbl

Line 1833: l_orig_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id

1829: iFeeCount := l_fees_tbl.count;
1830: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - found iFeeCount fees ' || iFeeCount);
1831: if p_installment <= 1 then
1832: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - checking origination fees' );
1833: l_orig_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id
1834: ,p_fee_category => 'EVENT'
1835: ,p_fee_type => 'EVENT_ORIGINATION'
1836: ,p_installment => p_installment
1837: ,p_fee_id => null);

Line 1841: lns_fee_engine.calculateFees(p_loan_id => p_loan_id

1837: ,p_fee_id => null);
1838: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - fee structures ' || l_orig_fee_structures.count);
1839:
1840: if l_orig_fee_structures.count > 0 then
1841: lns_fee_engine.calculateFees(p_loan_id => p_loan_id
1842: ,p_installment => p_installment
1843: ,p_fee_basis_tbl => p_fee_basis_tbl
1844: ,p_fee_structures => l_orig_fee_structures
1845: ,x_fees_tbl => l_virtual_fees_tbl

Line 1931: ,p_fees_tbl IN LNS_FEE_ENGINE.FEE_CALC_TBL

1927: *=======================================================================*/
1928: procedure updateFeeSchedule(p_init_msg_list in varchar2
1929: ,p_commit in varchar2
1930: ,p_loan_id in number
1931: ,p_fees_tbl IN LNS_FEE_ENGINE.FEE_CALC_TBL
1932: ,x_return_status out nocopy varchar2
1933: ,x_msg_count out nocopy number
1934: ,x_msg_data out nocopy varchar2)
1935: is

Line 2162: ,p_fees_tbl IN OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL

2158: *=======================================================================*/
2159: procedure writeFeeSchedule(p_init_msg_list in varchar2
2160: ,p_commit in varchar2
2161: ,p_loan_id in number
2162: ,p_fees_tbl IN OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL
2163: ,x_return_status out nocopy varchar2
2164: ,x_msg_count out nocopy number
2165: ,x_msg_data out nocopy varchar2)
2166:

Line 2380: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL

2376: procedure processFees(p_init_msg_list in varchar2
2377: ,p_commit in varchar2
2378: ,p_loan_id in number
2379: ,p_installment_number in number
2380: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
2381: ,p_fee_structures in LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
2382: ,x_fees_tbl OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL
2383: ,x_return_status out nocopy varchar2
2384: ,x_msg_count out nocopy number

Line 2381: ,p_fee_structures in LNS_FEE_ENGINE.FEE_STRUCTURE_TBL

2377: ,p_commit in varchar2
2378: ,p_loan_id in number
2379: ,p_installment_number in number
2380: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
2381: ,p_fee_structures in LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
2382: ,x_fees_tbl OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL
2383: ,x_return_status out nocopy varchar2
2384: ,x_msg_count out nocopy number
2385: ,x_msg_data out nocopy varchar2)

Line 2382: ,x_fees_tbl OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL

2378: ,p_loan_id in number
2379: ,p_installment_number in number
2380: ,p_fee_basis_tbl in LNS_FEE_ENGINE.FEE_BASIS_TBL
2381: ,p_fee_structures in LNS_FEE_ENGINE.FEE_STRUCTURE_TBL
2382: ,x_fees_tbl OUT NOCOPY LNS_FEE_ENGINE.FEE_CALC_TBL
2383: ,x_return_status out nocopy varchar2
2384: ,x_msg_count out nocopy number
2385: ,x_msg_data out nocopy varchar2)
2386: is

Line 2394: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

2390: l_msg_count NUMBER;
2391: l_msg_data VARCHAR2(32767);
2392:
2393: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
2394: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2395: l_fee_schedule_id NUMBER;
2396: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
2397: l_fee_category varchar2(30);
2398: l_fee_type varchar2(30);

Line 2396: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

2392:
2393: l_loan_details LNS_FINANCIALS.LOAN_DETAILS_REC;
2394: l_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2395: l_fee_schedule_id NUMBER;
2396: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
2397: l_fee_category varchar2(30);
2398: l_fee_type varchar2(30);
2399: i number;
2400: l_processed_fees number;

Line 2472: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id

2468: end if;
2469:
2470: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - fee category ' || l_fee_category);
2471: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - fee type ' || l_fee_type);
2472: l_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id
2473: ,p_fee_category => l_fee_category
2474: ,p_fee_type => l_fee_type
2475: ,p_installment => p_installment_number
2476: ,p_fee_id => null);

Line 2479: lns_fee_engine.calculateFees(p_loan_id => p_loan_id

2475: ,p_installment => p_installment_number
2476: ,p_fee_id => null);
2477: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - fee structures count is ' || l_fee_structures.count);
2478:
2479: lns_fee_engine.calculateFees(p_loan_id => p_loan_id
2480: ,p_fee_basis_tbl => p_fee_basis_tbl
2481: ,p_installment => p_installment_number
2482: ,p_fee_structures => l_fee_structures
2483: ,x_fees_tbl => l_fee_calc_tbl

Line 2494: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list

2490: RAISE FND_API.G_EXC_ERROR;
2491: end if;
2492:
2493: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - calculated fees count is ' || l_fee_calc_tbl.count);
2494: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list
2495: ,p_commit => p_commit
2496: ,p_loan_id => p_loan_id
2497: ,p_fees_tbl => l_fee_calc_tbl
2498: ,x_return_status => l_return_status

Line 2850: l_late_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

2846: l_return_status VARCHAR2(1);
2847: l_msg_count NUMBER;
2848: l_msg_data VARCHAR2(32767);
2849:
2850: l_late_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2851: l_late_fee_structure LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2852: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
2853: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
2854: l_fee_calc_tbl_full LNS_FEE_ENGINE.FEE_CALC_TBL;

Line 2851: l_late_fee_structure LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;

2847: l_msg_count NUMBER;
2848: l_msg_data VARCHAR2(32767);
2849:
2850: l_late_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2851: l_late_fee_structure LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2852: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
2853: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
2854: l_fee_calc_tbl_full LNS_FEE_ENGINE.FEE_CALC_TBL;
2855: i number;

Line 2852: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;

2848: l_msg_data VARCHAR2(32767);
2849:
2850: l_late_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2851: l_late_fee_structure LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2852: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
2853: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
2854: l_fee_calc_tbl_full LNS_FEE_ENGINE.FEE_CALC_TBL;
2855: i number;
2856: l_last_installment number;

Line 2853: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;

2849:
2850: l_late_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2851: l_late_fee_structure LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2852: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
2853: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
2854: l_fee_calc_tbl_full LNS_FEE_ENGINE.FEE_CALC_TBL;
2855: i number;
2856: l_last_installment number;
2857: l_amount_overdue number;

Line 2854: l_fee_calc_tbl_full LNS_FEE_ENGINE.FEE_CALC_TBL;

2850: l_late_fee_structures LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2851: l_late_fee_structure LNS_FEE_ENGINE.FEE_STRUCTURE_TBL;
2852: l_fee_basis_tbl LNS_FEE_ENGINE.FEE_BASIS_TBL;
2853: l_fee_calc_tbl LNS_FEE_ENGINE.FEE_CALC_TBL;
2854: l_fee_calc_tbl_full LNS_FEE_ENGINE.FEE_CALC_TBL;
2855: i number;
2856: l_last_installment number;
2857: l_amount_overdue number;
2858:

Line 2900: l_late_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id

2896: -- first part is for TERM PHASE
2897: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - last installment ' || l_last_installment);
2898: FND_FILE.PUT_LINE(FND_FILE.LOG, 'processing last installment ' || l_last_installment);
2899: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - loan_id ' || p_loan_id);
2900: l_late_fee_structures := lns_fee_engine.getFeeStructures(p_loan_id => p_loan_id
2901: ,p_fee_category => 'EVENT'
2902: ,p_fee_type => 'EVENT_LATE_CHARGE'
2903: ,p_installment => l_last_installment
2904: ,p_fee_id => null);

Line 2964: lns_fee_engine.calculateFees(p_loan_id => p_loan_id

2960: l_fee_basis_tbl(2).fee_basis_amount := l_amount_overdue;
2961:
2962: l_late_fee_structure(1) := l_late_fee_structures(x);
2963:
2964: lns_fee_engine.calculateFees(p_loan_id => p_loan_id
2965: ,p_fee_basis_tbl => l_fee_basis_tbl
2966: ,p_installment => l_last_installment + 1
2967: ,p_fee_structures => l_late_fee_structure
2968: ,x_fees_tbl => l_fee_calc_tbl

Line 2987: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list

2983: end loop;
2984:
2985: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - calculated fees count is ' || l_fee_calc_tbl_full.count);
2986: FND_FILE.PUT_LINE(FND_FILE.LOG, 'calculated fees count is ' || l_fee_calc_tbl_full.count);
2987: lns_fee_engine.writeFeeSchedule(p_init_msg_list => p_init_msg_list
2988: ,p_commit => p_commit
2989: ,p_loan_id => p_loan_id
2990: ,p_fees_tbl => l_fee_calc_tbl_full
2991: ,x_return_status => l_return_status

Line 3082: lns_fee_engine.processLateFees(p_loan_id => p_loan_id

3078: and billed_flag = 'N';
3079:
3080: if p_loan_id is not null then
3081: FND_FILE.PUT_LINE(FND_FILE.LOG, 'processing single loan ' || p_loan_id);
3082: lns_fee_engine.processLateFees(p_loan_id => p_loan_id
3083: ,p_init_msg_list => FND_API.G_TRUE
3084: ,p_commit => FND_API.G_TRUE
3085: ,x_return_status => l_return_status
3086: ,x_msg_count => l_msg_count

Line 3099: lns_fee_engine.processLateFees(p_loan_id => l_loan_id

3095:
3096: exit when c_borrower_loans%notfound;
3097:
3098: FND_FILE.PUT_LINE(FND_FILE.LOG, 'processing loan ' || l_loan_id);
3099: lns_fee_engine.processLateFees(p_loan_id => l_loan_id
3100: ,p_init_msg_list => FND_API.G_TRUE
3101: ,p_commit => FND_API.G_TRUE
3102: ,x_return_status => l_return_status
3103: ,x_msg_count => l_msg_count

Line 3118: lns_fee_engine.processLateFees(p_loan_id => l_loan_id

3114:
3115: exit when c_all_active_loans%notfound;
3116:
3117: FND_FILE.PUT_LINE(FND_FILE.LOG, 'processing loan ' || l_loan_id);
3118: lns_fee_engine.processLateFees(p_loan_id => l_loan_id
3119: ,p_init_msg_list => FND_API.G_TRUE
3120: ,p_commit => FND_API.G_TRUE
3121: ,x_return_status => l_return_status
3122: ,x_msg_count => l_msg_count

Line 3172: END LNS_FEE_ENGINE;

3168: END LOAN_LATE_FEES_CONCUR;
3169:
3170:
3171:
3172: END LNS_FEE_ENGINE;