The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT tax_status_id,
tax_status_code,
tax,
tax_regime_code,
effective_from,
effective_to,
Rule_Based_Rate_Flag,
Allow_Rate_Override_Flag,
-- Allow_Adhoc_Tax_Rate_Flag, -- commented out for bug 3420310
Allow_Exemptions_Flag,
Allow_Exceptions_Flag
FROM ZX_SCO_STATUS_B_V
WHERE TAX_STATUS_CODE = c_tax_status_code AND
TAX = c_tax AND
TAX_REGIME_CODE = c_tax_regime_code AND
c_tax_determine_date >= EFFECTIVE_FROM AND
(c_tax_determine_date <= EFFECTIVE_TO OR
EFFECTIVE_TO IS NULL)
-- AND rownum = 1;
SELECT regime_precedence,
tax_regime_id,
tax_regime_code,
parent_regime_code,
country_code,
geography_type,
geography_id,
effective_from,
effective_to,
country_or_group_code
FROM ZX_REGIMES_B_V
WHERE tax_regime_code = p_tax_regime_code
AND (( effective_from <= p_tax_determine_date) AND
( effective_to >= p_tax_determine_date OR effective_to IS NULL));
SELECT tax_id,
tax,
tax_regime_code,
tax_type_code,
tax_precision,
minimum_accountable_unit,
Rounding_Rule_Code,
Tax_Status_Rule_Flag,
Tax_Rate_Rule_Flag,
Place_Of_Supply_Rule_Flag,
Applicability_Rule_Flag,
Tax_Calc_Rule_Flag,
Taxable_Basis_Rule_Flag,
def_tax_calc_formula,
def_taxable_basis_formula,
Reporting_Only_Flag,
tax_currency_code,
Def_Place_Of_Supply_Type_Code,
Def_Registr_Party_Type_Code,
Registration_Type_Rule_Flag,
Direct_Rate_Rule_Flag,
Def_Inclusive_Tax_Flag,
effective_from,
effective_to,
compounding_precedence,
Has_Other_Jurisdictions_Flag,
Live_For_Processing_Flag,
Regn_Num_Same_As_Le_Flag,
applied_amt_handling_flag,
exchange_rate_type,
applicable_by_default_flag,
record_type_code,
tax_exmpt_cr_method_code,
tax_exmpt_source_tax,
legal_reporting_status_def_val,
def_rec_settlement_option_code,
zone_geography_type,
override_geography_type,
allow_rounding_override_flag,
tax_account_source_tax
FROM ZX_SCO_TAXES_B_V
WHERE tax = p_tax
AND tax_regime_code = p_tax_regime_code
AND (effective_from <= p_tax_determine_date AND
(effective_to >= p_tax_determine_date OR effective_to IS NULL))
AND live_for_processing_flag = 'Y'
AND (live_for_applicability_flag = 'Y' OR
(LIVE_FOR_APPLICABILITY_FLAG = 'N' AND
tax ='LOCATION' AND record_type_code = 'MIGRATED'
)
)
-- AND rownum = 1;
SELECT tax_jurisdiction_code,
tax_jurisdiction_id,
effective_from,
effective_to,
tax_regime_code,
tax
FROM ZX_JURISDICTIONS_B
WHERE tax_regime_code = p_tax_regime_code
AND tax = p_tax
AND tax_jurisdiction_code = p_tax_jurisdiction_code
AND (effective_from <= p_tax_determine_date AND
(effective_to >= p_tax_determine_date OR effective_to IS NULL));
SELECT tax_id,
tax,
tax_regime_code,
tax_type_code,
tax_precision,
minimum_accountable_unit,
Rounding_Rule_Code,
Tax_Status_Rule_Flag,
Tax_Rate_Rule_Flag,
Place_Of_Supply_Rule_Flag,
Applicability_Rule_Flag,
Tax_Calc_Rule_Flag,
Taxable_Basis_Rule_Flag,
def_tax_calc_formula,
def_taxable_basis_formula,
Reporting_Only_Flag,
tax_currency_code,
Def_Place_Of_Supply_Type_Code,
Def_Registr_Party_Type_Code,
Registration_Type_Rule_Flag,
Direct_Rate_Rule_Flag,
Def_Inclusive_Tax_Flag,
effective_from,
effective_to,
compounding_precedence,
Has_Other_Jurisdictions_Flag,
Live_For_Processing_Flag,
Regn_Num_Same_As_Le_Flag,
applied_amt_handling_flag,
exchange_rate_type,
applicable_by_default_flag,
record_type_code,
tax_exmpt_cr_method_code,
tax_exmpt_source_tax,
legal_reporting_status_def_val,
def_rec_settlement_option_code,
zone_geography_type,
override_geography_type,
allow_rounding_override_flag,
tax_account_source_tax
FROM ZX_TAXES_B
WHERE tax_id = p_tax_id;
SELECT sob.set_of_books_id,
cur.currency_code,
NVL(cur.minimum_accountable_unit, power(10, (-1 * precision))),
precision
FROM fnd_currencies cur, gl_sets_of_books sob
WHERE sob.set_of_books_id = p_ledger_id
AND cur.currency_code = sob.currency_code;
SELECT tax_regime_code,
tax,
tax_status_code,
tax_rate_code,
tax_rate_id,
effective_from,
effective_to,
rate_type_code,
percentage_rate,
quantity_rate,
Allow_Adhoc_Tax_Rate_Flag,
uom_code,
tax_jurisdiction_code,
offset_tax,
offset_status_code,
offset_tax_rate_code,
allow_exemptions_flag,
allow_exceptions_flag,
NULL tax_jurisdiction_id,
def_rec_settlement_option_code,
taxable_basis_formula_code,
adj_for_adhoc_amt_code,
inclusive_tax_flag,
tax_class
FROM ZX_SCO_RATES_B_V
WHERE tax_regime_code = p_tax_regime_code
AND tax = p_tax
AND tax_status_code = p_tax_status_code
AND active_flag = 'Y'
AND (tax_jurisdiction_code = p_tax_jurisdiction_code )
AND tax_rate_code = p_tax_rate_code
AND (tax_class = p_tax_class or tax_class IS NULL)
AND ( p_tax_determine_date >= effective_from AND
(p_tax_determine_date <= effective_to OR effective_to IS NULL))
ORDER BY tax_class NULLS LAST, subscription_level_code;
SELECT tax_regime_code,
tax,
tax_status_code,
tax_rate_code,
tax_rate_id,
effective_from,
effective_to,
rate_type_code,
percentage_rate,
quantity_rate,
Allow_Adhoc_Tax_Rate_Flag,
uom_code,
tax_jurisdiction_code,
offset_tax,
offset_status_code,
offset_tax_rate_code,
allow_exemptions_flag,
allow_exceptions_flag,
NULL tax_jurisdiction_id,
def_rec_settlement_option_code,
taxable_basis_formula_code,
adj_for_adhoc_amt_code,
inclusive_tax_flag,
tax_class
FROM ZX_SCO_RATES_B_V
WHERE tax_regime_code = p_tax_regime_code
AND tax = p_tax
AND tax_status_code = p_tax_status_code
AND active_flag = 'Y'
AND (tax_jurisdiction_code is NULL)
AND tax_rate_code = p_tax_rate_code
AND (tax_class = p_tax_class or tax_class IS NULL)
AND ( p_tax_determine_date >= effective_from AND
(p_tax_determine_date <= effective_to OR effective_to IS NULL))
ORDER BY tax_class NULLS LAST, subscription_level_code;
SELECT tax_regime_code,
tax,
tax_status_code,
tax_rate_code,
tax_rate_id,
effective_from,
effective_to,
rate_type_code,
percentage_rate,
quantity_rate,
Allow_Adhoc_Tax_Rate_Flag,
uom_code,
tax_jurisdiction_code,
offset_tax,
offset_status_code,
offset_tax_rate_code,
allow_exemptions_flag,
allow_exceptions_flag,
NULL tax_jurisdiction_id,
def_rec_settlement_option_code,
taxable_basis_formula_code,
adj_for_adhoc_amt_code,
inclusive_tax_flag,
tax_class
-- FROM ZX_SCO_RATES -- Bug#5395227
FROM ZX_RATES_B
WHERE tax_rate_id = p_tax_rate_id
AND active_flag = 'Y';