949: -- ie the line belonging to the PBH header line
950:
951: CURSOR c_lines(l_offer_id NUMBER) IS
952: SELECT offer_discount_line_id
953: FROM ozf_offer_discount_lines
954: WHERE offer_id = l_offer_id
955: AND offer_discount_line_id = NVL(p_lline_id, offer_discount_line_id)
956: AND tier_type = 'PBH';
957:
956: AND tier_type = 'PBH';
957:
958: CURSOR c_no_lines(l_offer_id NUMBER) IS
959: SELECT COUNT(*)
960: FROM ozf_offer_discount_lines
961: WHERE offer_id = l_offer_id
962: AND offer_discount_line_id = NVL(p_lline_id, offer_discount_line_id)
963: AND tier_type = 'PBH';
964:
2614: AND arc_act_product_used_by = 'OFFR'
2615: AND excluded_flag = 'N'
2616: UNION
2617: SELECT distinct offer_discount_line_id lline_id
2618: FROM ozf_offer_discount_lines a, ozf_offers b
2619: WHERE b.qp_list_header_id = ll_list_header_id
2620: AND a.offer_id = b.offer_id
2621: AND b.offer_type = 'VOLUME_OFFER'
2622: and a.tier_type = 'PBH'