[Home] [Help]
1485: -- If the new_chrId is from a renewed contract this cursor will return a record.
1486: -- It will not return any records if new_chrId is from a copied contract.
1487: Cursor got_renewed(new_chrId number) IS
1488: SELECT subject_chr_id new_chr_id
1489: FROM okc_operation_lines
1490: WHERE subject_chr_id =new_chrId;
1491:
1492: -- gets old and new item instance
1493: Cursor get_item_instance(chrId number, cleId number) IS
1504:
1505: Begin
1506: l_return_status := OKC_API.G_RET_STS_SUCCESS;
1507: l_intent := p_intent; --'RENEW' or NULL
1508: -- Renewed contracts have a record in okc_operation_lines
1509: If p_intent is null then
1510: open got_renewed(p_new_chr_id);
1511: Fetch got_renewed into l_temp;
1512: If got_renewed%NOTFOUND Then
2677: --get_old_chr_id_rec get_old_chr_id_csr%ROWTYPE;
2678:
2679: Cursor got_renewed(l_new_chr_id number) IS
2680: SELECT object_chr_id old_chr_id
2681: FROM okc_operation_lines
2682: WHERE subject_chr_id =l_new_chr_id and object_chr_id is not null;
2683:
2684: Cursor is_terminated(l_old_chr_id number) IS
2685: select line_number
4672: x_msg_data OUT NOCOPY VARCHAR2) IS
4673:
4674: CURSOR cur_has_lines_been_renewed_h IS -- header
4675: SELECT 1
4676: FROM okc_operation_lines a, okc_operation_instances b, okc_class_operations c
4677: where a.object_chr_id= p_chr_id and
4678: c.id=b.cop_id and
4679: c.opn_code in('RENEWAL', 'REN_CON') and
4680: a.oie_id=b.id and
4682:
4683:
4684: CURSOR cur_has_lines_been_renewed_l IS -- topline
4685: SELECT subject_cle_id
4686: FROM okc_operation_lines a,
4687: okc_operation_instances b,
4688: okc_class_operations c,
4689: okc_k_lines_b d
4690: where a.object_cle_id = d.id and
4698:
4699:
4700: CURSOR cur_has_lines_been_renewed_s IS -- Subline
4701: SELECT subject_chr_id
4702: FROM okc_operation_lines a, okc_operation_instances b, okc_class_operations c
4703: where a.object_cle_id= p_cle_id and -- subline id
4704: c.id=b.cop_id and
4705: c.opn_code in('RENEWAL', 'REN_CON') and
4706: a.oie_id=b.id and
4714: From okc_k_headers_b b
4715: where id = p_subject_chr_id;
4716:
4717: l_result NUMBER;
4718: l_sub_cle_id okc_operation_lines.subject_cle_id%TYPE;
4719: l_sub_chr_id okc_operation_lines.subject_chr_id%TYPE;
4720: l_contract_number OKC_K_HEADERS_B.contract_number%type;
4721: l_contract_modifier OKC_K_HEADERS_B.CONTRACT_NUMBER_MODIFIER%type;
4722:
4715: where id = p_subject_chr_id;
4716:
4717: l_result NUMBER;
4718: l_sub_cle_id okc_operation_lines.subject_cle_id%TYPE;
4719: l_sub_chr_id okc_operation_lines.subject_chr_id%TYPE;
4720: l_contract_number OKC_K_HEADERS_B.contract_number%type;
4721: l_contract_modifier OKC_K_HEADERS_B.CONTRACT_NUMBER_MODIFIER%type;
4722:
4723: BEGIN