DBA Data[Home] [Help]

APPS.OZF_OFFER_PVT dependencies on OZF_OFFER_DISCOUNT_LINES

Line 149: -- Changed function to query ozf_offer_discount_lines and ozf_offer_discount_products

145: -- If The Security profile is off, in which case local(operating unit specific offers cannot be created), clear the org_id and set the global_flag to Y, for the data sent to QP
146: -- while the org_id is sent to ozf_offers
147: -- If the Offer is Lumpsum or scandata then , raise an exception if the org_id is not passed in since scandata and lumpsum offers always are org specific
148: -- Fri Oct 21 2005:6/45 PM RSSHARMA r12 changes to function discount_lines_exist
149: -- Changed function to query ozf_offer_discount_lines and ozf_offer_discount_products
150: -- if offer type is VOLUME_OFFER
151: -- Mon Oct 31 2005:3/1 PM RSSHARMA Fixed bug # 4706367. Raise Error for Lumpsum and scandata only if it is null or g_miss in create mode
152: -- and null indicated by (g_miss) in update mode
153: -- Mon Nov 14 2005:4/45 PM Fixed bug # 4625922. Due to issues in process_regular_discounts, the user was not able to perform any database operations

Line 331: FROM ozf_offer_discount_lines

327: l_offer_discount_line_id NUMBER := -1;
328: BEGIN
329:
330: SELECT min(offer_discount_line_id) INTO l_offer_discount_line_id
331: FROM ozf_offer_discount_lines
332: WHERE offer_id = p_offer_id AND tier_type ='PBH';
333:
334: IF(l_offer_discount_line_id IS NULL) THEN
335: RETURN -1;

Line 8982: Changed function to query ozf_offer_discount_lines and ozf_offer_discount_products

8978: This function checks id active discount rules exist for an offer.
8979: If active discount rules exist for the offer then the function returns 0
8980: else it returns -1
8981: r12 changes
8982: Changed function to query ozf_offer_discount_lines and ozf_offer_discount_products
8983: if offer type is VOLUME_OFFER
8984: */
8985: FUNCTION discount_lines_exist(p_list_header_id IN NUMBER) RETURN NUMBER
8986: IS

Line 9001: 'X' FROM ozf_offer_discount_lines a, ozf_offer_discount_products b, ozf_offers c

8997: WHERE qp_list_header_id = cp_listHeaderId;
8998:
8999: CURSOR c_voCnt(cp_listHeaderId NUMBER) IS
9000: SELECT 1 FROM dual WHERE EXISTS(SELECT
9001: 'X' FROM ozf_offer_discount_lines a, ozf_offer_discount_products b, ozf_offers c
9002: WHERE a.offer_discount_line_id = b.offer_discount_line_id
9003: AND a.offer_id = c.offer_id
9004: AND c.qp_list_header_id = cp_listHeaderId
9005: );

Line 9278: FROM ozf_offer_discount_lines

9274: WHERE list_header_id = p_modifier_list_rec.qp_list_header_id;
9275:
9276: CURSOR c_na_line IS
9277: SELECT COUNT(*)
9278: FROM ozf_offer_discount_lines
9279: WHERE offer_id =
9280: (SELECT offer_id FROM ozf_offers WHERE qp_list_header_id = p_modifier_list_rec.qp_list_header_id);
9281:
9282: CURSOR c_prg_buy_count IS

Line 9308: SELECT count(*) FROM ozf_offer_discount_products a, ozf_offer_discount_lines b

9304: AND arc_act_budget_used_by = 'OFFR';
9305: -- end comment
9306:
9307: CURSOR c_vo_line (p_qp_list_header_id NUMBER)IS
9308: SELECT count(*) FROM ozf_offer_discount_products a, ozf_offer_discount_lines b
9309: WHERE a.offer_discount_line_id = b.offer_discount_line_id
9310: AND b.offer_id = (SELECT offer_id FROM ozf_offers WHERE qp_list_header_id = p_qp_list_header_id);
9311:
9312: CURSOR c_emptyDiscStruct(cp_qpListheaderId NUMBER) IS

Line 9314: ozf_offer_discount_lines a , ozf_offers b

9310: AND b.offer_id = (SELECT offer_id FROM ozf_offers WHERE qp_list_header_id = p_qp_list_header_id);
9311:
9312: CURSOR c_emptyDiscStruct(cp_qpListheaderId NUMBER) IS
9313: SELECT 1 FROM
9314: ozf_offer_discount_lines a , ozf_offers b
9315: WHERE a.tier_type = 'PBH'
9316: AND a.offer_id = b.offer_id --8013
9317: AND
9318: ( NOT EXISTS(SELECT 'X' FROM ozf_offer_discount_products WHERE offer_discount_line_id = a.offer_discount_line_id AND excluder_flag = 'N')

Line 9319: OR NOT EXISTS(SELECT 'X' FROM ozf_offer_discount_lines WHERE parent_discount_line_id = a.offer_discount_line_id)

9315: WHERE a.tier_type = 'PBH'
9316: AND a.offer_id = b.offer_id --8013
9317: AND
9318: ( NOT EXISTS(SELECT 'X' FROM ozf_offer_discount_products WHERE offer_discount_line_id = a.offer_discount_line_id AND excluder_flag = 'N')
9319: OR NOT EXISTS(SELECT 'X' FROM ozf_offer_discount_lines WHERE parent_discount_line_id = a.offer_discount_line_id)
9320: )
9321: AND b.qp_list_header_id = cp_qpListheaderId;
9322:
9323: l_emptyDiscStruct VARCHAR2(1) := NULL;

Line 10309: FROM ozf_offer_discount_products a, ozf_offer_discount_lines b

10305: , b.volume_break_type
10306: , b.volume_type
10307: , b.discount_type
10308: , b.uom_code
10309: FROM ozf_offer_discount_products a, ozf_offer_discount_lines b
10310: WHERE a.offer_discount_line_id = b.offer_discount_line_id
10311: AND a.off_discount_product_id = cp_offDiscountProductId;
10312: BEGIN
10313: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 10355: l_discountLineId ozf_offer_discount_lines.offer_discount_line_id%TYPE;

10351: CURSOR c_discountLineId(cp_offDiscountProductId NUMBER) IS
10352: SELECT offer_discount_line_id
10353: FROM ozf_offer_discount_products
10354: WHERE off_discount_product_id = cp_offDiscountProductId ;
10355: l_discountLineId ozf_offer_discount_lines.offer_discount_line_id%TYPE;
10356: BEGIN
10357: OPEN c_discountLineId(cp_offDiscountProductId => p_offDiscountProductId);
10358: FETCH c_discountLineId INTO l_discountLineId;
10359: IF c_discountLineId%NOTFOUND THEN

Line 10411: FROM ozf_offer_discount_lines a, ozf_offer_discount_products b

10407: IS
10408: CURSOR c_discounts( cp_offDiscountProductId NUMBER) IS
10409: SELECT a.volume_break_type
10410: , a.discount_type
10411: FROM ozf_offer_discount_lines a, ozf_offer_discount_products b
10412: WHERE a.offer_discount_line_id = b.offer_discount_line_id
10413: AND b.off_discount_product_id = cp_offDiscountProductId;
10414: BEGIN
10415: x_return_status := FND_API.G_RET_STS_SUCCESS;

Line 10457: FROM ozf_offer_discount_lines a, ozf_offer_discount_lines b, ozf_offer_discount_products c

10453: SELECT decode(c.apply_discount_flag, 'N',0,a.discount) discount
10454: , decode(c.apply_discount_flag, 'N',null,a.formula_id) formula_id
10455: , b.volume_break_type
10456: , b.discount_type
10457: FROM ozf_offer_discount_lines a, ozf_offer_discount_lines b, ozf_offer_discount_products c
10458: WHERE a.parent_discount_line_id = b.offer_discount_line_id
10459: AND b.offer_discount_line_id = c.offer_discount_line_id
10460: AND c.excluder_flag = 'N'
10461: AND c.off_discount_product_id = cp_offDiscountProductId

Line 10500: FROM ozf_offer_discount_lines a, ozf_offer_discount_products b

10496: RETURN NUMBER
10497: IS
10498: CURSOR c_minVolume(cp_offDiscountProductId NUMBER) IS
10499: SELECT min(volume_from)
10500: FROM ozf_offer_discount_lines a, ozf_offer_discount_products b
10501: WHERE a.parent_discount_line_id = b.offer_discount_line_id
10502: AND b.off_discount_product_id = cp_offDiscountProductId;
10503:
10504: l_minVolume OZF_OFFER_DISCOUNT_LINES.volume_from%TYPE;

Line 10504: l_minVolume OZF_OFFER_DISCOUNT_LINES.volume_from%TYPE;

10500: FROM ozf_offer_discount_lines a, ozf_offer_discount_products b
10501: WHERE a.parent_discount_line_id = b.offer_discount_line_id
10502: AND b.off_discount_product_id = cp_offDiscountProductId;
10503:
10504: l_minVolume OZF_OFFER_DISCOUNT_LINES.volume_from%TYPE;
10505: BEGIN
10506: OPEN c_minVolume(cp_offDiscountProductId => p_offDiscountProductId);
10507: FETCH c_minVolume INTO l_minVolume;
10508: IF c_minVolume%NOTFOUND THEN

Line 10527: FROM ozf_offer_discount_lines a, ozf_offer_discount_products b

10523: )
10524: IS
10525: CURSOR c_discounts(cp_offerDiscountProductId NUMBER) IS
10526: SELECT a.offer_discount_line_id
10527: FROM ozf_offer_discount_lines a, ozf_offer_discount_products b
10528: WHERE a.parent_discount_line_id = b.offer_discount_line_id
10529: AND b.off_discount_product_id = cp_offerDiscountProductId;
10530: i NUMBER;
10531: BEGIN

Line 10639: FROM ozf_offer_discount_lines

10635: )
10636: IS
10637: CURSOR c_volume(cp_offerDiscountLineId NUMBER) IS
10638: SELECT volume_from, volume_to
10639: FROM ozf_offer_discount_lines
10640: WHERE offer_discount_line_id = cp_offerDiscountLineId ;
10641: BEGIN
10642: x_return_status := FND_API.G_RET_STS_SUCCESS;
10643: IF p_offerDiscountLineId = -1 THEN