DBA Data[Home] [Help]

APPS.JAI_PO_PROC_PKG dependencies on JAI_PO_LINE_LOCATIONS

Line 144: FROM jai_po_line_locations

140: ,pv_retroprice_changed IN VARCHAR2 DEFAULT 'N'
141: ) IS
142: CURSOR fetch_focus_id_cur IS
143: SELECT line_focus_id
144: FROM jai_po_line_locations
145: WHERE po_line_id = v_po_line_id AND
146: nvl(line_location_id,0) = nvl(v_line_loc_id,0);
147:
148:

Line 166: FROM jai_po_line_locations

162: WHERE tax_id = taxid;
163:
164: CURSOR c_line_tax_category_id(p_po_line_id IN NUMBER, p_line_location_id IN NUMBER) IS
165: SELECT tax_category_id
166: FROM jai_po_line_locations
167: WHERE po_line_id = p_po_line_id AND
168: nvl(line_location_id,0) = nvl(p_line_location_id,0);
169:
170: CURSOR Fetch_Sum_Cur IS

Line 179: FROM JAI_PO_LINE_LOCATIONS

175: AND Tax_Type <> jai_constants.tax_type_tds;
176:
177: CURSOR c_tax_modified_flag(c_po_line_id NUMBER, c_line_loc_id NUMBER) IS
178: SELECT tax_modified_flag
179: FROM JAI_PO_LINE_LOCATIONS
180: WHERE po_line_id = c_po_line_id
181: AND nvl(line_location_id,0)= nvl(c_line_loc_id,0);
182: l_api_name CONSTANT VARCHAR2(30) := 'process_po_taxes';
183: v_seq_val NUMBER;

Line 214: v_tax_category_id JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;

210: operation VARCHAR2(2);
211: operation_flag NUMBER;
212: trans_name VARCHAR2(200);
213: v_tax_modified_flag VARCHAR2(1);
214: v_tax_category_id JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
215: v_tax_category_id_dflt JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
216:
217: BEGIN
218:

Line 215: v_tax_category_id_dflt JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;

211: operation_flag NUMBER;
212: trans_name VARCHAR2(200);
213: v_tax_modified_flag VARCHAR2(1);
214: v_tax_category_id JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
215: v_tax_category_id_dflt JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
216:
217: BEGIN
218:
219: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 352: UPDATE jai_po_line_locations

348: CLOSE c_line_tax_category_id;
349:
350: END IF;
351:
352: UPDATE jai_po_line_locations
353: SET tax_category_id = v_tax_category_id_dflt
354: WHERE line_focus_id = v_seq_val;
355:
356: /*END IF;*/

Line 392: UPDATE Jai_Po_Line_Locations

388: ELSE --p_tax_category_id is not null then
389: DELETE Jai_Po_Taxes WHERE Po_Line_Id = v_po_line_id
390: AND NVL( Line_Location_Id, 0 ) = NVL( v_line_loc_id, 0 );
391:
392: UPDATE Jai_Po_Line_Locations
393: SET Tax_Amount = NULL,
394: Total_Amount = NULL,
395: Last_Updated_By = fnd_global.user_id,
396: Last_Update_Date = sysdate,

Line 490: UPDATE JAI_PO_LINE_LOCATIONS

486: Last_Update_Login = v_last_upd_login
487: WHERE Po_Line_Id = v_po_line_id
488: AND nvl(Line_Location_Id,0) = nvl(v_line_loc_id,0);
489:
490: UPDATE JAI_PO_LINE_LOCATIONS
491: SET Tax_Amount = NULL,
492: Total_Amount = NULL,
493: Last_Updated_By = v_last_upd_by,
494: Last_Update_Date = v_last_upd_dt,

Line 503: UPDATE jai_po_line_locations

499: OPEN fetch_sum_cur;
500: FETCH fetch_sum_cur INTO v_tax_amt;
501: CLOSE fetch_sum_cur;
502:
503: UPDATE jai_po_line_locations
504: SET tax_amount = nvl(v_tax_amt,0),
505: total_amount = nvl((v_qty * v_price),0) + nvl(v_tax_amt,0), last_updated_by = v_last_upd_by,
506: last_update_date = v_last_upd_dt, last_update_login = v_last_upd_login
507: WHERE Po_Line_Id = v_po_line_id

Line 529: REM The main logic is insert/update data into JAI_PO_LINE_LOCATIONS table

525: REM Bug Number/ER Name : 14040855/JAI Triggers Elimination
526: REM SubProgram Name : process_po_tax_wrapper
527: REM Type : processing API
528: REM Purpose : process tax related logic when the event of Create and Update for PO Documents.
529: REM The main logic is insert/update data into JAI_PO_LINE_LOCATIONS table
530: REM and JAI_PO_TAXES table.
531: REM TDD Reference :
532: REM
533: REM Assumptions :

Line 607: FROM JAI_PO_LINE_LOCATIONS

603: WHERE Po_Header_Id = v_po_hdr_id;
604:
605: CURSOR c_line_tax_modified_flag(c_po_line_id NUMBER) IS
606: SELECT tax_modified_flag
607: FROM JAI_PO_LINE_LOCATIONS
608: WHERE po_line_id = c_po_line_id
609: AND line_location_id IS NULL;
610:
611: CURSOR c_line_loc_tax_flag(c_line_loc_id NUMBER) IS

Line 613: FROM JAI_PO_LINE_LOCATIONS

609: AND line_location_id IS NULL;
610:
611: CURSOR c_line_loc_tax_flag(c_line_loc_id NUMBER) IS
612: SELECT tax_modified_flag
613: FROM JAI_PO_LINE_LOCATIONS
614: WHERE line_location_id = c_line_loc_id;
615:
616: CURSOR c_line_info (cn_po_line_id NUMBER)IS
617: SELECT item_id

Line 623: FROM JAI_PO_LINE_LOCATIONS

619: WHERE po_line_id = cn_po_line_id;
620:
621: CURSOR c_old_qty(c_line_loc_id NUMBER) IS
622: SELECT quantity
623: FROM JAI_PO_LINE_LOCATIONS
624: WHERE line_location_id = c_line_loc_id;
625:
626: CURSOR Fetch_UOMCode_Cur IS
627: SELECT Uom_Code

Line 1028: FROM po_line_locations_all plla, JAI_PO_LINE_LOCATIONS jpll,

1024: /* move to function get_line_loc_id since mutating error.
1025: -- Cursor definition for picking line_location_id from po_line_locations_all
1026: CURSOR Fetch_Line_Loc_Id_Cur IS
1027: SELECT jpll.Line_Location_Id
1028: FROM po_line_locations_all plla, JAI_PO_LINE_LOCATIONS jpll,
1029: po_lines_all pla, po_headers_all pha
1030: WHERE pha.po_header_id = pla.po_header_id
1031: AND jpll.line_location_id = plla.line_location_id
1032: AND pha.po_header_id = plla.po_header_id

Line 1048: -- Cursor definition for picking values from JAI_PO_LINE_LOCATIONS

1044: WHERE pha.Po_Header_Id = p_from_hdr_id
1045: AND pla.line_num = p_line_num
1046: AND pha.po_header_id =pla.po_header_id;*/
1047:
1048: -- Cursor definition for picking values from JAI_PO_LINE_LOCATIONS
1049: CURSOR fetch_jain_line_cur IS
1050: SELECT line_location_id, po_line_id, po_header_id, item_id,tax_modified_flag,
1051: tax_amount, total_amount, line_focus_id, creation_date,
1052: created_by, last_update_date, last_updated_by, last_update_login,

Line 1054: FROM JAI_PO_LINE_LOCATIONS

1050: SELECT line_location_id, po_line_id, po_header_id, item_id,tax_modified_flag,
1051: tax_amount, total_amount, line_focus_id, creation_date,
1052: created_by, last_update_date, last_updated_by, last_update_login,
1053: tax_category_id ,quantity,PRICE_OVERRIDE, currency -- cbabu for EnhancementBug# 2427465
1054: FROM JAI_PO_LINE_LOCATIONS
1055: WHERE Po_Line_Id = v_line_id
1056: AND po_header_id = p_from_hdr_id
1057: AND ( line_location_id IS NULL
1058: OR line_location_id = 0 );

Line 1099: -- Cursor definition for picking values from JAI_PO_LINE_LOCATIONS

1095: AND po_header_id = p_from_hdr_id
1096: AND ( line_location_id IS NULL
1097: OR line_location_id = 0 );
1098:
1099: -- Cursor definition for picking values from JAI_PO_LINE_LOCATIONS
1100: CURSOR Fetch_Ja_In_Po_Ln_Loc_Cur IS
1101: SELECT line_location_id, po_line_id, po_header_id, tax_modified_flag,
1102: tax_amount, total_amount, line_focus_id, creation_date,
1103: created_by, last_update_date, last_updated_by, last_update_login,

Line 1105: FROM JAI_PO_LINE_LOCATIONS

1101: SELECT line_location_id, po_line_id, po_header_id, tax_modified_flag,
1102: tax_amount, total_amount, line_focus_id, creation_date,
1103: created_by, last_update_date, last_updated_by, last_update_login,
1104: tax_category_id,item_id, quantity,PRICE_OVERRIDE,currency
1105: FROM JAI_PO_LINE_LOCATIONS
1106: WHERE Line_Location_Id = v_ln_loc_id;
1107:
1108: -- Cursor definition for picking values from JAI_PO_TAXES
1109: -- using line_location_id as where clause

Line 1152: v_seq_val JAI_PO_LINE_LOCATIONS.line_focus_id%TYPE;

1148: where po_header_id=p_po_hdr_id;
1149:
1150:
1151: fetch_ja_in_po_ln_loc_rec FETCH_JA_IN_PO_LN_LOC_CUR%ROWTYPE;
1152: v_seq_val JAI_PO_LINE_LOCATIONS.line_focus_id%TYPE;
1153:
1154: BEGIN
1155:
1156: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 1370: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;

1366: v_currency po_headers_all.currency_code%TYPE;
1367: v_item_id po_lines_all.item_id%TYPE;
1368: v_assessable_value NUMBER;
1369: v_vat_assess_value NUMBER;
1370: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
1371:
1372: ------------------------------>
1373:
1374: CURSOR tax_cur IS

Line 1396: FROM JAI_PO_LINE_LOCATIONS

1392: ORDER BY a.tax_line_no;
1393:
1394: CURSOR c_line_tax_category_id_1(p_po_line_id IN NUMBER) IS
1395: SELECT tax_category_id
1396: FROM JAI_PO_LINE_LOCATIONS
1397: WHERE po_line_id = p_po_line_id
1398: AND line_location_id IS NULL;
1399:
1400: CURSOR c_line_tax_category_id_2(p_po_line_id IN NUMBER, p_line_location_id IN NUMBER) IS

Line 1402: FROM JAI_PO_LINE_LOCATIONS

1398: AND line_location_id IS NULL;
1399:
1400: CURSOR c_line_tax_category_id_2(p_po_line_id IN NUMBER, p_line_location_id IN NUMBER) IS
1401: SELECT tax_category_id
1402: FROM JAI_PO_LINE_LOCATIONS
1403: WHERE po_line_id = p_po_line_id
1404: AND line_location_id = p_line_location_id;
1405:
1406: CURSOR c_check_adhoc_flag(p_tax_id number) IS

Line 1537: UPDATE JAI_PO_LINE_LOCATIONS

1533: CLOSE c_line_tax_category_id_2;
1534: END IF;
1535: end if;
1536:
1537: UPDATE JAI_PO_LINE_LOCATIONS
1538: SET tax_category_id = v_tax_category_id_holder
1539: WHERE line_focus_id = v_line_focus_id;
1540:
1541: /*calculate av and VAT av*/

Line 1635: FROM JAI_PO_LINE_LOCATIONS

1631:
1632:
1633: CURSOR c_old_curr_vendor IS
1634: SELECT DISTINCT currency,vendor_id, vendor_site_id
1635: FROM JAI_PO_LINE_LOCATIONS
1636: WHERE po_header_id = pn_header_id;
1637:
1638: CURSOR Line_exist_cur(line_id NUMBER) IS
1639: SELECT 1

Line 1640: FROM JAI_PO_LINE_LOCATIONS

1636: WHERE po_header_id = pn_header_id;
1637:
1638: CURSOR Line_exist_cur(line_id NUMBER) IS
1639: SELECT 1
1640: FROM JAI_PO_LINE_LOCATIONS
1641: WHERE Po_Line_Id = line_id;
1642:
1643: l_api_name CONSTANT VARCHAR2(30) := 'process_po';
1644: lv_action VARCHAR2(10);

Line 1914: FROM JAI_PO_LINE_LOCATIONS

1910: WHERE Unit_Of_Measure = v_uom;
1911:
1912: CURSOR c_get_po_line_loc_details IS
1913: SELECT DISTINCT item_id
1914: FROM JAI_PO_LINE_LOCATIONS
1915: WHERE po_line_id = pn_line_id;
1916:
1917: CURSOR c_po_line_loc_exists(cn_line_loc_id NUMBER) IS
1918: SELECT 1

Line 1919: FROM JAI_PO_LINE_LOCATIONS

1915: WHERE po_line_id = pn_line_id;
1916:
1917: CURSOR c_po_line_loc_exists(cn_line_loc_id NUMBER) IS
1918: SELECT 1
1919: FROM JAI_PO_LINE_LOCATIONS
1920: WHERE Line_Location_Id = cn_line_loc_id;
1921:
1922: CURSOR c_po_hdr(cn_po_hdr_id NUMBER) IS
1923: SELECT *

Line 2211: r_get_po_line_loc_details JAI_PO_LINE_LOCATIONS%ROWTYPE;

2207: REM +=========================================================================================================+
2208: */
2209: PROCEDURE process_po_shipment_line (pn_line_loc_id IN NUMBER,pr_po_header IN PO_HEADERS_ALL%ROWTYPE DEFAULT NULL,pr_po_line IN PO_LINES_ALL%ROWTYPE DEFAULT NULL, pv_action IN VARCHAR2) IS
2210: l_api_name CONSTANT VARCHAR2(30) := 'process_po_shipment_line';
2211: r_get_po_line_loc_details JAI_PO_LINE_LOCATIONS%ROWTYPE;
2212: po_line_loc_rec PO_LINE_LOCATIONS_ALL%ROWTYPE;
2213: old_po_line_loce_rec PO_LINE_LOCATIONS_ALL%ROWTYPE;
2214:
2215:

Line 2266: FROM JAI_PO_LINE_LOCATIONS

2262: WHERE line_location_id = pn_line_loc_id;
2263:
2264: CURSOR c_get_po_line_loc_details (p_line_location_id IN NUMBER) IS
2265: SELECT *
2266: FROM JAI_PO_LINE_LOCATIONS
2267: WHERE line_location_id = p_line_location_id;
2268:
2269: CURSOR fetch_uomcode_cur IS
2270: SELECT uom_code

Line 2276: FROM JAI_PO_LINE_LOCATIONS

2272: WHERE unit_of_measure = v_uom_measure;
2273:
2274: CURSOR Fetch_Count_Cur (cn_po_hdr_id NUMBER)IS
2275: SELECT COUNT(Line_Location_Id)
2276: FROM JAI_PO_LINE_LOCATIONS
2277: WHERE Po_Header_Id = cn_po_hdr_id ;
2278:
2279: CURSOR c_po_hdr(cn_po_hdr_id NUMBER) IS
2280: SELECT *

Line 2292: FROM po_line_locations_all plla, JAI_PO_LINE_LOCATIONS jpll,

2288:
2289: -- Cursor definition for picking line_location_id from po_line_locations_all
2290: CURSOR Fetch_Line_Loc_Id_Cur(p_from_hdr_id NUMBER,p_line_num NUMBER ,p_item_id NUMBER, p_ship_num NUMBER) IS
2291: SELECT jpll.Line_Location_Id
2292: FROM po_line_locations_all plla, JAI_PO_LINE_LOCATIONS jpll,
2293: po_lines_all pla, po_headers_all pha
2294: WHERE pha.po_header_id = pla.po_header_id
2295: AND jpll.line_location_id = plla.line_location_id
2296: AND pha.po_header_id = plla.po_header_id

Line 2628: REM Purpose : Update currency in JAI_PO_LINE_LOCATIONS and JAI_PO_TAXES

2624: REM Creation Date : Jun 1, 2012
2625: REM Bug Number/ER Name : 14040855/JAI Triggers Elimination
2626: REM SubProgram Name : update_currency
2627: REM Type : table handler API
2628: REM Purpose : Update currency in JAI_PO_LINE_LOCATIONS and JAI_PO_TAXES
2629: REM
2630: REM TDD Reference :
2631: REM
2632: REM Assumptions :

Line 2663: UPDATE JAI_PO_LINE_LOCATIONS

2659: Last_Updated_By = pn_last_upd_by,
2660: Last_Update_Login = pn_last_upd_login
2661: WHERE Po_Header_Id = pn_po_header_id
2662: AND Currency = pv_old_currency;
2663: UPDATE JAI_PO_LINE_LOCATIONS
2664: SET Currency = pv_currency,
2665: Last_Update_Date = pd_last_upd_dt,
2666: Last_Updated_By = pn_last_upd_by,
2667: Last_Update_Login = pn_last_upd_login

Line 2690: REM Purpose : Update currency in JAI_PO_LINE_LOCATIONS and JAI_PO_TAXES

2686: REM Creation Date : Jun 1, 2012
2687: REM Bug Number/ER Name : 14040855/JAI Triggers Elimination
2688: REM SubProgram Name : update_vendor
2689: REM Type : table handler API
2690: REM Purpose : Update currency in JAI_PO_LINE_LOCATIONS and JAI_PO_TAXES
2691: REM
2692: REM TDD Reference :
2693: REM
2694: REM Assumptions :

Line 2732: UPDATE JAI_PO_LINE_LOCATIONS

2728: last_updated_by = pn_last_upd_by, last_update_login = pn_last_upd_login
2729: WHERE po_header_id = pn_po_header_id
2730: AND vendor_id = pn_old_vendor_id;
2731:
2732: UPDATE JAI_PO_LINE_LOCATIONS
2733: SET vendor_id = pn_vendor_id,
2734: vendor_site_id = pn_vendor_site_id,
2735: Last_Update_Date = pd_last_upd_dt,
2736: Last_Updated_By = pn_last_upd_by,

Line 2758: REM Purpose : delete JAI_PO_LINE_LOCATIONS

2754: REM Creation Date : Jun 1, 2012
2755: REM Bug Number/ER Name : 14040855/JAI Triggers Elimination
2756: REM SubProgram Name : delete_jai_po_lines
2757: REM Type : table handler API
2758: REM Purpose : delete JAI_PO_LINE_LOCATIONS
2759: REM
2760: REM TDD Reference :
2761: REM
2762: REM Assumptions :

Line 2781: DELETE FROM JAI_PO_LINE_LOCATIONS WHERE Line_Location_Id = pn_line_loc_id;

2777: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2778: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.BEGIN',G_PKG_NAME||': '||l_api_name||'()+');
2779: END IF;
2780: IF pn_line_loc_id IS NOT NULL THEN
2781: DELETE FROM JAI_PO_LINE_LOCATIONS WHERE Line_Location_Id = pn_line_loc_id;
2782: ELSIF pn_line_id IS NOT NULL THEN
2783: DELETE FROM JAI_PO_LINE_LOCATIONS WHERE po_line_id = pn_line_id;
2784: END IF;
2785: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 2783: DELETE FROM JAI_PO_LINE_LOCATIONS WHERE po_line_id = pn_line_id;

2779: END IF;
2780: IF pn_line_loc_id IS NOT NULL THEN
2781: DELETE FROM JAI_PO_LINE_LOCATIONS WHERE Line_Location_Id = pn_line_loc_id;
2782: ELSIF pn_line_id IS NOT NULL THEN
2783: DELETE FROM JAI_PO_LINE_LOCATIONS WHERE po_line_id = pn_line_id;
2784: END IF;
2785: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
2786: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.END',G_PKG_NAME||': '||l_api_name);
2787: END IF;

Line 2856: REM Purpose : insert data in JAI_PO_LINE_LOCATIONS

2852: REM Creation Date : Jun 1, 2012
2853: REM Bug Number/ER Name : 14040855/JAI Triggers Elimination
2854: REM SubProgram Name : delete_po_taxes
2855: REM Type : table handler API
2856: REM Purpose : insert data in JAI_PO_LINE_LOCATIONS
2857: REM
2858: REM TDD Reference :
2859: REM
2860: REM Assumptions :

Line 2918: SELECT JAI_PO_LINE_LOCATIONS_S.NEXTVAL

2914: v_seq_val NUMBER;
2915:
2916:
2917: CURSOR Fetch_Focus_Id IS
2918: SELECT JAI_PO_LINE_LOCATIONS_S.NEXTVAL
2919: FROM Dual;
2920:
2921: CURSOR cur_Line_Focus_Id IS
2922: SELECT Line_Focus_Id

Line 2923: FROM JAI_PO_LINE_LOCATIONS

2919: FROM Dual;
2920:
2921: CURSOR cur_Line_Focus_Id IS
2922: SELECT Line_Focus_Id
2923: FROM JAI_PO_LINE_LOCATIONS
2924: WHERE Line_Location_Id = v_line_Loc_id AND
2925: Po_Line_Id = v_po_line_id AND
2926: Po_Header_Id = v_po_hdr_id;
2927: BEGIN

Line 2940: INSERT INTO JAI_PO_LINE_LOCATIONS( Line_Focus_Id, Line_Location_Id, Po_Line_Id, Po_Header_Id,

2936:
2937: OPEN Fetch_Focus_Id;
2938: FETCH Fetch_Focus_Id INTO v_seq_val;
2939: CLOSE Fetch_Focus_Id;
2940: INSERT INTO JAI_PO_LINE_LOCATIONS( Line_Focus_Id, Line_Location_Id, Po_Line_Id, Po_Header_Id,
2941: Tax_Modified_Flag, Tax_Amount, Total_Amount,currency,
2942: Creation_Date, Created_By, Last_Update_Date, Last_Updated_By,tax_category_id,Last_Update_Login,Service_type_code
2943: ,item_id,vendor_id, vendor_site_id ,quantity
2944: ,PRICE_OVERRIDE

Line 2958: UPDATE JAI_PO_LINE_LOCATIONS

2954: );
2955:
2956: ELSIF flag = 'U' THEN
2957:
2958: UPDATE JAI_PO_LINE_LOCATIONS
2959: SET
2960: Last_Update_Date = v_last_upd_dt,
2961: Last_Updated_By = v_last_upd_by,
2962: Last_Update_Login = v_last_upd_login

Line 3140: FROM JAI_PO_LINE_LOCATIONS

3136: FUNCTION is_split_line(pn_orig_ship_id IN NUMBER, pn_po_hdr_id IN NUMBER, pn_po_line_id IN NUMBER) RETURN BOOLEAN IS
3137: l_api_name CONSTANT VARCHAR2(30) := 'is_split_line';
3138: CURSOR c_get_po_line_loc_details (p_line_location_id IN NUMBER) IS
3139: SELECT po_header_id, po_line_id
3140: FROM JAI_PO_LINE_LOCATIONS
3141: WHERE line_location_id = p_line_location_id;
3142: lb_split_line_flag BOOLEAN;
3143: ln_orig_po_hdr_id NUMBER;
3144: ln_orig_po_line_id NUMBER;

Line 3214: FROM JAI_PO_LINE_LOCATIONS

3210: where line_location_id = pn_orig_ship_id;
3211:
3212: CURSOR c_get_po_line_loc_details IS
3213: SELECT *
3214: FROM JAI_PO_LINE_LOCATIONS
3215: WHERE line_location_id = pn_orig_ship_id;
3216:
3217: CURSOR c_get_po_taxes (p_line_location_id IN NUMBER) IS
3218: SELECT *

Line 3227: rec_jai_line JAI_PO_LINE_LOCATIONS%ROWTYPE;

3223: l_ship_line_amount NUMBER;
3224: l_tax_amount NUMBER;
3225: l_line_focus_id NUMBER;
3226:
3227: rec_jai_line JAI_PO_LINE_LOCATIONS%ROWTYPE;
3228:
3229: BEGIN
3230:
3231: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN

Line 3243: /*Insert into JAI_PO_LINE_LOCATIONS*/

3239: OPEN c_get_po_line_loc_details;
3240: FETCH c_get_po_line_loc_details INTO rec_jai_line;
3241: CLOSE c_get_po_line_loc_details;
3242:
3243: /*Insert into JAI_PO_LINE_LOCATIONS*/
3244: insert_jai_line_locs(
3245: v_line_loc_id => pn_line_loc_id
3246: ,v_po_hdr_id => rec_jai_line.po_header_id
3247: ,v_po_line_id => rec_jai_line.po_line_id

Line 3294: UPDATE JAI_PO_LINE_LOCATIONS

3290: where line_location_id = pn_line_loc_id;
3291:
3292: l_ship_line_amount := pn_QUANTITY * pn_price;
3293:
3294: UPDATE JAI_PO_LINE_LOCATIONS
3295: SET tax_modified_flag = 'N',
3296: tax_amount = l_tax_amount,
3297: total_amount = l_ship_line_amount + l_tax_amount
3298:

Line 3361: v_tax_modified_flag JAI_PO_LINE_LOCATIONS.tax_modified_flag%TYPE;

3357: v_rate_date po_headers_all.rate_date%TYPE;
3358:
3359: v_style_id po_headers_all.style_id%TYPE;
3360: v_override_flag JAI_CMN_VENDOR_SITES.override_flag%TYPE;
3361: v_tax_modified_flag JAI_PO_LINE_LOCATIONS.tax_modified_flag%TYPE;
3362: */
3363: CURSOR c_dist IS
3364: SELECT *
3365: FROM PO_DISTRIBUTIONS_ALL

Line 3385: FROM JAI_PO_LINE_LOCATIONS

3381: AND vendor_site_id = c_supp_site_id;
3382:
3383: Cursor c_get_tax_modified_flag IS
3384: SELECT tax_modified_flag
3385: FROM JAI_PO_LINE_LOCATIONS
3386: WHERE line_location_id = v_line_location_id;
3387:
3388: CURSOR c_loc_line_cnt IS
3389: SELECT count(line_location_id)

Line 3390: FROM JAI_PO_LINE_LOCATIONS

3386: WHERE line_location_id = v_line_location_id;
3387:
3388: CURSOR c_loc_line_cnt IS
3389: SELECT count(line_location_id)
3390: FROM JAI_PO_LINE_LOCATIONS
3391: WHERE line_location_id=v_line_location_id;
3392:
3393:
3394: v_count NUMBER;

Line 3890: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;

3886: v_exclu_tax_amount NUMBER;
3887: v_total_amount NUMBER;
3888:
3889: lv_apps_source_code po_requisition_headers_all.apps_source_code%type;
3890: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
3891: v_modified_by_agent_flag po_requisition_lines_all.modified_by_agent_flag%type;
3892: v_parent_req_line_id po_requisition_lines_all.parent_req_line_id%type;
3893: lv_unit_meas_lookup po_line_locations_all.unit_meas_lookup_code%TYPE;
3894: l_func_curr_det jai_plsql_cache_pkg.func_curr_details;

Line 4842: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;

4838: v_vat_assess_value NUMBER;
4839: v_loc_count NUMBER;
4840:
4841: v_tax_category_id JAI_PO_TAXES.tax_category_id%TYPE;
4842: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
4843: v_style_id po_headers_all.style_id%TYPE;
4844:
4845: ------------------------------>
4846: -- Check the vendor btn the vendor present in tax lines and that of suggested vendor in requisition lines

Line 4959: FROM JAI_PO_LINE_LOCATIONS

4955: v_reqn_tax NUMBER;
4956:
4957: CURSOR Fetch_Focus_Id_Cur_for_req( line_id IN NUMBER , line_loc_id in Number ) IS
4958: SELECT Line_Focus_Id
4959: FROM JAI_PO_LINE_LOCATIONS
4960: WHERE Po_Line_Id = line_id
4961: AND Line_Location_Id = line_loc_id;
4962:
4963: CURSOR c_get_line_loc_cnt IS

Line 4964: select count(1) from JAI_PO_LINE_LOCATIONS

4960: WHERE Po_Line_Id = line_id
4961: AND Line_Location_Id = line_loc_id;
4962:
4963: CURSOR c_get_line_loc_cnt IS
4964: select count(1) from JAI_PO_LINE_LOCATIONS
4965: where line_location_id = v_line_loc_id;
4966:
4967: Cursor fetch_Tax_cnt( cp_line_loc_id in number ) is
4968: select count(1)

Line 4979: FROM JAI_PO_LINE_LOCATIONS

4975: WHERE Requisition_Header_Id = v_requisition_header_id;
4976:
4977: Cursor c_get_tax_modified_flag IS
4978: SELECT tax_modified_flag
4979: FROM JAI_PO_LINE_LOCATIONS
4980: WHERE line_location_id = prec_po_location.line_location_id ;
4981: lv_tax_modified_flag VARCHAR2(1) ;
4982:
4983: CURSOR c_get_req_lines IS

Line 5421: UPDATE JaI_Po_Line_Locations

5417: CLOSE c_get_tax_category_id;
5418:
5419:
5420:
5421: UPDATE JaI_Po_Line_Locations
5422: SET Tax_Amount = NVL( v_tax_amt, 0 ),
5423: Total_Amount = NVL( Line_Tot, 0 ) + NVL( v_tax_amt, 0 ),
5424: Last_Updated_By = v_last_upd_by,
5425: Last_Update_Date = v_last_upd_dt,

Line 5519: FROM JAI_PO_LINE_LOCATIONS jai

5515: WHERE po_release_id = pn_po_release_id;
5516:
5517: CURSOR c_jai_loc_exists(cn_line_id IN NUMBER) IS
5518: SELECT 1
5519: FROM JAI_PO_LINE_LOCATIONS jai
5520: WHERE jai.PO_LINE_ID = cn_line_id
5521: AND jai.line_location_id IS NULL;
5522:
5523: rec_line_location PO_LINE_LOCATIONS_ALL%ROWTYPE;

Line 5649: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;

5645:
5646: TYPE Uom IS TABLE OF VARCHAR2(50) INDEX BY BINARY_INTEGER;
5647: uom_tab uom;
5648:
5649: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
5650:
5651:
5652:
5653:

Line 5767: FROM JAI_PO_LINE_LOCATIONS

5763:
5764:
5765: CURSOR c_line_tax_category_id_1(p_po_line_id IN NUMBER) IS
5766: SELECT tax_category_id
5767: FROM JAI_PO_LINE_LOCATIONS
5768: WHERE po_line_id = p_po_line_id
5769: AND line_location_id IS NULL;
5770:
5771: CURSOR c_line_tax_category_id_2(p_po_line_id IN NUMBER, p_line_location_id IN NUMBER) IS

Line 5773: FROM JAI_PO_LINE_LOCATIONS

5769: AND line_location_id IS NULL;
5770:
5771: CURSOR c_line_tax_category_id_2(p_po_line_id IN NUMBER, p_line_location_id IN NUMBER) IS
5772: SELECT tax_category_id
5773: FROM JAI_PO_LINE_LOCATIONS
5774: WHERE po_line_id = p_po_line_id
5775: AND line_location_id = p_line_location_id;
5776:
5777: lv_override_flag JAI_CMN_VENDOR_SITES.override_flag%type ;

Line 6086: UPDATE JAI_PO_LINE_LOCATIONS

6082: OPEN Fetch_Tot_Sum_Cur( v_line_loc_id );
6083: FETCH Fetch_Tot_Sum_Cur INTO v_tax_amt1;
6084: CLOSE Fetch_Tot_Sum_Cur;
6085:
6086: UPDATE JAI_PO_LINE_LOCATIONS
6087: SET Tax_Amount = v_tax_amt1,
6088: Total_Amount = NVL( v_qty * v_temp_price, 0 ) + v_tax_amt1 ,
6089: Last_Update_Date = p_last_upd_dt,
6090: Last_Updated_By = p_last_upd_by,

Line 6239: UPDATE JAI_PO_LINE_LOCATIONS

6235: CLOSE c_line_tax_category_id_2;
6236: END IF;
6237: end if;
6238:
6239: UPDATE JAI_PO_LINE_LOCATIONS
6240: SET tax_category_id = v_tax_category_id_holder
6241: WHERE line_focus_id = v_seq_val;
6242:
6243: v_line_loc_id := p_line_loc_id;

Line 6609: FROM JAI_PO_LINE_LOCATIONS

6605: WHERE Po_Line_Id = v_po_line_id;
6606:
6607: CURSOR c_get_po_line_loc_details IS
6608: SELECT DISTINCT item_id
6609: FROM JAI_PO_LINE_LOCATIONS
6610: WHERE po_line_id = v_po_line_id;
6611:
6612: CURSOR po_line_loc_cur IS
6613: SELECT * FROM PO_LINE_LOCATIONS_ALL

Line 6887: FROM JAI_PO_LINE_LOCATIONS

6883: WHERE po_line_id = cn_po_line_id;
6884:
6885: CURSOR Fetch_Count_Cur (cn_po_hdr_id NUMBER)IS
6886: SELECT COUNT(Line_Location_Id)
6887: FROM JAI_PO_LINE_LOCATIONS
6888: WHERE Po_Header_Id = cn_po_hdr_id ;
6889:
6890: r_po_header PO_HEADERS_ALL%ROWTYPE;
6891: r_po_line PO_LINES_ALL%ROWTYPE;

Line 7167: FROM JAI_PO_LINE_LOCATIONS

7163: PROCEDURE process_vendor_change(prec_po_header IN PO_HEADERS_ALL%ROWTYPE,pn_old_vendor_id IN NUMBER)
7164: IS
7165: CURSOR Lines_Cur IS
7166: SELECT DISTINCT Po_Line_Id
7167: FROM JAI_PO_LINE_LOCATIONS
7168: WHERE Po_Header_Id = prec_po_header.po_header_id;
7169:
7170: CURSOR Line_Loc_Cur( lineid IN NUMBER ) IS
7171: SELECT Line_Location_Id

Line 7172: FROM JAI_PO_LINE_LOCATIONS

7168: WHERE Po_Header_Id = prec_po_header.po_header_id;
7169:
7170: CURSOR Line_Loc_Cur( lineid IN NUMBER ) IS
7171: SELECT Line_Location_Id
7172: FROM JAI_PO_LINE_LOCATIONS
7173: WHERE Po_Line_Id = lineid;
7174:
7175: CURSOR PO_Line_loc_cur(cn_line_loc_id NUMBER) IS
7176: SELECT * FROM

Line 7337: FROM po_line_locations_all plla, jai_po_line_locations jpll,

7333: PRAGMA AUTONOMOUS_TRANSACTION;
7334: -- Cursor definition for picking line_location_id from po_line_locations_all
7335: CURSOR fetch_line_loc_id_cur IS
7336: SELECT jpll.line_location_id
7337: FROM po_line_locations_all plla, jai_po_line_locations jpll,
7338: po_lines_all pla, po_headers_all pha
7339: WHERE pha.po_header_id = pla.po_header_id AND
7340: jpll.line_location_id = plla.line_location_id AND
7341: pha.po_header_id = plla.po_header_id AND

Line 7553: l_total_tax_amount JAI_PO_LINE_LOCATIONS.TAX_AMOUNT%TYPE;

7549: v_po_line_id po_line_locations_all.PO_LINE_ID%TYPE;
7550: v_line_loc_id po_line_locations_all.LINE_LOCATION_ID%TYPE;
7551: v_price po_line_locations_all.price_override%TYPE;
7552: v_po_hdr_id po_line_locations_all.po_header_id%TYPE;
7553: l_total_tax_amount JAI_PO_LINE_LOCATIONS.TAX_AMOUNT%TYPE;
7554: CURSOR rec_get_tax_amount
7555: IS
7556: SELECT
7557: nvl(a.tax_amount,0) tax_amount,

Line 7595: then delete the line and associated taxes from JAI_PO_LINE_LOCATIONS

7591: END IF;
7592: IF nvl(v_quantity_cancelled,-9999) = nvl(v_qty,0) THEN
7593: /*
7594: Indicating that the entire line has been cancelled and no receipt has been made for ths line,
7595: then delete the line and associated taxes from JAI_PO_LINE_LOCATIONS
7596: and JAI_PO_TAXES and return .
7597: */
7598: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7599: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name,G_PKG_NAME||': '||l_api_name||': entire line been cancelled.');

Line 7608: Now in this scenario update the line and the associated apportioned taxes in the table JAI_PO_LINE_LOCATIONS

7604: ELSIF nvl(v_quantity_cancelled,-9999) < nvl(v_qty,0) THEN
7605: /*
7606: Indicating that a partial receipt has been made for the line and then the line has been cancelled.
7607: In such a case the cancelled quantity would be lesser than the quantity in table po_line_locations_all.
7608: Now in this scenario update the line and the associated apportioned taxes in the table JAI_PO_LINE_LOCATIONS
7609: and JAI_PO_TAXES
7610: */
7611:
7612: /*

Line 7642: JAI_PO_LINE_LOCATIONS

7638: FETCH rec_calc_total_tax INTO l_total_tax_amount;
7639: CLOSE rec_calc_total_tax;
7640:
7641: UPDATE
7642: JAI_PO_LINE_LOCATIONS
7643: SET
7644: tax_amount = l_total_tax_amount ,
7645: total_amount = nvl(v_quantity_received * v_price, 0) + nvl(l_total_tax_amount,0)
7646: WHERE

Line 7677: FROM JAI_PO_LINE_LOCATIONS

7673: AND vendor_site_id = c_supp_site_id;
7674:
7675: Cursor c_get_tax_modified_flag(c_line_location_id NUMBER) IS
7676: SELECT tax_modified_flag
7677: FROM JAI_PO_LINE_LOCATIONS
7678: WHERE line_location_id = c_line_location_id;
7679:
7680: CURSOR c_loc_line_cnt(c_line_location_id NUMBER) IS
7681: SELECT count(line_location_id)

Line 7682: FROM JAI_PO_LINE_LOCATIONS

7678: WHERE line_location_id = c_line_location_id;
7679:
7680: CURSOR c_loc_line_cnt(c_line_location_id NUMBER) IS
7681: SELECT count(line_location_id)
7682: FROM JAI_PO_LINE_LOCATIONS
7683: WHERE line_location_id=c_line_location_id;
7684:
7685: v_po_line_id PO_DISTRIBUTIONS_ALL.Po_Line_Id%TYPE ;
7686: v_po_hdr_id PO_DISTRIBUTIONS_ALL.Po_Header_Id%TYPE;

Line 7707: v_tax_modified_flag JAI_PO_LINE_LOCATIONS.tax_modified_flag%TYPE;

7703: v_rate_date po_headers_all.rate_date%TYPE;
7704:
7705: v_style_id po_headers_all.style_id%TYPE;
7706: v_override_flag JAI_CMN_VENDOR_SITES.override_flag%TYPE;
7707: v_tax_modified_flag JAI_PO_LINE_LOCATIONS.tax_modified_flag%TYPE;
7708: v_count NUMBER;
7709: l_api_name CONSTANT VARCHAR2(200) := 'process_distribution_line';
7710: BEGIN
7711:

Line 7880: FROM JAI_PO_LINE_LOCATIONS

7876: WHERE po_line_id = cn_po_line_id;
7877:
7878: CURSOR Fetch_Count_Cur (cn_po_hdr_id NUMBER)IS
7879: SELECT COUNT(Line_Location_Id)
7880: FROM JAI_PO_LINE_LOCATIONS
7881: WHERE Po_Header_Id = cn_po_hdr_id ;
7882:
7883: CURSOR c_get_po_line_loc_details (p_line_location_id IN NUMBER) IS
7884: SELECT *

Line 7885: FROM JAI_PO_LINE_LOCATIONS

7881: WHERE Po_Header_Id = cn_po_hdr_id ;
7882:
7883: CURSOR c_get_po_line_loc_details (p_line_location_id IN NUMBER) IS
7884: SELECT *
7885: FROM JAI_PO_LINE_LOCATIONS
7886: WHERE line_location_id = p_line_location_id;
7887:
7888:
7889: r_po_header PO_HEADERS_ALL%ROWTYPE;

Line 7891: r_get_po_line_loc_details JAI_PO_LINE_LOCATIONS%ROWTYPE;

7887:
7888:
7889: r_po_header PO_HEADERS_ALL%ROWTYPE;
7890: r_po_line PO_LINES_ALL%ROWTYPE;
7891: r_get_po_line_loc_details JAI_PO_LINE_LOCATIONS%ROWTYPE;
7892: l_api_name CONSTANT VARCHAR2(30) := 'process_quotation_line_loc';
7893: BEGIN
7894: IF ( G_LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
7895: FND_LOG.STRING(G_LEVEL_PROCEDURE,G_MODULE_NAME||l_api_name||'.BEGIN',G_PKG_NAME||': '||l_api_name||'()+');

Line 8270: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;

8266: v_vat_assess_value NUMBER;
8267: v_loc_count NUMBER;
8268:
8269: v_tax_category_id JAI_PO_TAXES.tax_category_id%TYPE;
8270: v_tax_category_id_holder JAI_PO_LINE_LOCATIONS.tax_category_id%TYPE;
8271: v_style_id po_headers_all.style_id%TYPE;
8272:
8273: ------------------------------>
8274: -- Check the vendor btn the vendor present in tax lines and that of suggested vendor in requisition lines

Line 8387: FROM JAI_PO_LINE_LOCATIONS

8383: v_reqn_tax NUMBER;
8384:
8385: CURSOR Fetch_Focus_Id_Cur_for_req( line_id IN NUMBER , line_loc_id in Number ) IS
8386: SELECT Line_Focus_Id
8387: FROM JAI_PO_LINE_LOCATIONS
8388: WHERE Po_Line_Id = line_id
8389: AND Line_Location_Id = line_loc_id;
8390:
8391: CURSOR c_get_line_loc_cnt IS

Line 8392: select count(1) from JAI_PO_LINE_LOCATIONS

8388: WHERE Po_Line_Id = line_id
8389: AND Line_Location_Id = line_loc_id;
8390:
8391: CURSOR c_get_line_loc_cnt IS
8392: select count(1) from JAI_PO_LINE_LOCATIONS
8393: where line_location_id = v_line_loc_id;
8394:
8395: Cursor fetch_Tax_cnt( cp_line_loc_id in number ) is
8396: select count(1)

Line 8407: FROM JAI_PO_LINE_LOCATIONS

8403: WHERE Requisition_Header_Id = prec_po_req_line.REQUISITION_HEADER_ID;
8404:
8405: Cursor c_get_tax_modified_flag IS
8406: SELECT tax_modified_flag
8407: FROM JAI_PO_LINE_LOCATIONS
8408: WHERE line_location_id = prec_po_req_line.line_location_id ;
8409: lv_tax_modified_flag VARCHAR2(1) ;
8410:
8411: CURSOR c_get_po_line_loc IS

Line 8835: UPDATE JaI_Po_Line_Locations

8831: CLOSE c_get_tax_category_id;
8832:
8833:
8834:
8835: UPDATE JaI_Po_Line_Locations
8836: SET Tax_Amount = NVL( v_tax_amt, 0 ),
8837: Total_Amount = NVL( Line_Tot, 0 ) + NVL( v_tax_amt, 0 ),
8838: Last_Updated_By = v_last_upd_by,
8839: Last_Update_Date = v_last_upd_dt,