1861: FROM inl_adj_charge_lines_v cl,
1862: inl_charge_line_types_vl clt ,
1863: inl_associations assoc
1864: WHERE clt.charge_line_type_id = cl.charge_line_type_id
1865: AND assoc.from_parent_table_name = 'INL_CHARGE_LINES'
1866: AND assoc.from_parent_table_id = NVL (cl.parent_charge_line_id, cl.charge_line_id)
1867: AND assoc.ship_header_id = p_ship_header_id
1868: AND assoc.to_parent_table_name = p_to_parent_table_name
1869: AND assoc.to_parent_table_id = p_to_parent_table_id
1892: -- INCLUDE A LINE IN INL_SHIP_HOLdS
1893: Handle_ShipError ( p_ship_header_id => p_ship_header_id,
1894: p_ship_line_id => NULL,
1895: p_charge_line_id => l_ch_lines_rec.charge_line_id,
1896: p_table_name => 'INL_CHARGE_LINES',
1897: p_column_name => 'CURRENCY_CODE',
1898: p_column_value => l_ch_lines_rec.CURRENCY_CODE,
1899: p_error_message => SUBSTR (FND_MSG_PUB.Get (p_msg_index => FND_MSG_PUB.Count_Msg (),
1900: p_encoded => FND_API.g_false), 1, 2000),
3922: p_debug_info => l_debug_info
3923: ) ;
3924: SELECT NVL (MAX (cl.charge_line_num), 0) + 1
3925: INTO l_charge_line_num
3926: FROM inl_charge_lines cl
3927: WHERE NVL (cl.parent_charge_line_id, cl.charge_line_id) IN
3928: (
3929: SELECT assoc.from_parent_table_id
3930: FROM inl_associations assoc
3927: WHERE NVL (cl.parent_charge_line_id, cl.charge_line_id) IN
3928: (
3929: SELECT assoc.from_parent_table_id
3930: FROM inl_associations assoc
3931: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
3932: AND assoc.ship_header_id = NVL (p_ChLn_Assoc.inl_Assoc.ship_header_id, 0)
3933: ) ;
3934: ELSE
3935: l_charge_line_num := p_ChLn_Assoc.charge_line_num;
3942: ELSE
3943: l_adjustment_num := p_ChLn_Assoc.adjustment_num;
3944: END IF;
3945: --
3946: -- Get inl_charge_lines_s.nextval
3947: --
3948: l_debug_info := 'Get inl_charge_lines_s.nextval';
3949: INL_LOGGING_PVT.Log_Statement (
3950: p_module_name => g_module_name,
3944: END IF;
3945: --
3946: -- Get inl_charge_lines_s.nextval
3947: --
3948: l_debug_info := 'Get inl_charge_lines_s.nextval';
3949: INL_LOGGING_PVT.Log_Statement (
3950: p_module_name => g_module_name,
3951: p_procedure_name => l_proc_name,
3952: p_debug_info => l_debug_info
3950: p_module_name => g_module_name,
3951: p_procedure_name => l_proc_name,
3952: p_debug_info => l_debug_info
3953: ) ;
3954: SELECT inl_charge_lines_s.nextval
3955: INTO x_new_charge_line_id FROM dual;
3956: --
3957: -- include Charge Line record
3958: --
3962: p_procedure_name => l_proc_name,
3963: p_debug_info => l_debug_info
3964: ) ;
3965: INSERT
3966: INTO inl_charge_lines
3967: (
3968: charge_line_id, /* 01 */
3969: charge_line_num, /* 02 */
3970: charge_line_type_id, /* 03 */
4054:
4055: IF p_include_assoc = 'Y' THEN
4056: Create_Assoc (
4057: p_Assoc => p_ChLn_Assoc.inl_Assoc,
4058: p_from_parent_table_name => 'INL_CHARGE_LINES',
4059: p_new_line_id => x_new_charge_line_id,
4060: x_return_status => l_return_status
4061: );
4062: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
4132: assoc.to_parent_table_name,
4133: assoc.to_parent_table_id,
4134: assoc.ship_header_id
4135: FROM inl_associations assoc,
4136: inl_charge_lines cl
4137: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
4138: AND assoc.from_parent_table_id = cl.charge_line_id
4139: AND cl.charge_line_type_id = p_charge_line_type_id
4140: AND EXISTS
4133: assoc.to_parent_table_id,
4134: assoc.ship_header_id
4135: FROM inl_associations assoc,
4136: inl_charge_lines cl
4137: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
4138: AND assoc.from_parent_table_id = cl.charge_line_id
4139: AND cl.charge_line_type_id = p_charge_line_type_id
4140: AND EXISTS
4141: (SELECT 1
4214: AND EXISTS
4215: (
4216: SELECT 1
4217: FROM inl_associations assoc
4218: WHERE assoc.from_parent_table_name = 'INL_CHARGE_LINES'
4219: AND assoc.from_parent_table_id = NVL (cl.parent_charge_line_id, cl.charge_line_id)
4220: AND (
4221: (
4222: pc_level = 'ALL'
4453:
4454: Zero_EstimTaxLines (
4455: p_ship_header_id => NULL,
4456: p_match_id => p_match_id,
4457: p_comp_name => 'INL_CHARGE_LINES',
4458: p_comp_id => C_est_CL (i) .charge_line_id,
4459: p_tax_code => NULL,
4460: p_adjustment_num => p_adjustment_num,
4461: x_return_status => l_return_status
5193: p_procedure_name => l_api_name,
5194: p_var_name => l_debug_info,
5195: p_var_value => c_matches (i) .to_parent_table_id) ;
5196: Create_Assoc (p_Assoc => l_AssocLn,
5197: p_from_parent_table_name => 'INL_CHARGE_LINES',
5198: p_new_line_id => l_new_charge_line_id,
5199: x_return_status => l_return_status) ;
5200: END LOOP;
5201: END IF;
5781: m.tax_code ,
5782: m.to_parent_table_name,
5783: m.to_parent_table_id
5784: FROM
5785: inl_charge_lines cl,
5786: inl_ship_lines sl ,
5787: inl_ship_headers sh ,
5788: inl_corr_matches_v m
5789: WHERE
5786: inl_ship_lines sl ,
5787: inl_ship_headers sh ,
5788: inl_corr_matches_v m
5789: WHERE
5790: cl.charge_line_id (+) = DECODE (m.to_parent_table_name, 'INL_CHARGE_LINES', m.to_parent_table_id, NULL)
5791: AND sl.ship_line_id (+) = DECODE (m.to_parent_table_name, 'INL_SHIP_LINES', m.to_parent_table_id, NULL)
5792: AND sh.ship_header_id = m.ship_header_id
5793: AND m.ship_header_id = p_ship_header_id
5794: AND m.match_amount_id IS NULL
6819: sh.pending_matching_flag
6820: FROM inl_associations a,
6821: inl_ship_headers sh
6822: WHERE sh.ship_header_id = a.ship_header_id
6823: AND a.from_parent_table_name = 'INL_CHARGE_LINES'
6824: AND a.from_parent_table_id = p_charge_line_id
6825: AND a.ship_header_id <> p_ship_header_id;
6826:
6827: r_affected_ship c_affected_ship%ROWTYPE;