DBA Data[Home] [Help]

APPS.PAY_US_1099R_MAG_REPORTING dependencies on PAY_MAGTAPE_GENERIC

Line 163: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')

159: pay_payroll_actions ppa2, -- 1099R Payroll Action Id
160: ff_archive_items fai, -- Transmitter Indicator
161: ff_archive_items fai2 -- Transmitter code
162: where ppa2.payroll_action_id
163: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
164: and ppa.report_type = 'YREND'
165: and ppa.effective_date = ppa2.effective_date
166: and ppa.business_group_id + 0 = ppa2.business_group_id
167: and ppa.action_status = 'C'

Line 184: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID') */

180: /* changed back to original due to CBO issue */
181: /* and hoi.organization_id = ffaic.context */
182: /* Commented to avoid cartesian join issue */
183: /* and hoi.organization_id
184: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID') */
185: and hoi.organization_id = rtrim(ltrim(Pay_Mag_Utils.Get_Parameter(
186: 'TRANSFER_TRANS_LEGAL_CO_ID',
187: 'TRANSFER_ALL_PAYERS',
188: ppa2.legislative_parameters)))

Line 191: and Pay_Magtape_Generic.Get_Parameter_Value ('TRANSFER_STATE') ='FED'

187: 'TRANSFER_ALL_PAYERS',
188: ppa2.legislative_parameters)))
189: and hoi.org_information_context = '1099R Magnetic Report Rules'
190: -- and hoi.org_information1 = 'Y'
191: and Pay_Magtape_Generic.Get_Parameter_Value ('TRANSFER_STATE') ='FED'
192: UNION
193: select 'TAX_UNIT_ID=C', ffaic.context, -- hoi.organization_id,
194: 'JURISDICTION_CODE=C', psr.jurisdiction_code,
195: 'PAYROLL_ACTION_ID=C', ppa.payroll_action_id, -- YREND ARCHIVER

Line 221: where ppa2.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')

217: pay_payroll_actions ppa, -- YREND Preprocessor
218: pay_payroll_actions ppa2, -- 1099R Payroll Action Id
219: ff_archive_items fai, -- INDICATOR
220: ff_archive_items fai2 -- Transmitter code
221: where ppa2.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
222: and ppa.report_type = 'YREND'
223: and ppa.effective_date = ppa2.effective_date
224: and ppa.business_group_id + 0 = ppa2.business_group_id
225: and ppa.action_status = 'C'

Line 242: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID') */

238: /* changed back to original due to CBO issue */
239: /* and hoi.organization_id = ffaic.context */
240: /* Commented to avoid cartesian join issue */
241: /* and hoi.organization_id
242: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID') */
243: and hoi.organization_id = rtrim(ltrim(Pay_Mag_Utils.Get_Parameter(
244: 'TRANSFER_TRANS_LEGAL_CO_ID',
245: 'TRANSFER_ALL_PAYERS',
246: ppa2.legislative_parameters)))

Line 249: and psr.state_code = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_STATE');

245: 'TRANSFER_ALL_PAYERS',
246: ppa2.legislative_parameters)))
247: and hoi.org_information_context = '1099R Magnetic Report Rules'
248: -- and hoi.org_information1 = 'Y'
249: and psr.state_code = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_STATE');
250:
251:
252: -- Cursor to set up the tax unit context for each employer being reported. Sets
253: -- up a parameter holding the tax unit identifier which can then be used by

Line 280: where ffai.context1 = Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_YREND_PAY_ACT_ID')

276: ff_archive_item_contexts ffaic,
277: ff_archive_item_contexts ffaic2,
278: pay_payroll_actions ppa,
279: pay_payroll_actions ppa2
280: where ffai.context1 = Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_YREND_PAY_ACT_ID')
281: and ffai.archive_item_id = ffaic.archive_item_id
282: and ffue.user_entity_id = ffai.user_entity_id
283: and ffue.user_entity_name = 'A_US_1099R_TRANSMITTER_CODE'
284: and ffc.context_name = 'TAX_UNIT_ID'

Line 298: and (Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_ALL_PAYERS') = 'Y'

294: and ffue2.user_entity_name = 'A_TAX_UNIT_NAME'
295: and ffue2.user_entity_id = ffai3.user_entity_id
296: and ffai3.context1 = ffai2.context1
297: and ffaic2.context_id = ffc.context_id
298: and (Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_ALL_PAYERS') = 'Y'
299: OR ffaic2.context = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID'))
300: and exists (select 'Y' from pay_assignment_actions paa
301: where paa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
302: and paa.tax_unit_id = ffaic2.context)

Line 299: OR ffaic2.context = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID'))

295: and ffue2.user_entity_id = ffai3.user_entity_id
296: and ffai3.context1 = ffai2.context1
297: and ffaic2.context_id = ffc.context_id
298: and (Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_ALL_PAYERS') = 'Y'
299: OR ffaic2.context = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID'))
300: and exists (select 'Y' from pay_assignment_actions paa
301: where paa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
302: and paa.tax_unit_id = ffaic2.context)
303: order by ffai3.value;

Line 301: where paa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')

297: and ffaic2.context_id = ffc.context_id
298: and (Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_ALL_PAYERS') = 'Y'
299: OR ffaic2.context = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID'))
300: and exists (select 'Y' from pay_assignment_actions paa
301: where paa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
302: and paa.tax_unit_id = ffaic2.context)
303: order by ffai3.value;
304:
305:

Line 318: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned

314: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id, -- YREND Pre-Processor aaid
315: 'ASSIGNMENT_ID=C' , paa.assignment_id,
316: 'JURISDICTION_CODE=C' , pec.jurisdiction_code,
317: 'TRANSFER_JURISDICTION_CODE=P' , pec.jurisdiction_code,
318: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
319: (ppa.effective_date,
320: paa.assignment_id)),
321: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
322: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 335: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

331: per_all_assignments_f paf,
332: pay_assignment_actions paa,
333: pay_payroll_actions ppa
334: where pai.locking_action_id = paa.assignment_action_id
335: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
336: ('TRANSFER_PAYROLL_ACTION_ID')
337: and ppa.payroll_action_id = paa.payroll_action_id
338: and paf.assignment_id = paa.assignment_id
339: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

Line 339: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

335: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
336: ('TRANSFER_PAYROLL_ACTION_ID')
337: and ppa.payroll_action_id = paa.payroll_action_id
338: and paf.assignment_id = paa.assignment_id
339: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
340: ('TAX_UNIT_ID')
341: and ffue.user_entity_name = 'A_PER_1099R_NAME'
342: and ffue.user_entity_id = ffai.user_entity_id
343: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid

Line 348: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between

344: -- and paa.assignment_action_id = pai.locking_action_id /* duplicate of the first where statement */
345: and ppf.person_id = paf.person_id
346: -- and pec.assignment_id = paa.assignment_id
347: and pec.assignment_action_id = pai.locked_action_id
348: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
349: -- pec.effective_start_date AND pec.effective_end_date
350: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
351: paa.assignment_id,
352: paf.effective_start_date,

Line 361: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned

357: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id,
358: 'ASSIGNMENT_ID=C' , paa.assignment_id,
359: 'JURISDICTION_CODE=C' , pes.jurisdiction_code,
360: 'TRANSFER_JURISDICTION_CODE=P' , pes.jurisdiction_code,
361: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
362: (ppa.effective_date,
363: paa.assignment_id)),
364: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
365: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 378: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

374: per_all_assignments_f paf,
375: pay_assignment_actions paa,
376: pay_payroll_actions ppa
377: where pai.locking_action_id = paa.assignment_action_id
378: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
379: ('TRANSFER_PAYROLL_ACTION_ID')
380: and ppa.payroll_action_id = paa.payroll_action_id
381: and paf.assignment_id = paa.assignment_id
382: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

Line 382: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

378: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
379: ('TRANSFER_PAYROLL_ACTION_ID')
380: and ppa.payroll_action_id = paa.payroll_action_id
381: and paf.assignment_id = paa.assignment_id
382: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
383: ('TAX_UNIT_ID')
384: and ffue.user_entity_name = 'A_PER_1099R_NAME'
385: and ffue.user_entity_id = ffai.user_entity_id
386: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid

Line 395: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between

391: and not exists (select null from pay_us_arch_mag_county_v -- pay_us_emp_county_tax_rules_f
392: -- where state_code = pes.state_code
393: where substr(jurisdiction_code,1,2) = substr(pes.jurisdiction_code,1,2)
394: and assignment_action_id = pes.assignment_action_id )
395: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
396: -- pes.effective_start_date AND pes.effective_end_date
397: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
398: paa.assignment_id,
399: paf.effective_start_date,

Line 413: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned

409: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id,
410: 'ASSIGNMENT_ID=C' , paa.assignment_id,
411: 'JURISDICTION_CODE=C' , pec.jurisdiction_code,
412: 'TRANSFER_JURISDICTION_CODE=P' , pec.jurisdiction_code,
413: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
414: (ppa.effective_date,
415: paa.assignment_id)),
416: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
417: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 430: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

426: per_all_assignments_f paf,
427: pay_assignment_actions paa,
428: pay_payroll_actions ppa,
429: pay_us_states pus
430: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
431: ('TRANSFER_PAYROLL_ACTION_ID')
432: and ppa.payroll_action_id = paa.payroll_action_id
433: and paf.assignment_id = paa.assignment_id
434: and ppf.person_id = paf.person_id

Line 443: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

439: and ffue.user_entity_name = 'A_PER_1099R_NAME'
440: and ffue.user_entity_id = ffai.user_entity_id
441: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid
442: and substr(pec.jurisdiction_code,1,2) = pus.state_code
443: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
444: ('TAX_UNIT_ID')
445: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
446: ('TRANSFER_STATE')
447: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between

Line 445: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value

441: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid
442: and substr(pec.jurisdiction_code,1,2) = pus.state_code
443: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
444: ('TAX_UNIT_ID')
445: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
446: ('TRANSFER_STATE')
447: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
448: -- pec.effective_start_date AND pec.effective_end_date
449: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,

Line 447: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between

443: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
444: ('TAX_UNIT_ID')
445: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
446: ('TRANSFER_STATE')
447: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
448: -- pec.effective_start_date AND pec.effective_end_date
449: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
450: paa.assignment_id,
451: paf.effective_start_date,

Line 461: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned

457: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id,
458: 'ASSIGNMENT_ID=C' , paa.assignment_id,
459: 'JURISDICTION_CODE=C' , pes.jurisdiction_code,
460: 'TRANSFER_JURISDICTION_CODE=P' , pes.jurisdiction_code,
461: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
462: (ppa.effective_date,
463: paa.assignment_id)),
464: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
465: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 478: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

474: per_all_assignments_f paf,
475: pay_assignment_actions paa,
476: pay_payroll_actions ppa,
477: pay_us_states pus
478: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
479: ('TRANSFER_PAYROLL_ACTION_ID')
480: and ppa.payroll_action_id = paa.payroll_action_id
481: and paf.assignment_id = paa.assignment_id
482: and ppf.person_id = paf.person_id

Line 496: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between

492: -- where state_code = pes.state_code
493: where substr(jurisdiction_code,1,2) = substr(pes.jurisdiction_code,1,2)
494: -- and assignment_id = pes.assignment_id
495: and assignment_action_id = pes.assignment_action_id)
496: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
497: -- pes.effective_start_date AND pes.effective_end_date
498: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
499: ('TAX_UNIT_ID')
500: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value

Line 498: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

494: -- and assignment_id = pes.assignment_id
495: and assignment_action_id = pes.assignment_action_id)
496: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
497: -- pes.effective_start_date AND pes.effective_end_date
498: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
499: ('TAX_UNIT_ID')
500: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
501: ('TRANSFER_STATE')
502: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,

Line 500: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value

496: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
497: -- pes.effective_start_date AND pes.effective_end_date
498: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
499: ('TAX_UNIT_ID')
500: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
501: ('TRANSFER_STATE')
502: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
503: paa.assignment_id,
504: paf.effective_start_date,

Line 518: where hoi.organization_id = Pay_Magtape_Generic.Get_Parameter_Value

514: Cursor US_1099R_State_Process IS
515: select distinct 'TRANSFER_STATE_NAME=P', hlk.lookup_code
516: from fnd_common_lookups hlk,
517: hr_organization_information hoi
518: where hoi.organization_id = Pay_Magtape_Generic.Get_Parameter_Value
519: ('TRANSFER_TRANS_LEGAL_CO_ID')
520: and hoi.org_information4 = 'Y'
521: and hoi.org_information_context = '1099R Magnetic Report Rules'
522: and hlk.lookup_type = '1099R_US_COMBINED_FILER_STATES'

Line 523: and Pay_Magtape_Generic.Get_Parameter_Value

519: ('TRANSFER_TRANS_LEGAL_CO_ID')
520: and hoi.org_information4 = 'Y'
521: and hoi.org_information_context = '1099R Magnetic Report Rules'
522: and hlk.lookup_type = '1099R_US_COMBINED_FILER_STATES'
523: and Pay_Magtape_Generic.Get_Parameter_Value
524: ('TRANSFER_STATE') = 'FED'
525: UNION ALL
526: select 'TRANSFER_STATE_NAME=P', 'SC'
527: from dual

Line 528: where Pay_Magtape_Generic.Get_Parameter_Value

524: ('TRANSFER_STATE') = 'FED'
525: UNION ALL
526: select 'TRANSFER_STATE_NAME=P', 'SC'
527: from dual
528: where Pay_Magtape_Generic.Get_Parameter_Value
529: ('TRANSFER_STATE') = 'SC'
530: UNION ALL
531: select 'TRANSFER_STATE_NAME=P', 'ID'
532: from dual

Line 533: where Pay_Magtape_Generic.Get_Parameter_Value

529: ('TRANSFER_STATE') = 'SC'
530: UNION ALL
531: select 'TRANSFER_STATE_NAME=P', 'ID'
532: from dual
533: where Pay_Magtape_Generic.Get_Parameter_Value
534: ('TRANSFER_STATE') = 'ID'
535: UNION ALL
536: select 'TRANSFER_STATE_NAME=P', 'NE'
537: from dual

Line 538: where Pay_Magtape_Generic.Get_Parameter_Value

534: ('TRANSFER_STATE') = 'ID'
535: UNION ALL
536: select 'TRANSFER_STATE_NAME=P', 'NE'
537: from dual
538: where Pay_Magtape_Generic.Get_Parameter_Value
539: ('TRANSFER_STATE') = 'NE'
540: UNION ALL
541: select 'TRANSFER_STATE_NAME=P', 'VT'
542: from dual

Line 543: where Pay_Magtape_Generic.Get_Parameter_Value

539: ('TRANSFER_STATE') = 'NE'
540: UNION ALL
541: select 'TRANSFER_STATE_NAME=P', 'VT'
542: from dual
543: where Pay_Magtape_Generic.Get_Parameter_Value
544: ('TRANSFER_STATE') = 'VT'
545: ;
546:
547: --MMREF Cursors

Line 568: WHERE PPA1.payroll_action_id = pay_magtape_generic.get_parameter_value

564: FROM pay_state_rules SR,
565: hr_organization_information HOI,
566: pay_payroll_actions PPA,
567: pay_payroll_actions PPA1
568: WHERE PPA1.payroll_action_id = pay_magtape_generic.get_parameter_value
569: ('TRANSFER_PAYROLL_ACTION_ID')
570: AND ppa1.effective_date = ppa.effective_date
571: AND ppa1.report_qualifier = sr.state_code
572: AND HOI.organization_id =

Line 573: pay_magtape_generic.get_parameter_value('TRANSFER_TRANS_LEGAL_CO_ID')

569: ('TRANSFER_PAYROLL_ACTION_ID')
570: AND ppa1.effective_date = ppa.effective_date
571: AND ppa1.report_qualifier = sr.state_code
572: AND HOI.organization_id =
573: pay_magtape_generic.get_parameter_value('TRANSFER_TRANS_LEGAL_CO_ID')
574: AND SR.state_code =
575: substr(pay_magtape_generic.get_parameter_value('TRANSFER_STATE'),1,2) /* 13408243 */
576: AND HOI.org_information_context = '1099R Magnetic Report Rules'
577: AND PPA.report_type = 'YREND'

Line 575: substr(pay_magtape_generic.get_parameter_value('TRANSFER_STATE'),1,2) /* 13408243 */

571: AND ppa1.report_qualifier = sr.state_code
572: AND HOI.organization_id =
573: pay_magtape_generic.get_parameter_value('TRANSFER_TRANS_LEGAL_CO_ID')
574: AND SR.state_code =
575: substr(pay_magtape_generic.get_parameter_value('TRANSFER_STATE'),1,2) /* 13408243 */
576: AND HOI.org_information_context = '1099R Magnetic Report Rules'
577: AND PPA.report_type = 'YREND'
578: AND HOI.ORGANIZATION_ID =
579: substr(PPA.legislative_parameters,instr(PPA.legislative_parameters,'TRANSFER_GRE=')+ length('TRANSFER_GRE='))

Line 581: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')

577: AND PPA.report_type = 'YREND'
578: AND HOI.ORGANIZATION_ID =
579: substr(PPA.legislative_parameters,instr(PPA.legislative_parameters,'TRANSFER_GRE=')+ length('TRANSFER_GRE='))
580: AND to_char(PPA.effective_date,'YYYY') =
581: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')
582: AND to_char(PPA.effective_date,'DD-MM') = '31-12';
583:
584: --
585: -- Sets up the tax unit context for each employer to be reported on NB. sets

Line 620: WHERE AA.payroll_action_id = pay_magtape_generic.get_parameter_value

616: FROM
617: hr_all_organization_units hou,
618: pay_payroll_actions ppa,
619: pay_assignment_actions AA
620: WHERE AA.payroll_action_id = pay_magtape_generic.get_parameter_value
621: ('TRANSFER_PAYROLL_ACTION_ID')
622: AND ppa.report_type = 'YREND'
623: AND to_char(ppa.effective_date,'YYYY') =
624: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')

Line 624: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')

620: WHERE AA.payroll_action_id = pay_magtape_generic.get_parameter_value
621: ('TRANSFER_PAYROLL_ACTION_ID')
622: AND ppa.report_type = 'YREND'
623: AND to_char(ppa.effective_date,'YYYY') =
624: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')
625: AND to_char(ppa.effective_date,'DD-MM') = '31-12'
626: AND AA.tax_unit_id = substr(ppa.legislative_parameters,instr(ppa.legislative_parameters,'TRANSFER_GRE=') + length('TRANSFER_GRE='))
627: AND hou.organization_id = AA.tax_unit_id
628: order by substr(hou.name,1,80);

Line 641: 'DATE_EARNED=C', fnd_date.date_to_canonical( pay_magtape_generic.date_earned (PA.effective_date, AA.assignment_id)),

637: CURSOR state_1099r_mmref_payee IS
638: SELECT
639: 'ASSIGNMENT_ACTION_ID=C', AI.locked_action_id, -- YREND assignment action
640: 'ASSIGNMENT_ID=C', AA.assignment_id,
641: 'DATE_EARNED=C', fnd_date.date_to_canonical( pay_magtape_generic.date_earned (PA.effective_date, AA.assignment_id)),
642: 'JURISDICTION_CODE=C',pay_magtape_generic.get_parameter_value('TRANSFER_JD'),
643: 'YE_ASSIGNMENT_ACTION_ID=P',AI.locked_action_id
644: FROM per_all_people_f PE,
645: per_all_assignments_f SS,

Line 642: 'JURISDICTION_CODE=C',pay_magtape_generic.get_parameter_value('TRANSFER_JD'),

638: SELECT
639: 'ASSIGNMENT_ACTION_ID=C', AI.locked_action_id, -- YREND assignment action
640: 'ASSIGNMENT_ID=C', AA.assignment_id,
641: 'DATE_EARNED=C', fnd_date.date_to_canonical( pay_magtape_generic.date_earned (PA.effective_date, AA.assignment_id)),
642: 'JURISDICTION_CODE=C',pay_magtape_generic.get_parameter_value('TRANSFER_JD'),
643: 'YE_ASSIGNMENT_ACTION_ID=P',AI.locked_action_id
644: FROM per_all_people_f PE,
645: per_all_assignments_f SS,
646: pay_action_interlocks AI,

Line 649: WHERE PA.payroll_action_id = pay_magtape_generic.get_parameter_value

645: per_all_assignments_f SS,
646: pay_action_interlocks AI,
647: pay_assignment_actions AA,
648: pay_payroll_actions PA
649: WHERE PA.payroll_action_id = pay_magtape_generic.get_parameter_value
650: ('TRANSFER_PAYROLL_ACTION_ID') AND
651: AA.payroll_action_id = PA.payroll_action_id AND
652: AA.tax_unit_id = pay_magtape_generic.get_parameter_value
653: ('TAX_UNIT_ID') AND

Line 652: AA.tax_unit_id = pay_magtape_generic.get_parameter_value

648: pay_payroll_actions PA
649: WHERE PA.payroll_action_id = pay_magtape_generic.get_parameter_value
650: ('TRANSFER_PAYROLL_ACTION_ID') AND
651: AA.payroll_action_id = PA.payroll_action_id AND
652: AA.tax_unit_id = pay_magtape_generic.get_parameter_value
653: ('TAX_UNIT_ID') AND
654: AI.locking_action_id = AA.assignment_action_id AND
655: SS.assignment_id = AA.assignment_id AND
656: PE.person_id = SS.person_id AND

Line 657: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN

653: ('TAX_UNIT_ID') AND
654: AI.locking_action_id = AA.assignment_action_id AND
655: SS.assignment_id = AA.assignment_id AND
656: PE.person_id = SS.person_id AND
657: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
658: SS.effective_start_date and SS.effective_end_date AND
659: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
660: PE.effective_start_date and PE.effective_end_date
661: ORDER BY PE.last_name, PE.first_name, PE.middle_names;

Line 659: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN

655: SS.assignment_id = AA.assignment_id AND
656: PE.person_id = SS.person_id AND
657: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
658: SS.effective_start_date and SS.effective_end_date AND
659: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
660: PE.effective_start_date and PE.effective_end_date
661: ORDER BY PE.last_name, PE.first_name, PE.middle_names;
662:
663: