DBA Data[Home] [Help]

APPS.LNS_DISTRIBUTIONS_PUB dependencies on LNS_LOAN_HEADERS

Line 75: from lns_loan_headers h,

71: cursor c_budget_req(p_loan_id number) is
72: select nvl(p.BDGT_REQ_FOR_APPR_FLAG, 'N')
73: ,nvl(h.funds_reserved_flag, 'N')
74: ,nvl(h.gl_date, sysdate)
75: from lns_loan_headers h,
76: lns_loan_products p
77: where p.loan_product_id = h.product_id
78: and h.loan_id = p_loan_id;
79:

Line 82: from lns_loan_headers

78: and h.loan_id = p_loan_id;
79:
80: cursor c_obj_vers(p_loan_id number) is
81: select object_version_number
82: from lns_loan_headers
83: where loan_id = p_loan_id;
84:
85: cursor c_disbursements(p_loan_id number) is
86: select disb_header_id

Line 369: ,p_table_name => 'LNS_LOAN_HEADERS');

365: ,x_msg_data => l_msg_data
366: ,x_return_status => l_return_status
367: ,p_col_id => p_loan_id
368: ,p_col_name => 'LOAN_ID'
369: ,p_table_name => 'LNS_LOAN_HEADERS');
370:
371: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
372: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_VALUE');
373: FND_MESSAGE.SET_TOKEN('PARAMETER', 'LOAN_ID');

Line 523: from lns_loan_headers h,

519: cursor c_budget_req(p_loan_id number) is
520: select nvl(p.BDGT_REQ_FOR_APPR_FLAG, 'N')
521: ,nvl(h.funds_reserved_flag, 'N')
522: ,h.loan_start_date -- fix for bug 16068385
523: from lns_loan_headers h,
524: lns_loan_products p
525: where p.loan_product_id = h.product_id
526: and h.loan_id = p_loan_id;
527:

Line 549: from lns_loan_headers

545: and disbursement_number = 1;
546:
547: cursor c_obj_vers(p_loan_id number) is
548: select object_version_number
549: from lns_loan_headers
550: where loan_id = p_loan_id;
551:
552: cursor c_budget_event(p_loan_id number) is
553: select count(1)

Line 1051: from lns_loan_headers_all h

1047: select h.loan_class_code
1048: ,t.loan_type_id
1049: -- ,h.funded_amount
1050: ,h.requested_amount -- Bug#9755933
1051: from lns_loan_headers_all h
1052: ,lns_loan_types t
1053: where h.loan_id = p_loan_id
1054: and h.loan_type_id = t.loan_type_id;
1055:

Line 1061: from lns_loan_headers_all h

1057: is
1058: select h.loan_class_code
1059: ,t.loan_type_id
1060: ,d.header_amount
1061: from lns_loan_headers_all h
1062: ,lns_loan_types t
1063: ,lns_disb_headers d
1064: where h.loan_id = p_loan_id
1065: and h.loan_type_id = t.loan_type_id

Line 1074: from lns_loan_headers_all h

1070: is
1071: select h.loan_class_code
1072: ,t.loan_type_id
1073: ,ladj.adjustment_amount
1074: from lns_loan_headers_all h
1075: ,lns_loan_types t
1076: ,LNS_LOAN_AMOUNT_ADJS ladj
1077: where h.loan_id = p_loan_id
1078: and h.loan_type_id = t.loan_type_id

Line 1429: from lns_loan_headers_all h

1425:
1426: cursor c_loan_info(p_loan_id number) is
1427: select h.loan_class_code
1428: ,h.loan_type_id
1429: from lns_loan_headers_all h
1430: where h.loan_id = p_loan_id;
1431:
1432: begin
1433: l_api_name := 'create_event';

Line 1588: ,lns_loan_headers_all h

1584: -- this is cursor is for reading configuration for multi-fund swap natural account
1585: cursor c_mfar_nat_acct (p_loan_id number) is
1586: select MFAR_NATURAL_ACCOUNT_REC
1587: from lns_default_distribs_all d
1588: ,lns_loan_headers_all h
1589: where account_name = 'MFAR_FUND_ACCOUNT_CHANGE'
1590: and h.loan_id = p_loan_id
1591: and h.loan_class_code = d.loan_class
1592: and h.loan_type_id = d.loan_type_id

Line 1774: ,lns_loan_headers h

1770: -- gets the swap natural account value for LOAN_RECEIVABLE
1771: cursor c_mfar_nat_acct (p_loan_id number) is
1772: select MFAR_NATURAL_ACCOUNT_REC
1773: from lns_default_distribs d
1774: ,lns_loan_headers h
1775: where account_name = 'MFAR_FUND_ACCOUNT_CHANGE'
1776: and h.loan_id = p_loan_id
1777: and h.loan_class_code = d.loan_class
1778: and h.loan_type_id = d.loan_type_id;

Line 2579: || Source Tables: lns_distributions, lns_loan_headers

2575: || p_distribution_id = pk to LNS_DISTRIBUTIONS
2576: ||
2577: || Return value: amount of distribution based from loan funded amount
2578: ||
2579: || Source Tables: lns_distributions, lns_loan_headers
2580: ||
2581: || Target Tables: NA
2582: ||
2583: || KNOWN ISSUES

Line 2608: ,lns_loan_headers lnh

2604:
2605: cursor c_get_distribution(p_distribution_id number) is
2606: select round(lnh.funded_amount * lnd.distribution_percent / 100, curr.precision)
2607: from lns_distributions lnd
2608: ,lns_loan_headers lnh
2609: ,fnd_currencies curr
2610: where lnh.loan_id = lnd.loan_id
2611: and curr.currency_code = lnh.loan_currency
2612: and lnd.distribution_id = p_distribution_id;

Line 2620: ,lns_loan_headers lnh

2616: ,p_distribution_type varchar
2617: ,p_account_type varchar2) is
2618: select max(distribution_id)
2619: from lns_distributions lnd
2620: ,lns_loan_headers lnh
2621: where lnh.loan_id = lnd.loan_id
2622: and lnd.distribution_type = p_distribution_type
2623: and lnd.account_type = p_account_type
2624: and lnh.loan_id = p_loan_id;

Line 2640: ,lns_loan_headers lnh

2636: and distribution_type = p_distribution_type
2637: and account_type = p_account_type
2638: and loan_id = p_loan_id), curr.precision))
2639: from lns_distributions lnd
2640: ,lns_loan_headers lnh
2641: ,fnd_currencies curr
2642: where lnh.loan_id = lnd.loan_id
2643: and lnh.loan_id = p_loan_id
2644: and curr.currency_code = lnh.loan_currency;

Line 2716: || Source Tables: lns_distributions, lns_loan_headers

2712: || 'N' to get amount in loan currency
2713: ||
2714: || Return value: amount of distribution based from loan funded amount
2715: ||
2716: || Source Tables: lns_distributions, lns_loan_headers
2717: ||
2718: || Target Tables: NA
2719: ||
2720: || KNOWN ISSUES

Line 2753: from lns_loan_headers lnh

2749: select lnh.exchange_rate_type
2750: ,lnh.exchange_rate
2751: ,lnh.exchange_date
2752: ,lnh.loan_currency
2753: from lns_loan_headers lnh
2754: where loan_id = p_loan_id;
2755:
2756: cursor c_get_distribution(p_distribution_id number) is
2757: select round(lnh.funded_amount * lnd.distribution_percent / 100, curr.precision)

Line 2759: ,lns_loan_headers lnh

2755:
2756: cursor c_get_distribution(p_distribution_id number) is
2757: select round(lnh.funded_amount * lnd.distribution_percent / 100, curr.precision)
2758: from lns_distributions lnd
2759: ,lns_loan_headers lnh
2760: ,fnd_currencies curr
2761: where lnh.loan_id = lnd.loan_id
2762: and curr.currency_code = lnh.loan_currency
2763: and lnd.distribution_id = p_distribution_id;

Line 2779: ,lns_loan_headers lnh

2775: and distribution_type = p_distribution_type
2776: and account_type = p_account_type
2777: and loan_id = p_loan_id), curr.precision))
2778: from lns_distributions lnd
2779: ,lns_loan_headers lnh
2780: ,fnd_currencies curr
2781: where lnh.loan_id = lnd.loan_id
2782: and lnh.loan_id = p_loan_id
2783: and curr.currency_code = lnh.loan_currency;

Line 2847: from lns_loan_headers lnh

2843: l_amount number;
2844:
2845: cursor c_currency1(p_distribution_id number) is
2846: select lnh.loan_currency
2847: from lns_loan_headers lnh
2848: ,lns_distributions lnd
2849: where lnh.loan_id = lnd.loan_id
2850: and lnd.distribution_id = p_distribution_id;
2851:

Line 3092: from lns_loan_headers_all

3088: l_api_name varchar2(30);
3089:
3090: cursor c_loan_class(p_loan_id number) is
3091: select loan_class_code, loan_status
3092: from lns_loan_headers_all
3093: where loan_id = p_loan_id;
3094:
3095: CURSOR c_get_prin_distr(C_LOAN_ID number) IS
3096: SELECT dist.distribution_id

Line 3816: lns_loan_headers_all

3812: cursor c_subsidy_rate (p_loan_id number) is
3813: SELECT
3814: (nvl(subsidy_rate, 0)/100)
3815: FROM
3816: lns_loan_headers_all
3817: WHERE
3818: loan_id = p_loan_id;
3819:
3820: cursor c_loan_adj(c_loan_id number) is

Line 4050: || Source Tables: LNS_DEFAULT_DISTRIBUTIONS, lns_loan_headers_all

4046: || Parameter: p_loan_id => loan to default
4047: ||
4048: || Return value: Standard S = Success E = Error U = Unexpected
4049: ||
4050: || Source Tables: LNS_DEFAULT_DISTRIBUTIONS, lns_loan_headers_all
4051: ||
4052: || Target Tables: LNS_DISTRIBUTIONS
4053: ||
4054: || KNOWN ISSUES

Line 4241: from lns_loan_headers_all h

4237: ,'PENDING', h.requested_amount
4238: ,h.funded_amount)
4239: ,h.legal_entity_id
4240: ,h.LOAN_STATUS
4241: from lns_loan_headers_all h
4242: ,lns_loan_types t
4243: where h.loan_id = p_loan_id
4244: and h.loan_type_id = t.loan_type_id;
4245:

Line 4269: from lns_loan_headers

4265:
4266: -- cursor to update loan header
4267: cursor c_obj_vers(p_loan_id number) is
4268: select object_version_number
4269: from lns_loan_headers
4270: where loan_id = p_loan_id;
4271:
4272: -- cursor to get documents and check upgrade status
4273: cursor c_get_loan_documents(p_loan_id number) is

Line 4312: FROM lns_loan_headers lhdr,

4308: AND account_name IN ('PRINCIPAL_RECEIVABLE', 'INTEREST_RECEIVABLE', 'INTEREST_INCOME');
4309:
4310: CURSOR cur_default_ar_adj(c_loan_id NUMBER) IS
4311: SELECT rec.CODE_COMBINATION_ID
4312: FROM lns_loan_headers lhdr,
4313: lns_system_options sysop,
4314: ar_receivables_trx rec
4315: WHERE lhdr.loan_id = c_loan_id
4316: AND sysop.org_id = lhdr.org_id

Line 5089: from lns_loan_headers h

5085:
5086: cursor c_loan_info(p_loan_id number) is
5087: select h.legal_entity_id
5088: ,h.loan_class_code
5089: from lns_loan_headers h
5090: where h.loan_id = p_loan_id;
5091:
5092: -- this is only for loans entities
5093: cursor c_acc_errors (p_loan_id number, p_accounting_batch_id number) is

Line 5367: from lns_loan_headers

5363: select loan_class_code
5364: ,gl_date
5365: ,OBJECT_VERSION_NUMBER
5366: ,org_id
5367: from lns_loan_headers
5368: where loan_id = c_loan_id;
5369:
5370: CURSOR do_billing_cur(C_LOAN_ID number) IS
5371: select nvl(count(1),0)

Line 5590: from lns_loan_headers

5586: +-----------------------------------------------------------------------*/
5587:
5588: cursor c_loan_info (c_loan_id number) is
5589: select gl_date
5590: from lns_loan_headers
5591: where loan_id = c_loan_id;
5592:
5593: begin
5594:

Line 5786: ,p_table_name => 'LNS_LOAN_HEADERS');

5782: ,x_msg_data => l_msg_data
5783: ,x_return_status => l_return_status
5784: ,p_col_id => p_loan_id
5785: ,p_col_name => 'LOAN_ID'
5786: ,p_table_name => 'LNS_LOAN_HEADERS');
5787:
5788: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
5789: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_VALUE');
5790: FND_MESSAGE.SET_TOKEN('PARAMETER', 'LOAN_ID');

Line 5977: from lns_loan_headers h,

5973: cursor c_budget_req(c_loan_amount_adj_id number) is
5974: select nvl(p.BDGT_REQ_FOR_APPR_FLAG, 'N')
5975: ,nvl(ladj.funds_reserved_flag, 'N')
5976: ,ladj.EFFECTIVE_DATE -- fix for bug 16068385
5977: from lns_loan_headers h,
5978: lns_loan_products p,
5979: lns_loan_amount_adjs ladj
5980: where p.loan_product_id = h.product_id
5981: and ladj.loan_id = h.loan_id

Line 6012: from lns_loan_headers

6008: AND status = 'PENDING';
6009:
6010: cursor c_obj_vers(p_loan_id number) is
6011: select object_version_number
6012: from lns_loan_headers
6013: where loan_id = p_loan_id;
6014:
6015: cursor c_obj_vers_adj(c_loan_amount_adj_id number) is
6016: select object_version_number

Line 6061: ,p_table_name => 'LNS_LOAN_HEADERS');

6057: ,x_msg_data => l_msg_data
6058: ,x_return_status => l_return_status
6059: ,p_col_id => p_loan_id
6060: ,p_col_name => 'LOAN_ID'
6061: ,p_table_name => 'LNS_LOAN_HEADERS');
6062:
6063: if l_return_status <> FND_API.G_RET_STS_SUCCESS then
6064: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_VALUE');
6065: FND_MESSAGE.SET_TOKEN('PARAMETER', 'LOAN_ID');

Line 7292: || Source Tables: LNS_DISTRIBUTIONS, lns_loan_headers_all

7288: || Parameter: p_loan_id => loan to default
7289: ||
7290: || Return value: Standard S = Success E = Error U = Unexpected
7291: ||
7292: || Source Tables: LNS_DISTRIBUTIONS, lns_loan_headers_all
7293: ||
7294: || Target Tables: LNS_DISTRIBUTIONS
7295: ||
7296: || KNOWN ISSUES

Line 7371: from lns_loan_headers_all h

7367:
7368: cursor c_loan_info(c_loan_id NUMBER)
7369: is
7370: select h.loan_class_code, h.requested_amount, h.funded_amount, (nvl(subsidy_rate, 0)/100)
7371: from lns_loan_headers_all h
7372: where h.loan_id = c_loan_id;
7373:
7374:
7375: cursor c_num_receivables(c_loan_id number)

Line 7433: ,p_table_name => 'LNS_LOAN_HEADERS');

7429: ,x_msg_data => l_msg_data
7430: ,x_return_status => l_return_status
7431: ,p_col_id => p_loan_id
7432: ,p_col_name => 'LOAN_ID'
7433: ,p_table_name => 'LNS_LOAN_HEADERS');
7434:
7435: IF l_return_status <> FND_API.G_RET_STS_SUCCESS THEN
7436: FND_MESSAGE.SET_NAME('LNS', 'LNS_INVALID_VALUE');
7437: FND_MESSAGE.SET_TOKEN('PARAMETER', 'LOAN_ID');

Line 7658: from lns_loan_headers h,

7654: cursor c_budget_req(p_loan_id number) is
7655: select nvl(p.BDGT_REQ_FOR_APPR_FLAG, 'N')
7656: ,nvl(h.funds_reserved_flag, 'N')
7657: ,nvl(h.gl_date, sysdate)
7658: from lns_loan_headers h,
7659: lns_loan_products p
7660: where p.loan_product_id = h.product_id
7661: and h.loan_id = p_loan_id;
7662:

Line 7665: from lns_loan_headers

7661: and h.loan_id = p_loan_id;
7662:
7663: cursor c_obj_vers(p_loan_id number) is
7664: select object_version_number
7665: from lns_loan_headers
7666: where loan_id = p_loan_id;
7667:
7668: cursor c_disbursements(p_loan_id number) is
7669: select disb_header_id

Line 7949: select loan_number from lns_loan_headers where loan_id = P_LOAN_ID;

7945: select party_name from hz_parties party where party_id = P_BORROWER_ID;
7946:
7947: /* query for loan number */
7948: CURSOR loan_cur(P_LOAN_ID number) IS
7949: select loan_number from lns_loan_headers where loan_id = P_LOAN_ID;
7950:
7951: /* query for org name */
7952: CURSOR org_cur(C_ORG_ID number) IS
7953: select name

Line 8167: lns_loan_headers loan,

8163: ,to_char(C_INT_ACCRUED, FND_CURRENCY.SAFE_GET_FORMAT_MASK(loan.LOAN_CURRENCY,50))
8164: ,loan.last_payment_number
8165: ,decode(loan.current_phase, 'OPEN', to_char(loan.open_loan_start_date,'YYYY-MM-DD'), to_char(loan.loan_start_date,'YYYY-MM-DD'))
8166: FROM
8167: lns_loan_headers loan,
8168: hz_parties party
8169: WHERE party.party_id = loan.PRIMARY_BORROWER_ID
8170: AND loan.loan_id = C_LOAN_ID;
8171:

Line 8454: lns_loan_headers loan

8450: CURSOR loan_cur(C_LOAN_ID number) IS
8451: SELECT
8452: loan.loan_number
8453: FROM
8454: lns_loan_headers loan
8455: WHERE
8456: loan.loan_id = C_LOAN_ID;
8457:
8458: CURSOR c_accrual_date_distrbs_exists(c_loan_id NUMBER, c_accrual_date VARCHAR2) IS

Line 8776: FROM lns_loan_headers lnh

8772: from lns_amortization_scheds
8773: where reversed_flag = 'N'
8774: and loan_id = lnh.loan_id
8775: and phase = lnh.current_phase)))
8776: FROM lns_loan_headers lnh
8777: WHERE lnh.loan_id = c_loan_id;
8778:
8779:
8780: CURSOR c_loan_info(c_loan_id number) is

Line 8782: FROM lns_loan_headers h

8778:
8779:
8780: CURSOR c_loan_info(c_loan_id number) is
8781: SELECT nvl(h.current_phase, 'TERM')
8782: FROM lns_loan_headers h
8783: WHERE h.loan_id = c_loan_id;
8784:
8785:
8786: BEGIN

Line 9042: lns_loan_headers_all loan, lns_system_options_all lsysopt, hr_operating_units ou, gl_ledgers gl

9038: CURSOR loan_cur(C_LOAN_ID number) IS
9039: SELECT
9040: loan.loan_number, nvl(loan.disable_int_accrual_flag, 'N'), ou.name, gl.name
9041: FROM
9042: lns_loan_headers_all loan, lns_system_options_all lsysopt, hr_operating_units ou, gl_ledgers gl
9043: WHERE loan.loan_id = C_LOAN_ID
9044: AND loan.org_id = lsysopt.org_id
9045: AND lsysopt.set_of_books_id = gl.ledger_id
9046: AND loan.org_id = ou.organization_id;

Line 9088: FROM lns_loan_headers lhdr,

9084: AND err.event_id = C_EVENT_ID;
9085:
9086: CURSOR c_get_chart_acc_id(c_loan_id NUMBER) is
9087: SELECT sb.chart_of_accounts_id
9088: FROM lns_loan_headers lhdr,
9089: lns_system_options so,
9090: gl_ledgers sb,
9091: fnd_currencies fndc
9092: WHERE lhdr.loan_id = c_loan_id

Line 9103: GL_PERIOD_STATUSES glps, LNS_SYSTEM_OPTIONS sysopt, LNS_LOAN_HEADERS lhdr

9099: CURSOR cur_gl_period_status(C_LOAN_ID Number, C_PERIOD_NAME Varchar2) IS
9100: SELECT
9101: glps.closing_status
9102: FROM
9103: GL_PERIOD_STATUSES glps, LNS_SYSTEM_OPTIONS sysopt, LNS_LOAN_HEADERS lhdr
9104: WHERE lhdr.loan_id = C_LOAN_ID
9105: AND lhdr.org_id = sysopt.org_id
9106: AND sysopt.set_of_books_id = glps.ledger_id
9107: AND glps.application_id = 101

Line 9615: LNS_LOAN_HEADERS head, LNS_SYSTEM_OPTIONS sysopt

9611: CURSOR cur_loans_to_accrue_int(c_accrual_date DATE, C_LOAN_ID NUMBER, C_BORROWER_ID NUMBER, C_ORG_ID NUMBER, C_LEDGER_ID NUMBER) IS
9612: SELECT
9613: head.LOAN_ID
9614: FROM
9615: LNS_LOAN_HEADERS head, LNS_SYSTEM_OPTIONS sysopt
9616: WHERE
9617: head.org_id = sysopt.org_id
9618: AND sysopt.set_of_books_id = nvl(C_LEDGER_ID, sysopt.set_of_books_id)
9619: AND c_accrual_date >= NVL((select max(due_date) from LNS_AMORTIZATION_SCHEDS aschd

Line 10475: from lns_loan_headers lh

10471: where gl_books.set_of_books_id = (select set_of_books_id from lns_system_options);
10472:
10473: cursor C_LOAN_DETAILS(p_loan_id in number) is
10474: select org_id
10475: from lns_loan_headers lh
10476: where lh.loan_id = p_loan_id;
10477:
10478:
10479: