DBA Data[Home] [Help]

APPS.INL_SHIPMENT_PVT dependencies on INL_CHARGE_LINES

Line 2508: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'

2504: cl.charge_line_id,
2505: cl.charge_line_num
2506: FROM inl_adj_charge_lines_v cl,
2507: inl_associations assoc
2508: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
2509: AND assoc.from_parent_table_id = NVL (cl.parent_charge_line_id, cl.charge_line_id)
2510: AND assoc.ship_header_id = p_ship_header_id
2511: AND assoc.to_parent_table_name = p_to_parent_table_name
2512: AND assoc.to_parent_table_id = p_to_parent_table_id

Line 2536: p_table_name => 'INL_CHARGE_LINES',

2532: Handle_ShipError (
2533: p_ship_header_id => p_ship_header_id,
2534: p_ship_line_id => NULL,
2535: p_charge_line_id => l_ch_lines_rec.charge_line_id,
2536: p_table_name => 'INL_CHARGE_LINES',
2537: p_column_name => 'CURRENCY_CODE',
2538: p_column_value => l_ch_lines_rec.CURRENCY_CODE,
2539: p_error_message => SUBSTR (FND_MSG_PUB.Get (
2540: p_msg_index => FND_MSG_PUB.Count_Msg (),

Line 6280: FROM inl_charge_lines cl

6276: IF p_ChLn_Assoc.match_amount_id IS NOT NULL THEN
6277: -- Get the max charge line num for all shipments affected by this match
6278: SELECT NVL(MAX(cl.charge_line_num),0) + 1
6279: INTO l_charge_line_num
6280: FROM inl_charge_lines cl
6281: WHERE EXISTS
6282: (SELECT 1
6283: FROM inl_associations assoc
6284: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'

Line 6284: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'

6280: FROM inl_charge_lines cl
6281: WHERE EXISTS
6282: (SELECT 1
6283: FROM inl_associations assoc
6284: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
6285: AND assoc.from_parent_table_id = cl.charge_line_id
6286: AND assoc.ship_header_id
6287: IN (select m1.ship_header_id
6288: from inl_corr_matches_v m1

Line 6297: FROM inl_charge_lines cl

6293: -- BUG#8411723 => MURALI
6294: ELSE
6295: SELECT NVL (MAX (cl.charge_line_num), 0) + 1
6296: INTO l_charge_line_num
6297: FROM inl_charge_lines cl
6298: WHERE NVL (cl.parent_charge_line_id, cl.charge_line_id) IN
6299: (
6300: SELECT assoc.from_parent_table_id
6301: FROM inl_associations assoc

Line 6302: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'

6298: WHERE NVL (cl.parent_charge_line_id, cl.charge_line_id) IN
6299: (
6300: SELECT assoc.from_parent_table_id
6301: FROM inl_associations assoc
6302: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
6303: AND assoc.ship_header_id = NVL (p_ChLn_Assoc.inl_Assoc.ship_header_id, 0)
6304: ) ;
6305: END IF;
6306: ELSE

Line 6318: -- Get inl_charge_lines_s.nextval

6314: ELSE
6315: l_adjustment_num := p_ChLn_Assoc.adjustment_num;
6316: END IF;
6317: --
6318: -- Get inl_charge_lines_s.nextval
6319: --
6320: l_debug_info := 'Get inl_charge_lines_s.nextval';
6321: INL_LOGGING_PVT.Log_Statement (
6322: p_module_name => g_module_name,

Line 6320: l_debug_info := 'Get inl_charge_lines_s.nextval';

6316: END IF;
6317: --
6318: -- Get inl_charge_lines_s.nextval
6319: --
6320: l_debug_info := 'Get inl_charge_lines_s.nextval';
6321: INL_LOGGING_PVT.Log_Statement (
6322: p_module_name => g_module_name,
6323: p_procedure_name => l_program_name,
6324: p_debug_info => l_debug_info

Line 6326: SELECT inl_charge_lines_s.nextval

6322: p_module_name => g_module_name,
6323: p_procedure_name => l_program_name,
6324: p_debug_info => l_debug_info
6325: ) ;
6326: SELECT inl_charge_lines_s.nextval
6327: INTO x_new_charge_line_id FROM dual;
6328: --
6329: -- include Charge Line record
6330: --

Line 6338: INTO inl_charge_lines

6334: p_procedure_name => l_program_name,
6335: p_debug_info => l_debug_info
6336: ) ;
6337: INSERT
6338: INTO inl_charge_lines
6339: (
6340: charge_line_id, /* 01 */
6341: charge_line_num, /* 02 */
6342: charge_line_type_id, /* 03 */

Line 6429: p_from_parent_table_name => 'INL_CHARGE_LINES',

6425: ) ;
6426: IF p_include_assoc = 'Y' THEN
6427: Create_Assoc (
6428: p_Assoc => p_ChLn_Assoc.inl_Assoc,
6429: p_from_parent_table_name => 'INL_CHARGE_LINES',
6430: p_new_line_id => x_new_charge_line_id,
6431: x_return_status => l_return_status
6432: );
6433: IF l_return_status = L_FND_RET_STS_ERROR THEN

Line 6532: FROM inl_charge_lines cl

6528: poa_party_id ,
6529: poa_party_site_id ,
6530: poo_organization_id ,
6531: poo_location_id
6532: FROM inl_charge_lines cl
6533: WHERE cl.match_Amount_id = p_prev_match_amount_id
6534: AND cl.match_id IS NULL
6535: UNION --BUG#9804065
6536: SELECT charge_line_num ,

Line 6568: FROM inl_charge_lines cl

6564: poa_party_id ,
6565: poa_party_site_id ,
6566: poo_organization_id ,
6567: poo_location_id
6568: FROM inl_charge_lines cl
6569: WHERE p_prev_match_id IS NOT NULL --Bug#14044298
6570: AND cl.match_id = p_prev_match_id
6571: AND cl.match_amount_id IS NULL
6572: ;

Line 6680: p_comp_name => 'INL_CHARGE_LINES',

6676: ) ;
6677: Zero_EstimTaxLines (
6678: p_ship_header_id => NULL,
6679: p_match_id => NULL,
6680: p_comp_name => 'INL_CHARGE_LINES',
6681: p_comp_id => C_ori_CL(i).charge_line_id,
6682: p_tax_code => NULL,
6683: p_adjustment_num => p_adjustment_num,
6684: p_prev_adjustment_num => C_ori_CL(i).adjustment_num,

Line 6799: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

6795: AND cl.match_amount_id IS NULL)
6796: OR
6797: cl.adjustment_num < 0) -- SCM-051
6798: AND NVL(cl.charge_amt,0) <> 0
6799: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
6800: AND a.ship_header_id = m.ship_header_id
6801: AND a.from_parent_table_id
6802: = (SELECT
6803: cl1.charge_line_id

Line 6805: inl_charge_lines cl1

6801: AND a.from_parent_table_id
6802: = (SELECT
6803: cl1.charge_line_id
6804: FROM
6805: inl_charge_lines cl1
6806: WHERE
6807: CONNECT_BY_ISLEAF = 1
6808: START WITH cl1.charge_line_id = cl.charge_line_id
6809: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id)

Line 6962: p_comp_name => 'INL_CHARGE_LINES',

6958: ) ;
6959: Zero_EstimTaxLines (
6960: p_ship_header_id => NULL,
6961: p_match_id => p_match_id,
6962: p_comp_name => 'INL_CHARGE_LINES',
6963: p_comp_id => C_est_CL (i) .charge_line_id,
6964: p_tax_code => NULL,
6965: p_adjustment_num => p_adjustment_num,
6966: x_return_status => l_return_status

Line 7053: a.from_parent_table_name = 'INL_CHARGE_LINES'

7049: a.to_parent_table_id
7050: FROM
7051: inl_associations a
7052: WHERE
7053: a.from_parent_table_name = 'INL_CHARGE_LINES'
7054: AND a.from_parent_table_id = pc_charge_line_id
7055: ;
7056:
7057: TYPE affected_ship_Type

Line 7105: inl_charge_lines cl,

7101: cl.poo_location_id ,
7102: a.to_parent_table_name ,
7103: a.to_parent_table_id
7104: FROM
7105: inl_charge_lines cl,
7106: inl_associations a,
7107: inl_ship_lines_all sl,
7108: inl_ship_line_groups slg,
7109: inl_ship_headers_all sh

Line 7112: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

7108: inl_ship_line_groups slg,
7109: inl_ship_headers_all sh
7110: WHERE
7111: cl.adjustment_num = 0
7112: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
7113: AND a.from_parent_table_id = cl.charge_line_id
7114: AND cl.charge_line_type_id = p_charge_line_type_id
7115: AND a.ship_header_id = sl.ship_header_id
7116: AND ((a.to_parent_table_name = 'INL_SHIP_LINES'

Line 7182: inl_charge_lines cl

7178: INTO
7179: l_created_chLnId,
7180: l_created_chLnAmt
7181: FROM
7182: inl_charge_lines cl
7183: WHERE
7184: cl.match_id = p_match_id
7185: AND cl.charge_amt <> 0 --BUG#9804065 --discards lines to zeroes estimated
7186: ;

Line 7196: inl_charge_lines cl

7192: INTO
7193: l_created_chLnId,
7194: l_created_chLnAmt
7195: FROM
7196: inl_charge_lines cl
7197: WHERE
7198: cl.match_Amount_id = p_match_Amount_id
7199: AND cl.charge_amt <> 0 --BUG#9804065 -- discards lines to zeroes estimated
7200: ;

Line 7211: inl_charge_lines cl

7207: INTO
7208: l_created_chLnId,
7209: l_created_chLnAmt
7210: FROM
7211: inl_charge_lines cl
7212: WHERE
7213: ((p_match_id IS NOT NULL
7214: AND cl.match_id = p_match_id)
7215: OR

Line 7224: inl_charge_lines cl1

7220: OR 0 < --SCM-051
7221: (SELECT
7222: cl1.adjustment_num
7223: FROM
7224: inl_charge_lines cl1
7225: WHERE
7226: CONNECT_BY_ISLEAF = 1
7227: START WITH cl1.charge_line_id = cl.charge_line_id
7228: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id));

Line 7335: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

7331: AND a.to_parent_table_id = sl.ship_header_id))
7332: AND sh.ship_header_id = sl.ship_header_id
7333: AND slg.ship_line_group_id = sl.ship_line_group_id
7334: AND sl.ship_line_id = affected_by_alc_ship_lst(i).to_parent_table_id
7335: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
7336: AND a.from_parent_table_id = cl.charge_line_id
7337: ;
7338:
7339: l_debug_info := 'Sum all charge lines that come to this point: '||l_sum_chLnAmt;

Line 7364: inl_charge_lines cl,

7360: COUNT(*)
7361: INTO
7362: l_alc_zero
7363: FROM
7364: inl_charge_lines cl,
7365: inl_associations assoc
7366: WHERE
7367: assoc.to_parent_table_id = affected_by_alc_ship_lst(i).to_parent_table_id
7368: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'

Line 7369: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'

7365: inl_associations assoc
7366: WHERE
7367: assoc.to_parent_table_id = affected_by_alc_ship_lst(i).to_parent_table_id
7368: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'
7369: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'
7370: AND assoc.from_parent_table_id = cl.charge_line_id
7371: AND cl.charge_line_type_id = p_charge_line_type_id --same cost factor
7372: AND cl.charge_amt = 0
7373: AND (cl.parent_charge_line_id IS NULL

Line 7378: inl_charge_lines cl1

7374: OR 0 not in
7375: (SELECT
7376: cl1.adjustment_num
7377: FROM
7378: inl_charge_lines cl1
7379: WHERE
7380: CONNECT_BY_ISLEAF = 1
7381: START WITH cl1.charge_line_id = cl.charge_line_id
7382: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id));

Line 7493: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

7489: WHERE
7490: a.ship_header_id = affected_by_elc_lst(k).ship_header_id
7491: AND cl.charge_line_type_id = p_charge_line_type_id --same cost factor
7492: AND NVL(cl.match_id,cl.match_amount_id) IS NOT NULL --only ALC
7493: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
7494: AND a.from_parent_table_id = cl.charge_line_id
7495: ;
7496:
7497: --Bug#11064618

Line 7510: inl_charge_lines cl,

7506: COUNT(*)
7507: INTO
7508: l_alc_zero
7509: FROM
7510: inl_charge_lines cl,
7511: inl_associations assoc
7512: WHERE
7513: assoc.ship_header_id = affected_by_elc_lst(k).ship_header_id
7514: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'

Line 7515: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'

7511: inl_associations assoc
7512: WHERE
7513: assoc.ship_header_id = affected_by_elc_lst(k).ship_header_id
7514: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'
7515: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'
7516: AND assoc.from_parent_table_id = cl.charge_line_id
7517: AND cl.charge_amt = 0
7518: AND cl.charge_line_type_id = p_charge_line_type_id --same cost factor
7519: AND NVL(cl.match_id,cl.match_amount_id) IS NOT NULL --only ALC

Line 7525: inl_charge_lines cl1

7521: OR 0 not in
7522: (SELECT
7523: cl1.adjustment_num
7524: FROM
7525: inl_charge_lines cl1
7526: WHERE
7527: CONNECT_BY_ISLEAF = 1
7528: START WITH cl1.charge_line_id = cl.charge_line_id
7529: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id));

Line 7550: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

7546: WHERE sl.ship_line_id = a.to_parent_table_id
7547: AND sl.ship_header_id = affected_by_elc_lst(k).ship_header_id
7548: AND sl.ship_line_group_id = affected_by_elc_lst(k).to_parent_table_id
7549: AND ROWNUM < 2)
7550: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
7551: AND a.from_parent_table_id = cl.charge_line_id
7552: ;
7553:
7554: --Bug#11064618

Line 7567: inl_charge_lines cl,

7563: COUNT(*)
7564: INTO
7565: l_alc_zero
7566: FROM
7567: inl_charge_lines cl,
7568: inl_associations assoc
7569: WHERE
7570: assoc.ship_header_id = affected_by_elc_lst(k).ship_header_id
7571: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'

Line 7572: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'

7568: inl_associations assoc
7569: WHERE
7570: assoc.ship_header_id = affected_by_elc_lst(k).ship_header_id
7571: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'
7572: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'
7573: AND assoc.from_parent_table_id = cl.charge_line_id
7574: AND cl.charge_amt = 0
7575: AND cl.charge_line_type_id = p_charge_line_type_id --same cost factor
7576: AND NVL(cl.match_id,cl.match_amount_id) IS NOT NULL --only ALC

Line 7588: inl_charge_lines cl1

7584: OR 0 not in
7585: (SELECT
7586: cl1.adjustment_num
7587: FROM
7588: inl_charge_lines cl1
7589: WHERE
7590: CONNECT_BY_ISLEAF = 1
7591: START WITH cl1.charge_line_id = cl.charge_line_id
7592: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id));

Line 7608: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

7604: a.ship_header_id = affected_by_elc_lst(k).ship_header_id
7605: AND cl.charge_line_type_id = p_charge_line_type_id --same cost factor
7606: AND NVL(cl.match_id,cl.match_amount_id) IS NOT NULL --only ALC
7607: AND a.to_parent_table_id = affected_by_elc_lst(k).to_parent_table_id
7608: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
7609: AND a.from_parent_table_id = cl.charge_line_id
7610: ;
7611: --Bug#11064618
7612: l_debug_info := 'Verify if exist any actual with amount = 0 coming to this line ';

Line 7624: inl_charge_lines cl,

7620: COUNT(*)
7621: INTO
7622: l_alc_zero
7623: FROM
7624: inl_charge_lines cl,
7625: inl_associations assoc
7626: WHERE
7627: assoc.ship_header_id = affected_by_elc_lst(k).ship_header_id
7628: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'

Line 7630: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'

7626: WHERE
7627: assoc.ship_header_id = affected_by_elc_lst(k).ship_header_id
7628: AND assoc.to_parent_table_name = 'INL_SHIP_LINES'
7629: AND assoc.to_parent_table_id = affected_by_elc_lst(k).to_parent_table_id
7630: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'
7631: AND assoc.from_parent_table_id = cl.charge_line_id
7632: AND cl.charge_amt = 0
7633: AND cl.charge_line_type_id = p_charge_line_type_id --same cost factor
7634: AND NVL(cl.match_id,cl.match_amount_id) IS NOT NULL --only ALC

Line 7640: inl_charge_lines cl1

7636: OR 0 not in
7637: (SELECT
7638: cl1.adjustment_num
7639: FROM
7640: inl_charge_lines cl1
7641: WHERE
7642: CONNECT_BY_ISLEAF = 1
7643: START WITH cl1.charge_line_id = cl.charge_line_id
7644: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id));

Line 7693: inl_charge_lines cl1

7689: cl1.charge_line_id
7690: INTO
7691: l_last_parentChargeLineID
7692: FROM
7693: inl_charge_lines cl1
7694: WHERE
7695: CONNECT_BY_ISLEAF = 1
7696: START WITH cl1.charge_line_id = ELC_CLines_lst(j).charge_line_id
7697: CONNECT BY PRIOR cl1.charge_line_id = cl1.parent_charge_line_id

Line 7710: INSERT INTO inl_charge_lines

7706: --Create Charge lines and associations without use of bulk
7707: -- record should be generated before the evaluation of the next charge line
7708: --
7709: -- ASSOCIATIONS remain the same from original ELC charge
7710: INSERT INTO inl_charge_lines
7711: (
7712: charge_line_id , /* 01 */
7713: charge_line_num , /* 02 */
7714: charge_line_type_id , /* 03 */

Line 7758: inl_charge_lines_s.nextval , /* 01 */

7754: last_update_login /* 43 */
7755: )
7756: VALUES
7757: (
7758: inl_charge_lines_s.nextval , /* 01 */
7759: ELC_CLines_lst(j).charge_line_num , /* 02 */
7760: p_charge_line_type_id , /* 03 */
7761: ELC_CLines_lst(j).landed_cost_flag , /* 04 */
7762: ELC_CLines_lst(j).update_allowed , /* 05 */

Line 8908: WHERE from_parent_table_name = 'INL_CHARGE_LINES'

8904: ) ;
8905: SELECT MAX(association_id) --Bug#9907327
8906: INTO l_AssocLn.association_id
8907: FROM inl_associations
8908: WHERE from_parent_table_name = 'INL_CHARGE_LINES'
8909: AND from_parent_table_id = l_new_charge_line_id
8910: AND to_parent_table_name = c_matches(i).to_parent_table_name
8911: AND to_parent_table_id = c_matches(i).to_parent_table_id
8912: ;

Line 8932: p_from_parent_table_name => 'INL_CHARGE_LINES',

8928: p_var_name => 'c_matches('||i||').to_parent_table_id',
8929: p_var_value => c_matches(i).to_parent_table_id) ;
8930: Create_Assoc (
8931: p_Assoc => l_AssocLn,
8932: p_from_parent_table_name => 'INL_CHARGE_LINES',
8933: p_new_line_id => l_new_charge_line_id,
8934: x_return_status => l_return_status
8935: );
8936: END LOOP;

Line 9731: --Bug#14044298 inl_charge_lines cl ,

9727: m.to_parent_table_id ,
9728: sh.organization_id --Bug#14044298
9729: --Bug#14044298 gsb.currency_code func_currency_code --BUG#8468830
9730: FROM
9731: --Bug#14044298 inl_charge_lines cl ,
9732: --Bug#14044298 inl_ship_lines sl ,
9733: inl_ship_headers sh ,
9734: inl_corr_matches_v m
9735: --Bug#14044298 org_organization_definitions ood, --BUG#8468830

Line 9739: --Bug#14044298 cl.charge_line_id (+) = DECODE (m.to_parent_table_name, 'INL_CHARGE_LINES', m.to_parent_table_id, NULL)

9735: --Bug#14044298 org_organization_definitions ood, --BUG#8468830
9736: --Bug#14044298 gl_sets_of_books gsb --BUG#8468830
9737: WHERE
9738: sh.ship_header_id = p_ship_header_id
9739: --Bug#14044298 cl.charge_line_id (+) = DECODE (m.to_parent_table_name, 'INL_CHARGE_LINES', m.to_parent_table_id, NULL)
9740: --Bug#14044298 AND sl.ship_line_id (+) = DECODE (m.to_parent_table_name, 'INL_SHIP_LINES', m.to_parent_table_id, NULL)
9741: AND sh.ship_header_id = m.ship_header_id
9742: AND m.ship_header_id = p_ship_header_id
9743: AND m.match_amount_id IS NULL

Line 11153: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

11149: inl_adj_associations_v a
11150: WHERE sh.ship_header_id = a.ship_header_id
11151: AND a.from_parent_table_id = cl.charge_line_id
11152: AND sh.pending_update_flag = 'Y'
11153: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
11154: AND a.ship_header_id = p_ship_header_id
11155: AND (cl.adjustment_type_flag IS NULL
11156: OR cl.adjustment_type_flag <> 'Z')
11157: ORDER BY charge_line_id;

Line 11411: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'

11407: -- Check if associations changed
11408: SELECT COUNT(1)
11409: INTO l_count_assoc_changed
11410: FROM inl_adj_associations_v a
11411: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'
11412: AND a.from_parent_table_id = l_elc_adj_chlines(i).charge_line_id
11413: AND a.adjustment_type_flag IS NOT NULL
11414: AND a.ship_header_id = p_ship_header_id;
11415:

Line 11426: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'

11422: -- Check if charge contains associations
11423: SELECT COUNT(1)
11424: INTO l_exist_associations
11425: FROM inl_adj_associations_v a
11426: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'
11427: AND a.from_parent_table_id = l_elc_adj_chlines(i).charge_line_id
11428: AND (a.adjustment_type_flag IS NULL
11429: OR a.adjustment_type_flag = 'A')
11430: AND a.ship_header_id = p_ship_header_id;

Line 11439: SELECT inl_charge_lines_s.nextval

11435: p_var_value => l_exist_associations);
11436:
11437: IF NVL(l_exist_associations, 0) > 0 THEN -- Exist associations for charge
11438:
11439: SELECT inl_charge_lines_s.nextval
11440: INTO l_charge_line_id
11441: FROM DUAL;
11442:
11443: l_debug_info := 'Get next charge line number';

Line 11450: FROM inl_charge_lines cl

11446: p_debug_info => l_debug_info);
11447:
11448: SELECT NVL (MAX (cl.charge_line_num), 0) + 1
11449: INTO l_charge_line_num
11450: FROM inl_charge_lines cl
11451: WHERE NVL (cl.parent_charge_line_id, cl.charge_line_id) IN(
11452: SELECT assoc.from_parent_table_id
11453: FROM inl_associations assoc
11454: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'

Line 11454: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'

11450: FROM inl_charge_lines cl
11451: WHERE NVL (cl.parent_charge_line_id, cl.charge_line_id) IN(
11452: SELECT assoc.from_parent_table_id
11453: FROM inl_associations assoc
11454: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
11455: AND assoc.ship_header_id = p_ship_header_id);
11456:
11457: INL_LOGGING_PVT.Log_Variable(p_module_name => g_module_name,
11458: p_procedure_name => l_program_name,

Line 11468: INSERT INTO inl_charge_lines(charge_line_id, -- 01

11464: p_procedure_name => l_program_name,
11465: p_debug_info => l_debug_info);
11466:
11467: -- Create new charge line
11468: INSERT INTO inl_charge_lines(charge_line_id, -- 01
11469: charge_line_num, -- 02
11470: charge_line_type_id, -- 03
11471: landed_cost_flag, -- 04
11472: update_allowed, -- 05

Line 11602: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

11598: L_FND_LOGIN_ID, -- 13
11599: NULL -- 14
11600: FROM inl_adj_associations_v a
11601: WHERE a.ship_header_id = p_ship_header_id
11602: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
11603: AND a.from_parent_table_id = l_elc_adj_chlines(i).charge_line_id
11604: AND (a.adjustment_type_flag IS NULL
11605: OR a.adjustment_type_flag = 'A'));
11606: END IF; -- END Exist associations

Line 11614: INSERT INTO inl_charge_lines(charge_line_id, -- 01

11610: p_procedure_name => l_program_name,
11611: p_debug_info => l_debug_info);
11612:
11613: -- Charge_amt = 0 for current charge
11614: INSERT INTO inl_charge_lines(charge_line_id, -- 01
11615: charge_line_num, -- 02
11616: charge_line_type_id, -- 03
11617: landed_cost_flag, -- 04
11618: update_allowed, -- 05

Line 11662: (SELECT INL_CHARGE_LINES_S.NEXTVAL, -- 01

11658: new_currency_conversion_type, -- 45
11659: new_currency_conversion_date, -- 46
11660: new_currency_conversion_rate, -- 47
11661: adjustment_type_flag) -- 48
11662: (SELECT INL_CHARGE_LINES_S.NEXTVAL, -- 01
11663: cl.charge_line_num, -- 02
11664: cl.charge_line_type_id, -- 03
11665: cl.landed_cost_flag, -- 04
11666: cl.update_allowed, -- 05

Line 11735: INSERT INTO inl_charge_lines(charge_line_id, -- 01

11731: p_var_value => l_count_charge_changed);
11732:
11733: IF NVL(l_count_charge_changed,0) > 0 THEN
11734: -- Create new charge line
11735: INSERT INTO inl_charge_lines(charge_line_id, -- 01
11736: charge_line_num, -- 02
11737: charge_line_type_id, -- 03
11738: landed_cost_flag, -- 04
11739: update_allowed, -- 05

Line 11783: (SELECT INL_CHARGE_LINES_S.NEXTVAL, -- 01

11779: new_currency_conversion_type, -- 45
11780: new_currency_conversion_date, -- 46
11781: new_currency_conversion_rate -- 47
11782: )
11783: (SELECT INL_CHARGE_LINES_S.NEXTVAL, -- 01
11784: cl.charge_line_num, -- 02
11785: cl.charge_line_type_id, -- 03
11786: cl.landed_cost_flag, -- 04
11787: cl.update_allowed, -- 05

Line 12806: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

12802: sh.pending_matching_flag
12803: FROM inl_associations a,
12804: inl_ship_headers sh
12805: WHERE sh.ship_header_id = a.ship_header_id
12806: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
12807: AND a.from_parent_table_id = p_charge_line_id
12808: AND a.ship_header_id <> p_ship_header_id;
12809: r_affected_ship c_affected_ship%ROWTYPE;
12810: BEGIN

Line 13342: ELSIF (p_match_table_name = 'INL_CHARGE_LINES') THEN

13338:
13339: -- Handle Match Type Code
13340: IF(p_match_table_name = 'INL_SHIP_LINES' OR p_match_table_name IS NULL) THEN
13341: l_match_type_code := 'ITEM';
13342: ELSIF (p_match_table_name = 'INL_CHARGE_LINES') THEN
13343: l_match_type_code := 'CHARGE';
13344: ELSIF (p_match_table_name = 'INL_TAX_LINES') THEN
13345: l_match_type_code := 'TAX';
13346: END IF;

Line 13895: FROM inl_charge_lines cl

13891:
13892: -- charge lines to be deleted
13893: CURSOR c_delete_cl IS
13894: SELECT cl.charge_line_id
13895: FROM inl_charge_lines cl
13896: WHERE cl.adjustment_type_flag = 'A'
13897: AND cl.parent_charge_line_id IS NULL
13898: AND EXISTS (SELECT 1
13899: FROM inl_associations a

Line 13900: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'

13896: WHERE cl.adjustment_type_flag = 'A'
13897: AND cl.parent_charge_line_id IS NULL
13898: AND EXISTS (SELECT 1
13899: FROM inl_associations a
13900: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'
13901: AND a.from_parent_table_id = cl.charge_line_id
13902: AND a.adjustment_type_flag = 'A'
13903: AND a.ship_header_id = p_ship_header_id
13904: AND ROWNUM < 2

Line 13908: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'

13904: AND ROWNUM < 2
13905: )
13906: AND NOT EXISTS (SELECT 1
13907: FROM inl_associations a
13908: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'
13909: AND a.from_parent_table_id = cl.charge_line_id
13910: AND a.adjustment_type_flag IS NOT NULL
13911: AND a.adjustment_type_flag <> 'A'
13912: AND a.ship_header_id = p_ship_header_id

Line 13916: FROM inl_charge_lines cl0

13912: AND a.ship_header_id = p_ship_header_id
13913: AND ROWNUM < 2
13914: )
13915: AND NOT EXISTS (SELECT 1
13916: FROM inl_charge_lines cl0
13917: WHERE cl0.parent_charge_line_id = cl.charge_line_id
13918: AND ROWNUM < 2
13919: );
13920:

Line 13976: UPDATE inl_charge_lines icl

13972: l_debug_info := 'Revert Charge Line adjustment values';
13973: INL_LOGGING_PVT.Log_Statement (p_module_name => g_module_name,
13974: p_procedure_name => l_program_name,
13975: p_debug_info => l_debug_info);
13976: UPDATE inl_charge_lines icl
13977: SET icl.last_update_login = l_fnd_login_id,
13978: icl.last_update_date = SYSDATE,
13979: icl.last_updated_by = l_fnd_user_id,
13980: icl.new_charge_amt = NULL,

Line 13989: inl_charge_lines cl1

13985: WHERE icl.charge_line_id = (
13986: SELECT
13987: cl1.charge_line_id
13988: FROM
13989: inl_charge_lines cl1
13990: WHERE
13991: CONNECT_BY_ISLEAF = 1
13992: START WITH cl1.charge_line_id = icl.charge_line_id
13993: CONNECT BY PRIOR cl1.charge_line_id = cl1.parent_charge_line_id

Line 13998: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'

13994: )
13995: AND EXISTS (
13996: SELECT 1
13997: FROM inl_associations a
13998: WHERE a.from_parent_table_name = 'INL_CHARGE_LINES'
13999: AND a.ship_header_id = p_ship_header_id
14000: AND a.from_parent_table_id = (
14001: SELECT
14002: cl1.charge_line_id

Line 14004: inl_charge_lines cl1

14000: AND a.from_parent_table_id = (
14001: SELECT
14002: cl1.charge_line_id
14003: FROM
14004: inl_charge_lines cl1
14005: WHERE
14006: CONNECT_BY_ISLEAF = 1
14007: START WITH cl1.charge_line_id = icl.charge_line_id
14008: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id

Line 14033: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

14029:
14030: DELETE FROM inl_associations a
14031: WHERE a.adjustment_type_flag = 'A'
14032: AND a.ship_header_id = p_ship_header_id
14033: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
14034: AND a.from_parent_table_id = ( --Charge Line should be the top of charge lines
14035: SELECT
14036: cl1.charge_line_id
14037: FROM

Line 14038: inl_charge_lines cl1

14034: AND a.from_parent_table_id = ( --Charge Line should be the top of charge lines
14035: SELECT
14036: cl1.charge_line_id
14037: FROM
14038: inl_charge_lines cl1
14039: WHERE
14040: CONNECT_BY_ISLEAF = 1
14041: START WITH cl1.charge_line_id = a.from_parent_table_id
14042: CONNECT BY PRIOR cl1.charge_line_id = cl1.parent_charge_line_id

Line 14054: DELETE FROM inl_charge_lines

14050:
14051: IF NVL (l_delete_cl_lst.LAST, 0) > 0 THEN
14052: FOR i IN NVL (l_delete_cl_lst.FIRST, 0) ..NVL (l_delete_cl_lst.LAST, 0)
14053: LOOP
14054: DELETE FROM inl_charge_lines
14055: WHERE charge_line_id = l_delete_cl_lst(i).charge_line_id;
14056: END LOOP;
14057: END IF;
14058: --

Line 14071: AND a.from_parent_table_name = 'INL_CHARGE_LINES'

14067: a.last_update_date = SYSDATE,
14068: a.last_updated_by = l_fnd_user_id
14069: WHERE a.adjustment_type_flag = 'R'
14070: AND a.ship_header_id = p_ship_header_id
14071: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
14072: AND a.from_parent_table_id = ( --Charge Line should be the top of charge lines
14073: SELECT
14074: cl1.charge_line_id
14075: FROM

Line 14076: inl_charge_lines cl1

14072: AND a.from_parent_table_id = ( --Charge Line should be the top of charge lines
14073: SELECT
14074: cl1.charge_line_id
14075: FROM
14076: inl_charge_lines cl1
14077: WHERE
14078: CONNECT_BY_ISLEAF = 1
14079: START WITH cl1.charge_line_id = a.from_parent_table_id
14080: CONNECT BY PRIOR cl1.parent_charge_line_id = cl1.charge_line_id