DBA Data[Home] [Help]

APPS.OE_RETROBILL_PVT dependencies on OE_PRICE_ADJUSTMENTS

Line 667: FROM oe_price_adjustments

663: ,p_line_id IN NUMBER) As
664: --bug3738043 start
665: CURSOR retro_list_line_ids IS
666: SELECT price_adjustment_id, list_line_id
667: FROM oe_price_adjustments
668: WHERE line_id = p_line_id
669: AND retrobill_request_id IS NOT NULL
670: AND list_line_type_code IN ('DIS', 'SUR', 'PBH');
671:

Line 674: FROM oe_price_adjustments

670: AND list_line_type_code IN ('DIS', 'SUR', 'PBH');
671:
672: cursor retro_inv_list_line_id(p_list_line_id in number, p_line_id in number) is
673: SELECT list_line_id
674: FROM oe_price_adjustments
675: WHERE line_id = p_line_id
676: AND retrobill_request_id IS NOT NULL
677: AND list_line_type_code IN ('DIS', 'SUR', 'PBH')
678: AND list_line_id = p_list_line_id

Line 705: DELETE From OE_PRICE_ADJUSTMENTS

701: oe_debug_pub.add('PVIPRANA: retrobill line_id: ' || p_line_id);
702: END IF;
703: --bug3738043 end
704:
705: DELETE From OE_PRICE_ADJUSTMENTS
706: WHERE line_id = p_line_id
707: AND retrobill_request_id IS NULL
708: AND list_line_type_code <> 'TAX';
709:

Line 730: UPDATE OE_PRICE_ADJUSTMENTS

726: end if;
727: --bug3738043 adding the following condition
728: IF (l_retro_exists AND l_line_adj_tbl(i).retrobill_request_id IS NOT NULL) OR
729: NOT l_retro_exists THEN
730: UPDATE OE_PRICE_ADJUSTMENTS
731: SET operand = l_line_adj_tbl(i).operand,
732: operand_per_pqty = l_line_adj_tbl(i).operand_per_pqty,
733: adjusted_amount = l_line_adj_tbl(i).adjusted_amount,
734: adjusted_amount_per_pqty = l_line_adj_tbl(i).adjusted_amount_per_pqty,

Line 756: SELECT Oe_Price_Adjustments_S.Nextval

752: l_line_adj_tbl(i).line_id := p_line_id;
753: l_line_adj_tbl(i).header_id := p_header_id;
754: l_line_adj_tbl(1).operation := OE_GLOBALS.G_OPR_CREATE;
755:
756: SELECT Oe_Price_Adjustments_S.Nextval
757: INTO l_line_adj_tbl(i).price_adjustment_id
758: FROM dual;
759:
760: OE_LINE_ADJ_UTIL.Insert_Row(l_line_adj_tbl(i));

Line 815: DELETE FROM oe_price_adjustments

811:
812: IF l_new_price_adj_id_tbl.FIRST IS NOT NULL THEN
813:
814: FORALL i IN l_new_price_adj_id_tbl.FIRST..l_new_price_adj_id_tbl.LAST
815: DELETE FROM oe_price_adjustments
816: WHERE price_adjustment_id=l_new_price_adj_id_tbl(i);
817:
818: END IF;
819:

Line 1712: from oe_price_adjustments

1708: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
1709:
1710: cursor l_debug_cur IS
1711: select operand,operand_per_pqty,list_line_id,applied_flag,arithmetic_operator,updated_flag,adjusted_amount,adjusted_amount_per_pqty
1712: from oe_price_adjustments
1713: where retrobill_request_id = G_CURRENT_RETROBILL_REQUEST_ID;
1714:
1715: Begin
1716:

Line 1727: INSERT INTO OE_PRICE_ADJUSTMENTS

1723:
1724: end loop;
1725: END IF;
1726:
1727: INSERT INTO OE_PRICE_ADJUSTMENTS
1728: ( PRICE_ADJUSTMENT_ID
1729: , CREATION_DATE
1730: , CREATED_BY
1731: , LAST_UPDATE_DATE

Line 1831: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id

1827: , LOCK_CONTROL
1828: , retrobill_request_id
1829: )
1830: ( SELECT /*+ ORDERED USE_NL(ldets lines qh) */
1831: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id
1832: , sysdate --p_Line_Adj_rec.creation_date
1833: , fnd_global.user_id --p_Line_Adj_rec.created_by
1834: , sysdate --p_Line_Adj_rec.last_update_date
1835: , fnd_global.user_id --p_Line_Adj_rec.last_updated_by

Line 1945: , OE_PRICE_ADJUSTMENTS oepj

1941: ,null --this offset adjustment should not have retrobill request id
1942: FROM QP_LDETS_v ldets
1943: , QP_PREQ_LINES_TMP lines
1944: , QP_LIST_HEADERS_B QH
1945: , OE_PRICE_ADJUSTMENTS oepj
1946: , OE_ORDER_LINES_ALL oeol
1947: WHERE
1948: ldets.list_header_id=qh.list_header_id
1949: --AND ldets.process_code=QP_PREQ_GRP.G_STATUS_NEW

Line 1974: /*UPDATE OE_PRICE_ADJUSTMENTS oepj

1970: END Insert_diff_Adj;
1971:
1972: Procedure Update_Diff_Adj AS
1973: Begin
1974: /*UPDATE OE_PRICE_ADJUSTMENTS oepj
1975: SET (operand,
1976: operand_per_pqty,
1977: adjusted_amount,
1978: adjusted_amount_per_pqty)

Line 1996: UPDATE OE_PRICE_ADJUSTMENTS adj

1992: End;
1993:
1994: Procedure Update_Existing_Retro_Adj AS
1995: Begin
1996: UPDATE OE_PRICE_ADJUSTMENTS adj
1997: SET ( operand
1998: , operand_per_pqty
1999: , adjusted_amount
2000: , adjusted_amount_per_pqty

Line 2104: INSERT INTO OE_PRICE_ADJUSTMENTS

2100: --bug3654144 Adding a new procedure to insert adjustment lines corresponding to new modifiers returns by pricing engine.
2101: PROCEDURE Insert_New_Adj As
2102: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
2103: Begin
2104: INSERT INTO OE_PRICE_ADJUSTMENTS
2105: ( PRICE_ADJUSTMENT_ID
2106: , CREATION_DATE
2107: , CREATED_BY
2108: , LAST_UPDATE_DATE

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

2204: , LOCK_CONTROL
2205: , RETROBILL_REQUEST_ID
2206: )
2207: ( SELECT /*+ ORDERED USE_NL(ldets lines qh) */
2208: -- oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id
2209: ldets.price_adjustment_id
2210: , sysdate --p_Line_Adj_rec.creation_date
2211: , fnd_global.user_id --p_Line_Adj_rec.created_by
2212: , sysdate --p_Line_Adj_rec.last_update_date

Line 2399: INSERT INTO OE_PRICE_ADJUSTMENTS

2395: oe_debug_pub.add( 'pviprana INSERTED '||SQL%ROWCOUNT||' NEW PRICE ADJ ASSOCS' , 3 ) ;
2396: END IF;
2397:
2398:
2399: INSERT INTO OE_PRICE_ADJUSTMENTS
2400: ( PRICE_ADJUSTMENT_ID
2401: , CREATION_DATE
2402: , CREATED_BY
2403: , LAST_UPDATE_DATE

Line 2503: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id

2499: , LOCK_CONTROL
2500: , RETROBILL_REQUEST_ID
2501: )
2502: ( SELECT /*+ ORDERED USE_NL(ldets lines qh) */
2503: oe_price_adjustments_s.nextval -- p_Line_Adj_rec.price_adjustment_id
2504: , sysdate --p_Line_Adj_rec.creation_date
2505: , fnd_global.user_id --p_Line_Adj_rec.created_by
2506: , sysdate --p_Line_Adj_rec.last_update_date
2507: , fnd_global.user_id --p_Line_Adj_rec.last_updated_by

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

2640: Raise FND_API.G_EXC_ERROR;
2641: END Insert_New_Adj;
2642:
2643: --bug3654144 new procedure added
2644: -- This procedure selects the adjustments which were copied over to oe_price_adjustments
2645: --before the pricing engine call but are invalid in the setup,
2646: --and negates the adjusted_amount, operand etc so that the adjusted_amounts would tally
2647: --in the view adjustments form for the retrobill line.
2648: PROCEDURE Update_Invalid_Diff_Adj AS

Line 2651: FROM oe_price_adjustments adj

2647: --in the view adjustments form for the retrobill line.
2648: PROCEDURE Update_Invalid_Diff_Adj AS
2649: CURSOR invalid_price_adjs IS
2650: SELECT price_adjustment_id, list_line_id, list_line_type_code, line_id
2651: FROM oe_price_adjustments adj
2652: WHERE adj.list_line_id NOT IN
2653: (SELECT list_line_id
2654: FROM
2655: QP_LDETS_v ldets

Line 2700: UPDATE OE_PRICE_ADJUSTMENTS

2696: END IF;
2697:
2698: l_price_adjustment_id := invalid_price_adj.price_adjustment_id;
2699:
2700: UPDATE OE_PRICE_ADJUSTMENTS
2701: SET ( LAST_UPDATE_DATE
2702: , LIST_LINE_TYPE_CODE
2703: , UPDATED_FLAG
2704: , UPDATE_ALLOWED --bug3896248

Line 2728: FROM oe_price_adjustments adj

2724: , 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)
2725: , nvl(adj.adjusted_amount_per_pqty,0) * decode(l_line_category_code, 'ORDER', -1, 1)
2726: , 1
2727: , null --this offset adjustment should not have retrobill request id
2728: FROM oe_price_adjustments adj
2729: , oe_order_lines_all oeol
2730: WHERE adj.price_adjustment_id = l_price_adjustment_id
2731: AND oeol.line_id=adj.line_id
2732: )

Line 4296: from oe_price_adjustments

4292: END IF;
4293:
4294: IF(p_price_adjustment_id is NOT NULL) THEN
4295: select list_line_id into l_list_line_id
4296: from oe_price_adjustments
4297: where price_adjustment_id = p_price_adjustment_id;
4298: END IF;
4299:
4300: IF (l_list_line_id is NOT NULL) THEN

Line 4305: SELECT adjusted_amount into l_adjusted_amount from oe_price_adjustments where

4301: -- Looping through the retrobill only lines and totalling the adjustments for the given list line id of Return retrobilled line
4302:
4303: FOR I IN G_Retro_Bill_Only_Line_Tbl.first.. G_Retro_Bill_Only_Line_Tbl.last LOOP
4304: BEGIN
4305: SELECT adjusted_amount into l_adjusted_amount from oe_price_adjustments where
4306: header_id = G_Retro_Bill_Only_Line_Tbl(i).header_id and
4307: line_id = G_Retro_Bill_Only_Line_Tbl(i).line_id and
4308: list_line_id = l_list_line_id and
4309: applied_flag = 'Y' and