DBA Data[Home] [Help]

APPS.JAI_OE_OLA_TRIGGER_PKG dependencies on JAI_OM_OE_RMA_LINES

Line 49: DELETE JAI_OM_OE_RMA_LINES

45: v_gl_set_of_bks_id := l_func_curr_det.ledger_id;
46: v_currency_code := l_func_curr_det.currency_code;
47:
48: IF v_line_category_code = 'RETURN' THEN
49: DELETE JAI_OM_OE_RMA_LINES
50: WHERE rma_header_id = v_header_id
51: AND rma_line_id = v_line_id;
52:
53: DELETE FROM JAI_OM_OE_RMA_TAXES

Line 245: FROM JAI_OM_OE_RMA_LINES

241: WHERE line_id = p_line_id;
242:
243: CURSOR get_rma_lines_count_cur(p_line_id NUMBER) IS
244: SELECT COUNT(1)
245: FROM JAI_OM_OE_RMA_LINES
246: WHERE rma_line_id = v_line_id;
247:
248: CURSOR get_so_tax_lines_count_cur( p_header_id NUMBER, p_line_id NUMBER) IS
249: SELECT COUNT(1)

Line 341: Get the details from the JAI_OM_OE_RMA_LINES table.

337:
338: v_trigg_stat VARCHAR2(100);
339:
340: /* This cursor has been added by Aiyer for the fix of the bug #2798930.
341: Get the details from the JAI_OM_OE_RMA_LINES table.
342: */
343: CURSOR cur_get_rma_entry_lines (
344: p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,
345: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE

Line 344: p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,

340: /* This cursor has been added by Aiyer for the fix of the bug #2798930.
341: Get the details from the JAI_OM_OE_RMA_LINES table.
342: */
343: CURSOR cur_get_rma_entry_lines (
344: p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,
345: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE
346: )
347: IS
348: SELECT

Line 345: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE

341: Get the details from the JAI_OM_OE_RMA_LINES table.
342: */
343: CURSOR cur_get_rma_entry_lines (
344: p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,
345: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE
346: )
347: IS
348: SELECT
349: *

Line 351: JAI_OM_OE_RMA_LINES

347: IS
348: SELECT
349: *
350: FROM
351: JAI_OM_OE_RMA_LINES
352: WHERE
353: rma_header_id = p_header_id AND
354: rma_line_id = p_Line_Id ;
355:

Line 965: JAI_OM_OE_RMA_LINES

961: IS
962: SELECT
963: 'X'
964: FROM
965: JAI_OM_OE_RMA_LINES
966: WHERE
967: rma_line_id = p_line_id AND
968: rma_header_id = p_header_id ;
969:

Line 1078: select delivery_detail_id from JAI_OM_OE_RMA_LINES

1074: AND tax_type = cp_tax_type;
1075:
1076: /*Added by Bgowrava for Bug#6126581 */
1077: cursor cur_get_ddetail_id(p_source_document_id OE_ORDER_LINES_ALL.SOURCE_DOCUMENT_ID%TYPE , p_source_document_line_id OE_ORDER_LINES_ALL.SOURCE_DOCUMENT_LINE_ID%TYPE) is
1078: select delivery_detail_id from JAI_OM_OE_RMA_LINES
1079: where rma_header_id = p_source_document_id AND
1080: rma_line_id = p_source_document_line_id;
1081:
1082: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;

Line 1082: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;

1078: select delivery_detail_id from JAI_OM_OE_RMA_LINES
1079: where rma_header_id = p_source_document_id AND
1080: rma_line_id = p_source_document_line_id;
1081:
1082: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;
1083: /* END, Bug#6126581*/
1084:
1085: /*Added a parameter p_ddetail_id in the below cursor for Bug#6126581 */
1086: CURSOR c_get_detail_id(p_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type)

Line 1086: CURSOR c_get_detail_id(p_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type)

1082: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;
1083: /* END, Bug#6126581*/
1084:
1085: /*Added a parameter p_ddetail_id in the below cursor for Bug#6126581 */
1086: CURSOR c_get_detail_id(p_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type)
1087: IS
1088: SELECT
1089: wdd.delivery_detail_id,
1090: wnd.confirm_date

Line 1202: -- Insert a record into JAI_OM_OE_RMA_LINES

1198: IF a record does not exists with the newline_id and header_id
1199: only then go ahead with the insert
1200: */
1201: IF cur_rma_entry_line_exists%NOTFOUND THEN
1202: -- Insert a record into JAI_OM_OE_RMA_LINES
1203: INSERT INTO JAI_OM_OE_RMA_LINES
1204: (
1205: rma_line_number ,
1206: rma_line_id ,

Line 1203: INSERT INTO JAI_OM_OE_RMA_LINES

1199: only then go ahead with the insert
1200: */
1201: IF cur_rma_entry_line_exists%NOTFOUND THEN
1202: -- Insert a record into JAI_OM_OE_RMA_LINES
1203: INSERT INTO JAI_OM_OE_RMA_LINES
1204: (
1205: rma_line_number ,
1206: rma_line_id ,
1207: rma_header_id ,

Line 1452: UPDATE JAI_OM_OE_RMA_LINES

1448: END IF ; --IF cur_chk_rma_tax_lines_exists%NOTFOUND
1449: CLOSE cur_chk_rma_tax_lines_exists ;
1450: END LOOP;
1451:
1452: UPDATE JAI_OM_OE_RMA_LINES
1453: SET tax_amount = v_tax_total
1454: WHERE rma_line_id = v_line_id ;
1455:
1456: END IF ; --IF v_delivery_detail_id IS NOT NULL

Line 1488: -- need to insert into JAI_OM_OE_RMA_LINES from the source.

1484: THEN
1485: /*End of bug 5401180 */
1486: -- here need to code the cases where order category code is MIXED and line_category_code is RETURN
1487: -- this is typically the case where a legacy RMA is copied another legacy RMA
1488: -- need to insert into JAI_OM_OE_RMA_LINES from the source.
1489:
1490: DECLARE
1491:
1492: /* fetch the details of the original RMA order

Line 1496: FROM JAI_OM_OE_RMA_LINES

1492: /* fetch the details of the original RMA order
1493: */
1494: CURSOR c_rma_details(cp_rma_header_id number , cp_rma_line_id number) is
1495: SELECT *
1496: FROM JAI_OM_OE_RMA_LINES
1497: WHERE rma_header_id = cp_rma_header_id
1498: AND rma_line_id = cp_rma_line_id;
1499:
1500: /* get the new order number from oe_order_headers_all*/

Line 1520: insert into JAI_OM_OE_RMA_LINES

1516: open c_rma_number(pr_new.header_id );
1517: fetch c_rma_number into lv_rma_number;
1518: close c_rma_number;
1519:
1520: insert into JAI_OM_OE_RMA_LINES
1521: (
1522: rma_line_id ,
1523: rma_line_number ,
1524: rma_header_id ,

Line 2461: Due to this the record would be inserted into the JAI_OM_OE_RMA_LINES table instead of the

2457: Solution:-
2458: Added an NVL clause to the below IF statement .
2459: Now even if the Return_context is null it would be treated as = LEGACY
2460: and the v_transaction_name flag would be set to LEGACY.
2461: Due to this the record would be inserted into the JAI_OM_OE_RMA_LINES table instead of the
2462: JAI_OM_OE_SO_LINES table.
2463: */
2464: -- Start of bug #2979969
2465: IF pr_new.LINE_CATEGORY_CODE = 'RETURN' THEN

Line 2564: DELETE JAI_OM_OE_RMA_LINES

2560: END IF;
2561:
2562: IF ( v_transaction_name = 'RMA_LEGACY_INSERT') THEN
2563:
2564: DELETE JAI_OM_OE_RMA_LINES
2565: WHERE RMA_LINE_ID = V_LINE_ID;
2566: DELETE JAI_OM_OE_RMA_TAXES
2567: WHERE RMA_LINE_ID = V_LINE_ID;
2568: ELSE

Line 2695: utl_file.put_line(v_myfilehandle, ' BEFORE INSERTING RECORD INTO JAI_OM_OE_RMA_LINES ');

2691: END IF;
2692:
2693: IF v_transaction_name = 'RMA_LEGACY_INSERT' THEN
2694: IF v_debug = 'Y' THEN
2695: utl_file.put_line(v_myfilehandle, ' BEFORE INSERTING RECORD INTO JAI_OM_OE_RMA_LINES ');
2696: END IF;
2697: INSERT INTO JAI_OM_OE_RMA_LINES (
2698: rma_line_number,
2699: rma_line_id,

Line 2697: INSERT INTO JAI_OM_OE_RMA_LINES (

2693: IF v_transaction_name = 'RMA_LEGACY_INSERT' THEN
2694: IF v_debug = 'Y' THEN
2695: utl_file.put_line(v_myfilehandle, ' BEFORE INSERTING RECORD INTO JAI_OM_OE_RMA_LINES ');
2696: END IF;
2697: INSERT INTO JAI_OM_OE_RMA_LINES (
2698: rma_line_number,
2699: rma_line_id,
2700: rma_header_id,
2701: rma_number,

Line 3060: FROM JAI_OM_OE_RMA_LINES

3056:
3057: CURSOR c_ja_in_rma_lines (p_line_id NUMBER) IS
3058: SELECT quantity,
3059: assessable_value
3060: FROM JAI_OM_OE_RMA_LINES
3061: WHERE rma_line_id = p_line_id;
3062:
3063:
3064:

Line 3212: -- as the JAI_OM_OE_SO_LINES has no records for a return order and instead records are present in the JAI_OM_OE_RMA_LINES

3208: -- for the fix of bug # 3181926
3209: -- When a Legacy return order is created and line saved and if quantity is changed , this trigger was throwing up
3210: -- an exception - DIVIDE BY ZERO .The reason for this is that the cursor which fetches the old quantity and old
3211: -- assessable value fetched the values from the JAI_OM_OE_SO_LINES table. For a return order , this is not relevant
3212: -- as the JAI_OM_OE_SO_LINES has no records for a return order and instead records are present in the JAI_OM_OE_RMA_LINES
3213: -- table.
3214: -- code added by sriram includes adding the if statement below , adding the elsif condition and opening the cursor
3215: -- c_ja_in_rma_lines . This cursor definition also has been added by sriram.
3216: /*bduvarag for the bug#5256498 start*/

Line 3440: jai_om_oe_rma_lines

3436: */
3437:
3438: ELSIF pr_new.line_category_code = 'RETURN' THEN /*added by aiyer for the bug 5401180. Replaced return_context = legacy with this */
3439: UPDATE
3440: jai_om_oe_rma_lines
3441: SET
3442: quantity = v_quantity ,
3443: selling_price = v_selling_price ,
3444: assessable_value = v_assessable_value ,

Line 3557: from JAI_OM_OE_RMA_LINES

3553: /* Added for DFF Elimination by Ramananda. Bug#4348749 */
3554: cursor c_rma_line_dtls(cp_rma_line_id in number) is
3555: select delivery_detail_id, nvl(allow_excise_credit_flag, 'N') allow_excise_credit_flag , nvl(allow_sales_credit_flag, 'N') allow_sales_credit_flag,
3556: rate_per_unit, excise_duty_rate
3557: from JAI_OM_OE_RMA_LINES
3558: where rma_line_id = cp_rma_line_id;
3559:
3560: ln_delivery_detail_id number;
3561: lv_allow_excise_flag varchar2(1);