DBA Data[Home] [Help]

APPS.JAI_OM_TAX_PROCESSING_PKG dependencies on JAI_OM_OE_RMA_LINES

Line 813: Get the details from the JAI_OM_OE_RMA_LINES table.

809: */
810: PROCEDURE COPY_RETURN_TO_ORDER(pr_order_line t_rec%type,
811: pr_header_info get_header_info%rowtype) IS
812: /*
813: Get the details from the JAI_OM_OE_RMA_LINES table.
814: */
815: CURSOR cur_get_rma_entry_lines(p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,
816: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE) IS
817: SELECT *

Line 815: CURSOR cur_get_rma_entry_lines(p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,

811: pr_header_info get_header_info%rowtype) IS
812: /*
813: Get the details from the JAI_OM_OE_RMA_LINES table.
814: */
815: CURSOR cur_get_rma_entry_lines(p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,
816: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE) IS
817: SELECT *
818: FROM JAI_OM_OE_RMA_LINES
819: WHERE rma_header_id = p_header_id

Line 816: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE) IS

812: /*
813: Get the details from the JAI_OM_OE_RMA_LINES table.
814: */
815: CURSOR cur_get_rma_entry_lines(p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,
816: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE) IS
817: SELECT *
818: FROM JAI_OM_OE_RMA_LINES
819: WHERE rma_header_id = p_header_id
820: AND rma_line_id = p_Line_Id;

Line 818: FROM JAI_OM_OE_RMA_LINES

814: */
815: CURSOR cur_get_rma_entry_lines(p_header_id JAI_OM_OE_RMA_LINES.RMA_HEADER_ID%TYPE,
816: p_Line_Id JAI_OM_OE_RMA_LINES.RMA_LINE_ID%TYPE) IS
817: SELECT *
818: FROM JAI_OM_OE_RMA_LINES
819: WHERE rma_header_id = p_header_id
820: AND rma_line_id = p_Line_Id;
821:
822: CURSOR cur_source_line_id_exists(p_line_id OE_ORDER_LINES_ALL.LINE_ID%TYPE,

Line 1128: FROM JAI_OM_OE_RMA_LINES

1124:
1125: CURSOR cur_rma_entry_line_exists(p_line_id OE_ORDER_LINES_ALL.LINE_ID%TYPE,
1126: p_header_id OE_ORDER_LINES_ALL.HEADER_ID%TYPE) IS
1127: SELECT 'X'
1128: FROM JAI_OM_OE_RMA_LINES
1129: WHERE rma_line_id = p_line_id
1130: AND rma_header_id = p_header_id;
1131:
1132: l_exists VARCHAR2(1);

Line 1213: from JAI_OM_OE_RMA_LINES

1209:
1210: cursor cur_get_ddetail_id(p_source_document_id OE_ORDER_LINES_ALL.SOURCE_DOCUMENT_ID%TYPE,
1211: p_source_document_line_id OE_ORDER_LINES_ALL.SOURCE_DOCUMENT_LINE_ID%TYPE) is
1212: select delivery_detail_id
1213: from JAI_OM_OE_RMA_LINES
1214: where rma_header_id = p_source_document_id
1215: AND rma_line_id = p_source_document_line_id;
1216:
1217: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;

Line 1217: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;

1213: from JAI_OM_OE_RMA_LINES
1214: where rma_header_id = p_source_document_id
1215: AND rma_line_id = p_source_document_line_id;
1216:
1217: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;
1218:
1219: CURSOR c_get_detail_id(p_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type) IS
1220: SELECT wdd.delivery_detail_id, wnd.confirm_date
1221: FROM wsh_delivery_details wdd,

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

1215: AND rma_line_id = p_source_document_line_id;
1216:
1217: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;
1218:
1219: CURSOR c_get_detail_id(p_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type) IS
1220: SELECT wdd.delivery_detail_id, wnd.confirm_date
1221: FROM wsh_delivery_details wdd,
1222: wsh_delivery_assignments wda,
1223: wsh_new_deliveries wnd

Line 1361: -- Insert a record into JAI_OM_OE_RMA_LINES

1357: IF a record does not exists with the newline_id and header_id
1358: only then go ahead with the insert
1359: */
1360: IF cur_rma_entry_line_exists%NOTFOUND THEN
1361: -- Insert a record into JAI_OM_OE_RMA_LINES
1362: INSERT INTO JAI_OM_OE_RMA_LINES
1363: (rma_line_number,
1364: rma_line_id,
1365: rma_header_id,

Line 1362: INSERT INTO JAI_OM_OE_RMA_LINES

1358: only then go ahead with the insert
1359: */
1360: IF cur_rma_entry_line_exists%NOTFOUND THEN
1361: -- Insert a record into JAI_OM_OE_RMA_LINES
1362: INSERT INTO JAI_OM_OE_RMA_LINES
1363: (rma_line_number,
1364: rma_line_id,
1365: rma_header_id,
1366: rma_number,

Line 1617: UPDATE JAI_OM_OE_RMA_LINES

1613: END IF; --IF cur_chk_rma_tax_lines_exists%NOTFOUND
1614: CLOSE cur_chk_rma_tax_lines_exists;
1615: END LOOP;
1616:
1617: UPDATE JAI_OM_OE_RMA_LINES
1618: SET tax_amount = v_tax_total
1619: WHERE rma_line_id = pr_order_line.line_id;
1620:
1621: -- need to process copying taxes from referenced SO line for non-shippable RMA line whose delivery_detail_id is NULL

Line 1838: FROM JAI_OM_OE_RMA_LINES

1834: */
1835: CURSOR c_rma_details(cp_rma_header_id number,
1836: cp_rma_line_id number) is
1837: SELECT *
1838: FROM JAI_OM_OE_RMA_LINES
1839: WHERE rma_header_id = cp_rma_header_id
1840: AND rma_line_id = cp_rma_line_id;
1841:
1842: /* get the new order number from oe_order_headers_all*/

Line 1877: FROM JAI_OM_OE_RMA_LINES

1873:
1874: CURSOR cur_rma_entry_line_exists(p_line_id OE_ORDER_LINES_ALL.LINE_ID%TYPE,
1875: p_header_id OE_ORDER_LINES_ALL.HEADER_ID%TYPE) IS
1876: SELECT 'X'
1877: FROM JAI_OM_OE_RMA_LINES
1878: WHERE rma_line_id = p_line_id
1879: AND rma_header_id = p_header_id;
1880:
1881: l_exists VARCHAR2(1);

Line 1969: from JAI_OM_OE_RMA_LINES

1965:
1966: cursor cur_get_ddetail_id(p_source_document_id OE_ORDER_LINES_ALL.SOURCE_DOCUMENT_ID%TYPE,
1967: p_source_document_line_id OE_ORDER_LINES_ALL.SOURCE_DOCUMENT_LINE_ID%TYPE) is
1968: select delivery_detail_id
1969: from JAI_OM_OE_RMA_LINES
1970: where rma_header_id = p_source_document_id
1971: AND rma_line_id = p_source_document_line_id;
1972:
1973: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;

Line 1973: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;

1969: from JAI_OM_OE_RMA_LINES
1970: where rma_header_id = p_source_document_id
1971: AND rma_line_id = p_source_document_line_id;
1972:
1973: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;
1974:
1975: CURSOR c_get_detail_id(p_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type) IS
1976: SELECT wdd.delivery_detail_id, wnd.confirm_date
1977: FROM wsh_delivery_details wdd,

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

1971: AND rma_line_id = p_source_document_line_id;
1972:
1973: v_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type;
1974:
1975: CURSOR c_get_detail_id(p_ddetail_id JAI_OM_OE_RMA_LINES.delivery_detail_id%type) IS
1976: SELECT wdd.delivery_detail_id, wnd.confirm_date
1977: FROM wsh_delivery_details wdd,
1978: wsh_delivery_assignments wda,
1979: wsh_new_deliveries wnd

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

2040:
2041: BEGIN
2042: -- here need to code the cases where order category code is MIXED and line_category_code is RETURN
2043: -- this is typically the case where a legacy RMA is copied another legacy RMA
2044: -- need to insert into JAI_OM_OE_RMA_LINES from the source.
2045:
2046: IF pr_order_line.return_context IS NULL THEN
2047:
2048: px_return_code := jai_constants.successful;

Line 2061: insert into JAI_OM_OE_RMA_LINES

2057: fetch c_rma_number
2058: into lv_rma_number;
2059: close c_rma_number;
2060:
2061: insert into JAI_OM_OE_RMA_LINES
2062: (rma_line_id,
2063: rma_line_number,
2064: rma_header_id,
2065: rma_number,

Line 2194: INSERT INTO JAI_OM_OE_RMA_LINES

2190: only then go ahead with the insert
2191: */
2192: IF cur_rma_entry_line_exists%NOTFOUND THEN
2193:
2194: INSERT INTO JAI_OM_OE_RMA_LINES
2195: (rma_line_number,
2196: rma_line_id,
2197: rma_header_id,
2198: rma_number,

Line 2451: UPDATE JAI_OM_OE_RMA_LINES

2447: END IF; --IF cur_chk_rma_tax_lines_exists%NOTFOUND
2448: CLOSE cur_chk_rma_tax_lines_exists;
2449: END LOOP;
2450:
2451: UPDATE JAI_OM_OE_RMA_LINES
2452: SET tax_amount = v_tax_total
2453: WHERE rma_line_id = pr_order_line.line_id;
2454:
2455: -- need to process copying taxes from referenced SO line for non-shippable RMA line whose delivery_detail_id is NULL

Line 2731: FROM JAI_OM_OE_RMA_LINES

2727: AND line_id = p_line_id;
2728:
2729: CURSOR get_rma_lines_count_cur(p_line_id NUMBER) IS
2730: SELECT COUNT(1)
2731: FROM JAI_OM_OE_RMA_LINES
2732: WHERE rma_line_id = pr_order_line.line_id;
2733:
2734: CURSOR get_so_lines_count_cur(p_line_id NUMBER) IS
2735: SELECT COUNT(1)

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

2791: Solution:-
2792: Added an NVL clause to the below IF statement .
2793: Now even if the Return_context is null it would be treated as = LEGACY
2794: and the v_transaction_name flag would be set to LEGACY.
2795: Due to this the record would be inserted into the JAI_OM_OE_RMA_LINES table instead of the
2796: JAI_OM_OE_SO_LINES table.
2797: */
2798: IF pr_order_line.LINE_CATEGORY_CODE = 'RETURN' THEN
2799: IF pr_order_line.return_context IS NULL THEN

Line 2877: DELETE JAI_OM_OE_RMA_LINES WHERE RMA_LINE_ID = pr_order_line.line_id;

2873: END IF;
2874:
2875: IF (v_transaction_name = 'RMA_LEGACY_INSERT') THEN
2876:
2877: DELETE JAI_OM_OE_RMA_LINES WHERE RMA_LINE_ID = pr_order_line.line_id;
2878: DELETE JAI_OM_OE_RMA_TAXES WHERE RMA_LINE_ID = pr_order_line.line_id;
2879: ELSE
2880: DELETE JAI_OM_OE_SO_LINES WHERE LINE_ID = pr_order_line.line_id;
2881: DELETE JAI_OM_OE_SO_TAXES WHERE Line_ID = pr_order_line.line_id;

Line 3069: ' BEFORE INSERTING RECORD INTO JAI_OM_OE_RMA_LINES ');

3065:
3066: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
3067: FND_LOG.STRING(G_LEVEL_STATEMENT,
3068: G_MODULE_NAME || v_api_name,
3069: ' BEFORE INSERTING RECORD INTO JAI_OM_OE_RMA_LINES ');
3070: END IF;
3071: INSERT INTO JAI_OM_OE_RMA_LINES
3072: (rma_line_number,
3073: rma_line_id,

Line 3071: INSERT INTO JAI_OM_OE_RMA_LINES

3067: FND_LOG.STRING(G_LEVEL_STATEMENT,
3068: G_MODULE_NAME || v_api_name,
3069: ' BEFORE INSERTING RECORD INTO JAI_OM_OE_RMA_LINES ');
3070: END IF;
3071: INSERT INTO JAI_OM_OE_RMA_LINES
3072: (rma_line_number,
3073: rma_line_id,
3074: rma_header_id,
3075: rma_number,

Line 4046: FROM JAI_OM_OE_RMA_LINES

4042: WHERE line_id = p_line_id;
4043:
4044: CURSOR c_ja_in_rma_lines(p_line_id NUMBER) IS
4045: SELECT quantity, assessable_value
4046: FROM JAI_OM_OE_RMA_LINES
4047: WHERE rma_line_id = p_line_id;
4048:
4049: CURSOR bind_cur(p_header_id NUMBER) IS
4050: SELECT org_id,

Line 4181: -- 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

4177: -- the following if condition " if pr_new.LINE_CATEGORY_CODE = 'RETURN' then " added by sriram
4178: -- When a Legacy return order is created and line saved and if quantity is changed , this trigger was throwing up
4179: -- an exception - DIVIDE BY ZERO .The reason for this is that the cursor which fetches the old quantity and old
4180: -- assessable value fetched the values from the JAI_OM_OE_SO_LINES table. For a return order , this is not relevant
4181: -- 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
4182: -- table.
4183: -- code added by sriram includes adding the if statement below , adding the elsif condition and opening the cursor
4184: -- c_ja_in_rma_lines . This cursor definition also has been added by sriram.
4185:

Line 4435: UPDATE jai_om_oe_rma_lines

4431: END IF;
4432:
4433: ELSIF pr_new.line_category_code = 'RETURN' THEN
4434:
4435: UPDATE jai_om_oe_rma_lines
4436: SET quantity = v_quantity,
4437: uom = v_uom_code,
4438: selling_price = v_selling_price,
4439: assessable_value = v_assessable_value,

Line 4556: from JAI_OM_OE_RMA_LINES

4552: nvl(allow_excise_credit_flag, 'N') allow_excise_credit_flag,
4553: nvl(allow_sales_credit_flag, 'N') allow_sales_credit_flag,
4554: rate_per_unit,
4555: excise_duty_rate
4556: from JAI_OM_OE_RMA_LINES
4557: where rma_line_id = cp_rma_line_id;
4558:
4559: ln_delivery_detail_id number;
4560: lv_allow_excise_flag varchar2(1);