2190: ;
2191:
2192: CURSOR l_get_item_csr (p_cle_id NUMBER) IS
2193: SELECT id, uom_code
2194: FROM OKC_K_ITEMS_V
2195: WHERE dnz_chr_id = p_chr_id
2196: AND cle_id = p_cle_id;
2197: ***/
2198:
2202: rlb.id sub_line_id, rlb.price_unit,
2203: ri.uom_code
2204: FROM okc_k_lines_b rla,
2205: okc_k_lines_b rlb,
2206: okc_k_items_v ri
2207: WHERE rla.dnz_chr_id = p_chr_id
2208: AND rla.lse_id IN (1,19)
2209: AND rla.date_cancelled IS NULL
2210: AND rlb.cle_id = rla.id
2272: FROM okc_k_lines_b
2273: WHERE id = l_service_id;
2274:
2275:
2276: /*** Get service item id for all the service lines from OKC_K_ITEMS_V ***/
2277: CURSOR l_csr_get_service_item_id(p_cle_id IN NUMBER) IS
2278: SELECT object1_id1
2279: FROM okc_k_items_v
2280: WHERE cle_id = p_cle_id ;
2275:
2276: /*** Get service item id for all the service lines from OKC_K_ITEMS_V ***/
2277: CURSOR l_csr_get_service_item_id(p_cle_id IN NUMBER) IS
2278: SELECT object1_id1
2279: FROM okc_k_items_v
2280: WHERE cle_id = p_cle_id ;
2281:
2282:
2283: /*** Get all product lines and item lines for each service line ***/
2288: AND lse_id IN (9, 25, 7); -- 7 added for bug#2430496
2289:
2290:
2291: /*** Get service item id or product item if for all the service lines
2292: *** or product lines from OKC_K_ITEMS_V ***/
2293: CURSOR l_csr_get_item_id(p_cle_id IN NUMBER) IS
2294: SELECT object1_id1
2295: FROM okc_k_items_v
2296: WHERE cle_id = p_cle_id ;
2291: /*** Get service item id or product item if for all the service lines
2292: *** or product lines from OKC_K_ITEMS_V ***/
2293: CURSOR l_csr_get_item_id(p_cle_id IN NUMBER) IS
2294: SELECT object1_id1
2295: FROM okc_k_items_v
2296: WHERE cle_id = p_cle_id ;
2297:
2298: CURSOR l_product_csr(p_cp_id NUMBER) IS
2299: SELECT inventory_item_id
6322: AND id = l_service_id;
6323:
6324:
6325:
6326: /*** Get service item id for all the service lines from OKC_K_ITEMS_V ***/
6327: CURSOR l_csr_get_service_item_id(p_cle_id IN NUMBER) IS
6328: SELECT object1_id1
6329: FROM okc_k_items_v
6330: WHERE cle_id = p_cle_id ;
6325:
6326: /*** Get service item id for all the service lines from OKC_K_ITEMS_V ***/
6327: CURSOR l_csr_get_service_item_id(p_cle_id IN NUMBER) IS
6328: SELECT object1_id1
6329: FROM okc_k_items_v
6330: WHERE cle_id = p_cle_id ;
6331:
6332:
6333: /*** Get all product lines and item lines for each service line ***/
6340: ;
6341:
6342:
6343: /*** Get service item id or product item if for all the service lines
6344: *** or product lines from OKC_K_ITEMS_V ***/
6345: -- For a covered item the inventory_item_id is
6346: -- stored inside of object1_id1
6347: -- For covered products the customer_product_id is stored inside of object1_id1
6348: CURSOR l_csr_get_item_id(p_cle_id IN NUMBER) IS
6346: -- stored inside of object1_id1
6347: -- For covered products the customer_product_id is stored inside of object1_id1
6348: CURSOR l_csr_get_item_id(p_cle_id IN NUMBER) IS
6349: SELECT object1_id1
6350: FROM okc_k_items_v
6351: WHERE cle_id = p_cle_id ;
6352:
6353: CURSOR l_product_csr(p_cp_id NUMBER) IS
6354: SELECT inventory_item_id