DBA Data[Home] [Help]

APPS.LNS_FINANCIALS dependencies on LNS_LOAN_HEADERS_ALL

Line 608: from lns_loan_headers_all loan

604: cursor c_fund_sched_exist(p_loan_id number) is
605: select decode(loan.loan_class_code,
606: 'DIRECT', (select count(1) from lns_disb_headers where loan_id = p_loan_id and status is null and PAYMENT_REQUEST_DATE is not null),
607: 'ERS', (select count(1) from lns_loan_lines where loan_id = p_loan_id and (status is null or status = 'PENDING') and end_date is null))
608: from lns_loan_headers_all loan
609: where loan.loan_id = p_loan_id;
610:
611: BEGIN
612: -- Standard Start of API savepoint

Line 649: ,p_table_name => 'LNS_LOAN_HEADERS_ALL');

645: ,x_msg_data => l_msg_data
646: ,x_return_status => l_return_status
647: ,p_col_id => p_loan_id
648: ,p_col_name => 'LOAN_ID'
649: ,p_table_name => 'LNS_LOAN_HEADERS_ALL');
650:
651: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
652: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_VALUE');
653: FND_MESSAGE.SET_TOKEN('PARAMETER', 'LOAN_ID');

Line 1114: FROM lns_loan_headers_all h

1110:
1111: -- this is for get custom dates
1112: cursor c_customized (p_loan_id number) is
1113: SELECT nvl(h.custom_payments_flag, 'N')
1114: FROM lns_loan_headers_all h
1115: WHERE loan_id = p_loan_id;
1116:
1117: cursor c_customSchedule(p_loan_id number, p_installment number) is
1118: select payment_number installment_number

Line 2512: from lns_loan_headers_all loan

2508: cursor c_fund_sched_exist(p_loan_id number) is
2509: select decode(loan.loan_class_code,
2510: 'DIRECT', (select count(1) from lns_disb_headers where loan_id = p_loan_id and status is null and PAYMENT_REQUEST_DATE is not null),
2511: 'ERS', (select count(1) from lns_loan_lines where loan_id = p_loan_id and (status is null or status = 'PENDING') and end_date is null))
2512: from lns_loan_headers_all loan
2513: where loan.loan_id = p_loan_id;
2514:
2515: cursor c_get_bill_opt(p_loan_id number) is
2516: select nvl(BILL_ON_APPR_AMOUNT_FLAG, 'N')

Line 2517: from lns_loan_headers_all

2513: where loan.loan_id = p_loan_id;
2514:
2515: cursor c_get_bill_opt(p_loan_id number) is
2516: select nvl(BILL_ON_APPR_AMOUNT_FLAG, 'N')
2517: from lns_loan_headers_all
2518: where loan_id = p_loan_id;
2519:
2520: begin
2521:

Line 3903: from lns_loan_headers_all loan

3899: cursor c_fund_sched_exist(p_loan_id number) is
3900: select decode(loan.loan_class_code,
3901: 'DIRECT', (select count(1) from lns_disb_headers where loan_id = p_loan_id and status is null and PAYMENT_REQUEST_DATE is not null),
3902: 'ERS', (select count(1) from lns_loan_lines where loan_id = p_loan_id and (status is null or status = 'PENDING') and end_date is null))
3903: from lns_loan_headers_all loan
3904: where loan.loan_id = p_loan_id;
3905:
3906: cursor c_get_bill_opt(p_loan_id number) is
3907: select nvl(BILL_ON_APPR_AMOUNT_FLAG, 'N')

Line 3908: from lns_loan_headers_all

3904: where loan.loan_id = p_loan_id;
3905:
3906: cursor c_get_bill_opt(p_loan_id number) is
3907: select nvl(BILL_ON_APPR_AMOUNT_FLAG, 'N')
3908: from lns_loan_headers_all
3909: where loan_id = p_loan_id;
3910:
3911: begin
3912:

Line 5139: from lns_loan_headers_all loan

5135: cursor c_fund_sched_exist(p_loan_id number) is
5136: select decode(loan.loan_class_code,
5137: 'DIRECT', (select count(1) from lns_disb_headers where loan_id = p_loan_id and status is null and PAYMENT_REQUEST_DATE is not null),
5138: 'ERS', (select count(1) from lns_loan_lines where loan_id = p_loan_id and (status is null or status = 'PENDING') and end_date is null))
5139: from lns_loan_headers_all loan
5140: where loan.loan_id = p_loan_id;
5141:
5142: -- get sum of all add int for last billed installment
5143: cursor c_add_int(p_loan_id number, p_amortization_schedule_id number) is

Line 5155: from lns_loan_headers_all

5151: and trx_lines.description not like '%Normal Interest%';
5152:
5153: cursor c_get_bill_opt(p_loan_id number) is
5154: select nvl(BILL_ON_APPR_AMOUNT_FLAG, 'N')
5155: from lns_loan_headers_all
5156: where loan_id = p_loan_id;
5157:
5158: begin
5159:

Line 6982: ,p_table_name => 'LNS_LOAN_HEADERS_ALL');

6978: ,x_msg_data => l_msg_data
6979: ,x_return_status => l_return_status
6980: ,p_col_id => p_loan_id
6981: ,p_col_name => 'LOAN_ID'
6982: ,p_table_name => 'LNS_LOAN_HEADERS_ALL');
6983:
6984: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6985: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_VALUE');
6986: FND_MESSAGE.SET_TOKEN('PARAMETER', 'LOAN_ID');

Line 7144: from lns_loan_headers_all h,

7140: ,begin_installment_number
7141: ,end_installment_number
7142: ,nvl(interest_only_flag, 'N')
7143: ,nvl(floating_flag, 'N')
7144: from lns_loan_headers_all h,
7145: lns_terms t,
7146: lns_rate_schedules rs
7147: where h.loan_id = p_loan_id
7148: and h.loan_id = t.loan_id

Line 7731: FROM lns_loan_headers_all h

7727: ,nvl(t.CALC_ADD_INT_UNPAID_PRIN, 'N')
7728: ,nvl(t.CALC_ADD_INT_UNPAID_INT, 'N')
7729: ,nvl(t.CAPITALIZE_INT, 'N')
7730: ,nvl(t.FLUCTUATE_EQ_PAY_AMOUNT, 'N')
7731: FROM lns_loan_headers_all h
7732: ,lns_terms t
7733: ,fnd_currencies curr
7734: WHERE h.loan_id = p_loan_id
7735: AND t.loan_id = h.loan_id

Line 7746: FROM lns_loan_headers_all lnh,

7742: CURSOR c_reamortization(p_Loan_id NUMBER) IS
7743: SELECT nvl(reamortization_amount, 0)
7744: ,nvl(reamortize_from_installment, 0)
7745: ,nvl(reamortize_to_installment, 0)
7746: FROM lns_loan_headers_all lnh,
7747: lns_amortization_scheds amort1
7748: WHERE lnh.loan_id = amort1.loan_id(+)
7749: AND lnh.loan_id = p_loan_id
7750: AND amort1.reamortization_amount > 0;

Line 8105: || Source Tables: LNS_LOAN_HEADERS_ALL, LNS_DISB_HEADERS

8101: || -- the term will change to X MONTHS if TERM was > MONTHS
8102: ||
8103: || Parameter: p_loan_id = loan_id
8104: ||
8105: || Source Tables: LNS_LOAN_HEADERS_ALL, LNS_DISB_HEADERS
8106: || LNS_TERMS
8107: ||
8108: || Target Tables: LNS_LOAN_HEADERS_ALL, LNS_TERMS
8109: ||

Line 8108: || Target Tables: LNS_LOAN_HEADERS_ALL, LNS_TERMS

8104: ||
8105: || Source Tables: LNS_LOAN_HEADERS_ALL, LNS_DISB_HEADERS
8106: || LNS_TERMS
8107: ||
8108: || Target Tables: LNS_LOAN_HEADERS_ALL, LNS_TERMS
8109: ||
8110: || Return value: Standard Oracle API
8111: ||
8112: || MODIFICATION HISTORY

Line 8457: ,p_table_name => 'LNS_LOAN_HEADERS_ALL');

8453: ,x_msg_data => l_msg_data
8454: ,x_return_status => l_return_status
8455: ,p_col_id => p_loan_id
8456: ,p_col_name => 'LOAN_ID'
8457: ,p_table_name => 'LNS_LOAN_HEADERS_ALL');
8458:
8459: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
8460: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_VALUE');
8461: FND_MESSAGE.SET_TOKEN('PARAMETER', 'LOAN_ID');

Line 9964: lns_loan_headers_all h

9960:
9961: select rs.current_interest_rate into l_rate
9962: from lns_rate_schedules rs,
9963: lns_terms t,
9964: lns_loan_headers_all h
9965: where h.loan_id = p_loan_id
9966: and h.loan_id = t.loan_id
9967: and rs.term_id = t.term_id
9968: and rs.start_date_active <= sysdate

Line 10196: ' From lns_loan_headers_all ' ||

10192: -- logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
10193:
10194: Execute Immediate
10195: ' Select Loan_Status ' ||
10196: ' From lns_loan_headers_all ' ||
10197: ' where loan_id = :p_loan_id'
10198: into l_loan_status
10199: using p_loan_id;
10200:

Line 10205: -- l_table := 'LNS_LOAN_HEADERS_ALL';

10201: if l_loan_status = 'APPROVED' then
10202: l_column := 'TOTAL_PRINCIPAL_BALANCE';
10203: l_table := 'LNS_PAY_SUM_V';
10204: -- l_column := 'REQUESTED_AMOUNT';
10205: -- l_table := 'LNS_LOAN_HEADERS_ALL';
10206:
10207: elsif l_loan_Status = 'ACTIVE' then
10208: l_column := 'TOTAL_PRINCIPAL_BALANCE';
10209: l_table := 'LNS_PAY_SUM_V';

Line 10223: -- l_table := 'LNS_LOAN_HEADERS_ALL';

10219: elsif l_loan_Status = 'PAIDOFF' then
10220: l_column := 'TOTAL_PRINCIPAL_BALANCE';
10221: l_table := 'LNS_PAY_SUM_V';
10222: -- l_column := 'REQUESTED_AMOUNT';
10223: -- l_table := 'LNS_LOAN_HEADERS_ALL';
10224:
10225: elsif l_loan_Status = 'CANCELLED' then
10226: l_column := 'TOTAL_PRINCIPAL_BALANCE';
10227: l_table := 'LNS_PAY_SUM_V';

Line 10231: l_table := 'LNS_LOAN_HEADERS_ALL';

10227: l_table := 'LNS_PAY_SUM_V';
10228:
10229: elsif l_loan_status = 'PENDING' then
10230: l_column := 'REQUESTED_AMOUNT';
10231: l_table := 'LNS_LOAN_HEADERS_ALL';
10232:
10233: elsif l_loan_status = 'INCOMPLETE' then
10234: l_column := 'REQUESTED_AMOUNT';
10235: l_table := 'LNS_LOAN_HEADERS_ALL';

Line 10235: l_table := 'LNS_LOAN_HEADERS_ALL';

10231: l_table := 'LNS_LOAN_HEADERS_ALL';
10232:
10233: elsif l_loan_status = 'INCOMPLETE' then
10234: l_column := 'REQUESTED_AMOUNT';
10235: l_table := 'LNS_LOAN_HEADERS_ALL';
10236:
10237: elsif l_loan_status = 'IN_FUNDING' then
10238: l_column := 'REQUESTED_AMOUNT';
10239: l_table := 'LNS_LOAN_HEADERS_ALL';

Line 10239: l_table := 'LNS_LOAN_HEADERS_ALL';

10235: l_table := 'LNS_LOAN_HEADERS_ALL';
10236:
10237: elsif l_loan_status = 'IN_FUNDING' then
10238: l_column := 'REQUESTED_AMOUNT';
10239: l_table := 'LNS_LOAN_HEADERS_ALL';
10240:
10241: elsif l_loan_status = 'FUNDING_ERROR' then
10242: l_column := 'REQUESTED_AMOUNT';
10243: l_table := 'LNS_LOAN_HEADERS_ALL';

Line 10243: l_table := 'LNS_LOAN_HEADERS_ALL';

10239: l_table := 'LNS_LOAN_HEADERS_ALL';
10240:
10241: elsif l_loan_status = 'FUNDING_ERROR' then
10242: l_column := 'REQUESTED_AMOUNT';
10243: l_table := 'LNS_LOAN_HEADERS_ALL';
10244:
10245: else -- catch any new statuses
10246: l_column := 'REQUESTED_AMOUNT';
10247: l_table := 'LNS_LOAN_HEADERS_ALL';

Line 10247: l_table := 'LNS_LOAN_HEADERS_ALL';

10243: l_table := 'LNS_LOAN_HEADERS_ALL';
10244:
10245: else -- catch any new statuses
10246: l_column := 'REQUESTED_AMOUNT';
10247: l_table := 'LNS_LOAN_HEADERS_ALL';
10248:
10249: end if;
10250:
10251: Execute Immediate

Line 10291: from lns_loan_headers_all loan

10287: trunc(disb_line.DISBURSEMENT_DATE) <= trunc(p_date)),
10288: 'ERS', (select nvl(sum(lines.REQUESTED_AMOUNT), 0) from lns_loan_lines lines
10289: where lines.loan_id = loan.loan_id and lines.STATUS = 'APPROVED' and lines.end_date is null and
10290: trunc(lines.ADJUSTMENT_DATE) <= trunc(p_date)))
10291: from lns_loan_headers_all loan
10292: where loan.loan_id = p_loan_id;
10293:
10294: cursor c_get_loan_balance1(p_loan_id number, p_date date) is
10295: select

Line 10304: from lns_loan_headers_all loan

10300: (disb_hdr.PAYMENT_REQUEST_DATE is null or trunc(disb_hdr.PAYMENT_REQUEST_DATE) <= trunc(p_date))),
10301: 'ERS', (select nvl(sum(lines.REQUESTED_AMOUNT), 0) from lns_loan_lines lines
10302: where lines.loan_id = loan.loan_id and (lines.STATUS is null or lines.STATUS = 'PENDING') and
10303: lines.end_date is null))
10304: from lns_loan_headers_all loan
10305: where loan.loan_id = p_loan_id;
10306:
10307: cursor c_get_loan_balance2(p_loan_id number, p_date date) is
10308: select

Line 10317: from lns_loan_headers_all loan

10313: trunc(adj.EFFECTIVE_DATE) <= trunc(p_date))*/,
10314: 'ERS', (select nvl(sum(lines.REQUESTED_AMOUNT), 0) from lns_loan_lines lines
10315: where lines.loan_id = loan.loan_id and (lines.STATUS is null or lines.STATUS = 'PENDING') and
10316: lines.end_date is null))
10317: from lns_loan_headers_all loan
10318: where loan.loan_id = p_loan_id;
10319:
10320: cursor c_get_bill_opt(p_loan_id number) is
10321: select nvl(BILL_ON_APPR_AMOUNT_FLAG, 'N')

Line 10322: from lns_loan_headers_all

10318: where loan.loan_id = p_loan_id;
10319:
10320: cursor c_get_bill_opt(p_loan_id number) is
10321: select nvl(BILL_ON_APPR_AMOUNT_FLAG, 'N')
10322: from lns_loan_headers_all
10323: where loan_id = p_loan_id;
10324: begin
10325: logMessage(FND_LOG.LEVEL_PROCEDURE, G_PKG_NAME, l_api_name || ' - BEGIN');
10326: logMessage(FND_LOG.LEVEL_STATEMENT, G_PKG_NAME, 'p_loan_id = ' || p_loan_id);

Line 10610: lns_loan_headers_all loan

10606: from lns_loan_lines
10607: where loan_id = p_loan_id
10608: and (status is null or status = 'PENDING')
10609: and end_date is null) lines,
10610: lns_loan_headers_all loan
10611: where loan.loan_id = p_loan_id
10612: and loan.LOAN_CLASS_CODE = 'ERS')
10613: order by display_order, activity_date;
10614:

Line 10623: from lns_loan_headers_all h

10619: where loan_id = p_loan_id;
10620:
10621: cursor c_curr_precision(p_loan_id number) is
10622: select curr.precision
10623: from lns_loan_headers_all h
10624: ,fnd_currencies curr
10625: where h.loan_id = p_loan_id
10626: and curr.currency_code = h.loan_currency;
10627:

Line 11072: from lns_loan_headers_all h

11068: order by activity_date, display_order, LOAN_AMORTIZATION_ID;
11069:
11070: cursor c_curr_precision(p_loan_id number) is
11071: select curr.precision
11072: from lns_loan_headers_all h
11073: ,fnd_currencies curr
11074: where h.loan_id = p_loan_id
11075: and curr.currency_code = h.loan_currency;
11076:

Line 11349: from lns_loan_headers_all h

11345: loan.loan_id = term.loan_id;
11346:
11347: cursor c_curr_precision(p_loan_id number) is
11348: select curr.precision
11349: from lns_loan_headers_all h
11350: ,fnd_currencies curr
11351: where h.loan_id = p_loan_id
11352: and curr.currency_code = h.loan_currency;
11353:

Line 11831: SOURCE_TABLE = 'LNS_LOAN_HEADERS_ALL' and

11827: CURSOR c_get_xml(p_loan_id NUMBER) IS
11828: SELECT nvl(DOCUMENT_XML, empty_clob())
11829: FROM LNS_LOAN_DOCUMENTS
11830: WHERE source_id = p_loan_id and
11831: SOURCE_TABLE = 'LNS_LOAN_HEADERS_ALL' and
11832: DOCUMENT_TYPE = 'LOAN_AGREEMENT' AND
11833: VERSION = 1;
11834:
11835: BEGIN

Line 12225: from lns_loan_headers_all h

12221: loan.loan_id = term.loan_id;
12222:
12223: cursor c_curr_precision(p_loan_id number) is
12224: select curr.precision
12225: from lns_loan_headers_all h
12226: ,fnd_currencies curr
12227: where h.loan_id = p_loan_id
12228: and curr.currency_code = h.loan_currency;
12229: