[Home] [Help]
2074: , z.zip_end
2075: , b.county_name
2076: , b.county_code
2077: from
2078: pay_us_city_names a
2079: , pay_us_counties b
2080: , pay_us_states c
2081: , pay_us_zip_codes z
2082: where a.state_code = c.state_code
3112: -- ---------------------------------------------------------------------------
3113: --
3114: -- Description:
3115: -- If address style is 'US' and Payroll is installed under US legislation,
3116: -- validate town_or_city exist in pay_us_city_names.
3117: --
3118: -- Pre-conditions:
3119: -- Style (p_style) must be valid.
3120: --
3126: -- p_object_version_number
3127: --
3128: -- Post Success:
3129: -- If address style is 'US', payroll is installed under US legislation and
3130: -- a row exist in pay_us_city_names for the given town_or_city, processing
3131: -- continues.
3132: --
3133: -- Post Failure:
3134: -- If address style is 'US', payroll is installed under US legislation and
3131: -- continues.
3132: --
3133: -- Post Failure:
3134: -- If address style is 'US', payroll is installed under US legislation and
3135: -- a row does not exist in pay_us_city_names for the given town_or_city,
3136: -- an application error is raised and processing terminates.
3137: --
3138: -- Access Status:
3139: -- Internal Table Handler Use Only.
3155: -- Declare cursor
3156: --
3157: cursor csr_valid_town_or_city is
3158: select null
3159: from pay_us_city_names
3160: where city_name = p_town_or_city;
3161: begin
3162: hr_utility.set_location('Entering:'|| l_proc, 1);
3163: --
3227: -- ---------------------------------------------------------------------------
3228: --
3229: -- Description:
3230: -- If address style is 'US' and Payroll is installed under US legislation,
3231: -- validate tax_city (add_information18) exist in pay_us_city_names.
3232: --
3233: -- Pre-conditions:
3234: -- Style (p_style) must be valid.
3235: --
3241: -- p_object_version_number
3242: --
3243: -- Post Success:
3244: -- If address style is 'US', payroll is installed under US legislation and
3245: -- a row exist in pay_us_city_names for the given tax_city, processing
3246: -- continues.
3247: --
3248: -- Post Failure:
3249: -- If address style is 'US', payroll is installed under US legislation and
3246: -- continues.
3247: --
3248: -- Post Failure:
3249: -- If address style is 'US', payroll is installed under US legislation and
3250: -- a row does not exist in pay_us_city_names for the given tax_city,
3251: -- an application error is raised and processing terminates.
3252: --
3253: -- Access Status:
3254: -- Internal Table Handler Use Only.
3270: -- Declare cursor
3271: --
3272: cursor csr_valid_tax_city is
3273: select null
3274: from pay_us_city_names
3275: where city_name = p_tax_city;
3276: begin
3277: if p_tax_city is not null
3278: then
3382: --
3383: l_proc varchar2(72) := g_package||'chk_city_state_zip_comb';
3384: l_api_updating boolean;
3385: l_exists number;
3386: l_city_code pay_us_city_names.city_code%TYPE;
3387: l_state_code pay_us_city_names.state_code%TYPE;
3388: l_postal_code varchar2(6);
3389: l_county_code varchar2(3);
3390: l_geocodes_installed varchar2(1);
3383: l_proc varchar2(72) := g_package||'chk_city_state_zip_comb';
3384: l_api_updating boolean;
3385: l_exists number;
3386: l_city_code pay_us_city_names.city_code%TYPE;
3387: l_state_code pay_us_city_names.state_code%TYPE;
3388: l_postal_code varchar2(6);
3389: l_county_code varchar2(3);
3390: l_geocodes_installed varchar2(1);
3391: --
3401: --
3402: cursor csr_val_st_county_city
3403: is
3404: select cty.city_code
3405: from pay_us_city_names cty
3406: where cty.state_code = l_state_code
3407: and cty.county_code = l_county_code
3408: and cty.city_name = p_town_or_city;
3409: --
3409: --
3410: cursor csr_valid_zip_code is
3411: select 1
3412: from pay_us_zip_codes zip,
3413: pay_us_city_names cty
3414: where zip.state_code = l_state_code
3415: and zip.county_code = l_county_code
3416: and cty.city_name = p_town_or_city
3417: and zip.state_code = cty.state_code
3422: --
3423: cursor csr_val_st_city
3424: is
3425: select st.state_code
3426: from pay_us_city_names cty
3427: , pay_us_states st
3428: where cty.state_code = st.state_code
3429: and cty.city_name = p_town_or_city
3430: and st.state_abbrev = p_region_2;
3432: --
3433: cursor csr_valid_zip_code_no_ncty is
3434: select 1
3435: from pay_us_zip_codes zip,
3436: pay_us_city_names cty
3437: where cty.city_name = p_town_or_city
3438: and cty.state_code = l_state_code
3439: and zip.state_code = cty.state_code
3440: and zip.city_code = cty.city_code
3683: --
3684: l_proc varchar2(72) := g_package||'chk_tax_city_state_zip_comb';
3685: l_api_updating boolean;
3686: l_exists number;
3687: l_city_code pay_us_city_names.city_code%TYPE;
3688: l_state_code pay_us_city_names.state_code%TYPE;
3689: l_postal_code varchar2(6);
3690: l_county_code varchar2(3);
3691: l_geocodes_installed varchar2(1);
3684: l_proc varchar2(72) := g_package||'chk_tax_city_state_zip_comb';
3685: l_api_updating boolean;
3686: l_exists number;
3687: l_city_code pay_us_city_names.city_code%TYPE;
3688: l_state_code pay_us_city_names.state_code%TYPE;
3689: l_postal_code varchar2(6);
3690: l_county_code varchar2(3);
3691: l_geocodes_installed varchar2(1);
3692: --
3702: --
3703: cursor csr_val_st_county_city
3704: is
3705: select cty.city_code
3706: from pay_us_city_names cty
3707: where cty.state_code = l_state_code
3708: and cty.county_code = l_county_code
3709: and cty.city_name = p_tax_city;
3710: --
3710: --
3711: cursor csr_valid_zip_code is
3712: select 1
3713: from pay_us_zip_codes zip,
3714: pay_us_city_names cty
3715: where zip.state_code = l_state_code
3716: and zip.county_code = l_county_code
3717: and cty.city_name = p_tax_city
3718: and zip.state_code = cty.state_code
3723: --
3724: cursor csr_val_st_city
3725: is
3726: select st.state_code
3727: from pay_us_city_names cty
3728: , pay_us_states st
3729: where cty.state_code = st.state_code
3730: and cty.city_name = p_tax_city
3731: and st.state_abbrev = p_tax_state;
3733: --
3734: cursor csr_valid_zip_code_no_ncty is
3735: select 1
3736: from pay_us_zip_codes zip,
3737: pay_us_city_names cty
3738: where cty.city_name = p_tax_city
3739: and cty.state_code = l_state_code
3740: and zip.state_code = cty.state_code
3741: and zip.city_code = cty.city_code