DBA Data[Home] [Help]

APPS.OE_LINE_UTIL dependencies on OE_PRICE_ADJUSTMENTS

Line 5229: from oe_price_adjustments where

5225: AND p_old_line_rec.freight_terms_code <> FND_API.G_MISS_CHAR)))
5226: THEN
5227: IF OE_GLOBALS.G_FTE_REINVOKE IS NULL THEN
5228: Select Count(*) into l_fte_count
5229: from oe_price_adjustments where
5230: header_id = p_x_line_rec.header_id
5231: and LIST_LINE_TYPE_CODE = 'OM_CALLED_CHOOSE_SHIP_METHOD';
5232: if l_debug_level > 0 then
5233: oe_debug_pub.add( 'Value of fte count '||l_fte_count);

Line 16435: select count(*) into v_count from oe_price_adjustments

16431: IF (nvl(p_x_line_rec.split_by,'X') <> 'SYSTEM' and
16432: NVL(p_x_line_rec.split_action_code,'X') <> 'SPLIT') THEN
16433:
16434: --bug 4190357
16435: select count(*) into v_count from oe_price_adjustments
16436: where line_id = p_x_line_rec.line_id
16437: and substitution_attribute = 'QUALIFIER_ATTRIBUTE11'
16438: and list_line_type_code = 'TSN'
16439: and modified_to = p_x_line_rec.shipping_method_code;

Line 16444: DELETE FROM OE_PRICE_ADJUSTMENTS

16440: IF v_count > 0 THEN
16441: IF l_debug_level > 0 THEN
16442: oe_debug_pub.add('Deleting the tsn adjustments');
16443: END IF;
16444: DELETE FROM OE_PRICE_ADJUSTMENTS
16445: WHERE LINE_ID = p_x_line_rec.line_id
16446: AND LIST_LINE_TYPE_CODE = 'TSN'
16447: AND SUBSTITUTION_ATTRIBUTE = 'QUALIFIER_ATTRIBUTE11'
16448: AND MODIFIED_TO = p_x_line_rec.shipping_method_code

Line 22086: oe_price_adjustments opa1,

22082: --parent line assocation id through the OE_PRICE_ADJ_ASSOCS table
22083: CURSOR C1 IS
22084: SELECT opa1.price_adjustment_id, opa2.price_adjustment_id, opa1.line_id
22085: FROM
22086: oe_price_adjustments opa1,
22087: oe_price_adj_assocs opaa,
22088: oe_price_adjustments opa2
22089: WHERE
22090: opa1.line_id = p_old_line_rec.line_id

Line 22088: oe_price_adjustments opa2

22084: SELECT opa1.price_adjustment_id, opa2.price_adjustment_id, opa1.line_id
22085: FROM
22086: oe_price_adjustments opa1,
22087: oe_price_adj_assocs opaa,
22088: oe_price_adjustments opa2
22089: WHERE
22090: opa1.line_id = p_old_line_rec.line_id
22091: AND opa1.price_adjustment_id = opaa.rltd_price_adj_id
22092: AND opaa.price_adjustment_id = opa2.price_adjustment_id

Line 22098: FROM oe_price_adjustments

22094:
22095: --cursor to find the IUE adjustments for this line
22096: CURSOR c2 IS
22097: SELECT price_adjustment_id
22098: FROM oe_price_adjustments
22099: where line_id=p_old_line_rec.line_id AND list_line_type_code='IUE';
22100:
22101: --variables to read the cursor C1 into
22102: parent_adj_id oe_price_adjustments.price_adjustment_id%TYPE;

Line 22102: parent_adj_id oe_price_adjustments.price_adjustment_id%TYPE;

22098: FROM oe_price_adjustments
22099: where line_id=p_old_line_rec.line_id AND list_line_type_code='IUE';
22100:
22101: --variables to read the cursor C1 into
22102: parent_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22103: child_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22104: child_line_id oe_price_adjustments.line_id%TYPE;
22105:
22106: iue_adj_id oe_price_adjustments.price_adjustment_id%TYPE;

Line 22103: child_adj_id oe_price_adjustments.price_adjustment_id%TYPE;

22099: where line_id=p_old_line_rec.line_id AND list_line_type_code='IUE';
22100:
22101: --variables to read the cursor C1 into
22102: parent_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22103: child_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22104: child_line_id oe_price_adjustments.line_id%TYPE;
22105:
22106: iue_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22107: app_f oe_price_adjustments.applied_flag%TYPE;

Line 22104: child_line_id oe_price_adjustments.line_id%TYPE;

22100:
22101: --variables to read the cursor C1 into
22102: parent_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22103: child_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22104: child_line_id oe_price_adjustments.line_id%TYPE;
22105:
22106: iue_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22107: app_f oe_price_adjustments.applied_flag%TYPE;
22108: up_f oe_price_adjustments.updated_flag%TYPE;

Line 22106: iue_adj_id oe_price_adjustments.price_adjustment_id%TYPE;

22102: parent_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22103: child_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22104: child_line_id oe_price_adjustments.line_id%TYPE;
22105:
22106: iue_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22107: app_f oe_price_adjustments.applied_flag%TYPE;
22108: up_f oe_price_adjustments.updated_flag%TYPE;
22109: row_count NUMBER;
22110:

Line 22107: app_f oe_price_adjustments.applied_flag%TYPE;

22103: child_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22104: child_line_id oe_price_adjustments.line_id%TYPE;
22105:
22106: iue_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22107: app_f oe_price_adjustments.applied_flag%TYPE;
22108: up_f oe_price_adjustments.updated_flag%TYPE;
22109: row_count NUMBER;
22110:
22111: BEGIN

Line 22108: up_f oe_price_adjustments.updated_flag%TYPE;

22104: child_line_id oe_price_adjustments.line_id%TYPE;
22105:
22106: iue_adj_id oe_price_adjustments.price_adjustment_id%TYPE;
22107: app_f oe_price_adjustments.applied_flag%TYPE;
22108: up_f oe_price_adjustments.updated_flag%TYPE;
22109: row_count NUMBER;
22110:
22111: BEGIN
22112: oe_debug_pub.ADD('Entering OE_LINE_UTIL.UPDATE_ADJUSTMENT_FLAGS',1);

Line 22122: /* DELETE FROM oe_price_adjustments

22118: RETURN;
22119: END IF;
22120:
22121: --deleting the IUE adjustment
22122: /* DELETE FROM oe_price_adjustments
22123: where line_id=p_old_line_rec.line_id AND list_line_type_code='IUE';*/
22124:
22125: oe_debug_pub.ADD('trying to delete IUE adjustments...',1);
22126: OPEN c2;

Line 22157: FROM oe_price_adj_assocs opaa,oe_price_adjustments opa

22153:
22154: --Find out the number of free items adjustments associated with this parent
22155: --(other then this item, we already deleted its adjustment)
22156: SELECT COUNT(*) INTO row_count
22157: FROM oe_price_adj_assocs opaa,oe_price_adjustments opa
22158: WHERE opaa.price_adjustment_id=parent_adj_id
22159: AND opaa.rltd_price_adj_id=opa.price_adjustment_id;
22160: oe_debug_pub.ADD('total '||row_count||' free child record(s)',1);
22161:

Line 22164: UPDATE oe_price_adjustments

22160: oe_debug_pub.ADD('total '||row_count||' free child record(s)',1);
22161:
22162: IF row_count>0 THEN
22163: --not the only free item, this adjustment is applied _and_ updated = 'Y'
22164: UPDATE oe_price_adjustments
22165: SET applied_flag='Y',updated_flag='Y'
22166: WHERE price_adjustment_id=parent_adj_id;
22167: oe_debug_pub.ADD('updated parent adjustment: applied_flag=Y,updated_flag=Y:'||SQL%rowcount||' row(s)',1);
22168: UPDATE oe_price_adjustments

Line 22168: UPDATE oe_price_adjustments

22164: UPDATE oe_price_adjustments
22165: SET applied_flag='Y',updated_flag='Y'
22166: WHERE price_adjustment_id=parent_adj_id;
22167: oe_debug_pub.ADD('updated parent adjustment: applied_flag=Y,updated_flag=Y:'||SQL%rowcount||' row(s)',1);
22168: UPDATE oe_price_adjustments
22169: SET updated_flag = 'Y' where price_adjustment_id in
22170: (select rltd_price_adj_id from oe_price_adj_assocs
22171: where price_adjustment_id = parent_adj_id);
22172: ELSE

Line 22174: UPDATE oe_price_adjustments

22170: (select rltd_price_adj_id from oe_price_adj_assocs
22171: where price_adjustment_id = parent_adj_id);
22172: ELSE
22173: --the last (or only) free item, make parent adjustment applied='N'
22174: UPDATE oe_price_adjustments
22175: SET applied_flag='N',updated_flag='Y'
22176: WHERE price_adjustment_id=parent_adj_id;
22177: oe_debug_pub.ADD('updated parent adjustment: applied_flag=N,updated_flag=Y:'||SQL%rowcount||' rows',1);
22178: END IF;

Line 22180: FROM oe_price_adjustments

22176: WHERE price_adjustment_id=parent_adj_id;
22177: oe_debug_pub.ADD('updated parent adjustment: applied_flag=N,updated_flag=Y:'||SQL%rowcount||' rows',1);
22178: END IF;
22179: SELECT applied_flag,updated_flag INTO app_f,up_f
22180: FROM oe_price_adjustments
22181: WHERE price_adjustment_id=parent_adj_id;
22182: oe_debug_pub.ADD('price_adjustment_id:'||parent_adj_id||' applied_flag='||app_f||' updated_flag='||up_f,1);
22183:
22184: