DBA Data[Home] [Help]

APPS.OE_RETROBILL_PVT dependencies on OE_PRICE_ADJUSTMENTS

Line 679: FROM oe_price_adjustments

675: ,p_line_id IN NUMBER) As
676: --bug3738043 start
677: CURSOR retro_list_line_ids IS
678: SELECT price_adjustment_id, list_line_id
679: FROM oe_price_adjustments
680: WHERE line_id = p_line_id
681: AND retrobill_request_id IS NOT NULL
682: AND list_line_type_code IN ('DIS', 'SUR', 'PBH');
683:

Line 686: FROM oe_price_adjustments

682: AND list_line_type_code IN ('DIS', 'SUR', 'PBH');
683:
684: cursor retro_inv_list_line_id(p_list_line_id in number, p_line_id in number) is
685: SELECT list_line_id
686: FROM oe_price_adjustments
687: WHERE line_id = p_line_id
688: AND retrobill_request_id IS NOT NULL
689: AND list_line_type_code IN ('DIS', 'SUR', 'PBH')
690: AND list_line_id = p_list_line_id

Line 717: DELETE From OE_PRICE_ADJUSTMENTS

713: oe_debug_pub.add('PVIPRANA: retrobill line_id: ' || p_line_id);
714: END IF;
715: --bug3738043 end
716:
717: DELETE From OE_PRICE_ADJUSTMENTS
718: WHERE line_id = p_line_id
719: AND retrobill_request_id IS NULL
720: AND list_line_type_code <> 'TAX';
721:

Line 742: UPDATE OE_PRICE_ADJUSTMENTS

738: end if;
739: --bug3738043 adding the following condition
740: IF (l_retro_exists AND l_line_adj_tbl(i).retrobill_request_id IS NOT NULL) OR
741: NOT l_retro_exists THEN
742: UPDATE OE_PRICE_ADJUSTMENTS
743: SET operand = l_line_adj_tbl(i).operand,
744: operand_per_pqty = l_line_adj_tbl(i).operand_per_pqty,
745: adjusted_amount = l_line_adj_tbl(i).adjusted_amount,
746: adjusted_amount_per_pqty = l_line_adj_tbl(i).adjusted_amount_per_pqty,

Line 768: SELECT Oe_Price_Adjustments_S.Nextval

764: l_line_adj_tbl(i).line_id := p_line_id;
765: l_line_adj_tbl(i).header_id := p_header_id;
766: l_line_adj_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
767:
768: SELECT Oe_Price_Adjustments_S.Nextval
769: INTO l_line_adj_tbl(i).price_adjustment_id
770: FROM dual;
771:
772: OE_LINE_ADJ_UTIL.Insert_Row(l_line_adj_tbl(i));

Line 827: DELETE FROM oe_price_adjustments

823:
824: IF l_new_price_adj_id_tbl.FIRST IS NOT NULL THEN
825:
826: FORALL i IN l_new_price_adj_id_tbl.FIRST..l_new_price_adj_id_tbl.LAST
827: DELETE FROM oe_price_adjustments
828: WHERE price_adjustment_id=l_new_price_adj_id_tbl(i);
829:
830: END IF;
831:

Line 2050: from oe_price_adjustments

2046: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2047:
2048: cursor l_debug_cur IS
2049: select operand,operand_per_pqty,list_line_id,applied_flag,arithmetic_operator,updated_flag,adjusted_amount,adjusted_amount_per_pqty
2050: from oe_price_adjustments
2051: where retrobill_request_id = G_CURRENT_RETROBILL_REQUEST_ID;
2052:
2053: Begin
2054:

Line 2065: INSERT INTO OE_PRICE_ADJUSTMENTS

2061:
2062: end loop;
2063: END IF;
2064:
2065: INSERT INTO OE_PRICE_ADJUSTMENTS
2066: ( PRICE_ADJUSTMENT_ID
2067: , CREATION_DATE
2068: , CREATED_BY
2069: , LAST_UPDATE_DATE

Line 2169: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id

2165: , LOCK_CONTROL
2166: , retrobill_request_id
2167: )
2168: ( SELECT /*+ ORDERED USE_NL(ldets lines qh) */
2169: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id
2170: , sysdate --p_Line_Adj_rec.creation_date
2171: , fnd_global.user_id --p_Line_Adj_rec.created_by
2172: , sysdate --p_Line_Adj_rec.last_update_date
2173: , fnd_global.user_id --p_Line_Adj_rec.last_updated_by

Line 2283: , OE_PRICE_ADJUSTMENTS oepj

2279: ,null --this offset adjustment should not have retrobill request id
2280: FROM QP_LDETS_v ldets
2281: , QP_PREQ_LINES_TMP lines
2282: , QP_LIST_HEADERS_B QH
2283: , OE_PRICE_ADJUSTMENTS oepj
2284: , OE_ORDER_LINES_ALL oeol
2285: WHERE
2286: ldets.list_header_id=qh.list_header_id
2287: --AND ldets.process_code=QP_PREQ_GRP.G_STATUS_NEW

Line 2312: /*UPDATE OE_PRICE_ADJUSTMENTS oepj

2308: END Insert_diff_Adj;
2309:
2310: Procedure Update_Diff_Adj AS
2311: Begin
2312: /*UPDATE OE_PRICE_ADJUSTMENTS oepj
2313: SET (operand,
2314: operand_per_pqty,
2315: adjusted_amount,
2316: adjusted_amount_per_pqty)

Line 2334: UPDATE OE_PRICE_ADJUSTMENTS adj

2330: End;
2331:
2332: Procedure Update_Existing_Retro_Adj AS
2333: Begin
2334: UPDATE OE_PRICE_ADJUSTMENTS adj
2335: SET ( operand
2336: , operand_per_pqty
2337: , adjusted_amount
2338: , adjusted_amount_per_pqty

Line 2442: INSERT INTO OE_PRICE_ADJUSTMENTS

2438: --bug3654144 Adding a new procedure to insert adjustment lines corresponding to new modifiers returns by pricing engine.
2439: PROCEDURE Insert_New_Adj As
2440: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2441: Begin
2442: INSERT INTO OE_PRICE_ADJUSTMENTS
2443: ( PRICE_ADJUSTMENT_ID
2444: , CREATION_DATE
2445: , CREATED_BY
2446: , LAST_UPDATE_DATE

Line 2546: -- oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id

2542: , LOCK_CONTROL
2543: , RETROBILL_REQUEST_ID
2544: )
2545: ( SELECT /*+ ORDERED USE_NL(ldets lines qh) */
2546: -- oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id
2547: ldets.price_adjustment_id
2548: , sysdate --p_Line_Adj_rec.creation_date
2549: , fnd_global.user_id --p_Line_Adj_rec.created_by
2550: , sysdate --p_Line_Adj_rec.last_update_date

Line 2737: INSERT INTO OE_PRICE_ADJUSTMENTS

2733: oe_debug_pub.add( 'pviprana INSERTED '||SQL%ROWCOUNT||' NEW PRICE ADJ ASSOCS' , 3 ) ;
2734: END IF;
2735:
2736:
2737: INSERT INTO OE_PRICE_ADJUSTMENTS
2738: ( PRICE_ADJUSTMENT_ID
2739: , CREATION_DATE
2740: , CREATED_BY
2741: , LAST_UPDATE_DATE

Line 2841: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id

2837: , LOCK_CONTROL
2838: , RETROBILL_REQUEST_ID
2839: )
2840: ( SELECT /*+ ORDERED USE_NL(ldets lines qh) */
2841: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id
2842: , sysdate --p_Line_Adj_rec.creation_date
2843: , fnd_global.user_id --p_Line_Adj_rec.created_by
2844: , sysdate --p_Line_Adj_rec.last_update_date
2845: , fnd_global.user_id --p_Line_Adj_rec.last_updated_by

Line 2982: -- This procedure selects the adjustments which were copied over to oe_price_adjustments

2978: Raise FND_API.G_EXC_ERROR;
2979: END Insert_New_Adj;
2980:
2981: --bug3654144 new procedure added
2982: -- This procedure selects the adjustments which were copied over to oe_price_adjustments
2983: --before the pricing engine call but are invalid in the setup,
2984: --and negates the adjusted_amount, operand etc so that the adjusted_amounts would tally
2985: --in the view adjustments form for the retrobill line.
2986: PROCEDURE Update_Invalid_Diff_Adj AS

Line 2989: FROM oe_price_adjustments adj

2985: --in the view adjustments form for the retrobill line.
2986: PROCEDURE Update_Invalid_Diff_Adj AS
2987: CURSOR invalid_price_adjs IS
2988: SELECT price_adjustment_id, list_line_id, list_line_type_code, line_id
2989: FROM oe_price_adjustments adj
2990: WHERE adj.list_line_id NOT IN
2991: (SELECT list_line_id
2992: FROM
2993: QP_LDETS_v ldets

Line 3038: UPDATE OE_PRICE_ADJUSTMENTS

3034: END IF;
3035:
3036: l_price_adjustment_id := invalid_price_adj.price_adjustment_id;
3037:
3038: UPDATE OE_PRICE_ADJUSTMENTS
3039: SET ( LAST_UPDATE_DATE
3040: , LIST_LINE_TYPE_CODE
3041: , UPDATED_FLAG
3042: , UPDATE_ALLOWED --bug3896248

Line 3066: FROM oe_price_adjustments adj

3062: , nvl(adj.adjusted_amount_per_pqty,0) * decode(l_line_category_code, 'ORDER', -1, 1) * decode(adj.list_line_type_code, 'DIS', -1, 'PBH', -1, 1)
3063: , nvl(adj.adjusted_amount_per_pqty,0) * decode(l_line_category_code, 'ORDER', -1, 1)
3064: , 1
3065: , null --this offset adjustment should not have retrobill request id
3066: FROM oe_price_adjustments adj
3067: , oe_order_lines_all oeol
3068: WHERE adj.price_adjustment_id = l_price_adjustment_id
3069: AND oeol.line_id=adj.line_id
3070: )

Line 4721: from oe_price_adjustments

4717: END IF;
4718:
4719: IF(p_price_adjustment_id is NOT NULL) THEN
4720: select list_line_id into l_list_line_id
4721: from oe_price_adjustments
4722: where price_adjustment_id = p_price_adjustment_id;
4723: END IF;
4724:
4725: IF (l_list_line_id is NOT NULL) THEN

Line 4730: SELECT adjusted_amount into l_adjusted_amount from oe_price_adjustments where

4726: -- Looping through the retrobill only lines and totalling the adjustments for the given list line id of Return retrobilled line
4727:
4728: FOR I IN G_Retro_Bill_Only_Line_Tbl.first.. G_Retro_Bill_Only_Line_Tbl.last LOOP
4729: BEGIN
4730: SELECT adjusted_amount into l_adjusted_amount from oe_price_adjustments where
4731: header_id = G_Retro_Bill_Only_Line_Tbl(i).header_id and
4732: line_id = G_Retro_Bill_Only_Line_Tbl(i).line_id and
4733: list_line_id = l_list_line_id and
4734: applied_flag = 'Y' and