333: -- |------------------------< chk_jurisdiction_code >----------------------- -|
334: -- ----------------------------------------------------------------------------
335: --
336: -- Description
337: -- This procedure validates the jurisdiction_code against PAY_STATE_RULES
338: -- where the state is the same as the state_code
339: --
340: -- Pre-Conditions
341: -- Valid state_code
365: l_dummy varchar2(1);
366: --
367: cursor c1 is
368: select null
369: from pay_us_states pus, pay_state_rules psr
370: where pus.state_code = p_state_code
371: and pus.state_abbrev = psr.state_code
372: and psr.jurisdiction_code = p_jurisdiction_code;
373: --
393: hr_utility.set_message(801, 'PAY_72811_STA_JD_NOT_NULL');
394: hr_utility.raise_error;
395: end if;
396: --
397: -- check if jurisdiction_code value exists in pay_state_rules table
398: --
399: open c1;
400: --
401: fetch c1 into l_dummy;
402: if c1%notfound then
403: --
404: close c1;
405: --
406: -- raise error as code does not exist in pay_state_rules table.
407: --
408: hr_utility.set_message(801, 'PAY_8003_1099R_JU_CODE');
409: hr_utility.raise_error;
410: --
521: ,p_validation_end_date in date
522: ) is
523: --
524: l_proc varchar2(72) := g_package||'chk_filing_status_code';
525: l_fs_lookup_type pay_state_rules.fs_lookup_type%TYPE;
526: l_filing_status_code pay_us_emp_state_tax_rules_f.filing_status_code%TYPE;
527: --
528: cursor c1 is
529: select psr.fs_lookup_type
526: l_filing_status_code pay_us_emp_state_tax_rules_f.filing_status_code%TYPE;
527: --
528: cursor c1 is
529: select psr.fs_lookup_type
530: from pay_us_states pus, pay_state_rules psr
531: where pus.state_code = p_state_code
532: and pus.state_abbrev = psr.state_code;
533: --
534: Begin