DBA Data[Home] [Help]

APPS.PAY_US_1099R_MAG_REPORTING dependencies on PAY_MAGTAPE_GENERIC

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

153: pay_payroll_actions ppa2, -- 1099R Payroll Action Id
154: ff_archive_items fai, -- Transmitter Indicator
155: ff_archive_items fai2 -- Transmitter code
156: where ppa2.payroll_action_id
157: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
158: and ppa.report_type = 'YREND'
159: and ppa.effective_date = ppa2.effective_date
160: and ppa.business_group_id + 0 = ppa2.business_group_id
161: and ppa.action_status = 'C'

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

174: /* changed back to original due to CBO issue */
175: /* and hoi.organization_id = ffaic.context */
176: /* Commented to avoid cartesian join issue */
177: /* and hoi.organization_id
178: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID') */
179: and hoi.organization_id = rtrim(ltrim(Pay_Mag_Utils.Get_Parameter(
180: 'TRANSFER_TRANS_LEGAL_CO_ID',
181: 'TRANSFER_ALL_PAYERS',
182: ppa2.legislative_parameters)))

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

181: 'TRANSFER_ALL_PAYERS',
182: ppa2.legislative_parameters)))
183: and hoi.org_information_context = '1099R Magnetic Report Rules'
184: -- and hoi.org_information1 = 'Y'
185: and Pay_Magtape_Generic.Get_Parameter_Value ('TRANSFER_STATE') ='FED'
186: UNION
187: select 'TAX_UNIT_ID=C', ffaic.context, -- hoi.organization_id,
188: 'JURISDICTION_CODE=C', psr.jurisdiction_code,
189: 'PAYROLL_ACTION_ID=C', ppa.payroll_action_id, -- YREND ARCHIVER

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

211: pay_payroll_actions ppa, -- YREND Preprocessor
212: pay_payroll_actions ppa2, -- 1099R Payroll Action Id
213: ff_archive_items fai, -- INDICATOR
214: ff_archive_items fai2 -- Transmitter code
215: where ppa2.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
216: and ppa.report_type = 'YREND'
217: and ppa.effective_date = ppa2.effective_date
218: and ppa.business_group_id + 0 = ppa2.business_group_id
219: and ppa.action_status = 'C'

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

232: /* changed back to original due to CBO issue */
233: /* and hoi.organization_id = ffaic.context */
234: /* Commented to avoid cartesian join issue */
235: /* and hoi.organization_id
236: = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID') */
237: and hoi.organization_id = rtrim(ltrim(Pay_Mag_Utils.Get_Parameter(
238: 'TRANSFER_TRANS_LEGAL_CO_ID',
239: 'TRANSFER_ALL_PAYERS',
240: ppa2.legislative_parameters)))

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

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

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

270: ff_archive_item_contexts ffaic,
271: ff_archive_item_contexts ffaic2,
272: pay_payroll_actions ppa,
273: pay_payroll_actions ppa2
274: where ffai.context1 = Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_YREND_PAY_ACT_ID')
275: and ffai.archive_item_id = ffaic.archive_item_id
276: and ffue.user_entity_id = ffai.user_entity_id
277: and ffue.user_entity_name = 'A_US_1099R_TRANSMITTER_CODE'
278: and ffc.context_name = 'TAX_UNIT_ID'

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

288: and ffue2.user_entity_name = 'A_TAX_UNIT_NAME'
289: and ffue2.user_entity_id = ffai3.user_entity_id
290: and ffai3.context1 = ffai2.context1
291: and ffaic2.context_id = ffc.context_id
292: and (Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_ALL_PAYERS') = 'Y'
293: OR ffaic2.context = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID'))
294: and exists (select 'Y' from pay_assignment_actions paa
295: where paa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
296: and paa.tax_unit_id = ffaic2.context)

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

289: and ffue2.user_entity_id = ffai3.user_entity_id
290: and ffai3.context1 = ffai2.context1
291: and ffaic2.context_id = ffc.context_id
292: and (Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_ALL_PAYERS') = 'Y'
293: OR ffaic2.context = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID'))
294: and exists (select 'Y' from pay_assignment_actions paa
295: where paa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
296: and paa.tax_unit_id = ffaic2.context)
297: order by ffai3.value;

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

291: and ffaic2.context_id = ffc.context_id
292: and (Pay_Magtape_Generic.Get_Parameter_value('TRANSFER_ALL_PAYERS') = 'Y'
293: OR ffaic2.context = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_TRANS_LEGAL_CO_ID'))
294: and exists (select 'Y' from pay_assignment_actions paa
295: where paa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value('TRANSFER_PAYROLL_ACTION_ID')
296: and paa.tax_unit_id = ffaic2.context)
297: order by ffai3.value;
298:
299:

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

308: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id, -- YREND Pre-Processor aaid
309: 'ASSIGNMENT_ID=C' , paa.assignment_id,
310: 'JURISDICTION_CODE=C' , pec.jurisdiction_code,
311: 'TRANSFER_JURISDICTION_CODE=P' , pec.jurisdiction_code,
312: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
313: (ppa.effective_date,
314: paa.assignment_id)),
315: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
316: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 329: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

325: per_all_assignments_f paf,
326: pay_assignment_actions paa,
327: pay_payroll_actions ppa
328: where pai.locking_action_id = paa.assignment_action_id
329: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
330: ('TRANSFER_PAYROLL_ACTION_ID')
331: and ppa.payroll_action_id = paa.payroll_action_id
332: and paf.assignment_id = paa.assignment_id
333: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

Line 333: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

329: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
330: ('TRANSFER_PAYROLL_ACTION_ID')
331: and ppa.payroll_action_id = paa.payroll_action_id
332: and paf.assignment_id = paa.assignment_id
333: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
334: ('TAX_UNIT_ID')
335: and ffue.user_entity_name = 'A_PER_1099R_NAME'
336: and ffue.user_entity_id = ffai.user_entity_id
337: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid

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

338: -- and paa.assignment_action_id = pai.locking_action_id /* duplicate of the first where statement */
339: and ppf.person_id = paf.person_id
340: -- and pec.assignment_id = paa.assignment_id
341: and pec.assignment_action_id = pai.locked_action_id
342: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
343: -- pec.effective_start_date AND pec.effective_end_date
344: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
345: paa.assignment_id,
346: paf.effective_start_date,

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

351: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id,
352: 'ASSIGNMENT_ID=C' , paa.assignment_id,
353: 'JURISDICTION_CODE=C' , pes.jurisdiction_code,
354: 'TRANSFER_JURISDICTION_CODE=P' , pes.jurisdiction_code,
355: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
356: (ppa.effective_date,
357: paa.assignment_id)),
358: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
359: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 372: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

368: per_all_assignments_f paf,
369: pay_assignment_actions paa,
370: pay_payroll_actions ppa
371: where pai.locking_action_id = paa.assignment_action_id
372: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
373: ('TRANSFER_PAYROLL_ACTION_ID')
374: and ppa.payroll_action_id = paa.payroll_action_id
375: and paf.assignment_id = paa.assignment_id
376: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

Line 376: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

372: and ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
373: ('TRANSFER_PAYROLL_ACTION_ID')
374: and ppa.payroll_action_id = paa.payroll_action_id
375: and paf.assignment_id = paa.assignment_id
376: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
377: ('TAX_UNIT_ID')
378: and ffue.user_entity_name = 'A_PER_1099R_NAME'
379: and ffue.user_entity_id = ffai.user_entity_id
380: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid

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

385: and not exists (select null from pay_us_arch_mag_county_v -- pay_us_emp_county_tax_rules_f
386: -- where state_code = pes.state_code
387: where substr(jurisdiction_code,1,2) = substr(pes.jurisdiction_code,1,2)
388: and assignment_action_id = pes.assignment_action_id )
389: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
390: -- pes.effective_start_date AND pes.effective_end_date
391: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
392: paa.assignment_id,
393: paf.effective_start_date,

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

403: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id,
404: 'ASSIGNMENT_ID=C' , paa.assignment_id,
405: 'JURISDICTION_CODE=C' , pec.jurisdiction_code,
406: 'TRANSFER_JURISDICTION_CODE=P' , pec.jurisdiction_code,
407: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
408: (ppa.effective_date,
409: paa.assignment_id)),
410: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
411: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 424: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

420: per_all_assignments_f paf,
421: pay_assignment_actions paa,
422: pay_payroll_actions ppa,
423: pay_us_states pus
424: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
425: ('TRANSFER_PAYROLL_ACTION_ID')
426: and ppa.payroll_action_id = paa.payroll_action_id
427: and paf.assignment_id = paa.assignment_id
428: and ppf.person_id = paf.person_id

Line 437: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

433: and ffue.user_entity_name = 'A_PER_1099R_NAME'
434: and ffue.user_entity_id = ffai.user_entity_id
435: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid
436: and substr(pec.jurisdiction_code,1,2) = pus.state_code
437: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
438: ('TAX_UNIT_ID')
439: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
440: ('TRANSFER_STATE')
441: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between

Line 439: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value

435: and ffai.context1 = pai.locked_action_id -- YREND pre-process aaid
436: and substr(pec.jurisdiction_code,1,2) = pus.state_code
437: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
438: ('TAX_UNIT_ID')
439: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
440: ('TRANSFER_STATE')
441: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
442: -- pec.effective_start_date AND pec.effective_end_date
443: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,

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

437: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
438: ('TAX_UNIT_ID')
439: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
440: ('TRANSFER_STATE')
441: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
442: -- pec.effective_start_date AND pec.effective_end_date
443: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
444: paa.assignment_id,
445: paf.effective_start_date,

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

451: select 'ASSIGNMENT_ACTION_ID=C' , pai.locked_action_id,
452: 'ASSIGNMENT_ID=C' , paa.assignment_id,
453: 'JURISDICTION_CODE=C' , pes.jurisdiction_code,
454: 'TRANSFER_JURISDICTION_CODE=P' , pes.jurisdiction_code,
455: 'DATE_EARNED=C' , fnd_date.date_to_canonical(Pay_Magtape_Generic.Date_Earned
456: (ppa.effective_date,
457: paa.assignment_id)),
458: 'TRANSFER_LAST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_LN','TRANSFER_FN', ffai.value),
459: 'TRANSFER_FIRST_NAME=P' , pay_mag_utils.get_parameter('TRANSFER_FN','TRANSFER_MN', ffai.value),

Line 472: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value

468: per_all_assignments_f paf,
469: pay_assignment_actions paa,
470: pay_payroll_actions ppa,
471: pay_us_states pus
472: where ppa.payroll_action_id = Pay_Magtape_Generic.Get_Parameter_Value
473: ('TRANSFER_PAYROLL_ACTION_ID')
474: and ppa.payroll_action_id = paa.payroll_action_id
475: and paf.assignment_id = paa.assignment_id
476: and ppf.person_id = paf.person_id

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

486: -- where state_code = pes.state_code
487: where substr(jurisdiction_code,1,2) = substr(pes.jurisdiction_code,1,2)
488: -- and assignment_id = pes.assignment_id
489: and assignment_action_id = pes.assignment_action_id)
490: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
491: -- pes.effective_start_date AND pes.effective_end_date
492: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
493: ('TAX_UNIT_ID')
494: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value

Line 492: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value

488: -- and assignment_id = pes.assignment_id
489: and assignment_action_id = pes.assignment_action_id)
490: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
491: -- pes.effective_start_date AND pes.effective_end_date
492: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
493: ('TAX_UNIT_ID')
494: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
495: ('TRANSFER_STATE')
496: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,

Line 494: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value

490: -- and pay_magtape_generic.date_earned(ppa.effective_date, paa.assignment_id) between
491: -- pes.effective_start_date AND pes.effective_end_date
492: and paa.tax_unit_id = Pay_Magtape_Generic.Get_Parameter_Value
493: ('TAX_UNIT_ID')
494: and pus.state_abbrev= Pay_Magtape_Generic.Get_Parameter_Value
495: ('TRANSFER_STATE')
496: and Pay_Mag_Utils.Date_Earned(ppa.effective_date,
497: paa.assignment_id,
498: paf.effective_start_date,

Line 512: where hoi.organization_id = Pay_Magtape_Generic.Get_Parameter_Value

508: Cursor US_1099R_State_Process IS
509: select distinct 'TRANSFER_STATE_NAME=P', hlk.lookup_code
510: from fnd_common_lookups hlk,
511: hr_organization_information hoi
512: where hoi.organization_id = Pay_Magtape_Generic.Get_Parameter_Value
513: ('TRANSFER_TRANS_LEGAL_CO_ID')
514: and hoi.org_information4 = 'Y'
515: and hoi.org_information_context = '1099R Magnetic Report Rules'
516: and hlk.lookup_type = '1099R_US_COMBINED_FILER_STATES'

Line 517: and Pay_Magtape_Generic.Get_Parameter_Value

513: ('TRANSFER_TRANS_LEGAL_CO_ID')
514: and hoi.org_information4 = 'Y'
515: and hoi.org_information_context = '1099R Magnetic Report Rules'
516: and hlk.lookup_type = '1099R_US_COMBINED_FILER_STATES'
517: and Pay_Magtape_Generic.Get_Parameter_Value
518: ('TRANSFER_STATE') = 'FED'
519: UNION ALL
520: select 'TRANSFER_STATE_NAME=P', 'SC'
521: from dual

Line 522: where Pay_Magtape_Generic.Get_Parameter_Value

518: ('TRANSFER_STATE') = 'FED'
519: UNION ALL
520: select 'TRANSFER_STATE_NAME=P', 'SC'
521: from dual
522: where Pay_Magtape_Generic.Get_Parameter_Value
523: ('TRANSFER_STATE') = 'SC'
524: UNION ALL
525: select 'TRANSFER_STATE_NAME=P', 'ID'
526: from dual

Line 527: where Pay_Magtape_Generic.Get_Parameter_Value

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

Line 532: where Pay_Magtape_Generic.Get_Parameter_Value

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

Line 557: WHERE PPA1.payroll_action_id = pay_magtape_generic.get_parameter_value

553: FROM pay_state_rules SR,
554: hr_organization_information HOI,
555: pay_payroll_actions PPA,
556: pay_payroll_actions PPA1
557: WHERE PPA1.payroll_action_id = pay_magtape_generic.get_parameter_value
558: ('TRANSFER_PAYROLL_ACTION_ID')
559: AND ppa1.effective_date = ppa.effective_date
560: AND ppa1.report_qualifier = sr.state_code
561: AND HOI.organization_id =

Line 562: pay_magtape_generic.get_parameter_value('TRANSFER_TRANS_LEGAL_CO_ID')

558: ('TRANSFER_PAYROLL_ACTION_ID')
559: AND ppa1.effective_date = ppa.effective_date
560: AND ppa1.report_qualifier = sr.state_code
561: AND HOI.organization_id =
562: pay_magtape_generic.get_parameter_value('TRANSFER_TRANS_LEGAL_CO_ID')
563: AND SR.state_code =
564: pay_magtape_generic.get_parameter_value('TRANSFER_STATE')
565: AND HOI.org_information_context = '1099R Magnetic Report Rules'
566: AND PPA.report_type = 'YREND'

Line 564: pay_magtape_generic.get_parameter_value('TRANSFER_STATE')

560: AND ppa1.report_qualifier = sr.state_code
561: AND HOI.organization_id =
562: pay_magtape_generic.get_parameter_value('TRANSFER_TRANS_LEGAL_CO_ID')
563: AND SR.state_code =
564: pay_magtape_generic.get_parameter_value('TRANSFER_STATE')
565: AND HOI.org_information_context = '1099R Magnetic Report Rules'
566: AND PPA.report_type = 'YREND'
567: AND HOI.ORGANIZATION_ID =
568: substr(PPA.legislative_parameters,instr(PPA.legislative_parameters,'TRANSFER_GRE=')+ length('TRANSFER_GRE='))

Line 570: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')

566: AND PPA.report_type = 'YREND'
567: AND HOI.ORGANIZATION_ID =
568: substr(PPA.legislative_parameters,instr(PPA.legislative_parameters,'TRANSFER_GRE=')+ length('TRANSFER_GRE='))
569: AND to_char(PPA.effective_date,'YYYY') =
570: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')
571: AND to_char(PPA.effective_date,'DD-MM') = '31-12';
572:
573: --
574: -- Sets up the tax unit context for each employer to be reported on NB. sets

Line 609: WHERE AA.payroll_action_id = pay_magtape_generic.get_parameter_value

605: FROM
606: hr_all_organization_units hou,
607: pay_payroll_actions ppa,
608: pay_assignment_actions AA
609: WHERE AA.payroll_action_id = pay_magtape_generic.get_parameter_value
610: ('TRANSFER_PAYROLL_ACTION_ID')
611: AND ppa.report_type = 'YREND'
612: AND to_char(ppa.effective_date,'YYYY') =
613: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')

Line 613: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')

609: WHERE AA.payroll_action_id = pay_magtape_generic.get_parameter_value
610: ('TRANSFER_PAYROLL_ACTION_ID')
611: AND ppa.report_type = 'YREND'
612: AND to_char(ppa.effective_date,'YYYY') =
613: pay_magtape_generic.get_parameter_value('TRANSFER_REPORTING_YEAR')
614: AND to_char(ppa.effective_date,'DD-MM') = '31-12'
615: AND AA.tax_unit_id = substr(ppa.legislative_parameters,instr(ppa.legislative_parameters,'TRANSFER_GRE=') + length('TRANSFER_GRE='))
616: AND hou.organization_id = AA.tax_unit_id
617: order by hou.name;

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

626: CURSOR state_1099r_mmref_payee IS
627: SELECT
628: 'ASSIGNMENT_ACTION_ID=C', AI.locked_action_id, -- YREND assignment action
629: 'ASSIGNMENT_ID=C', AA.assignment_id,
630: 'DATE_EARNED=C', fnd_date.date_to_canonical( pay_magtape_generic.date_earned (PA.effective_date, AA.assignment_id)),
631: 'JURISDICTION_CODE=C',pay_magtape_generic.get_parameter_value('TRANSFER_JD'),
632: 'YE_ASSIGNMENT_ACTION_ID=P',AI.locked_action_id
633: FROM per_all_people_f PE,
634: per_all_assignments_f SS,

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

627: SELECT
628: 'ASSIGNMENT_ACTION_ID=C', AI.locked_action_id, -- YREND assignment action
629: 'ASSIGNMENT_ID=C', AA.assignment_id,
630: 'DATE_EARNED=C', fnd_date.date_to_canonical( pay_magtape_generic.date_earned (PA.effective_date, AA.assignment_id)),
631: 'JURISDICTION_CODE=C',pay_magtape_generic.get_parameter_value('TRANSFER_JD'),
632: 'YE_ASSIGNMENT_ACTION_ID=P',AI.locked_action_id
633: FROM per_all_people_f PE,
634: per_all_assignments_f SS,
635: pay_action_interlocks AI,

Line 638: WHERE PA.payroll_action_id = pay_magtape_generic.get_parameter_value

634: per_all_assignments_f SS,
635: pay_action_interlocks AI,
636: pay_assignment_actions AA,
637: pay_payroll_actions PA
638: WHERE PA.payroll_action_id = pay_magtape_generic.get_parameter_value
639: ('TRANSFER_PAYROLL_ACTION_ID') AND
640: AA.payroll_action_id = PA.payroll_action_id AND
641: AA.tax_unit_id = pay_magtape_generic.get_parameter_value
642: ('TAX_UNIT_ID') AND

Line 641: AA.tax_unit_id = pay_magtape_generic.get_parameter_value

637: pay_payroll_actions PA
638: WHERE PA.payroll_action_id = pay_magtape_generic.get_parameter_value
639: ('TRANSFER_PAYROLL_ACTION_ID') AND
640: AA.payroll_action_id = PA.payroll_action_id AND
641: AA.tax_unit_id = pay_magtape_generic.get_parameter_value
642: ('TAX_UNIT_ID') AND
643: AI.locking_action_id = AA.assignment_action_id AND
644: SS.assignment_id = AA.assignment_id AND
645: PE.person_id = SS.person_id AND

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

642: ('TAX_UNIT_ID') AND
643: AI.locking_action_id = AA.assignment_action_id AND
644: SS.assignment_id = AA.assignment_id AND
645: PE.person_id = SS.person_id AND
646: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
647: SS.effective_start_date and SS.effective_end_date AND
648: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
649: PE.effective_start_date and PE.effective_end_date
650: ORDER BY PE.last_name, PE.first_name, PE.middle_names;

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

644: SS.assignment_id = AA.assignment_id AND
645: PE.person_id = SS.person_id AND
646: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
647: SS.effective_start_date and SS.effective_end_date AND
648: pay_magtape_generic.date_earned(PA.effective_date,AA.assignment_id) BETWEEN
649: PE.effective_start_date and PE.effective_end_date
650: ORDER BY PE.last_name, PE.first_name, PE.middle_names;
651:
652: