DBA Data[Home] [Help]

APPS.PAY_IE_PAYE_API SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 31

  SELECT element_type_id
  FROM   pay_element_types_f
  WHERE  element_name = 'IE P45P3_P46 Information'
  AND    nvl(business_group_id, p_business_group_id) = p_business_group_id
  AND    nvl(legislation_code, 'IE') = 'IE'
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 41

  SELECT input_value_id
  FROM   pay_input_values_f
  WHERE  element_type_id = p_element_type_id
  AND    name = p_name
  AND    nvl(business_group_id, p_business_group_id) = p_business_group_id
  AND    nvl(legislation_code, 'IE') = 'IE'
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 61

   SELECT links.element_link_id
      FROM   pay_element_links_f links, per_all_assignments_f assign
      WHERE  links.element_type_id = p_element_type_id
      AND    links.business_group_id=p_business_group_id
      AND    assign.assignment_id=p_assignment_id
      AND   ((    links.payroll_id is not null
              and links.payroll_id = assign.payroll_id)
      OR     (    links.link_to_all_payrolls_flag='Y'
              and assign.payroll_id is not null)
      OR     (    links.payroll_id is null
              and links.link_to_all_payrolls_flag='N')
      OR     links.job_id=assign.job_id
      OR     links.position_id=assign.position_id
      OR     links.people_group_id=assign.people_group_id
      OR     links.organization_id=assign.organization_id
      OR     links.grade_id=assign.grade_id
      OR     links.location_id=assign.location_id
      OR     links.pay_basis_id=assign.pay_basis_id
      OR     links.employment_category=assign.employment_category)
      AND    p_effective_date BETWEEN links.effective_start_date
                              AND     links.effective_end_date
      AND    p_effective_date BETWEEN assign.effective_start_date
                              AND     assign.effective_end_date;  --16079457
Line: 198

procedure update_p46 (    p_effective_date IN DATE
				, p_assignment_id IN NUMBER
				, p_business_group_id IN NUMBER
				, p_datetrack_update_mode IN VARCHAR2
				, p_object_version_number IN OUT NOCOPY NUMBER
				, p_paye_details_id IN NUMBER
				, p_Tax_This_Employment IN NUMBER
				, p_Previous_Employment_Start_Dt IN	DATE
				, p_Previous_Employment_End_Date IN	DATE
				, p_Pay_This_Employment IN NUMBER
				, p_PAYE_Previous_Employer IN	VARCHAR2
				, p_P45P3_Or_P46 IN VARCHAR2
				, p_Already_Submitted IN VARCHAR2
				--, p_P45P3_Or_P46_Processed IN VARCHAR2
				--13359423
				,p_usc_pay_this_employment	      in     number
				,p_usc_tax_this_employment	      in     Number
				--13359423
   ) is
  CURSOR element_csr IS
  SELECT element_type_id
  FROM   pay_element_types_f
  WHERE  element_name = 'IE P45P3_P46 Information'
  AND    nvl(business_group_id, p_business_group_id) = p_business_group_id
  AND    nvl(legislation_code, 'IE') = 'IE'
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 228

  SELECT input_value_id
  FROM   pay_input_values_f
  WHERE  element_type_id = p_element_type_id
  AND    name = p_name
  AND    nvl(business_group_id, p_business_group_id) = p_business_group_id
  AND    nvl(legislation_code, 'IE') = 'IE'
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 248

    SELECT pee.element_entry_id, pee.effective_start_date, pee.object_version_number
      FROM pay_element_entries_f pee,
           pay_element_types_f pet,
           pay_element_links_f pel
     WHERE pee.element_link_id = pel.element_link_id AND
           pee.assignment_id = p_assignment_id AND
           --p_effective_date between pee.effective_start_date and pee.effective_end_date AND
	     --pee.effective_start_date >= l_tax_yr_start_date and
           --pee.effective_end_date <= add_months(l_tax_yr_start_date,12) AND
           pel.element_type_id = pet.element_type_id AND
           pel.business_group_id = p_business_group_id AND
           pet.element_name = 'IE P45P3_P46 Information' AND
           NVL(pet.business_group_id, p_business_group_id) = p_business_group_id AND
           pet.legislation_code = 'IE' ;
Line: 268

  l_update_warning BOOLEAN := FALSE;
Line: 273

    SELECT pee.element_entry_id, pee.effective_start_date
      FROM pay_element_entries_f pee,
           pay_element_types_f pet,
           pay_element_links_f pel
     WHERE pee.element_link_id = pel.element_link_id AND
           pee.assignment_id = p_assignment_id AND
           --p_effective_date between pee.effective_start_date and pee.effective_end_date AND
           pel.element_type_id = pet.element_type_id AND
           pel.business_group_id = p_business_group_id AND
           pet.element_name = 'IE P45P3_P46 Information' AND
           NVL(pet.business_group_id, p_business_group_id) = p_business_group_id AND
           pet.legislation_code = 'IE' ;
Line: 290

  SELECT min(effective_start_date)
  FROM   pay_ie_paye_details_f
  WHERE  paye_details_id = p_paye_details_id;
Line: 298

  l_datetrack_update_mode  VARCHAR2(100);
Line: 375

		l_datetrack_update_mode := 'CORRECTION';
Line: 378

		py_element_entry_api.update_element_entry
		  (p_validate				=> false
		  ,p_datetrack_update_mode		=> l_datetrack_update_mode   --p_datetrack_update_mode
		  ,p_effective_date			=> rec_entry_csr.effective_start_date  --l_p45p3_eff_start_date    --p_effective_date  --11788742
		  ,p_business_group_id			=> p_business_group_id
		  ,p_element_entry_id			=> rec_entry_csr.element_entry_id
		  ,p_object_version_number		=> l_object_version_number   --p_object_version_number
		  ,p_input_value_id1			=> input_val_rec1.input_value_id
		  ,p_input_value_id2			=> input_val_rec2.input_value_id
		  ,p_input_value_id3			=> input_val_rec3.input_value_id
		  ,p_input_value_id4			=> input_val_rec4.input_value_id
		  ,p_input_value_id5			=> input_val_rec5.input_value_id
		  ,p_input_value_id6			=> input_val_rec6.input_value_id
		  ,p_input_value_id7			=> input_val_rec7.input_value_id
		  --,p_input_value_id8			=> input_val_rec8.input_value_id
		--13359423
		,p_input_value_id8			=> input_val_rec8.input_value_id
		,p_input_value_id9			=> input_val_rec9.input_value_id
		--13359423
		  ,p_entry_value1				=> nvl(p_Tax_This_Employment,0)
		  ,p_entry_value2				=> p_Previous_Employment_Start_Dt
		  ,p_entry_value3				=> p_Previous_Employment_End_Date
		  ,p_entry_value4				=> nvl(p_Pay_This_Employment,0)
		  ,p_entry_value5				=> p_PAYE_Previous_Employer
		  ,p_entry_value6				=> nvl(p_P45P3_Or_P46,'N')
		  ,p_entry_value7				=> nvl(p_Already_Submitted,'N')
		  --,p_entry_value8				=> nvl(p_P45P3_Or_P46_Processed,'N')
		--13359423
		, p_entry_value8               => nvl(p_usc_pay_this_employment,0)
		, p_entry_value9               => nvl(p_usc_tax_this_employment,0)
		--13359423
		  ,p_effective_start_date		=> l_effective_start_date
		  ,p_effective_end_date			=> l_effective_end_date
		  ,p_update_warning			=> l_update_warning
		  );
Line: 421

			IF p_datetrack_update_mode	= 'CORRECTION' THEN
				OPEN  cur_p45p3_eff_start_date;
Line: 425

			ELSIF p_datetrack_update_mode	= 'UPDATE' THEN
				l_p45p3_eff_start_date := p_effective_date;
Line: 465

end update_p46;
Line: 471

procedure delete_p46 (   p_effective_date IN DATE
                         , p_assignment_id IN NUMBER
                         , p_business_group_id IN NUMBER
				 , p_datetrack_delete_mode IN VARCHAR2
				 , p_object_version_number IN OUT NOCOPY NUMBER
				) is
   l_tax_yr_start_date date;
Line: 480

    SELECT pee.element_entry_id, pee.effective_start_date, pee.object_version_number
      FROM pay_element_entries_f pee,
           pay_element_types_f pet,
           pay_element_links_f pel
     WHERE pee.element_link_id = pel.element_link_id AND
           pee.assignment_id = p_assignment_id AND
           --p_effective_date between pee.effective_start_date and pee.effective_end_date AND
           pel.element_type_id = pet.element_type_id AND
           pel.business_group_id = p_business_group_id AND
           pet.element_name = 'IE P45P3_P46 Information' AND
           NVL(pet.business_group_id, p_business_group_id) = p_business_group_id AND
           pet.legislation_code = 'IE' ;
Line: 497

  l_delete_warning BOOLEAN := FALSE;
Line: 511

		py_element_entry_api.delete_element_entry
		(p_validate			 => false
		,p_datetrack_delete_mode => p_datetrack_delete_mode
		,p_effective_date		 => rec_entry_csr.effective_start_date
		,p_element_entry_id	 => rec_entry_csr.element_entry_id
		,p_object_version_number => p_object_version_number
		,p_effective_start_date	 => l_effective_start_date
		,p_effective_end_date	 => l_effective_end_date
		,p_delete_warning		 => l_delete_warning
		);
Line: 523

end delete_p46;
Line: 543

  SELECT element_type_id
  FROM   pay_element_types_f
  WHERE  element_name = 'IE P45 Information'
  AND    nvl(business_group_id, p_business_group_id) = p_business_group_id
  AND    nvl(legislation_code, 'IE') = 'IE'
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 553

  SELECT input_value_id
  FROM   pay_input_values_f
  WHERE  element_type_id = p_element_type_id
  AND    name = p_name
  AND    nvl(business_group_id, p_business_group_id) = p_business_group_id
  AND    nvl(legislation_code, 'IE') = 'IE'
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 572

   SELECT links.element_link_id
      FROM   pay_element_links_f links, per_all_assignments_f assign
      WHERE  links.element_type_id = p_element_type_id
      AND    links.business_group_id=p_business_group_id
      AND    assign.assignment_id=p_assignment_id
      AND   ((    links.payroll_id is not null
              and links.payroll_id = assign.payroll_id)
      OR     (    links.link_to_all_payrolls_flag='Y'
              and assign.payroll_id is not null)
      OR     (    links.payroll_id is null
              and links.link_to_all_payrolls_flag='N')
      OR     links.job_id=assign.job_id
      OR     links.position_id=assign.position_id
      OR     links.people_group_id=assign.people_group_id
      OR     links.organization_id=assign.organization_id
      OR     links.grade_id=assign.grade_id
      OR     links.location_id=assign.location_id
      OR     links.pay_basis_id=assign.pay_basis_id
      OR     links.employment_category=assign.employment_category)
      AND    p_effective_date BETWEEN links.effective_start_date
                              AND     links.effective_end_date
      AND    p_effective_date BETWEEN assign.effective_start_date
                              AND     assign.effective_end_date; --16079457
Line: 683

PROCEDURE delete_bal_adj (p_effective_date    IN DATE
                     ,p_business_group_id IN NUMBER
                     ,p_assignment_id     IN NUMBER ) IS
/* commented to fix bug 3013304
we now delete all the balances whihc are created within the tax year
rather than just deleting the one.

   CURSOR entry_csr IS
      SELECT pee.element_entry_id
      FROM   pay_element_entries_f pee, pay_element_types_f pet, pay_element_links_f pel
      WHERE  pee.element_link_id = pel.element_link_id
      AND    pee.assignment_id = p_assignment_id
      AND    p_effective_date BETWEEN pee.effective_start_Date AND pee.effective_end_Date
      AND    pel.element_type_id = pet.element_type_id
      AND    pel.business_group_id = p_business_group_id
      AND    p_effective_date BETWEEN pel.effective_start_Date AND pel.effective_end_Date
      AND    pet.element_name = 'IE P45 Information'
      AND    nvl(pet.business_group_id, p_business_group_id) = p_business_group_id
      AND    pet.legislation_code = 'IE'
      AND    p_effective_date BETWEEN pet.effective_start_Date AND pet.effective_end_Date;
Line: 708

    SELECT pee.element_entry_id, pee.effective_start_date
      FROM pay_element_entries_f pee,
           pay_element_types_f pet,
           pay_element_links_f pel
     WHERE pee.element_link_id = pel.element_link_id AND
           pee.assignment_id = p_assignment_id AND
           pee.effective_start_date >= l_tax_yr_start_date and
           pee.effective_end_date <= add_months(l_tax_yr_start_date,12) AND
           pel.element_type_id = pet.element_type_id AND
           pel.business_group_id = p_business_group_id AND
--           pet.element_name = 'IE P45 Information' AND
           pet.element_name in('IE P45 Information', 'Setup P45 Element') AND
           NVL(pet.business_group_id, p_business_group_id) = p_business_group_id AND
           pet.legislation_code = 'IE' ;
Line: 730

          pay_balance_adjustment_api.delete_adjustment (
             p_validate         => false,
             p_effective_date   => element_entries.effective_start_date,
             p_element_entry_id => element_entries.element_entry_id );
Line: 736

END delete_bal_adj;
Line: 832

  SELECT business_group_id
  FROM   per_all_assignments_f
  WHERE  assignment_id = p_assignment_id
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 962

       ,p_program_update_date            =>  sysdate
       ,p_paye_details_id                =>  l_paye_details_id
       ,p_object_version_number          =>  l_object_version_number
       ,p_effective_start_date           =>  l_effective_start_date
       ,p_effective_end_date             =>  l_effective_end_date
       ,p_certificate_issue_date         =>  p_certificate_issue_Date
--13359423
,p_yrly_tax_cred => p_yrly_tax_cred
,p_yrly_tax_rate_1	=> p_yrly_tax_rate_1
,p_yrly_tax_rate_2	=> p_yrly_tax_rate_2
,p_mthly_tax_rate_2	=> p_mthly_tax_rate_2
,p_wkly_tax_rate_2	=> p_wkly_tax_rate_2
,p_tax_rate_3		=> p_tax_rate_3
,p_yrly_tax_rate_3	=> p_yrly_tax_rate_3
,p_mthly_tax_rate_3	=> p_mthly_tax_rate_3
,p_wkly_tax_rate_3	=> p_wkly_tax_rate_3
,p_tax_rate_4		=> p_tax_rate_4
,p_yrly_tax_rate_4	=> p_yrly_tax_rate_4
,p_mthly_tax_rate_4	=> p_mthly_tax_rate_4
,p_wkly_tax_rate_4	=> p_wkly_tax_rate_4
,p_tax_rate_5		=> p_tax_rate_5
,p_in_exempt_usc	=> p_in_exempt_usc
,p_total_usc_pay_todate => p_total_usc_pay_todate
,p_total_usc_tax_todate => p_total_usc_tax_todate
,p_usc_rate_1		=> p_usc_rate_1
,p_usc_yrly_cutoff_1	=> p_usc_yrly_cutoff_1
,p_usc_mthly_cutoff_1	=> p_usc_mthly_cutoff_1
,p_usc_wkly_cutoff_1	=> p_usc_wkly_cutoff_1
,p_usc_rate_2		=> p_usc_rate_2
,p_usc_yrly_cutoff_2	=> p_usc_yrly_cutoff_2
,p_usc_mthly_cutoff_2	=> p_usc_mthly_cutoff_2
,p_usc_wkly_cutoff_2	=> p_usc_wkly_cutoff_2
,p_usc_rate_3		=> p_usc_rate_3
,p_usc_yrly_cutoff_3	=> p_usc_yrly_cutoff_3
,p_usc_mthly_cutoff_3	=> p_usc_mthly_cutoff_3
,p_usc_wkly_cutoff_3	=> p_usc_wkly_cutoff_3
,p_usc_rate_4		=> p_usc_rate_4
,p_usc_yrly_cutoff_4	=> p_usc_yrly_cutoff_4
,p_usc_mthly_cutoff_4	=> p_usc_mthly_cutoff_4
,p_usc_wkly_cutoff_4	=> p_usc_wkly_cutoff_4
,p_usc_rate_5		=> p_usc_rate_5
,p_usc_tax_basis	=> p_usc_tax_basis
,p_usc_info_source	=> p_usc_info_source
--13359423
       );
Line: 1021

     delete_bal_adj ( p_effective_date => P_EFFECTIVE_DATE
                     ,p_business_group_id => l_business_group_id
                     ,p_assignment_id => p_assignment_id );
Line: 1205

procedure update_ie_paye_details
  (p_validate                      in     boolean
  ,p_effective_date                in     date
  ,p_datetrack_update_mode         in     varchar2
  ,p_paye_details_id               in     number
  ,p_info_source                   in     varchar2
  ,p_tax_basis                     in     varchar2
  ,p_certificate_start_date        in     date
  ,p_tax_assess_basis              in     varchar2
  ,p_certificate_issue_date        in     date     default null
  ,p_certificate_end_date          in     date     default null
  ,p_weekly_tax_credit             in     number   default null
  ,p_weekly_std_rate_cut_off       in     number   default null
  ,p_monthly_tax_credit            in     number   default null
  ,p_monthly_std_rate_cut_off      in     number   default null
  ,p_tax_deducted_to_date          in     number   default null
  ,p_pay_to_date                   in     number   default null
  ,p_disability_benefit            in     number   default null
  ,p_lump_sum_payment              in     number   default null
  ,p_object_version_number         in out nocopy number
  ,p_effective_start_date          out    nocopy date
  ,p_effective_end_date            out    nocopy date
  ,p_Tax_This_Employment	      in     Number
  ,p_Previous_Employment_Start_Dt   in	date
  ,p_Previous_Employment_End_Date	in	date
  ,p_Pay_This_Employment		in	number
  ,p_PAYE_Previous_Employer		in	varchar2
  ,p_P45P3_Or_P46				in	varchar2
  ,p_Already_Submitted			in	varchar2
  --,p_P45P3_Or_P46_Processed		in	varchar2
--13359423
,p_yrly_tax_cred in NUMBER DEFAULT NULL
,p_yrly_tax_rate_1 in number default null
,p_yrly_tax_rate_2 in number default null
,p_mthly_tax_rate_2 in number default null
,p_wkly_tax_rate_2 in number default null
,p_tax_rate_3 in number default null
,p_yrly_tax_rate_3 in number default null
,p_mthly_tax_rate_3 in number default null
,p_wkly_tax_rate_3 in number default null
,p_tax_rate_4 in number default null
,p_yrly_tax_rate_4 in number default null
,p_mthly_tax_rate_4 in number default null
,p_wkly_tax_rate_4 in number default null
,p_tax_rate_5 in number default null
,p_in_exempt_usc in varchar2 default null
,p_total_usc_pay_todate in number default null
,p_total_usc_tax_todate in number default null
,p_usc_rate_1 in number default null
,p_usc_yrly_cutoff_1 in number default null
,p_usc_mthly_cutoff_1 in number default null
,p_usc_wkly_cutoff_1 in number default null
,p_usc_rate_2 in number default null
,p_usc_yrly_cutoff_2 in number default null
,p_usc_mthly_cutoff_2 in number default null
,p_usc_wkly_cutoff_2 in number default null
,p_usc_rate_3 in number default null
,p_usc_yrly_cutoff_3 in number default null
,p_usc_mthly_cutoff_3 in number default null
,p_usc_wkly_cutoff_3 in number default null
,p_usc_rate_4 in number default null
,p_usc_yrly_cutoff_4 in number default null
,p_usc_mthly_cutoff_4 in number default null
,p_usc_wkly_cutoff_4 in number default null
,p_usc_rate_5 in number default null
,p_usc_tax_basis in varchar2 default null
,p_usc_info_source in varchar2 default null
,p_usc_pay_this_employment	      in     number default null
,p_usc_tax_this_employment	      in     Number default null
--13359423
  ) IS
  --
  -- Declare cursors and local variables
  --

  l_proc                varchar2(72) := g_package||'update_ie_paye_details';
Line: 1295

  SELECT assignment_id
  FROM   pay_ie_paye_details_f
  WHERE  paye_details_id = p_paye_details_id
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 1301

  SELECT business_group_id
  FROM   per_all_assignments_f
  WHERE  assignment_id = l_assignment_id
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 1313

    SELECT pee.element_entry_id, pee.effective_start_date
      FROM pay_element_entries_f pee,
           pay_element_types_f pet,
           pay_element_links_f pel
     WHERE pee.element_link_id = pel.element_link_id AND
           pee.assignment_id = l_assignment_id AND
           pee.effective_start_date >= l_tax_yr_start_date and
           pee.effective_end_date <= add_months(l_tax_yr_start_date,12) AND
	     (pee.effective_start_date > p_effective_date OR
	      p_effective_date Between pee.effective_start_date AND pee.effective_end_date) AND
           pel.element_type_id = pet.element_type_id AND
           pel.business_group_id = l_business_group_id AND
           pet.element_name in('IE P45 Information', 'Setup P45 Element') AND
           NVL(pet.business_group_id, l_business_group_id) = l_business_group_id AND
           pet.legislation_code = 'IE' ; */
Line: 1330

	select 1
	from
	pay_payroll_actions ppa,
	pay_assignment_actions paa,
	pay_run_results prr,
	pay_run_result_values prrv,
	pay_element_types_f petf,
	pay_element_entries_f peef
	where ppa.business_group_id = l_business_group_id
	and ppa.action_type = 'B'
	and ppa.action_status = 'C'
	and ppa.payroll_action_id = paa.payroll_action_id
	and paa.assignment_id = l_assignment_id
	and prr.assignment_action_id = paa.assignment_action_id
	and prr.entry_type = 'B'
	and prr.run_result_id = prrv.run_result_id
	and prr.element_type_id = petf.element_type_id
	and NVL(petf.business_group_id, l_business_group_id) = l_business_group_id
	and petf.element_name in('IE P45 Information', 'Setup P45 Element')
	and petf.legislation_code = 'IE'
	and peef.element_type_id = petf.element_type_id
	and peef.assignment_id = paa.assignment_id
	and peef.effective_start_date >= l_tax_yr_start_date
	and peef.effective_end_date <= add_months(l_tax_yr_start_date,12)
	and peef.entry_type = 'B'
	and peef.element_entry_id = prr.element_entry_id
	and ppa.effective_date > p_effective_date;
Line: 1367

  savepoint update_ie_paye_details;
Line: 1389

    hr_utility.set_location('before pay_ie_paye_bk2.update_ie_paye_details_b', 2001);
Line: 1390

    pay_ie_paye_bk2.update_ie_paye_details_b
      (p_effective_date                => p_effective_date
      ,p_datetrack_update_mode         => p_datetrack_update_mode
      ,p_business_group_id             => l_business_group_id
      ,p_paye_details_id               => p_paye_details_id
      ,p_info_source                   => p_info_source
      ,p_tax_basis                     => p_tax_basis
      ,p_certificate_start_date        => p_certificate_start_date
      ,p_tax_assess_basis              => p_tax_assess_basis
      ,p_certificate_issue_date        => p_certificate_issue_date
      ,p_certificate_end_date          => p_certificate_end_date
      ,p_weekly_tax_credit             => p_weekly_tax_credit
      ,p_weekly_std_rate_cut_off       => p_weekly_std_rate_cut_off
      ,p_monthly_tax_credit            => p_monthly_tax_credit
      ,p_monthly_std_rate_cut_off      => p_monthly_std_rate_cut_off
      ,p_tax_deducted_to_date          => p_tax_deducted_to_date
      ,p_pay_to_date                   => p_pay_to_date
      ,p_disability_benefit            => p_disability_benefit
      ,p_lump_sum_payment              => p_lump_sum_payment
      ,p_object_version_number         => l_object_version_number
	,p_Tax_This_Employment	         => p_Tax_This_Employment
	,p_Previous_Employment_Start_Dt  => p_Previous_Employment_Start_Dt
	,p_Previous_Employment_End_Date  => p_Previous_Employment_End_Date
	,p_Pay_This_Employment		   => p_Pay_This_Employment
	,p_PAYE_Previous_Employer	   => p_PAYE_Previous_Employer
	,p_P45P3_Or_P46			   => p_P45P3_Or_P46
	,p_Already_Submitted		   => p_Already_Submitted
	--,p_P45P3_Or_P46_Processed	   => p_P45P3_Or_P46_Processed
--13359423
,p_yrly_tax_cred	=> p_yrly_tax_cred
,p_yrly_tax_rate_1	=> p_yrly_tax_rate_1
,p_yrly_tax_rate_2	=> p_yrly_tax_rate_2
,p_mthly_tax_rate_2	=> p_mthly_tax_rate_2
,p_wkly_tax_rate_2	=> p_wkly_tax_rate_2
,p_tax_rate_3		=> p_tax_rate_3
,p_yrly_tax_rate_3	=> p_yrly_tax_rate_3
,p_mthly_tax_rate_3	=> p_mthly_tax_rate_3
,p_wkly_tax_rate_3	=> p_wkly_tax_rate_3
,p_tax_rate_4		=> p_tax_rate_4
,p_yrly_tax_rate_4	=> p_yrly_tax_rate_4
,p_mthly_tax_rate_4	=> p_mthly_tax_rate_4
,p_wkly_tax_rate_4	=> p_wkly_tax_rate_4
,p_tax_rate_5		=> p_tax_rate_5
,p_in_exempt_usc	=> p_in_exempt_usc
,p_total_usc_pay_todate	=> p_total_usc_pay_todate
,p_total_usc_tax_todate	=> p_total_usc_tax_todate
,p_usc_rate_1		=> p_usc_rate_1
,p_usc_yrly_cutoff_1	=> p_usc_yrly_cutoff_1
,p_usc_mthly_cutoff_1	=> p_usc_mthly_cutoff_1
,p_usc_wkly_cutoff_1	=> p_usc_wkly_cutoff_1
,p_usc_rate_2		=> p_usc_rate_2
,p_usc_yrly_cutoff_2	=> p_usc_yrly_cutoff_2
,p_usc_mthly_cutoff_2	=> p_usc_mthly_cutoff_2
,p_usc_wkly_cutoff_2	=> p_usc_wkly_cutoff_2
,p_usc_rate_3		=> p_usc_rate_3
,p_usc_yrly_cutoff_3	=> p_usc_yrly_cutoff_3
,p_usc_mthly_cutoff_3	=> p_usc_mthly_cutoff_3
,p_usc_wkly_cutoff_3	=> p_usc_wkly_cutoff_3
,p_usc_rate_4		=> p_usc_rate_4
,p_usc_yrly_cutoff_4	=> p_usc_yrly_cutoff_4
,p_usc_mthly_cutoff_4	=> p_usc_mthly_cutoff_4
,p_usc_wkly_cutoff_4	=> p_usc_wkly_cutoff_4
,p_usc_rate_5		=> p_usc_rate_5
,p_usc_tax_basis	=> p_usc_tax_basis
,p_usc_info_source	=> p_usc_info_source
,p_usc_pay_this_employment	=> p_usc_pay_this_employment
,p_usc_tax_this_employment	=> p_usc_tax_this_employment
--13359423
      );
Line: 1459

    hr_utility.set_location('after pay_ie_paye_bk2.update_ie_paye_details_b', 2001);
Line: 1463

        (p_module_name => 'update_ie_paye_details'
        ,p_hook_type   => 'BP'
        );
Line: 1481

       ,p_datetrack_mode                 =>  p_datetrack_update_mode
       ,p_paye_details_id                =>  p_paye_details_id
       ,p_object_version_number          =>  l_object_version_number
       ,p_info_source                    =>  p_info_source
       ,p_tax_basis                      =>  p_tax_basis
       ,p_certificate_start_date         =>  p_certificate_start_Date
       ,p_tax_assess_basis               =>  p_tax_assess_basis
       ,p_certificate_end_date           =>  p_certificate_end_date
       ,p_weekly_tax_credit              =>  p_weekly_tax_credit
       ,p_weekly_std_rate_cut_off        =>  p_weekly_std_rate_cut_off
       ,p_monthly_tax_credit             =>  p_monthly_tax_credit
       ,p_monthly_std_rate_cut_off       =>  p_monthly_std_rate_cut_off
       ,p_request_id                     =>  l_request_id
       ,p_program_application_id         =>  l_prog_appl_id
       ,p_program_id                     =>  l_program_id
       ,p_program_update_date            =>  sysdate
       ,p_effective_start_date           =>  l_effective_start_date
       ,p_effective_end_date             =>  l_effective_end_date
       ,p_certificate_issue_date         =>  p_certificate_issue_Date
--13359423
,p_yrly_tax_cred => p_yrly_tax_cred
,p_yrly_tax_rate_1	=> p_yrly_tax_rate_1
,p_yrly_tax_rate_2	=> p_yrly_tax_rate_2
,p_mthly_tax_rate_2	=> p_mthly_tax_rate_2
,p_wkly_tax_rate_2	=> p_wkly_tax_rate_2
,p_tax_rate_3		=> p_tax_rate_3
,p_yrly_tax_rate_3	=> p_yrly_tax_rate_3
,p_mthly_tax_rate_3	=> p_mthly_tax_rate_3
,p_wkly_tax_rate_3	=> p_wkly_tax_rate_3
,p_tax_rate_4		=> p_tax_rate_4
,p_yrly_tax_rate_4	=> p_yrly_tax_rate_4
,p_mthly_tax_rate_4	=> p_mthly_tax_rate_4
,p_wkly_tax_rate_4	=> p_wkly_tax_rate_4
,p_tax_rate_5		=> p_tax_rate_5
,p_in_exempt_usc	=> p_in_exempt_usc
,p_total_usc_pay_todate => p_total_usc_pay_todate
,p_total_usc_tax_todate => p_total_usc_tax_todate
,p_usc_rate_1		=> p_usc_rate_1
,p_usc_yrly_cutoff_1	=> p_usc_yrly_cutoff_1
,p_usc_mthly_cutoff_1	=> p_usc_mthly_cutoff_1
,p_usc_wkly_cutoff_1	=> p_usc_wkly_cutoff_1
,p_usc_rate_2		=> p_usc_rate_2
,p_usc_yrly_cutoff_2	=> p_usc_yrly_cutoff_2
,p_usc_mthly_cutoff_2	=> p_usc_mthly_cutoff_2
,p_usc_wkly_cutoff_2	=> p_usc_wkly_cutoff_2
,p_usc_rate_3		=> p_usc_rate_3
,p_usc_yrly_cutoff_3	=> p_usc_yrly_cutoff_3
,p_usc_mthly_cutoff_3	=> p_usc_mthly_cutoff_3
,p_usc_wkly_cutoff_3	=> p_usc_wkly_cutoff_3
,p_usc_rate_4		=> p_usc_rate_4
,p_usc_yrly_cutoff_4	=> p_usc_yrly_cutoff_4
,p_usc_mthly_cutoff_4	=> p_usc_mthly_cutoff_4
,p_usc_wkly_cutoff_4	=> p_usc_wkly_cutoff_4
,p_usc_rate_5		=> p_usc_rate_5
,p_usc_tax_basis	=> p_usc_tax_basis
,p_usc_info_source	=> p_usc_info_source
--13359423
       );
Line: 1549

  SELECT min(effective_start_date)
  INTO   l_p45_effective_date
  FROM   pay_ie_paye_details_f
  WHERE  paye_details_id = p_paye_details_id;
Line: 1573

     delete_bal_adj ( p_effective_date => P_EFFECTIVE_DATE
			   ,p_business_group_id => l_business_group_id
			   ,p_assignment_id => l_assignment_id );
Line: 1595

	     -- Delete previous adjustments
	     delete_bal_adj ( p_effective_date => P_EFFECTIVE_DATE
				   ,p_business_group_id => l_business_group_id
				   ,p_assignment_id => l_assignment_id );
Line: 1630

hr_utility.set_location('before  update_p46', 2003);
Line: 1647

	update_p46 (	p_effective_date
				, l_assignment_id
				, l_business_group_id
				, p_datetrack_update_mode
				, l_object_version_p45p3
				, p_paye_details_id
				, p_Tax_This_Employment
				, p_Previous_Employment_Start_Dt
				, p_Previous_Employment_End_Date
				, p_Pay_This_Employment
				, p_PAYE_Previous_Employer
				, p_P45P3_Or_P46
				, p_Already_Submitted
				--, p_P45P3_Or_P46_Processed
				--13359423
				,p_usc_pay_this_employment
				,p_usc_tax_this_employment
				--13359423
				);
Line: 1669

hr_utility.set_location('after  update_p46', 2003);
Line: 1675

hr_utility.set_location('before  pay_ie_paye_bk2.update_ie_paye_details_a', 2004);
Line: 1676

     pay_ie_paye_bk2.update_ie_paye_details_a
      (p_effective_date                => p_effective_date
      ,p_business_group_id             => l_business_group_id
      ,p_datetrack_update_mode         => p_datetrack_update_mode
      ,p_paye_details_id               => p_paye_details_id
      ,p_info_source                   => p_info_source
      ,p_tax_basis                     => p_tax_basis
      ,p_certificate_start_date        => p_certificate_start_date
      ,p_tax_assess_basis              => p_tax_assess_basis
      ,p_certificate_issue_date        => p_certificate_issue_date
      ,p_certificate_end_date          => p_certificate_end_date
      ,p_weekly_tax_credit             => p_weekly_tax_credit
      ,p_weekly_std_rate_cut_off       => p_weekly_std_rate_cut_off
      ,p_monthly_tax_credit            => p_monthly_tax_credit
      ,p_monthly_std_rate_cut_off      => p_monthly_std_rate_cut_off
      ,p_tax_deducted_to_date          => p_tax_deducted_to_date
      ,p_pay_to_date                   => p_pay_to_date
      ,p_disability_benefit            => p_disability_benefit
      ,p_lump_sum_payment              => p_lump_sum_payment
      ,p_object_version_number         => l_object_version_number
      ,p_effective_start_date          => l_effective_start_date
      ,p_effective_end_date            => l_effective_end_date
	,p_Tax_This_Employment	         => p_Tax_This_Employment
	,p_Previous_Employment_Start_Dt  => p_Previous_Employment_Start_Dt
	,p_Previous_Employment_End_Date  => p_Previous_Employment_End_Date
	,p_Pay_This_Employment		   => p_Pay_This_Employment
	,p_PAYE_Previous_Employer	   => p_PAYE_Previous_Employer
	,p_P45P3_Or_P46			   => p_P45P3_Or_P46
	,p_Already_Submitted		   => p_Already_Submitted
	--,p_P45P3_Or_P46_Processed	   => p_P45P3_Or_P46_Processed
--13359423
,p_yrly_tax_cred	=> p_yrly_tax_cred
,p_yrly_tax_rate_1	=> p_yrly_tax_rate_1
,p_yrly_tax_rate_2	=> p_yrly_tax_rate_2
,p_mthly_tax_rate_2	=> p_mthly_tax_rate_2
,p_wkly_tax_rate_2	=> p_wkly_tax_rate_2
,p_tax_rate_3		=> p_tax_rate_3
,p_yrly_tax_rate_3	=> p_yrly_tax_rate_3
,p_mthly_tax_rate_3	=> p_mthly_tax_rate_3
,p_wkly_tax_rate_3	=> p_wkly_tax_rate_3
,p_tax_rate_4		=> p_tax_rate_4
,p_yrly_tax_rate_4	=> p_yrly_tax_rate_4
,p_mthly_tax_rate_4	=> p_mthly_tax_rate_4
,p_wkly_tax_rate_4	=> p_wkly_tax_rate_4
,p_tax_rate_5		=> p_tax_rate_5
,p_in_exempt_usc	=> p_in_exempt_usc
,p_total_usc_pay_todate	=> p_total_usc_pay_todate
,p_total_usc_tax_todate	=> p_total_usc_tax_todate
,p_usc_rate_1		=> p_usc_rate_1
,p_usc_yrly_cutoff_1	=> p_usc_yrly_cutoff_1
,p_usc_mthly_cutoff_1	=> p_usc_mthly_cutoff_1
,p_usc_wkly_cutoff_1	=> p_usc_wkly_cutoff_1
,p_usc_rate_2		=> p_usc_rate_2
,p_usc_yrly_cutoff_2	=> p_usc_yrly_cutoff_2
,p_usc_mthly_cutoff_2	=> p_usc_mthly_cutoff_2
,p_usc_wkly_cutoff_2	=> p_usc_wkly_cutoff_2
,p_usc_rate_3		=> p_usc_rate_3
,p_usc_yrly_cutoff_3	=> p_usc_yrly_cutoff_3
,p_usc_mthly_cutoff_3	=> p_usc_mthly_cutoff_3
,p_usc_wkly_cutoff_3	=> p_usc_wkly_cutoff_3
,p_usc_rate_4		=> p_usc_rate_4
,p_usc_yrly_cutoff_4	=> p_usc_yrly_cutoff_4
,p_usc_mthly_cutoff_4	=> p_usc_mthly_cutoff_4
,p_usc_wkly_cutoff_4	=> p_usc_wkly_cutoff_4
,p_usc_rate_5		=> p_usc_rate_5
,p_usc_tax_basis	=> p_usc_tax_basis
,p_usc_info_source	=> p_usc_info_source
,p_usc_pay_this_employment	=> p_usc_pay_this_employment
,p_usc_tax_this_employment	=> p_usc_tax_this_employment
--13359423
      );
Line: 1748

hr_utility.set_location('after  pay_ie_paye_bk2.update_ie_paye_details_a', 2004);
Line: 1752

        (p_module_name => 'update_ie_paye_details'
        ,p_hook_type   => 'AP'
        );
Line: 1779

    rollback to update_ie_paye_details;
Line: 1796

    rollback to update_ie_paye_details;
Line: 1802

end update_ie_paye_details;
Line: 1809

procedure delete_ie_paye_details
  (p_validate                      in     boolean
  ,p_effective_date                in     date
  ,p_datetrack_delete_mode         in     varchar2
  ,p_paye_details_id               in     number
  ,p_object_version_number         in out nocopy number
  ,p_effective_start_date          out    nocopy date
  ,p_effective_end_date            out    nocopy date
  ) IS
  --
  -- Declare cursors and local variables
  --

  l_proc                varchar2(72) := g_package||'delete_ie_paye_details';
Line: 1831

  SELECT assignment_id
  FROM   pay_ie_paye_details_f
  WHERE  paye_details_id = p_paye_details_id
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 1837

  SELECT business_group_id
  FROM   per_all_assignments_f
  WHERE  assignment_id = l_assignment_id
  AND    p_effective_date BETWEEN effective_start_date AND effective_end_date;
Line: 1850

  savepoint delete_ie_paye_details;
Line: 1866

  hr_utility.set_location('before pay_ie_paye_bk3.delete_ie_paye_details_b', 1000);
Line: 1867

    pay_ie_paye_bk3.delete_ie_paye_details_b
      (p_effective_date                => p_effective_date
      ,p_datetrack_delete_mode         => p_datetrack_delete_mode
      ,p_business_group_id             => l_business_group_id
      ,p_paye_details_id               => p_paye_details_id
      ,p_object_version_number         => l_object_version_number
      );
Line: 1874

    hr_utility.set_location('after pay_ie_paye_bk3.delete_ie_paye_details_b', 1000);
Line: 1878

        (p_module_name => 'delete_ie_paye_details'
        ,p_hook_type   => 'BP'
        );
Line: 1891

       ,p_datetrack_mode                 =>  p_datetrack_delete_mode
       ,p_paye_details_id                =>  p_paye_details_id
       ,p_object_version_number          =>  l_object_version_number
       ,p_effective_start_date           =>  l_effective_start_date
       ,p_effective_end_date             =>  l_effective_end_date
       );
Line: 1907

  SELECT min(effective_start_date)
  INTO   l_p45_effective_date
  FROM   pay_ie_paye_details_f
  WHERE  paye_details_id = p_paye_details_id;
Line: 1918

  IF ( p_datetrack_delete_mode = hr_api.g_zap) THEN
     -- Delete previous adjustments
     delete_bal_adj ( p_effective_date => p_effective_date -- l_p45_effective_date
                     ,p_business_group_id => l_business_group_id
                     ,p_assignment_id => l_assignment_id );
Line: 1925

	hr_utility.set_location('before delete_p46', 1001);
Line: 1927

	delete_p46 (p_effective_date
			, l_assignment_id
			, l_business_group_id
			, p_datetrack_delete_mode
			, l_object_version_p45p3
			);
Line: 1933

	hr_utility.set_location('after delete_p46', 1001);
Line: 1945

         ,p_datetrack_mode                 =>  p_datetrack_delete_mode
         ,p_paye_details_id                =>  p_paye_details_id
         ,p_object_version_number          =>  l_object_version_number
         ,p_effective_start_date           =>  l_effective_start_date
         ,p_effective_end_date             =>  l_effective_end_date
         );
Line: 1957

hr_utility.set_location('before  pay_ie_paye_bk3.delete_ie_paye_details_a', 1003);
Line: 1958

     pay_ie_paye_bk3.delete_ie_paye_details_a
      (p_effective_date                => p_effective_date
      ,p_business_group_id             => l_business_group_id
      ,p_datetrack_delete_mode         => p_datetrack_delete_mode
      ,p_paye_details_id               => p_paye_details_id
      ,p_object_version_number         => l_object_version_number
      ,p_effective_start_date          => l_effective_start_date
      ,p_effective_end_date            => l_effective_end_date
      );
Line: 1967

hr_utility.set_location('after  pay_ie_paye_bk3.delete_ie_paye_details_a', 1003);
Line: 1971

        (p_module_name => 'delete_ie_paye_details'
        ,p_hook_type   => 'AP'
        );
Line: 1998

    rollback to delete_ie_paye_details;
Line: 2014

    rollback to update_ie_paye_details;
Line: 2020

end delete_ie_paye_details;