[Home] [Help]
602: CURSOR assoc IS
603: SELECT association_id,
604: to_parent_table_name,
605: to_parent_table_id
606: FROM inl_adj_associations_v
607: WHERE from_parent_table_name = p_from_component_name
608: AND from_parent_table_id = p_from_component_id
609: ORDER BY association_id;
610: rec_assoc assoc%ROWTYPE;
1003: a.to_parent_table_id,
1004: a.allocation_basis,
1005: a.allocation_uom_code,
1006: a.to_parent_table_id ship_line_id
1007: FROM inl_adj_associations_v a
1008: WHERE a.from_parent_table_name = 'INL_SHIP_LINES'
1009: AND a.from_parent_table_id = p_ship_line_id
1010: AND a.to_parent_table_name = 'INL_SHIP_LINES'
1011: AND a.ship_header_id = p_ship_header_id
1558: from_parent_table_name,
1559: from_parent_table_id,
1560: to_parent_table_name,
1561: to_parent_table_id
1562: FROM INL_adj_associations_v
1563: WHERE ship_header_id = p_ship_header_id
1564: AND from_parent_table_name = rec_component.component_name
1565: AND from_parent_table_id = rec_component.component_id
1566: ORDER BY association_id;
1945: to_parent_table_id,
1946: allocation_basis,
1947: allocation_uom_code,
1948: association_id
1949: FROM inl_adj_associations_v
1950: WHERE ship_header_id = p_ship_header_id
1951: AND ((p_calc_scope_code = 3 AND from_parent_table_name = 'INL_TAX_LINES') OR
1952: (p_calc_scope_code = 2 AND from_parent_table_name = 'INL_CHARGE_LINES') OR
1953: (p_calc_scope_code = 1 AND from_parent_table_name IN ('INL_SHIP_HEADERS','INL_SHIP_LINES')) OR
1975: currency_conversion_date,
1976: charge_line_id
1977: FROM INL_adj_charge_lines_v c
1978: WHERE EXISTS (SELECT 'x'
1979: FROM inl_adj_associations_v x
1980: WHERE x.from_parent_table_name = 'INL_CHARGE_LINES'
1981: AND x.from_parent_table_id = c.charge_line_id
1982: AND x.ship_header_id = p_ship_header_id
1983: AND p_calc_scope_code in (0,2)
1989: SELECT tax_amt,
1990: tax_line_id
1991: FROM INL_tax_lines t
1992: WHERE EXISTS (SELECT 'x'
1993: FROM INL_adj_associations_v x
1994: WHERE x.from_parent_table_name = 'INL_TAX_LINES'
1995: AND x.from_parent_table_id = t.tax_line_id
1996: AND x.ship_header_id = p_ship_header_id
1997: AND p_calc_scope_code in (0,3)
2344: p_debug_info => l_debug_info);
2345:
2346: SELECT COUNT(*) + l_count
2347: INTO l_count
2348: FROM INL_adj_associations_v
2349: WHERE from_parent_table_name = 'INL_SHIP_LINES'
2350: AND from_parent_table_id = rec_dist.ship_line_id;
2351:
2352: SELECT COUNT(*) + l_count
2350: AND from_parent_table_id = rec_dist.ship_line_id;
2351:
2352: SELECT COUNT(*) + l_count
2353: INTO l_count
2354: FROM INL_adj_associations_v
2355: WHERE from_parent_table_name = 'INL_SHIP_HEADERS'
2356: AND from_parent_table_id = rec_dist.ship_header_id;
2357:
2358: SELECT DECODE(l_count,0,'Y','N') INTO l_lc_flag FROM DUAL;
2375:
2376: SELECT SUM(NVL(al.allocation_amt,0))
2377: INTO l_inclusive_tax_amt
2378: FROM inl_tax_lines t,
2379: inl_adj_associations_v assoc,
2380: inl_allocations al
2381: WHERE t.tax_amt_included_flag = 'Y'
2382: AND t.tax_line_id = assoc.from_parent_table_id
2383: AND assoc.from_parent_table_name = 'INL_TAX_LINES'