DBA Data[Home] [Help]

APPS.OKL_CNTRCT_FIN_EXTRACT_PVT dependencies on OKL_TRX_CONTRACTS

Line 2652: CURSOR l_okl_trx_contracts_csr(cp_khr_id IN NUMBER) IS

2648: END amount_due_remaining;
2649:
2650: FUNCTION first_activation_date (p_chr_id NUMBER) return DATE IS
2651:
2652: CURSOR l_okl_trx_contracts_csr(cp_khr_id IN NUMBER) IS
2653: SELECT transaction_date
2654: FROM okl_trx_contracts_all
2655: WHERE khr_id = cp_khr_id
2656: AND try_id = 252879000775029305619701078073046135725 --'Booking' transaction id

Line 2654: FROM okl_trx_contracts_all

2650: FUNCTION first_activation_date (p_chr_id NUMBER) return DATE IS
2651:
2652: CURSOR l_okl_trx_contracts_csr(cp_khr_id IN NUMBER) IS
2653: SELECT transaction_date
2654: FROM okl_trx_contracts_all
2655: WHERE khr_id = cp_khr_id
2656: AND try_id = 252879000775029305619701078073046135725 --'Booking' transaction id
2657: AND tcn_type = 'BKG'
2658: ORDER BY transaction_date;

Line 2671: OPEN l_okl_trx_contracts_csr (p_chr_id );

2667: END IF;
2668:
2669: --Each time contract is Rebooked, a Booking transaction is created again. Hence
2670: --This cursor may return multiple rows. The first row identifies the first Booking transaction.
2671: OPEN l_okl_trx_contracts_csr (p_chr_id );
2672: FETCH l_okl_trx_contracts_csr INTO l_first_booking_dt;
2673: CLOSE l_okl_trx_contracts_csr;
2674:
2675: RETURN l_first_booking_dt;

Line 2672: FETCH l_okl_trx_contracts_csr INTO l_first_booking_dt;

2668:
2669: --Each time contract is Rebooked, a Booking transaction is created again. Hence
2670: --This cursor may return multiple rows. The first row identifies the first Booking transaction.
2671: OPEN l_okl_trx_contracts_csr (p_chr_id );
2672: FETCH l_okl_trx_contracts_csr INTO l_first_booking_dt;
2673: CLOSE l_okl_trx_contracts_csr;
2674:
2675: RETURN l_first_booking_dt;
2676:

Line 2673: CLOSE l_okl_trx_contracts_csr;

2669: --Each time contract is Rebooked, a Booking transaction is created again. Hence
2670: --This cursor may return multiple rows. The first row identifies the first Booking transaction.
2671: OPEN l_okl_trx_contracts_csr (p_chr_id );
2672: FETCH l_okl_trx_contracts_csr INTO l_first_booking_dt;
2673: CLOSE l_okl_trx_contracts_csr;
2674:
2675: RETURN l_first_booking_dt;
2676:
2677:

Line 2681: IF l_okl_trx_contracts_csr%ISOPEN THEN

2677:
2678: EXCEPTION
2679:
2680: WHEN OTHERS THEN
2681: IF l_okl_trx_contracts_csr%ISOPEN THEN
2682: CLOSE l_okl_trx_contracts_csr;
2683: END IF;
2684:
2685: Okl_Api.SET_MESSAGE(p_app_name => G_APP_NAME,

Line 2682: CLOSE l_okl_trx_contracts_csr;

2678: EXCEPTION
2679:
2680: WHEN OTHERS THEN
2681: IF l_okl_trx_contracts_csr%ISOPEN THEN
2682: CLOSE l_okl_trx_contracts_csr;
2683: END IF;
2684:
2685: Okl_Api.SET_MESSAGE(p_app_name => G_APP_NAME,
2686: p_msg_name => G_UNEXPECTED_ERROR,

Line 2714: FROM OKL_TRX_CONTRACTS trx, OKL_REPRESENTATIONS_V rep

2710: IS
2711:
2712: CURSOR accrual_status_csr (p_chr_id NUMBER) IS
2713: SELECT trx.accrual_status_yn accrual_status
2714: FROM OKL_TRX_CONTRACTS trx, OKL_REPRESENTATIONS_V rep
2715: WHERE trx.tcn_type = 'ACL'
2716: AND trx.khr_id = p_chr_id
2717: AND trx.tsu_code = 'PROCESSED'
2718: AND trx.representation_code = rep.representation_code

Line 2721: FROM OKL_TRX_CONTRACTS tcn

2717: AND trx.tsu_code = 'PROCESSED'
2718: AND trx.representation_code = rep.representation_code
2719: AND rep.representation_type='PRIMARY'
2720: AND trx.date_transaction_occurred = (SELECT MAX(tcn.date_transaction_occurred)
2721: FROM OKL_TRX_CONTRACTS tcn
2722: WHERE tcn.khr_id = trx.khr_id
2723: AND tcn.tcn_type = trx.tcn_type
2724: AND tcn.tsu_code = trx.tsu_code)
2725: AND trx.trx_number = (select to_char(max(to_number(t.trx_number)))

Line 2726: from okl_trx_contracts t

2722: WHERE tcn.khr_id = trx.khr_id
2723: AND tcn.tcn_type = trx.tcn_type
2724: AND tcn.tsu_code = trx.tsu_code)
2725: AND trx.trx_number = (select to_char(max(to_number(t.trx_number)))
2726: from okl_trx_contracts t
2727: where t.khr_id = trx.khr_id
2728: and t.tsu_code=trx.tsu_code
2729: and t.tcn_type=trx.tcn_type);
2730:

Line 2732: l_accrual_status OKL_TRX_CONTRACTS.accrual_status_yn%TYPE := NULL;

2728: and t.tsu_code=trx.tsu_code
2729: and t.tcn_type=trx.tcn_type);
2730:
2731:
2732: l_accrual_status OKL_TRX_CONTRACTS.accrual_status_yn%TYPE := NULL;
2733:
2734: BEGIN
2735:
2736: IF (p_chr_id IS NULL) THEN