DBA Data[Home] [Help]

APPS.PAY_US_EMP_DT_TAX_RULES SQL Statements

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

Line: 5

     Purpose     : This procedure can be used to create as well as update the vertex
                   element entry for an assignment. It calls the element entries api
                   to insert and update the element entry record.
     Parameters  :
                  p_assignment_id     -> The assignment for which the vertex elemnt entry is to be
                                         created/modified.
                  p_effective_start_date -> The start date of the element entry.
                  p_effective_end_date   -> The end date of the element entry.
                  p_session_date         -> This will be helpful for the various update modes.
                  p_jurisdiction_code    -> The jurisdiction code for which the elemnt entry is to
                                            created/updated.
                  p_percentage_time      -> Time in the jurisdiction.
                  p_mode                 -> If can have the following values :
                                            'INSERT'
                                            'CORRECTION',
                                            'UPDATE',
                                            'UPDATE_CHANGE_INSERT',
                                            'UPDATE_OVERRIDE',
                                            'ZAP'
                                            'INSERT_OLD'
    Note : Since the change in location might lead us to scenarios where we might
           want to do various kinds of updates, all kinds of update modes have been
           added.
  */

  procedure maintain_element_entry (p_assignment_id        in number,
                                    p_effective_start_date in date,
                                    p_effective_end_date   in date,
                                    p_session_date         in date,
                                    p_jurisdiction_code    in varchar2,
                                    p_percentage_time      in number,
                                    p_mode                 in varchar2) is

   l_inp_value_id_table   hr_entry.number_table;
Line: 50

   l_delete_flag          varchar2(1) := 'N';
Line: 58

       select pet.element_type_id,
              piv.input_value_id,
              piv.name
       from   PAY_INPUT_VALUES_F  piv,
              PAY_ELEMENT_TYPES_F pet
       where  p_session_date between piv.effective_start_date
                             and piv.effective_end_date
       and    pet.element_type_id       = piv.element_type_id
       and    p_session_date between pet.effective_start_date
                             and pet.effective_end_date
       and    pet.element_name          = 'VERTEX';
Line: 73

       select pee.element_entry_id
       from   PAY_ELEMENT_ENTRY_VALUES_F pev,
              PAY_ELEMENT_ENTRIES_F pee
       where    pev.screen_entry_value   = p_jurisdiction_code
       and    pev.input_value_id + 0   = p_inp_val
       and    p_session_date between pev.effective_start_date
                             and pev.effective_end_date
       and    pev.element_entry_id     = pee.element_entry_id
       and    p_session_date between pee.effective_start_date
                             and pee.effective_end_date
       and    pee.element_link_id      = p_element_link
       and    pee.assignment_id        = p_assignment_id;
Line: 89

       select pev.screen_entry_value
       from   PAY_ELEMENT_ENTRY_VALUES_F pev
       where  pev.screen_entry_value is not null
       and    pev.input_value_id + 0  = p_inp_val
       and    p_session_date between pev.effective_start_date
                             and pev.effective_end_date
       and  pev.element_entry_id     = p_ele_entry_id;
Line: 180

       if p_mode = 'INSERT' then

             /* Create the vertex element entry */

             hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,5);
Line: 186

             hr_entry_api.insert_element_entry( P_effective_start_date     => l_effective_start_date,
                                                P_effective_end_date       => l_effective_end_date,
                                                P_element_entry_id         => l_element_entry_id,
                                                P_assignment_id            => p_assignment_id,
                                                P_element_link_id          => l_element_link_id,
                                                P_creator_type             => 'UT',
                                                P_entry_type               => 'E',
                                                P_num_entry_values         => 3,
                                                P_input_value_id_tbl       => l_inp_value_id_table,
                                                P_entry_value_tbl          => l_scr_value_table);
Line: 199

    elsif p_mode in ('CORRECTION','UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE','ZAP','DELETE_NEXT_CHANGE','FUTURE_CHANGE','INSERT_OLD') then

             /* Get the element entry of the vertex element entry that is to be updated
                or deleted */

             hr_utility.set_location('pay_us_emp_dt_tax_rules.maintain_element_entry' ,7);
Line: 211

              /* Added the delete flag for the upgrade. Currently, there
                 may be state tax records which might not have a vertex
                 element entry */

              if csr_ele_entry%NOTFOUND then
                if p_mode in('ZAP','DELETE_NEXT_CHANGE','FUTURE_CHANGE') then

                    l_delete_flag := 'N';
Line: 232

                  l_delete_flag := 'Y';
Line: 238

              if p_mode = 'INSERT_OLD' then

                 open csr_get_curr_percnt(l_element_entry_id, l_inp_value_id_table(3));
Line: 259

                     l_mode := 'UPDATE';
Line: 263

                     l_mode := 'UPDATE_CHANGE_INSERT';
Line: 269

              if p_mode in ('ZAP','DELETE_NEXT_CHANGE','FUTURE_CHANGE')
                 and l_delete_flag = 'Y' then

                 hr_entry_api.delete_element_entry(
                    p_dt_delete_mode           => l_mode,
                    p_session_date             => p_session_date,
                    p_element_entry_id         => l_element_entry_id);
Line: 277

              elsif p_mode in ('CORRECTION','UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE','INSERT_OLD') then

                 hr_entry_api.update_element_entry(
                    p_dt_update_mode           => l_mode,
                    p_session_date             => p_session_date,
                    p_element_entry_id         => l_element_entry_id,
                    p_num_entry_values         => 3,
                    p_input_value_id_tbl       => l_inp_value_id_table,
                    p_entry_value_tbl          => l_scr_value_table);
Line: 297

     Purpose     : This procedure can be used to create as well as update the worker's
                   compensation element entry for an assignment. It calls the element
                   entries api to insert and update the element entry record.
     Parameters  :
                  p_assignment_id     -> The assignment for which the vertex elemnt entry is to be
                                         created/modified.
                  p_effective_start_date -> The start date of the element entry.
                  p_effective_end_date   -> The end date of the element entry.
                  p_session_date         -> This will be helpful for changing the wc element
                                            entry for change in the federal record.
                  p_jurisdiction_code    -> The jurisdiction code for which the elemnt entry is to
                                            created/updated.
                  p_mode                 -> If can have the following values :
                                            'INSERT'
                                            'CORRECTION',
                                            'UPDATE',
                                            'UPDATE_CHANGE_INSERT',
                                            'UPDATE_OVERRIDE',
                                            'ZAP'
    Note : For every change in federal record, we will be changing the worker's comp element entry.
  */

  procedure maintain_wc_ele_entry (p_assignment_id        in number,
                                   p_effective_start_date in date,
                                   p_effective_end_date   in date,
                                   p_session_date         in date,
                                   p_jurisdiction_code    in varchar2,
                                   p_mode                 in varchar2) is

   l_inp_value_id_table   hr_entry.number_table;
Line: 337

   l_delete_flag          varchar2(1);
Line: 343

       select pet.element_type_id,
              piv.input_value_id,
              piv.name
       from   PAY_INPUT_VALUES_F  piv,
              PAY_ELEMENT_TYPES_F pet
       where    p_session_date between piv.effective_start_date
              and piv.effective_end_date
       and    pet.element_type_id       = piv.element_type_id
       and    p_session_date between pet.effective_start_date
              and pet.effective_end_date
       and    pet.element_name   = 'Workers Compensation'; -- Bug 3354060 FTS on PAY_ELEMENT_TYPES_F was removed. Done by removing
Line: 361

       select pee.element_entry_id
       from   PAY_ELEMENT_ENTRIES_F pee
       where  p_session_date between pee.effective_start_date
              and pee.effective_end_date
       and    pee.element_link_id       = p_element_link
       and    pee.assignment_id         = p_assignment_id;
Line: 450

       if p_mode = 'INSERT'
       then

           /* Insert the worker's compensation element entry */

           hr_utility.set_location(
                'pay_us_emp_dt_tax_rules.maintain_wc_ele_entry' ,5);
Line: 457

           hr_entry_api.insert_element_entry(
                P_effective_start_date     => l_effective_start_date,
                P_effective_end_date       => l_effective_end_date,
                P_element_entry_id         => l_element_entry_id,
                P_assignment_id            => p_assignment_id,
                P_element_link_id          => l_element_link_id,
                P_creator_type             => 'UT',
                P_entry_type               => 'E',
                P_num_entry_values         => 2,
                P_input_value_id_tbl       => l_inp_value_id_table,
                P_entry_value_tbl          => l_scr_value_table);
Line: 472

          elsif p_mode in ('CORRECTION', 'UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE','ZAP')then

             /* Update the worker's compensation element entry */

              open csr_wc_ele_entry(l_element_link_id);
Line: 482

                if p_mode in('ZAP','DELETE_NEXT_CHANGE','FUTURE_CHANGE') then

                    l_delete_flag := 'N';
Line: 498

                  l_delete_flag := 'Y';
Line: 504

              if p_mode = 'ZAP' and l_delete_flag = 'Y' then

                 /* All of the tax %age records will be created from the date on which the
                    default tax rules criteria was met till the end of time. So, we should
                    get records for the state, county and city for the same effective start
                    date */

                 hr_entry_api.delete_element_entry(
                    p_dt_delete_mode           => l_mode,
                    p_session_date             => p_session_date,
                    p_element_entry_id         => l_element_entry_id);
Line: 516

              elsif p_mode in ('CORRECTION','UPDATE', 'UPDATE_CHANGE_INSERT','UPDATE_OVERRIDE') then

                 hr_entry_api.update_element_entry(
                    p_dt_update_mode           => l_mode,
                    p_session_date             => p_session_date,
                    p_element_entry_id         => l_element_entry_id,
                    p_num_entry_values         => 2,
                    p_input_value_id_tbl       => l_inp_value_id_table,
                    p_entry_value_tbl          => l_scr_value_table);
Line: 593

       select min(effective_start_date)
       from   PAY_US_EMP_FED_TAX_RULES_F
       where  assignment_id = p_assignment_id;
Line: 616

    select paf1.location_id,
           paf1.effective_start_date,
           paf1.effective_start_date - 1
    from per_assignments_f paf1
    where paf1.assignment_id = passignment
    and paf1.effective_start_date >= pdefault_date
    order by 2;
Line: 705

         l_mode := 'INSERT';
Line: 709

         l_mode := 'UPDATE';
Line: 723

                              p_mode                 => 'INSERT');
Line: 734

                              p_mode                 => 'UPDATE');
Line: 766

                           p_mode                 => 'INSERT');
Line: 776

                           p_mode                 => 'UPDATE');
Line: 785

  /* Name        : insert_fed_tax_row
     Purpose     : To create the federal tax rule record. It also calls the
                   maintain_wc_ele_entry routine to create the worker's compensation
                   for the SUI state
  */

  procedure insert_fed_tax_row ( p_emp_fed_tax_rule_id in out nocopy number,
				                 p_effective_start_date in date,
                                  p_effective_end_date in date,
                                  p_assignment_id in number,
                                  p_sui_state_code in varchar2,
                                  p_sui_jurisdiction_code in varchar2,
                                  p_business_group_id in number,
                                  p_additional_wa_amount in number,
                                  p_filing_status_code in varchar2,
                                  p_fit_override_amount in number,
 				                  p_fit_override_rate in number,
                                  p_withholding_allowances in number,
                                  p_cumulative_taxation in varchar2,
                                  p_eic_filing_status_code in varchar2,
                                  p_fit_additional_tax in number,
                                  p_fit_exempt in varchar2,
                                  p_futa_tax_exempt in varchar2,
                                  p_medicare_tax_exempt in varchar2,
                                  p_ss_tax_exempt in varchar2,
                                  p_wage_exempt in varchar2,
                                  p_statutory_employee in varchar2,
                                  p_w2_filed_year in number,
                                  p_supp_tax_override_rate in number,
                                  p_excessive_wa_reject_date in date,
                                  p_attribute_category        in varchar2,
                                  p_attribute1                in varchar2,
                                  p_attribute2                in varchar2,
                                  p_attribute3                in varchar2,
                                  p_attribute4                in varchar2,
                                  p_attribute5                in varchar2,
                                  p_attribute6                in varchar2,
                                  p_attribute7                in varchar2,
                                  p_attribute8                in varchar2,
                                  p_attribute9                in varchar2,
                                  p_attribute10               in varchar2,
                                  p_attribute11               in varchar2,
                                  p_attribute12               in varchar2,
                                  p_attribute13               in varchar2,
                                  p_attribute14               in varchar2,
                                  p_attribute15               in varchar2,
                                  p_attribute16               in varchar2,
                                  p_attribute17               in varchar2,
                                  p_attribute18               in varchar2,
                                  p_attribute19               in varchar2,
                                  p_attribute20               in varchar2,
                                  p_attribute21               in varchar2,
                                  p_attribute22               in varchar2,
                                  p_attribute23               in varchar2,
                                  p_attribute24               in varchar2,
                                  p_attribute25               in varchar2,
                                  p_attribute26               in varchar2,
                                  p_attribute27               in varchar2,
                                  p_attribute28               in varchar2,
                                  p_attribute29               in varchar2,
                                  p_attribute30               in varchar2,
                                  p_fed_information_category  in varchar2,
                                  p_fed_information1          in varchar2,
                                  p_fed_information2          in varchar2,
                                  p_fed_information3          in varchar2,
                                  p_fed_information4          in varchar2,
                                  p_fed_information5          in varchar2,
                                  p_fed_information6          in varchar2,
                                  p_fed_information7          in varchar2,
                                  p_fed_information8          in varchar2,
                                  p_fed_information9          in varchar2,
                                  p_fed_information10         in varchar2,
                                  p_fed_information11         in varchar2,
                                  p_fed_information12         in varchar2,
                                  p_fed_information13         in varchar2,
                                  p_fed_information14         in varchar2,
                                  p_fed_information15         in varchar2,
                                  p_fed_information16         in varchar2,
                                  p_fed_information17         in varchar2,
                                  p_fed_information18         in varchar2,
                                  p_fed_information19         in varchar2,
                                  p_fed_information20         in varchar2,
                                  p_fed_information21         in varchar2,
                                  p_fed_information22         in varchar2,
                                  p_fed_information23         in varchar2,
                                  p_fed_information24         in varchar2,
                                  p_fed_information25         in varchar2,
                                  p_fed_information26         in varchar2,
                                  p_fed_information27         in varchar2,
                                  p_fed_information28         in varchar2,
                                  p_fed_information29         in varchar2,
                                  p_fed_information30         in varchar2,
                                  p_mode  in varchar2) is


  l_step   number;
Line: 885

  select PAY_US_EMP_FED_TAX_RULES_S.nextval
  from sys.DUAL;
Line: 891

     hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
                             ' - Opening cursor', 1);
Line: 894

     if p_mode = 'INSERT' then

       open csr_fed_tax_rule_id;
Line: 898

       hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
                             ' - Fetching cursor', 2);
Line: 903

       hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
                             ' - Closing cursor', 3);
Line: 909

       hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
                             ' - inserting row', 4);
Line: 916

     if p_mode = 'UPDATE' then

          select p_effective_start_date -1
          into l_new_date
          from DUAL;
Line: 922

          /* Update the Federal tax record as of the p_effective_start_date */

          l_step := 2;
Line: 926

          update PAY_US_EMP_FED_TAX_RULES_F
          set    effective_end_date = l_new_date
          where assignment_id        = p_assignment_id
          and   effective_end_date   = p_effective_end_date;
Line: 935

     insert into PAY_US_EMP_FED_TAX_RULES_F
     (emp_fed_tax_rule_id,
      effective_start_date,
      effective_end_date,
      assignment_id,
      sui_state_code,
      sui_jurisdiction_code,
      business_group_id,
      additional_wa_amount,
      filing_status_code,
      fit_override_amount,
      fit_override_rate,
      withholding_allowances,
      cumulative_taxation,
      eic_filing_status_code,
      fit_additional_tax,
      fit_exempt,
      futa_tax_exempt,
      medicare_tax_exempt,
      ss_tax_exempt,
      wage_exempt,
      statutory_employee,
      w2_filed_year,
      supp_tax_override_rate,
      excessive_wa_reject_date,
      object_version_number,
      attribute_category,
      attribute1,
      attribute2,
      attribute3,
      attribute4,
      attribute5,
      attribute6,
      attribute7,
      attribute8,
      attribute9,
      attribute10,
      attribute11,
      attribute12,
      attribute13,
      attribute14,
      attribute15,
      attribute16,
      attribute17,
      attribute18,
      attribute19,
      attribute20,
      attribute21,
      attribute22,
      attribute23,
      attribute24,
      attribute25,
      attribute26,
      attribute27,
      attribute28,
      attribute29,
      attribute30,
      fed_information_category,
      fed_information1,
      fed_information2,
      fed_information3,
      fed_information4,
      fed_information5,
      fed_information6,
      fed_information7,
      fed_information8,
      fed_information9,
      fed_information10,
      fed_information11,
      fed_information12,
      fed_information13,
      fed_information14,
      fed_information15,
      fed_information16,
      fed_information17,
      fed_information18,
      fed_information19,
      fed_information20,
      fed_information21,
      fed_information22,
      fed_information23,
      fed_information24,
      fed_information25,
      fed_information26,
      fed_information27,
      fed_information28,
      fed_information29,
      fed_information30)
     values
     (p_emp_fed_tax_rule_id,
      p_effective_start_date,
      p_effective_end_date,
      p_assignment_id,
      p_sui_state_code,
      p_sui_jurisdiction_code,
      p_business_group_id,
      p_additional_wa_amount,
      lpad(p_filing_status_code,2,'0'),
      p_fit_override_amount,
      p_fit_override_rate,
      p_withholding_allowances,
      p_cumulative_taxation,
      p_eic_filing_status_code,
      p_fit_additional_tax,
      p_fit_exempt,
      p_futa_tax_exempt,
      p_medicare_tax_exempt,
      p_ss_tax_exempt,
      p_wage_exempt,
      p_statutory_employee,
      p_w2_filed_year,
      p_supp_tax_override_rate,
      p_excessive_wa_reject_date,
      0,
      p_attribute_category,
      p_attribute1,
      p_attribute2,
      p_attribute3,
      p_attribute4,
      p_attribute5,
      p_attribute6,
      p_attribute7,
      p_attribute8,
      p_attribute9,
      p_attribute10,
      p_attribute11,
      p_attribute12,
      p_attribute13,
      p_attribute14,
      p_attribute15,
      p_attribute16,
      p_attribute17,
      p_attribute18,
      p_attribute19,
      p_attribute20,
      p_attribute21,
      p_attribute22,
      p_attribute23,
      p_attribute24,
      p_attribute25,
      p_attribute26,
      p_attribute27,
      p_attribute28,
      p_attribute29,
      p_attribute30,
      p_fed_information_category,
      p_fed_information1,
      p_fed_information2,
      p_fed_information3,
      p_fed_information4,
      p_fed_information5,
      p_fed_information6,
      p_fed_information7,
      p_fed_information8,
      p_fed_information9,
      p_fed_information10,
      p_fed_information11,
      p_fed_information12,
      p_fed_information13,
      p_fed_information14,
      p_fed_information15,
      p_fed_information16,
      p_fed_information17,
      p_fed_information18,
      p_fed_information19,
      p_fed_information20,
      p_fed_information21,
      p_fed_information22,
      p_fed_information23,
      p_fed_information24,
      p_fed_information25,
      p_fed_information26,
      p_fed_information27,
      p_fed_information28,
      p_fed_information29,
      p_fed_information30);
Line: 1116

      hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_fed_tax_row'||
                             ' - inserting row', 5);
Line: 1138

                       'pay_us_emp_dt_tax_rules.insert_fed_tax_row - '|| substr(sqlerrm,1,60));
Line: 1146

  end insert_fed_tax_row;
Line: 1149

  /* Name        : insert_state_tax_row
     Purpose     : To create the state tax rule record. It also calls the
                   create_tax_percentage routine to create the %age records
                   for the state, for every change in location of the assignment
  */

  procedure insert_state_tax_row ( p_row_id in out nocopy varchar2,
                                   p_emp_state_tax_rule_id in out nocopy number,
                                   p_effective_start_date in date,
                                   p_effective_end_date in date,
                                   p_assignment_id in number,
                                   p_state_code in varchar2,
                                   p_jurisdiction_code in varchar2,
                                   p_business_group_id in number,
                                   p_additional_wa_amount in number,
                                   p_filing_status_code in varchar2,
                                   p_remainder_percent in number,
                                   p_secondary_wa in number,
                                   p_sit_additional_tax in number,
                                   p_sit_override_amount in number,
                                   p_sit_override_rate in number,
                                   p_withholding_allowances in number,
                                   p_excessive_wa_reject_date in date,
                                   p_sdi_exempt in varchar2,
                                   p_sit_exempt in varchar2,
                                   p_sit_optional_calc_ind in varchar2,
                                   p_state_non_resident_cert in varchar2,
                                   p_sui_exempt in varchar2,
                                   p_wc_exempt in varchar2,
                                   p_wage_exempt in varchar2,
                                   p_sui_wage_base_override_amt in number,
                                   p_supp_tax_override_rate in number,
                                   p_time_in_state in number,
                                   p_attribute_category        in varchar2,
                                   p_attribute1                in varchar2,
                                   p_attribute2                in varchar2,
                                   p_attribute3                in varchar2,
                                   p_attribute4                in varchar2,
                                   p_attribute5                in varchar2,
                                   p_attribute6                in varchar2,
                                   p_attribute7                in varchar2,
                                   p_attribute8                in varchar2,
                                   p_attribute9                in varchar2,
                                   p_attribute10               in varchar2,
                                   p_attribute11               in varchar2,
                                   p_attribute12               in varchar2,
                                   p_attribute13               in varchar2,
                                   p_attribute14               in varchar2,
                                   p_attribute15               in varchar2,
                                   p_attribute16               in varchar2,
                                   p_attribute17               in varchar2,
                                   p_attribute18               in varchar2,
                                   p_attribute19               in varchar2,
                                   p_attribute20               in varchar2,
                                   p_attribute21               in varchar2,
                                   p_attribute22               in varchar2,
                                   p_attribute23               in varchar2,
                                   p_attribute24               in varchar2,
                                   p_attribute25               in varchar2,
                                   p_attribute26               in varchar2,
                                   p_attribute27               in varchar2,
                                   p_attribute28               in varchar2,
                                   p_attribute29               in varchar2,
                                   p_attribute30               in varchar2,
                                   p_sta_information_category  in varchar2,
                                   p_sta_information1          in varchar2,
                                   p_sta_information2          in varchar2,
                                   p_sta_information3          in varchar2,
                                   p_sta_information4          in varchar2,
                                   p_sta_information5          in varchar2,
                                   p_sta_information6          in varchar2,
                                   p_sta_information7          in varchar2,
                                   p_sta_information8          in varchar2,
                                   p_sta_information9          in varchar2,
                                   p_sta_information10         in varchar2,
                                   p_sta_information11         in varchar2,
                                   p_sta_information12         in varchar2,
                                   p_sta_information13         in varchar2,
                                   p_sta_information14         in varchar2,
                                   p_sta_information15         in varchar2,
                                   p_sta_information16         in varchar2,
                                   p_sta_information17         in varchar2,
                                   p_sta_information18         in varchar2,
                                   p_sta_information19         in varchar2,
                                   p_sta_information20         in varchar2,
                                   p_sta_information21         in varchar2,
                                   p_sta_information22         in varchar2,
                                   p_sta_information23         in varchar2,
                                   p_sta_information24         in varchar2,
                                   p_sta_information25         in varchar2,
                                   p_sta_information26         in varchar2,
                                   p_sta_information27         in varchar2,
                                   p_sta_information28         in varchar2,
                                   p_sta_information29         in varchar2,
                                   p_sta_information30         in varchar2
                                   ) is

  cursor csr_state_tax_rule_id is
    select PAY_US_EMP_STATE_TAX_RULES_S.nextval
    from sys.DUAL;
Line: 1251

    select rowidtochar(rowid)
    from PAY_US_EMP_STATE_TAX_RULES_F str
    where str.emp_state_tax_rule_id = p_emp_state_tax_rule_id
    and   str.effective_start_date  = p_effective_start_date
    and   str.effective_end_date    = p_effective_end_date;
Line: 1259

     select null
     from   pay_us_emp_state_tax_rules_f sta
     where  sta.assignment_id = p_assignment_id
     and    sta.state_code = p_state_code;
Line: 1287

                             ' - inserting row', 4);
Line: 1303

     insert into PAY_US_EMP_STATE_TAX_RULES_F
     (emp_state_tax_rule_id,
      effective_start_date,
      effective_end_date,
      assignment_id,
      state_code,
      jurisdiction_code,
      business_group_id,
      additional_wa_amount,
      filing_status_code,
      remainder_percent,
      secondary_wa,
      sit_additional_tax,
      sit_override_amount,
      sit_override_rate,
      withholding_allowances,
      excessive_wa_reject_date,
      sdi_exempt,
      sit_exempt,
      sit_optional_calc_ind,
      state_non_resident_cert,
      sui_exempt,
      wc_exempt,
      wage_exempt,
      sui_wage_base_override_amount,
      supp_tax_override_rate,
      object_version_number,
      attribute_category,
      attribute1,
      attribute2,
      attribute3,
      attribute4,
      attribute5,
      attribute6,
      attribute7,
      attribute8,
      attribute9,
      attribute10,
      attribute11,
      attribute12,
      attribute13,
      attribute14,
      attribute15,
      attribute16,
      attribute17,
      attribute18,
      attribute19,
      attribute20,
      attribute21,
      attribute22,
      attribute23,
      attribute24,
      attribute25,
      attribute26,
      attribute27,
      attribute28,
      attribute29,
      attribute30,
      sta_information_category,
      sta_information1,
      sta_information2,
      sta_information3,
      sta_information4,
      sta_information5,
      sta_information6,
      sta_information7,
      sta_information8,
      sta_information9,
      sta_information10,
      sta_information11,
      sta_information12,
      sta_information13,
      sta_information14,
      sta_information15,
      sta_information16,
      sta_information17,
      sta_information18,
      sta_information19,
      sta_information20,
      sta_information21,
      sta_information22,
      sta_information23,
      sta_information24,
      sta_information25,
      sta_information26,
      sta_information27,
      sta_information28,
      sta_information29,
      sta_information30)
     values
     (p_emp_state_tax_rule_id,
      p_effective_start_date,
      p_effective_end_date,
      p_assignment_id,
      p_state_code,
      p_jurisdiction_code,
      p_business_group_id,
      p_additional_wa_amount,
      lpad(p_filing_status_code,2,'0'),
      p_remainder_percent,
      p_secondary_wa,
      p_sit_additional_tax,
      p_sit_override_amount,
      p_sit_override_rate,
      p_withholding_allowances,
      p_excessive_wa_reject_date,
      p_sdi_exempt,
      p_sit_exempt,
      p_sit_optional_calc_ind,
      p_state_non_resident_cert,
      p_sui_exempt,
      p_wc_exempt,
      p_wage_exempt,
      p_sui_wage_base_override_amt,
      p_supp_tax_override_rate,
      0,
      p_attribute_category,
      p_attribute1,
      p_attribute2,
      p_attribute3,
      p_attribute4,
      p_attribute5,
      p_attribute6,
      p_attribute7,
      p_attribute8,
      p_attribute9,
      p_attribute10,
      p_attribute11,
      p_attribute12,
      p_attribute13,
      p_attribute14,
      p_attribute15,
      p_attribute16,
      p_attribute17,
      p_attribute18,
      p_attribute19,
      p_attribute20,
      p_attribute21,
      p_attribute22,
      p_attribute23,
      p_attribute24,
      p_attribute25,
      p_attribute26,
      p_attribute27,
      p_attribute28,
      p_attribute29,
      p_attribute30,
      p_sta_information_category,
      p_sta_information1,
      p_sta_information2,
      p_sta_information3,
      p_sta_information4,
      p_sta_information5,
      p_sta_information6,
      p_sta_information7,
      p_sta_information8,
      p_sta_information9,
      p_sta_information10,
      p_sta_information11,
      p_sta_information12,
      p_sta_information13,
      p_sta_information14,
      p_sta_information15,
      p_sta_information16,
      p_sta_information17,
      p_sta_information18,
      p_sta_information19,
      p_sta_information20,
      p_sta_information21,
      p_sta_information22,
      p_sta_information23,
      p_sta_information24,
      p_sta_information25,
      p_sta_information26,
      p_sta_information27,
      p_sta_information28,
      p_sta_information29,
      p_sta_information30);
Line: 1485

                        'pay_us_emp_dt_tax_rules.insert_state_tax_row');
Line: 1519

        /* Insert row into the pay_us_asg_reporting table */

        pay_asg_geo_pkg.create_asg_geo_row(P_assignment_id => p_assignment_id,
                                           P_jurisdiction  =>  p_jurisdiction_code,
                                           P_tax_unit_id   =>  NULL );
Line: 1526

  end insert_state_tax_row;
Line: 1529

  /* Name        : insert_county_tax_row
     Purpose     : To create the county tax rule record. It also calls the
                   create_tax_percentage routine to create the %age records
                   for the county, for every change in location of the assignment
  */
  procedure insert_county_tax_row ( p_row_id in out nocopy varchar2,
                                    p_emp_county_tax_rule_id in out nocopy number,
                                    p_effective_start_date in date,
                                    p_effective_end_date in date,
                                    p_assignment_id in number,
                                    p_state_code in varchar2,
                                    p_county_code in varchar2,
                                    p_business_group_id in number,
                                    p_additional_wa_rate in number,
                                    p_filing_status_code in varchar2,
                                    p_jurisdiction_code in varchar2,
                                    p_lit_additional_tax in number,
                                    p_lit_override_amount in number,
                                    p_lit_override_rate in number,
                                    p_withholding_allowances in number,
                                    p_lit_exempt in varchar2,
                                    p_sd_exempt in varchar2,
                                    p_ht_exempt in varchar2,
                                    p_wage_exempt in varchar2,
                                    p_school_district_code in varchar2,
                                    p_time_in_county in number,
                                    p_attribute_category        in varchar2,
                                    p_attribute1                in varchar2,
                                    p_attribute2                in varchar2,
                                    p_attribute3                in varchar2,
                                    p_attribute4                in varchar2,
                                    p_attribute5                in varchar2,
                                    p_attribute6                in varchar2,
                                    p_attribute7                in varchar2,
                                    p_attribute8                in varchar2,
                                    p_attribute9                in varchar2,
                                    p_attribute10               in varchar2,
                                    p_attribute11               in varchar2,
                                    p_attribute12               in varchar2,
                                    p_attribute13               in varchar2,
                                    p_attribute14               in varchar2,
                                    p_attribute15               in varchar2,
                                    p_attribute16               in varchar2,
                                    p_attribute17               in varchar2,
                                    p_attribute18               in varchar2,
                                    p_attribute19               in varchar2,
                                    p_attribute20               in varchar2,
                                    p_attribute21               in varchar2,
                                    p_attribute22               in varchar2,
                                    p_attribute23               in varchar2,
                                    p_attribute24               in varchar2,
                                    p_attribute25               in varchar2,
                                    p_attribute26               in varchar2,
                                    p_attribute27               in varchar2,
                                    p_attribute28               in varchar2,
                                    p_attribute29               in varchar2,
                                    p_attribute30               in varchar2,
                                    p_cnt_information_category  in varchar2,
                                    p_cnt_information1          in varchar2,
                                    p_cnt_information2          in varchar2,
                                    p_cnt_information3          in varchar2,
                                    p_cnt_information4          in varchar2,
                                    p_cnt_information5          in varchar2,
                                    p_cnt_information6          in varchar2,
                                    p_cnt_information7          in varchar2,
                                    p_cnt_information8          in varchar2,
                                    p_cnt_information9          in varchar2,
                                    p_cnt_information10         in varchar2,
                                    p_cnt_information11         in varchar2,
                                    p_cnt_information12         in varchar2,
                                    p_cnt_information13         in varchar2,
                                    p_cnt_information14         in varchar2,
                                    p_cnt_information15         in varchar2,
                                    p_cnt_information16         in varchar2,
                                    p_cnt_information17         in varchar2,
                                    p_cnt_information18         in varchar2,
                                    p_cnt_information19         in varchar2,
                                    p_cnt_information20         in varchar2,
                                    p_cnt_information21         in varchar2,
                                    p_cnt_information22         in varchar2,
                                    p_cnt_information23         in varchar2,
                                    p_cnt_information24         in varchar2,
                                    p_cnt_information25         in varchar2,
                                    p_cnt_information26         in varchar2,
                                    p_cnt_information27         in varchar2,
                                    p_cnt_information28         in varchar2,
                                    p_cnt_information29         in varchar2,
                                    p_cnt_information30         in varchar2) is

  cursor csr_county_tax_rule_id is
    select PAY_US_EMP_COUNTY_TAX_RULES_S.nextval
    from sys.DUAL;
Line: 1623

    select rowidtochar(rowid)
    from PAY_US_EMP_COUNTY_TAX_RULES_F ctr
    where ctr.emp_county_tax_rule_id = p_emp_county_tax_rule_id
    and   ctr.effective_start_date  = p_effective_start_date
    and   ctr.effective_end_date    = p_effective_end_date;
Line: 1631

     select null
     from   pay_us_emp_county_tax_rules_f sta
     where  sta.assignment_id = p_assignment_id
     and    sta.state_code = p_state_code
     and    sta.county_code= p_county_code;
Line: 1656

    hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
                             ' - Opening cursor', 1);
Line: 1661

    hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
                             ' - Fetching cursor', 2);
Line: 1666

    hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
                             ' - Closing cursor', 3);
Line: 1672

    hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
                             ' - inserting row', 4);
Line: 1689

     insert into pay_us_emp_county_tax_rules_f
     (emp_county_tax_rule_id,
      effective_start_date,
      effective_end_date,
      assignment_id,
      state_code,
      county_code,
      business_group_id,
      additional_wa_rate,
      filing_status_code,
      jurisdiction_code,
      lit_additional_tax,
      lit_override_amount,
      lit_override_rate,
      withholding_allowances,
      lit_exempt,
      sd_exempt,
      ht_exempt,
      wage_exempt,
      school_district_code,
      object_version_number,
      attribute_category,
      attribute1,
      attribute2,
      attribute3,
      attribute4,
      attribute5,
      attribute6,
      attribute7,
      attribute8,
      attribute9,
      attribute10,
      attribute11,
      attribute12,
      attribute13,
      attribute14,
      attribute15,
      attribute16,
      attribute17,
      attribute18,
      attribute19,
      attribute20,
      attribute21,
      attribute22,
      attribute23,
      attribute24,
      attribute25,
      attribute26,
      attribute27,
      attribute28,
      attribute29,
      attribute30,
      cnt_information_category,
      cnt_information1,
      cnt_information2,
      cnt_information3,
      cnt_information4,
      cnt_information5,
      cnt_information6,
      cnt_information7,
      cnt_information8,
      cnt_information9,
      cnt_information10,
      cnt_information11,
      cnt_information12,
      cnt_information13,
      cnt_information14,
      cnt_information15,
      cnt_information16,
      cnt_information17,
      cnt_information18,
      cnt_information19,
      cnt_information20,
      cnt_information21,
      cnt_information22,
      cnt_information23,
      cnt_information24,
      cnt_information25,
      cnt_information26,
      cnt_information27,
      cnt_information28,
      cnt_information29,
      cnt_information30)
     values
     (p_emp_county_tax_rule_id,
      p_effective_start_date,
      p_effective_end_date,
      p_assignment_id,
      p_state_code,
      p_county_code,
      p_business_group_id,
      p_additional_wa_rate,
      lpad(p_filing_status_code,2,'0'),
      p_jurisdiction_code,
      p_lit_additional_tax,
      p_lit_override_amount,
      p_lit_override_rate,
      p_withholding_allowances,
      p_lit_exempt,
      p_sd_exempt,
      p_ht_exempt,
      p_wage_exempt,
      p_school_district_code,
      0,
      p_attribute_category,
      p_attribute1,
      p_attribute2,
      p_attribute3,
      p_attribute4,
      p_attribute5,
      p_attribute6,
      p_attribute7,
      p_attribute8,
      p_attribute9,
      p_attribute10,
      p_attribute11,
      p_attribute12,
      p_attribute13,
      p_attribute14,
      p_attribute15,
      p_attribute16,
      p_attribute17,
      p_attribute18,
      p_attribute19,
      p_attribute20,
      p_attribute21,
      p_attribute22,
      p_attribute23,
      p_attribute24,
      p_attribute25,
      p_attribute26,
      p_attribute27,
      p_attribute28,
      p_attribute29,
      p_attribute30,
      p_cnt_information_category,
      p_cnt_information1,
      p_cnt_information2,
      p_cnt_information3,
      p_cnt_information4,
      p_cnt_information5,
      p_cnt_information6,
      p_cnt_information7,
      p_cnt_information8,
      p_cnt_information9,
      p_cnt_information10,
      p_cnt_information11,
      p_cnt_information12,
      p_cnt_information13,
      p_cnt_information14,
      p_cnt_information15,
      p_cnt_information16,
      p_cnt_information17,
      p_cnt_information18,
      p_cnt_information19,
      p_cnt_information20,
      p_cnt_information21,
      p_cnt_information22,
      p_cnt_information23,
      p_cnt_information24,
      p_cnt_information25,
      p_cnt_information26,
      p_cnt_information27,
      p_cnt_information28,
      p_cnt_information29,
      p_cnt_information30);
Line: 1859

                        'pay_us_emp_dt_tax_rules.insert_county_tax_row');
Line: 1875

    hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_county_tax_row'||
                             ' - creating %age record ', 5);
Line: 1893

        /* Insert row into the pay_us_asg_reporting table */

        pay_asg_geo_pkg.create_asg_geo_row(P_assignment_id => p_assignment_id,
                                           P_jurisdiction  =>  p_jurisdiction_code,
                                           P_tax_unit_id   =>  NULL );
Line: 1907

  end insert_county_tax_row;
Line: 1910

  /* Name        : insert_city_tax_row
     Purpose     : To create the city tax rule record. It also calls the
                   create_tax_percentage routine to create the %age records
                   for the city, for every change in location of the assignment
  */

  procedure insert_city_tax_row ( p_row_id in out nocopy varchar2,
                                  p_emp_city_tax_rule_id in out nocopy number,
                                  p_effective_start_date in date,
                                  p_effective_end_date in date,
                                  p_assignment_id in number,
                                  p_state_code in varchar2,
                                  p_county_code in varchar2,
                                  p_city_code in varchar2,
                                  p_business_group_id in number,
                                  p_additional_wa_rate in number,
                                  p_filing_status_code in varchar2,
                                  p_jurisdiction_code in varchar2,
                                  p_lit_additional_tax in number,
                                  p_lit_override_amount in number,
                                  p_lit_override_rate in number,
                                  p_withholding_allowances in number,
                                  p_lit_exempt in varchar2,
                                  p_sd_exempt in varchar2,
                                  p_ht_exempt in varchar2,
                                  p_wage_exempt in varchar2,
                                  p_school_district_code in varchar2,
                                  p_time_in_city in number,
                                  p_attribute_category        in varchar2,
                                  p_attribute1                in varchar2,
                                  p_attribute2                in varchar2,
                                  p_attribute3                in varchar2,
                                  p_attribute4                in varchar2,
                                  p_attribute5                in varchar2,
                                  p_attribute6                in varchar2,
                                  p_attribute7                in varchar2,
                                  p_attribute8                in varchar2,
                                  p_attribute9                in varchar2,
                                  p_attribute10               in varchar2,
                                  p_attribute11               in varchar2,
                                  p_attribute12               in varchar2,
                                  p_attribute13               in varchar2,
                                  p_attribute14               in varchar2,
                                  p_attribute15               in varchar2,
                                  p_attribute16               in varchar2,
                                  p_attribute17               in varchar2,
                                  p_attribute18               in varchar2,
                                  p_attribute19               in varchar2,
                                  p_attribute20               in varchar2,
                                  p_attribute21               in varchar2,
                                  p_attribute22               in varchar2,
                                  p_attribute23               in varchar2,
                                  p_attribute24               in varchar2,
                                  p_attribute25               in varchar2,
                                  p_attribute26               in varchar2,
                                  p_attribute27               in varchar2,
                                  p_attribute28               in varchar2,
                                  p_attribute29               in varchar2,
                                  p_attribute30               in varchar2,
                                  p_cty_information_category  in varchar2,
                                  p_cty_information1          in varchar2,
                                  p_cty_information2          in varchar2,
                                  p_cty_information3          in varchar2,
                                  p_cty_information4          in varchar2,
                                  p_cty_information5          in varchar2,
                                  p_cty_information6          in varchar2,
                                  p_cty_information7          in varchar2,
                                  p_cty_information8          in varchar2,
                                  p_cty_information9          in varchar2,
                                  p_cty_information10         in varchar2,
                                  p_cty_information11         in varchar2,
                                  p_cty_information12         in varchar2,
                                  p_cty_information13         in varchar2,
                                  p_cty_information14         in varchar2,
                                  p_cty_information15         in varchar2,
                                  p_cty_information16         in varchar2,
                                  p_cty_information17         in varchar2,
                                  p_cty_information18         in varchar2,
                                  p_cty_information19         in varchar2,
                                  p_cty_information20         in varchar2,
                                  p_cty_information21         in varchar2,
                                  p_cty_information22         in varchar2,
                                  p_cty_information23         in varchar2,
                                  p_cty_information24         in varchar2,
                                  p_cty_information25         in varchar2,
                                  p_cty_information26         in varchar2,
                                  p_cty_information27         in varchar2,
                                  p_cty_information28         in varchar2,
                                  p_cty_information29         in varchar2,
                                  p_cty_information30         in varchar2) is

  cursor csr_city_tax_rule_id is
    select PAY_US_EMP_CITY_TAX_RULES_S.nextval
    from sys.DUAL;
Line: 2006

    select rowidtochar(rowid)
    from PAY_US_EMP_CITY_TAX_RULES_F ctr
    where ctr.emp_city_tax_rule_id = p_emp_city_tax_rule_id
    and   ctr.effective_start_date  = p_effective_start_date
    and   ctr.effective_end_date    = p_effective_end_date;
Line: 2014

     select null
     from   pay_us_emp_city_tax_rules_f sta
     where  sta.assignment_id = p_assignment_id
     and    sta.state_code = p_state_code
     and    sta.county_code= p_county_code
     and    sta.city_code= p_city_code;
Line: 2041

     hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
                             ' - Opening cursor', 1);
Line: 2046

     hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
                             ' - Fetching cursor', 2);
Line: 2051

     hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
                             ' - Closing cursor', 3);
Line: 2057

     hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
                             ' - inserting row', 4);
Line: 2074

     insert into PAY_US_EMP_CITY_TAX_RULES_F
     (emp_city_tax_rule_id,
      effective_start_date,
      effective_end_date,
      assignment_id,
      state_code,
      county_code,
      city_code,
      business_group_id,
      additional_wa_rate,
      filing_status_code,
      jurisdiction_code,
      lit_additional_tax,
      lit_override_amount,
      lit_override_rate,
      withholding_allowances,
      lit_exempt,
      sd_exempt,
      ht_exempt,
      wage_exempt,
      school_district_code,
      object_version_number,
      attribute_category,
      attribute1,
      attribute2,
      attribute3,
      attribute4,
      attribute5,
      attribute6,
      attribute7,
      attribute8,
      attribute9,
      attribute10,
      attribute11,
      attribute12,
      attribute13,
      attribute14,
      attribute15,
      attribute16,
      attribute17,
      attribute18,
      attribute19,
      attribute20,
      attribute21,
      attribute22,
      attribute23,
      attribute24,
      attribute25,
      attribute26,
      attribute27,
      attribute28,
      attribute29,
      attribute30,
      cty_information_category,
      cty_information1,
      cty_information2,
      cty_information3,
      cty_information4,
      cty_information5,
      cty_information6,
      cty_information7,
      cty_information8,
      cty_information9,
      cty_information10,
      cty_information11,
      cty_information12,
      cty_information13,
      cty_information14,
      cty_information15,
      cty_information16,
      cty_information17,
      cty_information18,
      cty_information19,
      cty_information20,
      cty_information21,
      cty_information22,
      cty_information23,
      cty_information24,
      cty_information25,
      cty_information26,
      cty_information27,
      cty_information28,
      cty_information29,
      cty_information30)
     values
     (p_emp_city_tax_rule_id,
      p_effective_start_date,
      p_effective_end_date,
      p_assignment_id,
      p_state_code,
      p_county_code,
      p_city_code,
      p_business_group_id,
      p_additional_wa_rate,
      lpad(p_filing_status_code,2,'0'),
      p_jurisdiction_code,
      p_lit_additional_tax,
      p_lit_override_amount,
      p_lit_override_rate,
      p_withholding_allowances,
      p_lit_exempt,
      p_sd_exempt,
      p_ht_exempt,
      p_wage_exempt,
      p_school_district_code,
      0,
      p_attribute_category,
      p_attribute1,
      p_attribute2,
      p_attribute3,
      p_attribute4,
      p_attribute5,
      p_attribute6,
      p_attribute7,
      p_attribute8,
      p_attribute9,
      p_attribute10,
      p_attribute11,
      p_attribute12,
      p_attribute13,
      p_attribute14,
      p_attribute15,
      p_attribute16,
      p_attribute17,
      p_attribute18,
      p_attribute19,
      p_attribute20,
      p_attribute21,
      p_attribute22,
      p_attribute23,
      p_attribute24,
      p_attribute25,
      p_attribute26,
      p_attribute27,
      p_attribute28,
      p_attribute29,
      p_attribute30,
      p_cty_information_category,
      p_cty_information1,
      p_cty_information2,
      p_cty_information3,
      p_cty_information4,
      p_cty_information5,
      p_cty_information6,
      p_cty_information7,
      p_cty_information8,
      p_cty_information9,
      p_cty_information10,
      p_cty_information11,
      p_cty_information12,
      p_cty_information13,
      p_cty_information14,
      p_cty_information15,
      p_cty_information16,
      p_cty_information17,
      p_cty_information18,
      p_cty_information19,
      p_cty_information20,
      p_cty_information21,
      p_cty_information22,
      p_cty_information23,
      p_cty_information24,
      p_cty_information25,
      p_cty_information26,
      p_cty_information27,
      p_cty_information28,
      p_cty_information29,
      p_cty_information30);
Line: 2247

                        'pay_us_emp_dt_tax_rules.insert_city_tax_row');
Line: 2265

      hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_city_tax_row'||
                             ' - creating %age record ', 5);
Line: 2288

        /* Insert row into the pay_us_asg_reporting table */

        pay_asg_geo_pkg.create_asg_geo_row(P_assignment_id => p_assignment_id,
                                           P_jurisdiction  =>  p_jurisdiction_code,
                                           P_tax_unit_id   =>  NULL );
Line: 2302

  end insert_city_tax_row;
Line: 2305

  /* Name        : update_fed_tax_row
     Purpose     : To update the federal tax rule record. It also calls the
                   maintain_wc_ele_entry routine to update the worker's compensation
                   for the SUI state
  */

  procedure update_fed_tax_row ( p_row_id                    in varchar2,
                                  p_emp_fed_tax_rule_id      in number,
				                  p_effective_start_date     in date,
                                  p_effective_end_date       in date,
                                  p_assignment_id            in number,
                                  p_sui_state_code           in varchar2,
                                  p_sui_jurisdiction_code    in varchar2,
                                  p_business_group_id        in number,
                                  p_additional_wa_amount     in number,
                                  p_filing_status_code       in varchar2,
                                  p_fit_override_amount      in number,
 				                  p_fit_override_rate        in number,
                                  p_withholding_allowances   in number,
                                  p_cumulative_taxation      in varchar2,
                                  p_eic_filing_status_code   in varchar2,
                                  p_fit_additional_tax       in number,
                                  p_fit_exempt               in varchar2,
                                  p_futa_tax_exempt          in varchar2,
                                  p_medicare_tax_exempt      in varchar2,
                                  p_ss_tax_exempt            in varchar2,
                                  p_wage_exempt              in varchar2,
                                  p_statutory_employee       in varchar2,
                                  p_w2_filed_year            in number,
                                  p_supp_tax_override_rate   in number,
                                  p_excessive_wa_reject_date in date,
                                  p_session_date             in date,
                                  p_attribute_category        in varchar2,
                                  p_attribute1                in varchar2,
                                  p_attribute2                in varchar2,
                                  p_attribute3                in varchar2,
                                  p_attribute4                in varchar2,
                                  p_attribute5                in varchar2,
                                  p_attribute6                in varchar2,
                                  p_attribute7                in varchar2,
                                  p_attribute8                in varchar2,
                                  p_attribute9                in varchar2,
                                  p_attribute10               in varchar2,
                                  p_attribute11               in varchar2,
                                  p_attribute12               in varchar2,
                                  p_attribute13               in varchar2,
                                  p_attribute14               in varchar2,
                                  p_attribute15               in varchar2,
                                  p_attribute16               in varchar2,
                                  p_attribute17               in varchar2,
                                  p_attribute18               in varchar2,
                                  p_attribute19               in varchar2,
                                  p_attribute20               in varchar2,
                                  p_attribute21               in varchar2,
                                  p_attribute22               in varchar2,
                                  p_attribute23               in varchar2,
                                  p_attribute24               in varchar2,
                                  p_attribute25               in varchar2,
                                  p_attribute26               in varchar2,
                                  p_attribute27               in varchar2,
                                  p_attribute28               in varchar2,
                                  p_attribute29               in varchar2,
                                  p_attribute30               in varchar2,
                                  p_fed_information_category  in varchar2,
                                  p_fed_information1          in varchar2,
                                  p_fed_information2          in varchar2,
                                  p_fed_information3          in varchar2,
                                  p_fed_information4          in varchar2,
                                  p_fed_information5          in varchar2,
                                  p_fed_information6          in varchar2,
                                  p_fed_information7          in varchar2,
                                  p_fed_information8          in varchar2,
                                  p_fed_information9          in varchar2,
                                  p_fed_information10         in varchar2,
                                  p_fed_information11         in varchar2,
                                  p_fed_information12         in varchar2,
                                  p_fed_information13         in varchar2,
                                  p_fed_information14         in varchar2,
                                  p_fed_information15         in varchar2,
                                  p_fed_information16         in varchar2,
                                  p_fed_information17         in varchar2,
                                  p_fed_information18         in varchar2,
                                  p_fed_information19         in varchar2,
                                  p_fed_information20         in varchar2,
                                  p_fed_information21         in varchar2,
                                  p_fed_information22         in varchar2,
                                  p_fed_information23         in varchar2,
                                  p_fed_information24         in varchar2,
                                  p_fed_information25         in varchar2,
                                  p_fed_information26         in varchar2,
                                  p_fed_information27         in varchar2,
                                  p_fed_information28         in varchar2,
                                  p_fed_information29         in varchar2,
                                  p_fed_information30         in varchar2,
                                  p_mode                     in varchar2) is

  lv_warning          VARCHAR2(300);
Line: 2406

     hr_utility.set_location('pay_us_emp_dt_tax_rules.update_fed_tax_row'||
                             ' - updating row', 1);
Line: 2417

     update PAY_US_EMP_FED_TAX_RULES_F
     set emp_fed_tax_rule_id   = p_emp_fed_tax_rule_id,
      effective_start_date     = p_effective_start_date,
      effective_end_date       = p_effective_end_date,
      assignment_id            = p_assignment_id ,
      sui_state_code           = p_sui_state_code,
      sui_jurisdiction_code    = p_sui_jurisdiction_code,
      business_group_id        = p_business_group_id ,
      additional_wa_amount     = p_additional_wa_amount,
      filing_status_code       = lpad(p_filing_status_code,2,'0'),
      fit_override_amount      = p_fit_override_amount,
      fit_override_rate        = p_fit_override_rate,
      withholding_allowances   = p_withholding_allowances,
      cumulative_taxation      = p_cumulative_taxation,
      eic_filing_status_code   = p_eic_filing_status_code,
      fit_additional_tax       = p_fit_additional_tax,
      fit_exempt               = p_fit_exempt,
      futa_tax_exempt          = p_futa_tax_exempt,
      medicare_tax_exempt      = p_medicare_tax_exempt,
      ss_tax_exempt            = p_ss_tax_exempt,
      wage_exempt              = p_wage_exempt,
      statutory_employee       = p_statutory_employee,
      w2_filed_year            = p_w2_filed_year,
      supp_tax_override_rate   = p_supp_tax_override_rate,
      excessive_wa_reject_date = p_excessive_wa_reject_date,
      attribute_category       = p_attribute_category,
      attribute1               = p_attribute1,
      attribute2               = p_attribute2,
      attribute3               = p_attribute3,
      attribute4               = p_attribute4,
      attribute5               = p_attribute5,
      attribute6               = p_attribute6,
      attribute7               = p_attribute7,
      attribute8               = p_attribute8,
      attribute9               = p_attribute9,
      attribute10              = p_attribute10,
      attribute11              = p_attribute11,
      attribute12              = p_attribute12,
      attribute13              = p_attribute13,
      attribute14              = p_attribute14,
      attribute15              = p_attribute15,
      attribute16              = p_attribute16,
      attribute17              = p_attribute17,
      attribute18              = p_attribute18,
      attribute19              = p_attribute19,
      attribute20              = p_attribute20,
      attribute21              = p_attribute21,
      attribute22              = p_attribute22,
      attribute23              = p_attribute23,
      attribute24              = p_attribute24,
      attribute25              = p_attribute25,
      attribute26              = p_attribute26,
      attribute27              = p_attribute27,
      attribute28              = p_attribute28,
      attribute29              = p_attribute29,
      attribute30              = p_attribute30,
      fed_information_category = p_fed_information_category,
      fed_information1         = p_fed_information1,
      fed_information2         = p_fed_information2,
      fed_information3         = p_fed_information3,
      fed_information4         = p_fed_information4,
      fed_information5         = p_fed_information5,
      fed_information6         = p_fed_information6,
      fed_information7         = p_fed_information7,
      fed_information8         = p_fed_information8,
      fed_information9         = p_fed_information9,
      fed_information10        = p_fed_information10,
      fed_information11        = p_fed_information11,
      fed_information12        = p_fed_information12,
      fed_information13        = p_fed_information13,
      fed_information14        = p_fed_information14,
      fed_information15        = p_fed_information15,
      fed_information16        = p_fed_information16,
      fed_information17        = p_fed_information17,
      fed_information18        = p_fed_information18,
      fed_information19        = p_fed_information19,
      fed_information20        = p_fed_information20,
      fed_information21        = p_fed_information21,
      fed_information22        = p_fed_information22,
      fed_information23        = p_fed_information23,
      fed_information24        = p_fed_information24,
      fed_information25        = p_fed_information25,
      fed_information26        = p_fed_information26,
      fed_information27        = p_fed_information27,
      fed_information28        = p_fed_information28,
      fed_information29        = p_fed_information29,
      fed_information30        = p_fed_information30
      where rowid              = chartorowid(p_row_id);
Line: 2509

                       'pay_us_emp_dt_tax_rules.update_fed_tax');
Line: 2514

      /* Update workers compensation element entry for the sui state in
         the federal record */

      maintain_wc_ele_entry (p_assignment_id        => p_assignment_id,
                             p_effective_start_date => p_effective_start_date,
                             p_effective_end_date   => p_effective_end_date,
                             p_session_date         => p_session_date,
                             p_jurisdiction_code    => p_sui_jurisdiction_code,
                             p_mode                 => p_mode);
Line: 2525

  end update_fed_tax_row;
Line: 2527

  /* Name        : update_state_tax_row
     Purpose     : To update the state tax rule record.
  */

  procedure update_state_tax_row ( p_row_id in varchar2,
                                   p_emp_state_tax_rule_id in number,
                                   p_effective_start_date in date,
                                   p_effective_end_date in date,
                                   p_assignment_id in number,
                                   p_state_code in varchar2,
                                   p_jurisdiction_code in varchar2,
                                   p_business_group_id in number,
                                   p_additional_wa_amount in number,
                                   p_filing_status_code in varchar2,
                                   p_remainder_percent in number,
                                   p_secondary_wa in number,
                                   p_sit_additional_tax in number,
                                   p_sit_override_amount in number,
                                   p_sit_override_rate in number,
                                   p_withholding_allowances in number,
                                   p_excessive_wa_reject_date in date,
                                   p_sdi_exempt in varchar2,
                                   p_sit_exempt in varchar2,
                                   p_sit_optional_calc_ind in varchar2,
                                   p_state_non_resident_cert in varchar2,
                                   p_sui_exempt in varchar2,
                                   p_wc_exempt in varchar2,
                                   p_wage_exempt in varchar2,
                                   p_sui_wage_base_override_amt in number,
                                   p_supp_tax_override_rate in number,
                                   p_attribute_category        in varchar2,
                                   p_attribute1                in varchar2,
                                   p_attribute2                in varchar2,
                                   p_attribute3                in varchar2,
                                   p_attribute4                in varchar2,
                                   p_attribute5                in varchar2,
                                   p_attribute6                in varchar2,
                                   p_attribute7                in varchar2,
                                   p_attribute8                in varchar2,
                                   p_attribute9                in varchar2,
                                   p_attribute10               in varchar2,
                                   p_attribute11               in varchar2,
                                   p_attribute12               in varchar2,
                                   p_attribute13               in varchar2,
                                   p_attribute14               in varchar2,
                                   p_attribute15               in varchar2,
                                   p_attribute16               in varchar2,
                                   p_attribute17               in varchar2,
                                   p_attribute18               in varchar2,
                                   p_attribute19               in varchar2,
                                   p_attribute20               in varchar2,
                                   p_attribute21               in varchar2,
                                   p_attribute22               in varchar2,
                                   p_attribute23               in varchar2,
                                   p_attribute24               in varchar2,
                                   p_attribute25               in varchar2,
                                   p_attribute26               in varchar2,
                                   p_attribute27               in varchar2,
                                   p_attribute28               in varchar2,
                                   p_attribute29               in varchar2,
                                   p_attribute30               in varchar2,
                                   p_sta_information_category  in varchar2,
                                   p_sta_information1          in varchar2,
                                   p_sta_information2          in varchar2,
                                   p_sta_information3          in varchar2,
                                   p_sta_information4          in varchar2,
                                   p_sta_information5          in varchar2,
                                   p_sta_information6          in varchar2,
                                   p_sta_information7          in varchar2,
                                   p_sta_information8          in varchar2,
                                   p_sta_information9          in varchar2,
                                   p_sta_information10         in varchar2,
                                   p_sta_information11         in varchar2,
                                   p_sta_information12         in varchar2,
                                   p_sta_information13         in varchar2,
                                   p_sta_information14         in varchar2,
                                   p_sta_information15         in varchar2,
                                   p_sta_information16         in varchar2,
                                   p_sta_information17         in varchar2,
                                   p_sta_information18         in varchar2,
                                   p_sta_information19         in varchar2,
                                   p_sta_information20         in varchar2,
                                   p_sta_information21         in varchar2,
                                   p_sta_information22         in varchar2,
                                   p_sta_information23         in varchar2,
                                   p_sta_information24         in varchar2,
                                   p_sta_information25         in varchar2,
                                   p_sta_information26         in varchar2,
                                   p_sta_information27         in varchar2,
                                   p_sta_information28         in varchar2,
                                   p_sta_information29         in varchar2,
                                   p_sta_information30         in varchar2) is
  begin

     hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_st_tax_row'||
                             ' - updating row', 1);
Line: 2624

     update PAY_US_EMP_STATE_TAX_RULES_F
     set emp_state_tax_rule_id      = p_emp_state_tax_rule_id,
      effective_start_date          = p_effective_start_date,
      effective_end_date            = p_effective_end_date,
      assignment_id                 = p_assignment_id,
      state_code                    = p_state_code,
      jurisdiction_code             = p_jurisdiction_code,
      business_group_id             = p_business_group_id,
      additional_wa_amount          = p_additional_wa_amount,
      filing_status_code            = lpad(p_filing_status_code,2,'0'),
      remainder_percent             = p_remainder_percent,
      secondary_wa                  = p_secondary_wa,
      sit_additional_tax            = p_sit_additional_tax,
      sit_override_amount           = p_sit_override_amount,
      sit_override_rate             = p_sit_override_rate,
      withholding_allowances        = p_withholding_allowances,
      excessive_wa_reject_date      = p_excessive_wa_reject_date,
      sdi_exempt                    = p_sdi_exempt,
      sit_exempt                    = p_sit_exempt,
      sit_optional_calc_ind         = p_sit_optional_calc_ind,
      state_non_resident_cert       = p_state_non_resident_cert,
      sui_exempt                    = p_sui_exempt,
      wc_exempt                     = p_wc_exempt,
      wage_exempt                   = p_wage_exempt,
      sui_wage_base_override_amount = p_sui_wage_base_override_amt,
      supp_tax_override_rate        = p_supp_tax_override_rate,
      attribute_category       = p_attribute_category,
      attribute1               = p_attribute1,
      attribute2               = p_attribute2,
      attribute3               = p_attribute3,
      attribute4               = p_attribute4,
      attribute5               = p_attribute5,
      attribute6               = p_attribute6,
      attribute7               = p_attribute7,
      attribute8               = p_attribute8,
      attribute9               = p_attribute9,
      attribute10              = p_attribute10,
      attribute11              = p_attribute11,
      attribute12              = p_attribute12,
      attribute13              = p_attribute13,
      attribute14              = p_attribute14,
      attribute15              = p_attribute15,
      attribute16              = p_attribute16,
      attribute17              = p_attribute17,
      attribute18              = p_attribute18,
      attribute19              = p_attribute19,
      attribute20              = p_attribute20,
      attribute21              = p_attribute21,
      attribute22              = p_attribute22,
      attribute23              = p_attribute23,
      attribute24              = p_attribute24,
      attribute25              = p_attribute25,
      attribute26              = p_attribute26,
      attribute27              = p_attribute27,
      attribute28              = p_attribute28,
      attribute29              = p_attribute29,
      attribute30              = p_attribute30,
      sta_information_category = p_sta_information_category,
      sta_information1         = p_sta_information1,
      sta_information2         = p_sta_information2,
      sta_information3         = p_sta_information3,
      sta_information4         = p_sta_information4,
      sta_information5         = p_sta_information5,
      sta_information6         = p_sta_information6,
      sta_information7         = p_sta_information7,
      sta_information8         = p_sta_information8,
      sta_information9         = p_sta_information9,
      sta_information10        = p_sta_information10,
      sta_information11        = p_sta_information11,
      sta_information12        = p_sta_information12,
      sta_information13        = p_sta_information13,
      sta_information14        = p_sta_information14,
      sta_information15        = p_sta_information15,
      sta_information16        = p_sta_information16,
      sta_information17        = p_sta_information17,
      sta_information18        = p_sta_information18,
      sta_information19        = p_sta_information19,
      sta_information20        = p_sta_information20,
      sta_information21        = p_sta_information21,
      sta_information22        = p_sta_information22,
      sta_information23        = p_sta_information23,
      sta_information24        = p_sta_information24,
      sta_information25        = p_sta_information25,
      sta_information26        = p_sta_information26,
      sta_information27        = p_sta_information27,
      sta_information28        = p_sta_information28,
      sta_information29        = p_sta_information29,
      sta_information30        = p_sta_information30
      where rowid  = chartorowid(p_row_id);
Line: 2717

                        'pay_us_emp_dt_tax_rules.update_state_tax_row');
Line: 2723

                             ' - updated row', 2);
Line: 2725

  end update_state_tax_row;
Line: 2728

  /* Name        : update_county_tax_row
     Purpose     : To update the county tax rule record.
  */
  procedure update_county_tax_row ( p_row_id in varchar2,
                                    p_emp_county_tax_rule_id in number,
                                    p_effective_start_date in date,
                                    p_effective_end_date in date,
                                    p_assignment_id in number,
                                    p_state_code in varchar2,
                                    p_county_code in varchar2,
                                    p_business_group_id in number,
                                    p_additional_wa_rate in number,
                                    p_filing_status_code in varchar2,
                                    p_jurisdiction_code in varchar2,
                                    p_lit_additional_tax in number,
                                    p_lit_override_amount in number,
                                    p_lit_override_rate in number,
                                    p_withholding_allowances in number,
                                    p_lit_exempt in varchar2,
                                    p_sd_exempt in varchar2,
                                    p_ht_exempt in varchar2,
                                    p_wage_exempt in varchar2,
                                    p_school_district_code in varchar2,
                                    p_attribute_category        in varchar2,
                                    p_attribute1                in varchar2,
                                    p_attribute2                in varchar2,
                                    p_attribute3                in varchar2,
                                    p_attribute4                in varchar2,
                                    p_attribute5                in varchar2,
                                    p_attribute6                in varchar2,
                                    p_attribute7                in varchar2,
                                    p_attribute8                in varchar2,
                                    p_attribute9                in varchar2,
                                    p_attribute10               in varchar2,
                                    p_attribute11               in varchar2,
                                    p_attribute12               in varchar2,
                                    p_attribute13               in varchar2,
                                    p_attribute14               in varchar2,
                                    p_attribute15               in varchar2,
                                    p_attribute16               in varchar2,
                                    p_attribute17               in varchar2,
                                    p_attribute18               in varchar2,
                                    p_attribute19               in varchar2,
                                    p_attribute20               in varchar2,
                                    p_attribute21               in varchar2,
                                    p_attribute22               in varchar2,
                                    p_attribute23               in varchar2,
                                    p_attribute24               in varchar2,
                                    p_attribute25               in varchar2,
                                    p_attribute26               in varchar2,
                                    p_attribute27               in varchar2,
                                    p_attribute28               in varchar2,
                                    p_attribute29               in varchar2,
                                    p_attribute30               in varchar2,
                                    p_cnt_information_category  in varchar2,
                                    p_cnt_information1          in varchar2,
                                    p_cnt_information2          in varchar2,
                                    p_cnt_information3          in varchar2,
                                    p_cnt_information4          in varchar2,
                                    p_cnt_information5          in varchar2,
                                    p_cnt_information6          in varchar2,
                                    p_cnt_information7          in varchar2,
                                    p_cnt_information8          in varchar2,
                                    p_cnt_information9          in varchar2,
                                    p_cnt_information10         in varchar2,
                                    p_cnt_information11         in varchar2,
                                    p_cnt_information12         in varchar2,
                                    p_cnt_information13         in varchar2,
                                    p_cnt_information14         in varchar2,
                                    p_cnt_information15         in varchar2,
                                    p_cnt_information16         in varchar2,
                                    p_cnt_information17         in varchar2,
                                    p_cnt_information18         in varchar2,
                                    p_cnt_information19         in varchar2,
                                    p_cnt_information20         in varchar2,
                                    p_cnt_information21         in varchar2,
                                    p_cnt_information22         in varchar2,
                                    p_cnt_information23         in varchar2,
                                    p_cnt_information24         in varchar2,
                                    p_cnt_information25         in varchar2,
                                    p_cnt_information26         in varchar2,
                                    p_cnt_information27         in varchar2,
                                    p_cnt_information28         in varchar2,
                                    p_cnt_information29         in varchar2,
                                    p_cnt_information30         in varchar2) is

  begin

    if p_school_district_code is not null
    then

       hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
                             ' - checking sd', 1);
Line: 2832

    hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
                             ' - updating row', 2);
Line: 2835

     update PAY_US_EMP_COUNTY_TAX_RULES_F
     set emp_county_tax_rule_id = p_emp_county_tax_rule_id,
      effective_start_date   = p_effective_start_date,
      effective_end_date     = p_effective_end_date,
      assignment_id          = p_assignment_id,
      state_code             = p_state_code,
      county_code            = p_county_code,
      business_group_id      = p_business_group_id,
      additional_wa_rate     = p_additional_wa_rate,
      filing_status_code     = lpad(p_filing_status_code,2,'0'),
      jurisdiction_code      = p_jurisdiction_code,
      lit_additional_tax     = p_lit_additional_tax,
      lit_override_amount    = p_lit_override_amount,
      lit_override_rate      = p_lit_override_rate,
      withholding_allowances = p_withholding_allowances,
      lit_exempt             = p_lit_exempt,
      sd_exempt              = p_sd_exempt,
      ht_exempt              = p_ht_exempt,
      wage_exempt            = p_wage_exempt,
      school_district_code   = p_school_district_code,
      attribute_category       = p_attribute_category,
      attribute1               = p_attribute1,
      attribute2               = p_attribute2,
      attribute3               = p_attribute3,
      attribute4               = p_attribute4,
      attribute5               = p_attribute5,
      attribute6               = p_attribute6,
      attribute7               = p_attribute7,
      attribute8               = p_attribute8,
      attribute9               = p_attribute9,
      attribute10              = p_attribute10,
      attribute11              = p_attribute11,
      attribute12              = p_attribute12,
      attribute13              = p_attribute13,
      attribute14              = p_attribute14,
      attribute15              = p_attribute15,
      attribute16              = p_attribute16,
      attribute17              = p_attribute17,
      attribute18              = p_attribute18,
      attribute19              = p_attribute19,
      attribute20              = p_attribute20,
      attribute21              = p_attribute21,
      attribute22              = p_attribute22,
      attribute23              = p_attribute23,
      attribute24              = p_attribute24,
      attribute25              = p_attribute25,
      attribute26              = p_attribute26,
      attribute27              = p_attribute27,
      attribute28              = p_attribute28,
      attribute29              = p_attribute29,
      attribute30              = p_attribute30,
      cnt_information_category = p_cnt_information_category,
      cnt_information1         = p_cnt_information1,
      cnt_information2         = p_cnt_information2,
      cnt_information3         = p_cnt_information3,
      cnt_information4         = p_cnt_information4,
      cnt_information5         = p_cnt_information5,
      cnt_information6         = p_cnt_information6,
      cnt_information7         = p_cnt_information7,
      cnt_information8         = p_cnt_information8,
      cnt_information9         = p_cnt_information9,
      cnt_information10        = p_cnt_information10,
      cnt_information11        = p_cnt_information11,
      cnt_information12        = p_cnt_information12,
      cnt_information13        = p_cnt_information13,
      cnt_information14        = p_cnt_information14,
      cnt_information15        = p_cnt_information15,
      cnt_information16        = p_cnt_information16,
      cnt_information17        = p_cnt_information17,
      cnt_information18        = p_cnt_information18,
      cnt_information19        = p_cnt_information19,
      cnt_information20        = p_cnt_information20,
      cnt_information21        = p_cnt_information21,
      cnt_information22        = p_cnt_information22,
      cnt_information23        = p_cnt_information23,
      cnt_information24        = p_cnt_information24,
      cnt_information25        = p_cnt_information25,
      cnt_information26        = p_cnt_information26,
      cnt_information27        = p_cnt_information27,
      cnt_information28        = p_cnt_information28,
      cnt_information29        = p_cnt_information29,
      cnt_information30        = p_cnt_information30
      where rowid  = chartorowid(p_row_id);
Line: 2922

                        'pay_us_emp_dt_tax_rules.update_county_tax_row');
Line: 2929

        /* Insert row into the pay_us_asg_reporting table */

        hr_utility.set_location('pay_us_emp_dt_tax_rules.update_county_tax_row'||
                                  ' - asg_geo row', 3);
Line: 2940

  end update_county_tax_row;
Line: 2943

  /* Name        : update_city_tax_row
     Purpose     : To update the city tax rule record.
  */

  procedure update_city_tax_row ( p_row_id in varchar2,
                                  p_emp_city_tax_rule_id in number,
                                  p_effective_start_date in date,
                                  p_effective_end_date in date,
                                  p_assignment_id in number,
                                  p_state_code in varchar2,
                                  p_county_code in varchar2,
                                  p_city_code in varchar2,
                                  p_business_group_id in number,
                                  p_additional_wa_rate in number,
                                  p_filing_status_code in varchar2,
                                  p_jurisdiction_code in varchar2,
                                  p_lit_additional_tax in number,
                                  p_lit_override_amount in number,
                                  p_lit_override_rate in number,
                                  p_withholding_allowances in number,
                                  p_lit_exempt in varchar2,
                                  p_sd_exempt in varchar2,
                                  p_ht_exempt in varchar2,
                                  p_wage_exempt in varchar2,
                                  p_school_district_code in varchar2,
                                  p_attribute_category        in varchar2,
                                  p_attribute1                in varchar2,
                                  p_attribute2                in varchar2,
                                  p_attribute3                in varchar2,
                                  p_attribute4                in varchar2,
                                  p_attribute5                in varchar2,
                                  p_attribute6                in varchar2,
                                  p_attribute7                in varchar2,
                                  p_attribute8                in varchar2,
                                  p_attribute9                in varchar2,
                                  p_attribute10               in varchar2,
                                  p_attribute11               in varchar2,
                                  p_attribute12               in varchar2,
                                  p_attribute13               in varchar2,
                                  p_attribute14               in varchar2,
                                  p_attribute15               in varchar2,
                                  p_attribute16               in varchar2,
                                  p_attribute17               in varchar2,
                                  p_attribute18               in varchar2,
                                  p_attribute19               in varchar2,
                                  p_attribute20               in varchar2,
                                  p_attribute21               in varchar2,
                                  p_attribute22               in varchar2,
                                  p_attribute23               in varchar2,
                                  p_attribute24               in varchar2,
                                  p_attribute25               in varchar2,
                                  p_attribute26               in varchar2,
                                  p_attribute27               in varchar2,
                                  p_attribute28               in varchar2,
                                  p_attribute29               in varchar2,
                                  p_attribute30               in varchar2,
                                  p_cty_information_category  in varchar2,
                                  p_cty_information1          in varchar2,
                                  p_cty_information2          in varchar2,
                                  p_cty_information3          in varchar2,
                                  p_cty_information4          in varchar2,
                                  p_cty_information5          in varchar2,
                                  p_cty_information6          in varchar2,
                                  p_cty_information7          in varchar2,
                                  p_cty_information8          in varchar2,
                                  p_cty_information9          in varchar2,
                                  p_cty_information10         in varchar2,
                                  p_cty_information11         in varchar2,
                                  p_cty_information12         in varchar2,
                                  p_cty_information13         in varchar2,
                                  p_cty_information14         in varchar2,
                                  p_cty_information15         in varchar2,
                                  p_cty_information16         in varchar2,
                                  p_cty_information17         in varchar2,
                                  p_cty_information18         in varchar2,
                                  p_cty_information19         in varchar2,
                                  p_cty_information20         in varchar2,
                                  p_cty_information21         in varchar2,
                                  p_cty_information22         in varchar2,
                                  p_cty_information23         in varchar2,
                                  p_cty_information24         in varchar2,
                                  p_cty_information25         in varchar2,
                                  p_cty_information26         in varchar2,
                                  p_cty_information27         in varchar2,
                                  p_cty_information28         in varchar2,
                                  p_cty_information29         in varchar2,
                                  p_cty_information30         in varchar2) is
  begin

     if p_school_district_code is not null
     and p_state_code <> '39'
     then

        hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
                             ' - checking sd', 1);
Line: 3050

     hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
                             ' - updating row', 2);
Line: 3053

     update PAY_US_EMP_CITY_TAX_RULES_F
     set emp_city_tax_rule_id = p_emp_city_tax_rule_id,
      effective_start_date    = p_effective_start_date,
      effective_end_date      = p_effective_end_date,
      assignment_id           = p_assignment_id,
      state_code              = p_state_code,
      county_code             = p_county_code,
      city_code               = p_city_code,
      business_group_id       = p_business_group_id,
      additional_wa_rate      = p_additional_wa_rate,
      filing_status_code      = lpad(p_filing_status_code,2,'0'),
      jurisdiction_code       = p_jurisdiction_code,
      lit_additional_tax      = p_lit_additional_tax,
      lit_override_amount     = p_lit_override_amount,
      lit_override_rate       = p_lit_override_rate,
      withholding_allowances  = p_withholding_allowances,
      lit_exempt              = p_lit_exempt,
      sd_exempt               = p_sd_exempt,
      ht_exempt               = p_ht_exempt,
      wage_exempt             = p_wage_exempt,
      school_district_code    = p_school_district_code,
      attribute_category       = p_attribute_category,
      attribute1               = p_attribute1,
      attribute2               = p_attribute2,
      attribute3               = p_attribute3,
      attribute4               = p_attribute4,
      attribute5               = p_attribute5,
      attribute6               = p_attribute6,
      attribute7               = p_attribute7,
      attribute8               = p_attribute8,
      attribute9               = p_attribute9,
      attribute10              = p_attribute10,
      attribute11              = p_attribute11,
      attribute12              = p_attribute12,
      attribute13              = p_attribute13,
      attribute14              = p_attribute14,
      attribute15              = p_attribute15,
      attribute16              = p_attribute16,
      attribute17              = p_attribute17,
      attribute18              = p_attribute18,
      attribute19              = p_attribute19,
      attribute20              = p_attribute20,
      attribute21              = p_attribute21,
      attribute22              = p_attribute22,
      attribute23              = p_attribute23,
      attribute24              = p_attribute24,
      attribute25              = p_attribute25,
      attribute26              = p_attribute26,
      attribute27              = p_attribute27,
      attribute28              = p_attribute28,
      attribute29              = p_attribute29,
      attribute30              = p_attribute30,
      cty_information_category = p_cty_information_category,
      cty_information1         = p_cty_information1,
      cty_information2         = p_cty_information2,
      cty_information3         = p_cty_information3,
      cty_information4         = p_cty_information4,
      cty_information5         = p_cty_information5,
      cty_information6         = p_cty_information6,
      cty_information7         = p_cty_information7,
      cty_information8         = p_cty_information8,
      cty_information9         = p_cty_information9,
      cty_information10        = p_cty_information10,
      cty_information11        = p_cty_information11,
      cty_information12        = p_cty_information12,
      cty_information13        = p_cty_information13,
      cty_information14        = p_cty_information14,
      cty_information15        = p_cty_information15,
      cty_information16        = p_cty_information16,
      cty_information17        = p_cty_information17,
      cty_information18        = p_cty_information18,
      cty_information19        = p_cty_information19,
      cty_information20        = p_cty_information20,
      cty_information21        = p_cty_information21,
      cty_information22        = p_cty_information22,
      cty_information23        = p_cty_information23,
      cty_information24        = p_cty_information24,
      cty_information25        = p_cty_information25,
      cty_information26        = p_cty_information26,
      cty_information27        = p_cty_information27,
      cty_information28        = p_cty_information28,
      cty_information29        = p_cty_information29,
      cty_information30        = p_cty_information30
      where rowid  = chartorowid(p_row_id);
Line: 3142

                        'pay_us_emp_dt_tax_rules.update_city_tax_row');
Line: 3150

        /* Insert row into the pay_us_asg_reporting table */

        hr_utility.set_location('pay_us_emp_dt_tax_rules.update_city_tax_row'||
                                  ' - asg_geo row', 3);
Line: 3161

  end update_city_tax_row;
Line: 3164

  /* Name     : delete_tax_row
     Purpose  : This routine will be called by the W4 form to purge a tax rule record.
                Only purging(i.e. ZAP) of the tax record will be allowed. No other kind
                of delete will be allowed for the tax record. If a state record is purged,
                then all of the county and city records for that state, will also be purged.
                Similarly, is a county record is purged then all of the city records under
                that county, will also be purged.
                Along with the tax rule record, the tax %age records associated with that
                tax rules record, will also be purged i.e. delete cascade
    Parameters :
                p_assignment_id     -> The assignment whose tax record will be purged.
                p_state_code        -> State whose tax record will be purged
                p_county_code       -> County whose tax record will be purged
                p_city_code         -> City whose tax record will be purged
  */

  procedure delete_tax_row ( p_assignment_id in number,
                             p_state_code    in varchar2,
                             p_county_code   in varchar2,
                             p_city_code     in varchar2) is

  l_ret_code             number;
Line: 3193

   select puc.jurisdiction_code
   from   PAY_US_EMP_COUNTY_TAX_RULES_F puc
   where  puc.assignment_id = p_assignment_id
   and    puc.state_code  = p_state_code;
Line: 3200

   select puc.jurisdiction_code
   from   PAY_US_EMP_CITY_TAX_RULES_F puc
   where  puc.assignment_id = p_assignment_id
   and    puc.state_code  = p_state_code;
Line: 3207

   select puc.jurisdiction_code
   from   PAY_US_EMP_CITY_TAX_RULES_F puc
   where  puc.assignment_id = p_assignment_id
   and    puc.state_code  = p_state_code
   and    puc.county_code = p_county_code;
Line: 3218

       select min(effective_start_date)
       from   PAY_US_EMP_FED_TAX_RULES_F
       where  assignment_id = p_assignment_id;
Line: 3229

       /* Now all validations done. Go ahead and delete the element entries.
          Once the element entries are deleted, delete the tax rules records */

       /* Get the start date of the tax percentage records */

       open csr_get_eff_date;
Line: 3241

                      'pay_us_emp_dt_tax_rules.delete_tax_row');
Line: 3248

       /* Processing for deleteing the state tax rule record */

       if p_state_code is not null and p_county_code is null
          and p_city_code is null then

         /* Delete the element entries only if Payroll is installed */

          if l_payroll_installed then

            /* Get the cities for the state and call the maintain_element_entry routine
              to delete the city %age records for the cities in the state */

             open csr_state_cities;
Line: 3268

               /* Delete the %age tax record for the jurisdiction */

               maintain_element_entry(p_assignment_id        => p_assignment_id,
                                      p_effective_start_date => l_effective_start_date,
                                    p_effective_end_date   => to_date('31-12-4712','dd-mm-yyyy'),
                                      p_session_date         => l_effective_start_date,
                                      p_jurisdiction_code    => l_jurisdiction_code,
                                      p_percentage_time      => 0,
                                      p_mode                 => 'ZAP');
Line: 3284

                to delete the county %age records for the cities in the state */

             open csr_state_counties;
Line: 3294

                /* Delete the %age tax record for the jurisdiction */

                maintain_element_entry(p_assignment_id       => p_assignment_id,
                                      p_effective_start_date => l_effective_start_date,
                                      p_effective_end_date   => to_date('31-12-4712','dd-mm-yyyy'),
                                      p_session_date         => l_effective_start_date,
                                      p_jurisdiction_code    => l_jurisdiction_code,
                                      p_percentage_time      => 0,
                                      p_mode                 => 'ZAP');
Line: 3308

             /* Delete the state %age records for the state */

                maintain_element_entry(p_assignment_id       => p_assignment_id,
                                      p_effective_start_date => l_effective_start_date,
                                      p_effective_end_date   => to_date('31-12-4712','dd-mm-yyyy'),
                                      p_session_date         => l_effective_start_date,
                                      p_jurisdiction_code    => p_state_code || '-000-0000',
                                      p_percentage_time      => 0,
                                      p_mode                 => 'ZAP');
Line: 3319

         /* Delete records from PAY_US_EMP_CITY_TAX_RULES_F */

         delete PAY_US_EMP_CITY_TAX_RULES_F
         where assignment_id = p_assignment_id
         and  state_code = p_state_code;
Line: 3325

         /* Delete records from PAY_US_EMP_COUNTY_TAX_RULES_F */

         delete PAY_US_EMP_COUNTY_TAX_RULES_F
         where assignment_id = p_assignment_id
         and  state_code = p_state_code;
Line: 3331

         /* Delete records from PAY_US_EMP_STATE_TAX_RULES_F */

         delete PAY_US_EMP_STATE_TAX_RULES_F
         where assignment_id = p_assignment_id
         and  state_code = p_state_code;
Line: 3343

                to delete the city %age records for the cities in the county */

             open csr_county_cities;
Line: 3353

                 /* Delete the %age tax record for the jurisdiction */

                 maintain_element_entry(p_assignment_id      => p_assignment_id,
                                      p_effective_start_date => l_effective_start_date,
                                      p_effective_end_date   => to_date('31-12-4712','dd-mm-yyyy'),
                                      p_session_date         => l_effective_start_date,
                                      p_jurisdiction_code    => l_jurisdiction_code,
                                      p_percentage_time      => 0,
                                      p_mode                 => 'ZAP');
Line: 3367

             /* Delete the state %age records for the county */

             maintain_element_entry(p_assignment_id      => p_assignment_id,
                                      p_effective_start_date => l_effective_start_date,
                                      p_effective_end_date   => to_date('31-12-4712','dd-mm-yyyy'),
                                      p_session_date         => l_effective_start_date,
                                      p_jurisdiction_code    => p_state_code ||'-' ||
                                                                p_county_code ||'-0000',
                                      p_percentage_time      => 0,
                                      p_mode                 => 'ZAP');
Line: 3379

          /* Delete records from PAY_US_EMP_CITY_TAX_RULES_F */

          delete PAY_US_EMP_CITY_TAX_RULES_F
          where assignment_id = p_assignment_id
          and  state_code     = p_state_code
          and  county_code    = p_county_code;
Line: 3386

          /* Delete records from PAY_US_EMP_COUNTY_TAX_RULES_F */

          delete PAY_US_EMP_COUNTY_TAX_RULES_F
          where assignment_id = p_assignment_id
          and  state_code     = p_state_code
          and  county_code    = p_county_code;
Line: 3398

              /* Delete the state %age records for the city */

              maintain_element_entry(p_assignment_id      => p_assignment_id,
                                     p_effective_start_date => l_effective_start_date,
                                     p_effective_end_date   => to_date('31-12-4712','dd-mm-yyyy'),
                                     p_session_date         => l_effective_start_date,
                                     p_jurisdiction_code    => p_state_code ||'-' ||
                                                               p_county_code ||'-'|| p_city_code,
                                     p_percentage_time      => 0,
                                     p_mode                 => 'ZAP');
Line: 3411

           /* Delete records from PAY_US_EMP_CITY_TAX_RULES_F */

           delete PAY_US_EMP_CITY_TAX_RULES_F
           where assignment_id = p_assignment_id
           and  state_code     = p_state_code
           and  county_code    = p_county_code
           and  city_code      = p_city_code;
Line: 3421

   end delete_tax_row;
Line: 3517

  select assignment_id
  from   PER_ASSIGNMENTS_F
  where  assignment_id = p_assignment_id
  and    p_effective_start_date between effective_start_date
         and effective_end_date
  for update of assignment_id nowait;
Line: 3525

  select *
  from   PAY_US_EMP_FED_TAX_RULES_F
  where  rowid = chartorowid(p_row_id)
  for update of emp_fed_tax_rule_id nowait;
Line: 4004

  select assignment_id
  from   PER_ASSIGNMENTS_F
  where  assignment_id = p_assignment_id
  and    p_effective_start_date between effective_start_date
         and effective_end_date
  for update of assignment_id nowait;
Line: 4012

  select *
  from   PAY_US_EMP_STATE_TAX_RULES_F
  where  rowid = chartorowid(p_row_id)
  for update of emp_state_tax_rule_id nowait;
Line: 4485

  select assignment_id
  from   PER_ASSIGNMENTS_F
  where  assignment_id = p_assignment_id
  and    p_effective_start_date between effective_start_date
         and effective_end_date
  for update of assignment_id nowait;
Line: 4494

  select *
  from   PAY_US_EMP_COUNTY_TAX_RULES_F
  where  rowid = chartorowid(p_row_id)
  for update of emp_county_tax_rule_id nowait;
Line: 4951

  select assignment_id
  from   PER_ASSIGNMENTS_F
  where  assignment_id = p_assignment_id
  and    p_effective_start_date between effective_start_date
         and effective_end_date
  for update of assignment_id nowait;
Line: 4960

  select *
  from   PAY_US_EMP_CITY_TAX_RULES_F
  where  rowid = chartorowid(p_row_id)
  for update of emp_city_tax_rule_id nowait;
Line: 5330

function insert_def_fed_rec(p_assignment_id         number,
                            p_effective_start_date  date,
                            p_effective_end_date    date,
                            p_sui_state_code        varchar2,
                            p_business_group_id     number)
return number is

l_filing_status_code     varchar2(2);
Line: 5344

       select lookup_code
       from   HR_LOOKUPS
       where  lookup_type    = 'US_FIT_FILING_STATUS'
       and    upper(meaning) = 'SINGLE';
Line: 5351

       select lookup_code
       from   FND_LOOKUP_VALUES
       where  lookup_type    = 'US_FIT_FILING_STATUS'
       and    upper(meaning) = 'SINGLE'
       and    language = 'US';
Line: 5359

       select lookup_code
       from   hr_lookups
       where  lookup_type    = 'US_EIC_FILING_STATUS'
       and    upper(meaning) = 'NO EIC';
Line: 5366

       select lookup_code
       from   fnd_lookup_values
       where  lookup_type    = 'US_EIC_FILING_STATUS'
       and    upper(meaning) = 'NO EIC'
       and    language = 'US';
Line: 5375

      hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',1);
Line: 5381

      hr_utility.trace('insert_def_fed_rec** ' || to_char(p_assignment_id));
Line: 5382

      hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_start_date));
Line: 5383

      hr_utility.trace('insert_def_fed_rec** ' || to_char(p_effective_end_date));
Line: 5384

      hr_utility.trace('insert_def_fed_rec** ' || p_sui_state_code);
Line: 5385

      hr_utility.trace('insert_def_fed_rec** ' || to_char(p_business_group_id));
Line: 5400

      hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',2);
Line: 5416

      /* Insert Federal Tax Record */

     hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',3);
Line: 5420

     l_mode := 'INSERT';
Line: 5422

     insert_fed_tax_row(p_emp_fed_tax_rule_id  => l_emp_fed_tax_rule_id,
                     p_effective_start_date  => p_effective_start_date,
                     p_effective_end_date    => p_effective_end_date,
                     p_assignment_id         => p_assignment_id,
                     p_sui_state_code        => p_sui_state_code,
                     p_sui_jurisdiction_code => p_sui_state_code || '-000-0000',
                     p_business_group_id     => p_business_group_id,
                     p_additional_wa_amount  => 0,
                     p_filing_status_code    => lpad(l_filing_status_code,2,'0'),
                     p_fit_override_amount   => 0,
                     p_fit_override_rate     => 0,
                     p_withholding_allowances => 0,
                     p_cumulative_taxation   => 'N',
                     p_eic_filing_status_code => l_eic_fstatus_code,
                     p_fit_additional_tax    => 0,
                     p_fit_exempt            => 'N',
                     p_futa_tax_exempt       => 'N',
                     p_medicare_tax_exempt   => 'N',
                     p_ss_tax_exempt         => 'N',
                     p_wage_exempt           => 'N',
                     p_statutory_employee    => 'N',
                     p_w2_filed_year         => null,
                     p_supp_tax_override_rate => 0,
                     p_excessive_wa_reject_date => null,
                     p_attribute_category        => null,
                     p_attribute1                => null,
                     p_attribute2                => null,
                     p_attribute3                => null,
                     p_attribute4                => null,
                     p_attribute5                => null,
                     p_attribute6                => null,
                     p_attribute7                => null,
                     p_attribute8                => null,
                     p_attribute9                => null,
                     p_attribute10               => null,
                     p_attribute11               => null,
                     p_attribute12               => null,
                     p_attribute13               => null,
                     p_attribute14               => null,
                     p_attribute15               => null,
                     p_attribute16               => null,
                     p_attribute17               => null,
                     p_attribute18               => null,
                     p_attribute19               => null,
                     p_attribute20               => null,
                     p_attribute21               => null,
                     p_attribute22               => null,
                     p_attribute23               => null,
                     p_attribute24               => null,
                     p_attribute25               => null,
                     p_attribute26               => null,
                     p_attribute27               => null,
                     p_attribute28               => null,
                     p_attribute29               => null,
                     p_attribute30               => null,
                     p_fed_information_category  => null,
                     p_fed_information1          => null,
                     p_fed_information2          => null,
                     p_fed_information3          => null,
                     p_fed_information4          => null,
                     p_fed_information5          => null,
                     p_fed_information6          => null,
                     p_fed_information7          => null,
                     p_fed_information8          => null,
                     p_fed_information9          => null,
                     p_fed_information10         => null,
                     p_fed_information11         => null,
                     p_fed_information12         => null,
                     p_fed_information13         => null,
                     p_fed_information14         => null,
                     p_fed_information15         => null,
                     p_fed_information16         => null,
                     p_fed_information17         => null,
                     p_fed_information18         => null,
                     p_fed_information19         => null,
                     p_fed_information20         => null,
                     p_fed_information21         => null,
                     p_fed_information22         => null,
                     p_fed_information23         => null,
                     p_fed_information24         => null,
                     p_fed_information25         => null,
                     p_fed_information26         => null,
                     p_fed_information27         => null,
                     p_fed_information28         => null,
                     p_fed_information29         => null,
                     p_fed_information30         => null,
                     p_mode                   => 'INSERT');
Line: 5510

hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_fed_rec',5);
Line: 5514

end  insert_def_fed_rec;
Line: 5517

/*  Insert state record   */


function insert_def_state_rec(p_assignment_id        number,
                              p_effective_start_date date,
                              p_effective_end_date   date,
                              p_state_code           varchar2,
                              p_business_group_id    number,
                              p_percent_time         number)
return number is

l_emp_state_tax_rule_id       number;
Line: 5540

       select hrl.lookup_code, peft.withholding_allowances
       from   HR_LOOKUPS hrl
       ,      PAY_US_EMP_FED_TAX_RULES_V peft
       where  hrl.lookup_type    = 'US_FS_'||p_state
       and    upper(hrl.meaning) = decode(
              upper(substr(peft.filing_status,1,7)),
                           'MARRIED',
                           'MARRIED',
                           upper(peft.filing_status))
       and    peft.assignment_id = p_assignment ;
Line: 5552

       select flv.lookup_code, peft.withholding_allowances
       from   FND_LOOKUP_VALUES flv
       ,      PAY_US_EMP_FED_TAX_RULES_V peft
       where  flv.lookup_type    = 'US_FS_'||p_state
       and    upper(flv.meaning) = decode(
              upper(substr(peft.filing_status,1,7)),
                           'MARRIED',
                           'MARRIED',
                           upper(peft.filing_status))
       and    peft.assignment_id = p_assignment
       and    language = 'US' ;
Line: 5566

       select hsck.segment1
        from hr_soft_coding_keyflex hsck,
             per_assignments_f paf
       where paf.assignment_id = p_assignment
         and p_effective_start_date between paf.effective_start_date
                                        and paf.effective_end_date
         and paf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id;
Line: 5575

       select hoi.org_information12
         from pay_us_states pus,
              hr_organization_information hoi
       where hoi.organization_id = p_tax_unit_id
         and hoi.org_information_context = 'State Tax Rules'
         and pus.state_code = p_state
         and hoi.org_information1 = pus.state_abbrev;
Line: 5585

select 'Y'
from dual
where exists (select null
              from pay_us_emp_state_tax_rules_f pst
              where pst.assignment_id = p_assignment_id
              and   state_code = p_state_code
              and business_group_id + 0 = p_business_group_id);
Line: 5660

  /* Insert State Tax record  */

  hr_utility.set_location('pay_us_emp_dt_tax_rules.ins_def_state',8);
Line: 5664

  insert_state_tax_row ( p_row_id                  => l_row_id,
                         p_emp_state_tax_rule_id  => l_emp_state_tax_rule_id,
                         p_effective_start_date    => p_effective_start_date,
                         p_effective_end_date      => p_effective_end_date,
                         p_assignment_id           => p_assignment_id,
                         p_state_code              => p_state_code,
                         p_jurisdiction_code       => p_state_code ||'-000-0000',
                         p_business_group_id       => p_business_group_id,
                         p_additional_wa_amount    => 0,
                         p_filing_status_code      => lpad(l_filing_status_code,2,'0'),
                         p_remainder_percent       => 0,
                         p_secondary_wa            => 0,
                         p_sit_additional_tax      => 0,
                         p_sit_override_amount     => 0,
                         p_sit_override_rate       => 0,
                         p_withholding_allowances  => l_allowances,
                         p_excessive_wa_reject_date => null,
                         p_sdi_exempt              => 'N',
                         p_sit_exempt              => 'N',
                         p_sit_optional_calc_ind   => null,
                         p_state_non_resident_cert => 'N',
                         p_sui_exempt              => 'N',
                         p_wc_exempt               => null,
                         p_wage_exempt             => 'N',
                         p_sui_wage_base_override_amt => null,
                         p_supp_tax_override_rate  => 0,
                         p_time_in_state           => nvl(p_percent_time,0),
                         p_attribute_category        => null,
                         p_attribute1                => null,
                         p_attribute2                => null,
                         p_attribute3                => null,
                         p_attribute4                => null,
                         p_attribute5                => null,
                         p_attribute6                => null,
                         p_attribute7                => null,
                         p_attribute8                => null,
                         p_attribute9                => null,
                         p_attribute10               => null,
                         p_attribute11               => null,
                         p_attribute12               => null,
                         p_attribute13               => null,
                         p_attribute14               => null,
                         p_attribute15               => null,
                         p_attribute16               => null,
                         p_attribute17               => null,
                         p_attribute18               => null,
                         p_attribute19               => null,
                         p_attribute20               => null,
                         p_attribute21               => null,
                         p_attribute22               => null,
                         p_attribute23               => null,
                         p_attribute24               => null,
                         p_attribute25               => null,
                         p_attribute26               => null,
                         p_attribute27               => null,
                         p_attribute28               => null,
                         p_attribute29               => null,
                         p_attribute30               => null,
                         p_sta_information_category  => null,
                         p_sta_information1          => null,
                         p_sta_information2          => null,
                         p_sta_information3          => null,
                         p_sta_information4          => null,
                         p_sta_information5          => null,
                         p_sta_information6          => null,
                         p_sta_information7          => null,
                         p_sta_information8          => null,
                         p_sta_information9          => null,
                         p_sta_information10         => null,
                         p_sta_information11         => null,
                         p_sta_information12         => null,
                         p_sta_information13         => null,
                         p_sta_information14         => null,
                         p_sta_information15         => null,
                         p_sta_information16         => null,
                         p_sta_information17         => null,
                         p_sta_information18         => null,
                         p_sta_information19         => null,
                         p_sta_information20         => null,
                         p_sta_information21         => null,
                         p_sta_information22         => null,
                         p_sta_information23         => null,
                         p_sta_information24         => null,
                         p_sta_information25         => null,
                         p_sta_information26         => null,
                         p_sta_information27         => null,
                         p_sta_information28         => null,
                         p_sta_information29         => null,
                         p_sta_information30         => null     );
Line: 5762

end  insert_def_state_rec;
Line: 5765

function insert_def_county_rec(p_assignment_id        number,
                               p_effective_start_date date,
                               p_effective_end_date   date,
                               p_state_code           varchar2,
                               p_county_code          varchar2,
                               p_business_group_id    number,
                               p_percent_time         number)
return number is

l_filing_status_code       varchar2(2);
Line: 5780

       select lookup_code
       from   HR_LOOKUPS
       where  lookup_type    = 'US_LIT_FILING_STATUS'
       and    upper(meaning) = 'SINGLE';
Line: 5787

       select lookup_code
       from   FND_LOOKUP_VALUES
       where  lookup_type    = 'US_LIT_FILING_STATUS'
       and    upper(meaning) = 'SINGLE'
       and    language = 'US';
Line: 5794

select 'Y'
from dual
where exists (select null
              from pay_us_emp_county_tax_rules_f pst
              where pst.assignment_id = p_assignment_id
              and   state_code = p_state_code
              and   county_code = p_county_code
              and business_group_id + 0 = p_business_group_id);
Line: 5807

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',1);
Line: 5816

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',91);
Line: 5824

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',2);
Line: 5836

  /* Insert County Tax record */

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',3);
Line: 5841

  insert_county_tax_row(p_row_id                  => l_row_id,
                        p_emp_county_tax_rule_id  => l_emp_county_tax_rule_id,
                        p_effective_start_date    => p_effective_start_date,
                        p_effective_end_date      => p_effective_end_date,
                        p_assignment_id           => p_assignment_id,
                        p_state_code              => p_state_code,
                        p_county_code             => p_county_code,
                        p_business_group_id       => p_business_group_id,
                        p_additional_wa_rate      => 0,
                        p_filing_status_code      => lpad(l_filing_status_code,2,'0'),
                        p_jurisdiction_code       => p_state_code || '-' ||
                                                     p_county_code ||'-0000',
                        p_lit_additional_tax      => 0,
                        p_lit_override_amount     => 0,
                        p_lit_override_rate       => 0,
                        p_withholding_allowances  => 0,
                        p_lit_exempt              => 'N',
                        p_sd_exempt               => null,
                        p_ht_exempt               => null,
                        p_wage_exempt             => 'N',
                        p_school_district_code    => null,
                        p_time_in_county          => nvl(p_percent_time,0),
                        p_attribute_category        => null,
                        p_attribute1                => null,
                        p_attribute2                => null,
                        p_attribute3                => null,
                        p_attribute4                => null,
                        p_attribute5                => null,
                        p_attribute6                => null,
                        p_attribute7                => null,
                        p_attribute8                => null,
                        p_attribute9                => null,
                        p_attribute10               => null,
                        p_attribute11               => null,
                        p_attribute12               => null,
                        p_attribute13               => null,
                        p_attribute14               => null,
                        p_attribute15               => null,
                        p_attribute16               => null,
                        p_attribute17               => null,
                        p_attribute18               => null,
                        p_attribute19               => null,
                        p_attribute20               => null,
                        p_attribute21               => null,
                        p_attribute22               => null,
                        p_attribute23               => null,
                        p_attribute24               => null,
                        p_attribute25               => null,
                        p_attribute26               => null,
                        p_attribute27               => null,
                        p_attribute28               => null,
                        p_attribute29               => null,
                        p_attribute30               => null,
                        p_cnt_information_category  => null,
                        p_cnt_information1          => null,
                        p_cnt_information2          => null,
                        p_cnt_information3          => null,
                        p_cnt_information4          => null,
                        p_cnt_information5          => null,
                        p_cnt_information6          => null,
                        p_cnt_information7          => null,
                        p_cnt_information8          => null,
                        p_cnt_information9          => null,
                        p_cnt_information10         => null,
                        p_cnt_information11         => null,
                        p_cnt_information12         => null,
                        p_cnt_information13         => null,
                        p_cnt_information14         => null,
                        p_cnt_information15         => null,
                        p_cnt_information16         => null,
                        p_cnt_information17         => null,
                        p_cnt_information18         => null,
                        p_cnt_information19         => null,
                        p_cnt_information20         => null,
                        p_cnt_information21         => null,
                        p_cnt_information22         => null,
                        p_cnt_information23         => null,
                        p_cnt_information24         => null,
                        p_cnt_information25         => null,
                        p_cnt_information26         => null,
                        p_cnt_information27         => null,
                        p_cnt_information28         => null,
                        p_cnt_information29         => null,
                        p_cnt_information30         => null    );
Line: 5926

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',4);
Line: 5928

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_county_rec',5);
Line: 5932

end  insert_def_county_rec;
Line: 5935

function insert_def_city_rec(p_assignment_id        number,
                               p_effective_start_date date,
                               p_effective_end_date   date,
                               p_state_code           varchar2,
                               p_county_code          varchar2,
                               p_city_code            varchar2,
                               p_business_group_id    number,
                               p_percent_time       number)
return number is

l_filing_status_code       varchar2(2);
Line: 5951

       select lookup_code
       from   HR_LOOKUPS
       where  lookup_type    = 'US_LIT_FILING_STATUS'
       and    upper(meaning) = 'SINGLE';
Line: 5958

       select lookup_code
       from   FND_LOOKUP_VALUES
       where  lookup_type    = 'US_LIT_FILING_STATUS'
       and    upper(meaning) = 'SINGLE'
       and    language = 'US';
Line: 5965

select 'Y'
from dual
where exists (select null
              from pay_us_emp_city_tax_rules_f pst
              where pst.assignment_id = p_assignment_id
              and   state_code = p_state_code
              and   county_code = p_county_code
              and   city_code = p_city_code
              and business_group_id + 0 = p_business_group_id);
Line: 5980

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',1);
Line: 5989

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',91);
Line: 5997

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',2);
Line: 6009

  /* Insert City Tax record */

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',3);
Line: 6014

  insert_city_tax_row(p_row_id                  => l_row_id,
                        p_emp_city_tax_rule_id  => l_emp_city_tax_rule_id,
                        p_effective_start_date    => p_effective_start_date,
                        p_effective_end_date      => p_effective_end_date,
                        p_assignment_id           => p_assignment_id,
                        p_state_code              => p_state_code,
                        p_county_code             => p_county_code,
                        p_city_code               => p_city_code,
                        p_business_group_id       => p_business_group_id,
                        p_additional_wa_rate      => 0,
                        p_filing_status_code      => lpad(l_filing_status_code,2,'0'),
                        p_jurisdiction_code       => p_state_code || '-' ||
                                           p_county_code ||'-' || p_city_code,
                        p_lit_additional_tax      => 0,
                        p_lit_override_amount     => 0,
                        p_lit_override_rate       => 0,
                        p_withholding_allowances  => 0,
                        p_lit_exempt              => 'N',
                        p_sd_exempt               => null,
                        p_ht_exempt               => null,
                        p_wage_exempt             => 'N',
                        p_school_district_code    => null,
                        p_time_in_city            => nvl(p_percent_time,0),
                        p_attribute_category        => null,
                        p_attribute1                => null,
                        p_attribute2                => null,
                        p_attribute3                => null,
                        p_attribute4                => null,
                        p_attribute5                => null,
                        p_attribute6                => null,
                        p_attribute7                => null,
                        p_attribute8                => null,
                        p_attribute9                => null,
                        p_attribute10               => null,
                        p_attribute11               => null,
                        p_attribute12               => null,
                        p_attribute13               => null,
                        p_attribute14               => null,
                        p_attribute15               => null,
                        p_attribute16               => null,
                        p_attribute17               => null,
                        p_attribute18               => null,
                        p_attribute19               => null,
                        p_attribute20               => null,
                        p_attribute21               => null,
                        p_attribute22               => null,
                        p_attribute23               => null,
                        p_attribute24               => null,
                        p_attribute25               => null,
                        p_attribute26               => null,
                        p_attribute27               => null,
                        p_attribute28               => null,
                        p_attribute29               => null,
                        p_attribute30               => null,
                        p_cty_information_category  => null,
                        p_cty_information1          => null,
                        p_cty_information2          => null,
                        p_cty_information3          => null,
                        p_cty_information4          => null,
                        p_cty_information5          => null,
                        p_cty_information6          => null,
                        p_cty_information7          => null,
                        p_cty_information8          => null,
                        p_cty_information9          => null,
                        p_cty_information10         => null,
                        p_cty_information11         => null,
                        p_cty_information12         => null,
                        p_cty_information13         => null,
                        p_cty_information14         => null,
                        p_cty_information15         => null,
                        p_cty_information16         => null,
                        p_cty_information17         => null,
                        p_cty_information18         => null,
                        p_cty_information19         => null,
                        p_cty_information20         => null,
                        p_cty_information21         => null,
                        p_cty_information22         => null,
                        p_cty_information23         => null,
                        p_cty_information24         => null,
                        p_cty_information25         => null,
                        p_cty_information26         => null,
                        p_cty_information27         => null,
                        p_cty_information28         => null,
                        p_cty_information29         => null,
                        p_cty_information30         => null     );
Line: 6100

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',4);
Line: 6103

  hr_utility.set_location('pay_us_emp_dt_tax_rules.insert_def_city_rec',5);
Line: 6107

end  insert_def_city_rec;
Line: 6127

select peev.screen_entry_value jurisdiction,
       peef.effective_start_date start_date
  from  PAY_ELEMENT_ENTRY_VALUES_F peev,
        PAY_ELEMENT_ENTRIES_F peef,
        PAY_INPUT_VALUES_F piv,
        PAY_ELEMENT_TYPES_F pet
  where pet.element_name = 'VERTEX'
    and pet.element_type_id = piv.element_type_id
    and piv.name = 'Jurisdiction'
    and piv.input_value_id = 0 + peev.input_value_id
    and peev.element_entry_id = peef.element_entry_id
    and peev.effective_start_date = peef.effective_start_date
    and peev.effective_end_date = peef.effective_end_date
    and p_assignment_id = peef.assignment_id
    and peef.effective_start_date = p_effective_start_date
    and peef.effective_end_date   = p_effective_end_date
    and peef.effective_start_date between pet.effective_start_date and pet.effective_end_date; -- Bug 3354060 added to remove MJC between
Line: 6184

   Purpose : To update sui_wage_base_override_amount for the new work location,
             with respect to every change in location state. The procedure
             will also take care of the condition of changing GRE when work
             location state remains unchanged / changed as well Rehire condition.
*/

procedure set_sui_wage_base_override(p_assignment_id    in number,
                                     p_state_code       in varchar2 default null,
				                     p_session_date     in date)
is

l_sui_er_wg_lt_curr_state  pay_us_state_tax_info_f.sui_er_wage_limit%type ;
Line: 6212

     select state_code
     from   pay_us_emp_state_tax_rules_f
     where  assignment_id = p_assignment_id ;
Line: 6218

     select to_number(segment1) tax_unit_id
     from   hr_soft_coding_keyflex a,
            per_assignments_f  b
     where  b.assignment_id = p_assignment_id
     and    b.soft_coding_keyflex_id = a.soft_coding_keyflex_id
     and    p_session_date between b.effective_start_date and b.effective_end_date ;
Line: 6226

     select fnd_number.canonical_to_number(UE.creator_id)
     from  ff_user_entities  UE,
           ff_database_items DI
     where  DI.user_name            = p_dbi_name --'SUI_ER_TAXABLE_PER_JD_GRE_YTD'
       and  UE.user_entity_id       = DI.user_entity_id
       and  Ue.creator_type         = 'B'
       and  UE.legislation_code     = 'US' ;
Line: 6235

      select max(effective_start_date)
      from   per_assignments_f paf,
             per_assignment_status_types past
      where  paf.assignment_id = p_assignment_id
      and    paf.assignment_status_type_id = past.assignment_status_type_id
      and    past.per_system_status = 'ACTIVE_ASSIGN'
      and   ((past.business_group_id is null
             and past.legislation_code is null)
             OR (past.business_group_id is null
                and past.legislation_code = 'US')
             OR (past.legislation_code is null
                 and exists
                    (select 'x'
                     from  per_assignments_f paf_i
                     where paf_i.assignment_id = p_assignment_id
                     and   paf_i.business_group_id = past.business_group_id)
                 )
             )
      and    paf.payroll_id is not null ;
Line: 6256

      select sui_er_wage_limit
      from pay_us_state_tax_info_f
      where p_effective_date between effective_start_date
                                  and effective_end_date
        and sta_information_category = 'State tax limit rate info'
        and state_code = p_state_code ;
Line: 6265

    select max(effective_date)
	from pay_payroll_actions ppa,
	     pay_assignment_actions paa,
	     per_assignments_f paf
	where paf.assignment_id = p_assignment_id
	and   paf.assignment_id = paa.assignment_id
	and   paa.payroll_action_id = ppa.payroll_action_id
	and   ppa.action_type in ('R','Q','B','V','I')
	and   nvl(ppa.date_earned,ppa.effective_date) between trunc(p_session_date,'Y')
	                         and last_day(add_months(trunc(p_session_date,'Y'),11)) ;
Line: 6278

        select 'Y'
        from per_assignments_f paf_o,
             per_assignment_status_types past
        where paf_o.assignment_id = p_assignment_id
         and  paf_o.assignment_status_type_id = past.assignment_status_type_id
         and  past.per_system_status = 'ACTIVE_ASSIGN'
         and  ((past.business_group_id is null
                and past.legislation_code is null)
                OR (past.business_group_id is null
                    and past.legislation_code = 'US')
                OR (past.legislation_code is null
                    and exists
                        (select 'x'
                         from  per_assignments_f paf_a
                         where paf_a.assignment_id = p_assignment_id
                         and   paf_a.business_group_id = past.business_group_id)
                    )
               )

        and   exists
       (
        select distinct paf_i.assignment_id
        from per_assignments_f paf_i,
             per_assignments_f paf_term
        where paf_i.person_id = paf_o.person_id
        and   paf_i.person_id = paf_term.person_id
        and   paf_i.assignment_id > paf_term.assignment_id
        and   paf_i.effective_start_date >= paf_term.effective_end_date
        and  ( trunc(paf_i.effective_end_date,'Y') = trunc(p_session_date,'Y')
              or (trunc(paf_i.effective_start_date,'Y') = trunc(p_session_date,'Y')
                 and trunc(paf_i.effective_end_date,'Y') > trunc(p_session_date,'Y')))
       ) ;
Line: 6312

        select distinct paf.person_id
        from per_assignments_f paf
        where paf.assignment_id = p_assignment_id ;
Line: 6318

        select distinct paf.assignment_id
        from per_assignments_f paf
        where paf.person_id = p_person_id
        and  ( trunc(paf.effective_end_date,'Y') = trunc(p_session_date,'Y')
              or (trunc(paf.effective_start_date,'Y') = trunc(p_session_date,'Y')
                 and trunc(paf.effective_end_date,'Y') > trunc(p_session_date,'Y'))) ;
Line: 6494

             update pay_us_emp_state_tax_rules_f
             set    sui_wage_base_override_amount = l_sui_wg_base
             where  assignment_id = p_assignment_id
             and    state_code = i_all_curr_states.state_code ;
Line: 6499

	          update pay_us_emp_state_tax_rules_f
              set    sui_wage_base_override_amount = null
              where  assignment_id = p_assignment_id
              and    state_code = i_all_curr_states.state_code ;
Line: 6504

           hr_utility.trace('SUI Wage Base Updated...') ;
Line: 6561

             update pay_us_emp_state_tax_rules_f
             set    sui_wage_base_override_amount = l_sui_wg_base
             where  assignment_id = p_assignment_id
             and    state_code = state_code_tab(i) ;
Line: 6566

	          update pay_us_emp_state_tax_rules_f
              set    sui_wage_base_override_amount = null
              where  assignment_id = p_assignment_id
              and    state_code = state_code_tab(i) ;
Line: 6571

          hr_utility.trace('SUI Wage Base Updated...') ;
Line: 6581

    update pay_us_emp_state_tax_rules_f
    set    sui_wage_base_override_amount = l_sui_er_wg_lt_curr_state
    where  assignment_id = p_assignment_id
    and    state_code = p_state_code  ;
Line: 6633

   select pus.state_code,
         puco.county_code,
         puci.city_code,
         pus1.state_code,
         puco1.county_code,
         puci1.city_code
   from  PAY_US_CITY_NAMES puci1,
         PAY_US_COUNTIES puco1,
         PAY_US_STATES pus1,
         PAY_US_CITY_NAMES puci,
         PAY_US_COUNTIES puco,
         PAY_US_STATES pus,
         HR_LOCATIONS hrl
  where  hrl.location_id  = p_location
  and    pus.state_abbrev = hrl.region_2
  and    puco.state_code  = pus.state_code
  and    puco.county_name = hrl.region_1
  and    puci.state_code  = puco.state_code
  and    puci.county_code = puco.county_code
  and    puci.city_name   = hrl.town_or_city
  and    pus1.state_abbrev = nvl(hrl.loc_information17,hrl.region_2)
  and    puco1.state_code  = pus1.state_code
  and    puco1.county_name = nvl(hrl.loc_information19,hrl.region_1)
  and    puci1.state_code  = puco1.state_code
  and    puci1.county_code = puco1.county_code
  and    puci1.city_name   = nvl(hrl.loc_information18,hrl.town_or_city);
Line: 6665

       select min(effective_start_date)
       from   PAY_US_EMP_FED_TAX_RULES_F
       where  assignment_id = p_assignment_id;
Line: 6677

      select max(effective_end_date)
      from   per_assignments_f
      where  assignment_id = p_assignment_id;
Line: 6780

         insert_def_state_rec(p_assignment_id        => p_assignment_id,
                           p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_max_assign_end_dt, -- Bug 2535501
--                           p_effective_end_date   => l_end_of_time,
                           p_state_code           => l_state_code,
                           p_business_group_id    => p_business_group,
                           p_percent_time         => 0);
Line: 6796

         insert_def_county_rec(p_assignment_id        => p_assignment_id,
                           p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_max_assign_end_dt, -- Bug 2535501
--                           p_effective_end_date   => l_end_of_time,
                           p_state_code           => l_state_code,
                           p_county_code          => l_county_code,
                           p_business_group_id    => p_business_group,
                           p_percent_time         => 0);
Line: 6813

         insert_def_city_rec(p_assignment_id        => p_assignment_id,
                           p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_max_assign_end_dt, -- Bug 2535501
--                           p_effective_end_date   => l_end_of_time,
                           p_state_code           => l_state_code,
                           p_county_code          => l_county_code,
                           p_city_code            => l_city_code,
                           p_business_group_id    => p_business_group,
                           p_percent_time         => 0);
Line: 6830

	     -- call the procedure which does the update
         -- Turning Off SUI Wage Base Override Functionality due to Bug# 5486281
         /*
	     IF  hr_utility.chk_product_install(p_product =>'Oracle Payroll',
                                           p_legislation => 'US')
         then
                 hr_utility.set_location('pay_us_emp_dt_tax_rules.create_new_location_rec',102);
Line: 6867

           insert_def_county_rec(p_assignment_id        => p_assignment_id,
                          p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_max_assign_end_dt, -- Bug 2535501
--                           p_effective_end_date   => l_end_of_time,
                          p_state_code           => l_state_code,
                          p_county_code          => l_county_code,
                          p_business_group_id    => p_business_group,
                          p_percent_time         => 0);
Line: 6884

           insert_def_city_rec(p_assignment_id        => p_assignment_id,
                          p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_max_assign_end_dt, -- Bug 2535501
--                           p_effective_end_date   => l_end_of_time,
                          p_state_code           => l_state_code,
                          p_county_code          => l_county_code,
                          p_city_code            => l_city_code,
                          p_business_group_id    => p_business_group,
                          p_percent_time         => 0);
Line: 6922

            insert_def_city_rec(p_assignment_id        => p_assignment_id,
                              p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_max_assign_end_dt, -- Bug 2535501
--                           p_effective_end_date   => l_end_of_time,
                              p_state_code           => l_state_code,
                              p_county_code          => l_county_code,
                              p_city_code            => l_city_code,
                              p_business_group_id    => p_business_group,
                              p_percent_time         => 0);
Line: 6943

       insert_def_state_rec(p_assignment_id   => p_assignment_id,
                           p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_end_of_time,
                           p_state_code           => l_ovrd_state_code,
                           p_business_group_id    => p_business_group,
                           p_percent_time         => 0);
Line: 6957

         insert_def_county_rec(p_assignment_id        => p_assignment_id,
                           p_effective_start_date => l_default_date,
                           p_effective_end_date   => l_end_of_time,
                           p_state_code           => l_ovrd_state_code,
                           p_county_code          => l_ovrd_county_code,
                           p_business_group_id    => p_business_group,
                           p_percent_time         => 0);
Line: 6972

            insert_def_city_rec(p_assignment_id        => p_assignment_id,
                              p_effective_start_date => l_default_date,
                              p_effective_end_date   => l_end_of_time,
                              p_state_code           => l_ovrd_state_code,
                              p_county_code          => l_ovrd_county_code,
                              p_city_code            => l_ovrd_city_code,
                              p_business_group_id    => p_business_group,
                              p_percent_time         => 0);
Line: 6991

     /* Now update the city record and set it to 100% */

     if l_state_code = l_ovrd_state_code and l_county_code = l_ovrd_county_code
        and l_city_code = l_ovrd_city_code then
        l_jurisdiction_code := l_state_code ||'-' || l_county_code ||'-'|| l_city_code;
Line: 7020

                   an assignment. It can also be used to delete the element entries
                   for a given date range.
     Parameters  :
                 p_assignment_id     -> The assignment for which the vertex elemnt entries are
                                         to be modified for their start and/or end dates.
                  p_session_date      -> The start date of the element entry.
                  p_new_start_date    -> The new start date of the element entry.
                  p_new_end_date      -> The new end date of the element entry.
                  p_mode              -> 'U' -> for update
                                         'D' -> for Delete
                                         'F' -> FUTURE_CHANGE (for Delete)
                                         'N' -> DELETE_NEXT_CHANGE
*/

procedure del_updt_entries_for_dates (p_assignment_id        in number,
                                    p_jurisdiction_code    in varchar2,
                                    p_session_date         in date,
                                    p_new_start_date       in date,
                                    p_new_end_date         in date,
                                    p_mode                 in varchar2) is

   l_inp_value_id_table   hr_entry.number_table;
Line: 7057

       select pet.element_type_id,
              piv.input_value_id,
              piv.name
       from   PAY_INPUT_VALUES_F  piv,
              PAY_ELEMENT_TYPES_F pet
       where  p_session_date between piv.effective_start_date
                             and piv.effective_end_date
       and    pet.element_type_id       = piv.element_type_id
       and    p_session_date between pet.effective_start_date
                             and pet.effective_end_date
       and    pet.element_name          = 'VERTEX';
Line: 7072

       select pee.element_entry_id
       from   PAY_ELEMENT_ENTRY_VALUES_F pev,
              PAY_ELEMENT_ENTRIES_F pee
       where  pev.screen_entry_value   = p_jurisdiction_code
       and    pev.input_value_id + 0   = p_inp_val
       and    p_session_date between pev.effective_start_date
                             and pev.effective_end_date
       and    pev.element_entry_id     = pee.element_entry_id
       and    pee.element_link_id      = p_element_link
       and    p_session_date between pee.effective_start_date
                             and pee.effective_end_date
       and    pee.assignment_id        = p_assignment_id;
Line: 7173

           /* Update Element Entries and Element Entry values as well */

           if p_new_start_date is not null
           then

               l_step := 4;
Line: 7179

               update PAY_ELEMENT_ENTRIES_F
               set    effective_start_date = p_new_start_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7186

               update PAY_ELEMENT_ENTRY_VALUES_F
               set    effective_start_date = p_new_start_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7197

               update PAY_ELEMENT_ENTRIES_F
               set    effective_end_date = p_new_end_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7204

               update PAY_ELEMENT_ENTRY_VALUES_F
               set    effective_end_date = p_new_end_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7213

            /* Delete the element entries */

               l_step := 8;
Line: 7216

               delete PAY_ELEMENT_ENTRY_VALUES_F
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7221

            /* Delete the element entry values */

               l_step := 9;
Line: 7224

               delete PAY_ELEMENT_ENTRIES_F
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7229

        elsif p_mode = 'N' then /* Delete next change */

          l_mode := 'DELETE_NEXT_CHANGE';
Line: 7241

        elsif p_mode = 'F' then /* Delete future change */

          l_mode := 'FUTURE_CHANGE';
Line: 7266

   Purpose   : Since we have to update the element entries of all the
               jurisdictions, we can get the jurisdictions that are
               valid as of the session date. from the tax rules tables.
               Then for each of the jurisdiction, we will call the
               del_updt_entries_for_dates to change their effective dates.
               This rotuine will also be called to delete the element entries
               for a specific date range.
   Parameters : p_assignment_id -> The assignment id.
                p_session_date  -> The session date for which the element
                                    entries have to be updated/deleted.
                p_new_start_date -> The new effective start date to which
                                    the effective start date of the records
                                    needs to be changed.
                p_new_end_date   -> The new end date for the element entries
                                    effective as of the session date.
                p_mode          ->  'U' -> Update
                                    'D' -> Delete
                                    'F' -> FUTURE_CHANGE (for Delete)
                                    'N' -> DELETE_NEXT_CHANGE
*/

procedure upd_del_entries(p_assignment_id     in number,
                          p_session_date      in date,
                          p_new_start_date    in date,
                          p_new_end_date      in date,
                          p_mode              in varchar2) is

  l_state_code        varchar2(2);
Line: 7299

  select state_code
  from   PAY_US_EMP_STATE_TAX_RULES_F str
  where  str.assignment_id = p_assignment_id
  and    p_session_date between str.effective_start_date
         and str.effective_end_date;
Line: 7306

  select state_code,
         county_code
  from   PAY_US_EMP_COUNTY_TAX_RULES_F ctr
  where  ctr.assignment_id = p_assignment_id
  and    p_session_date between ctr.effective_start_date
         and ctr.effective_end_date;
Line: 7314

  select state_code,
         county_code,
         city_code
  from   PAY_US_EMP_CITY_TAX_RULES_F ctr
  where  ctr.assignment_id = p_assignment_id
  and    p_session_date between ctr.effective_start_date
         and ctr.effective_end_date;
Line: 7334

             /* Update the entries for their effective start and/or
                effective end date */

             l_jurisdiction_code := l_state_code || '-000-0000';
Line: 7358

          /* Update the entries for their effective start and/or
             effective end date */

          l_jurisdiction_code := l_state_code || '-' || l_county_code ||
                                  '-0000';
Line: 7385

          /* Update the entries for their effective start and/or
             effective end date */

          l_jurisdiction_code := l_state_code || '-' || l_county_code ||
                                  '-' || l_city_code;
Line: 7410

                   can also be used to delete the workers comp. element entry
                   for a given date range.
     Parameters  :
                 p_assignment_id     -> The assignment for which the workers
                                        comp. element entry are to be modified
                                        for their start and/or end dates.
                  p_session_date     -> The start date of the element entry.
                  p_new_start_date   -> The new start date of the element entry.
                  p_new_end_date     -> The new end date of the element entry.
                  p_mode             -> 'U' -> for update
                                        'D' -> for Delete
*/

procedure del_updt_wc_entry_for_dates (p_assignment_id        in number,
                                         p_session_date         in date,
                                         p_new_start_date       in date,
                                         p_new_end_date         in date,
                                         p_mode                 in varchar2) is


   l_element_type_id      number       :=0;
Line: 7440

       select pet.element_type_id
       from   PAY_ELEMENT_TYPES_F pet
       where  pet.element_name = 'Workers Compensation'       -- Bug 3354060 FTS on PAY_ELEMENT_TYPES_F was removed. Done by removing
       and    p_session_date between pet.effective_start_date -- 'upper' from pet.element_name and 'WORKERS COMPENSATION' was changed to
                             and pet.effective_end_date;      -- 'Workers Compensation'
Line: 7449

       select pee.element_entry_id
       from   PAY_ELEMENT_ENTRIES_F pee
       where  pee.assignment_id        = p_assignment_id
       and    p_session_date between pee.effective_start_date
                             and pee.effective_end_date
       and    pee.element_link_id      = p_element_link;
Line: 7514

           /* Update Element Entries and Element Entry values as well */

           if p_new_start_date is not null
           then

               l_step := 4;
Line: 7520

               update PAY_ELEMENT_ENTRIES_F
               set    effective_start_date = p_new_start_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7527

               update PAY_ELEMENT_ENTRY_VALUES_F
               set    effective_start_date = p_new_start_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7539

               update PAY_ELEMENT_ENTRIES_F
               set    effective_end_date = p_new_end_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7546

               update PAY_ELEMENT_ENTRY_VALUES_F
               set    effective_end_date = p_new_end_date
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7555

            /* Delete the element entry */

               l_step := 8;
Line: 7558

               delete PAY_ELEMENT_ENTRY_VALUES_F
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7563

            /* Delete the element entry values */

               l_step := 9;
Line: 7566

               delete PAY_ELEMENT_ENTRIES_F
               where  element_entry_id = l_element_entry_id
               and    p_session_date between effective_start_date
                      and effective_end_date;
Line: 7586

       Purpose  : To create or update the %age tax records for
                  all of the existing tax rules records, for a given date
                  range i.e. from the p_start_date till p_end_date.
                  When this procedure is called with the mode of 'INSERT_OLD'
                  the %age passed by this routine to the maintain_element_entry
                  routine will not be of any importance because the maintain_element_entry
                  routine will do an update insert with the existing %age
*/

procedure change_entries(p_assignment_id in number,
                             p_session_date  in date,
                             p_start_date    in date,
                             p_end_date      in date,
                             p_mode          in varchar2) is

  l_state_code     varchar2(2);
Line: 7607

  select state_code
  from   PAY_US_EMP_STATE_TAX_RULES_F str
  where  str.assignment_id = p_assignment_id
  and    p_session_date between
         str.effective_start_date and str.effective_end_date;
Line: 7614

  select state_code,
         county_code
  from   PAY_US_EMP_COUNTY_TAX_RULES_F ctr
  where  ctr.assignment_id = p_assignment_id
  and    p_session_date between
         ctr.effective_start_date and ctr.effective_end_date;
Line: 7622

  select state_code,
         county_code,
         city_code
  from   PAY_US_EMP_CITY_TAX_RULES_F ctr
  where  ctr.assignment_id = p_assignment_id
  and    p_session_date between
         ctr.effective_start_date and ctr.effective_end_date;
Line: 7738

  select paf.location_id, paf.effective_end_date
  from   PER_ASSIGNMENTS_F paf
  where  paf.assignment_id = p_assignment_id
         and p_next_eff_date between paf.effective_start_date
         and paf.effective_end_date;
Line: 7746

       select pet.element_type_id
       from   PAY_ELEMENT_TYPES_F pet
       where  pet.element_name          = 'VERTEX'
       and    p_session_date between pet.effective_start_date
                             and pet.effective_end_date;
Line: 7754

       select pee.effective_end_date
       from   PAY_ELEMENT_ENTRIES_F pee
       where  pee.assignment_id        = p_assignment_id
       and    p_date between pee.effective_start_date
                             and pee.effective_end_date
       and    pee.element_link_id      = p_element_link
       and rownum < 2;
Line: 7763

    select nvl(hsck.segment18, paf.location_id)
    from   HR_SOFT_CODING_KEYFLEX hsck,
           PER_ASSIGNMENTS_F      paf
    where  paf.assignment_id = p_assignment
    and    p_session_dt between paf.effective_start_date
                     and paf.effective_end_date
    and    hsck.soft_coding_keyflex_id = paf.soft_coding_keyflex_id;
Line: 7803

              /* Do an update insert for the existing %age records with the same %age */

              change_entries(p_assignment_id     => p_assignment_id,
                             p_session_date      => p_default_date,
                             p_start_date        => l_validation_start_date,
                             p_end_date          => l_next_end_date,
                             p_mode              => 'INSERT_OLD');
Line: 7912

            /* inserting rec for all jurisdcitions for the new date
               range */
            zero_out_time(p_assignment_id         => p_assignment_id,
                          p_effective_start_date  => l_validation_start_date,
                          p_effective_end_date    => l_validation_end_date);
Line: 8004

  select min(ftr.effective_start_date)
  from PAY_US_EMP_FED_TAX_RULES_F ftr
  where ftr.assignment_id = passignment;
Line: 8014

    select paf1.location_id,
           paf1.effective_start_date,
           paf1.effective_start_date - 1
    from per_assignments_f paf1
    where paf1.assignment_id = passignment
    and paf1.effective_start_date >= p_start_date
    and paf1.effective_end_date <= p_end_date
    order by 2;
Line: 8026

       select pet.element_type_id
       from   PAY_ELEMENT_TYPES_F pet
       where  pet.element_name          = 'VERTEX'
       and    p_session_date between pet.effective_start_date
                             and pet.effective_end_date;
Line: 8035

      select 'Y'
      from pay_element_entries_f pef
      where pef.assignment_id = p_assignment_id
      and   pef.element_link_id = p_ele_link
      and   pef.effective_start_date >= p_def_date
      and   exists (select null
                    from pay_element_entries_f pee
                    where pee.assignment_id = p_assignment_id
                    and   pee.element_entry_id = pef.element_entry_id
                    and   pee.effective_start_date >= p_def_date
                    and   pee.effective_start_date <> pef.effective_start_date);
Line: 8050

       select pee.effective_start_date,
             pee.effective_end_date,
             pee.effective_start_date -1
       from   PAY_ELEMENT_ENTRIES_F pee
       where  pee.assignment_id        = p_assignment_id
       and    p_session_date between pee.effective_start_date
                             and pee.effective_end_date
       and    pee.element_link_id      = p_element_link
       and rownum < 2;
Line: 8063

  select paf.location_id
  from   PER_ASSIGNMENTS_F paf
  where  paf.assignment_id = p_assignment_id and
         p_next_eff_date between paf.effective_start_date
         and paf.effective_end_date;
Line: 8073

       select pee.effective_end_date
       from   PAY_ELEMENT_ENTRIES_F pee
       where  pee.assignment_id        = p_assignment_id
       and    p_date between pee.effective_start_date
                             and pee.effective_end_date
       and    pee.element_link_id      = p_element_link
       and rownum < 2;
Line: 8082

    select nvl(hsck.segment18, paf.location_id)
    from   HR_SOFT_CODING_KEYFLEX hsck,
           PER_ASSIGNMENTS_F      paf
    where  paf.assignment_id = p_assignment
    and    p_session_dt between paf.effective_start_date
                     and paf.effective_end_date
    and    hsck.soft_coding_keyflex_id = paf.soft_coding_keyflex_id;
Line: 8104

   select paf.location_id
   from   PER_ASSIGNMENTS_F paf
   where  paf.assignment_id = p_assignment and
          p_prev_eff_date between paf.effective_start_date
          and paf.effective_end_date;
Line: 8112

       select pee.effective_start_date
       from   PAY_ELEMENT_ENTRIES_F pee
       where  pee.assignment_id        = p_assignment
       and    pee.element_link_id      = p_element_link
       and    p_date between pee.effective_start_date
                             and pee.effective_end_date
       and rownum < 2;
Line: 8126

         select p_eff_start_date -1
         into   l_eff_prev_date
         from dual;
Line: 8403

          select p_effective_end_date + 1
          into   l_pef_new_start_date
          from   sys.DUAL;
Line: 8407

          /* Do an update insert for the same %age as of the l_pef_new_start_date */
          change_entries(p_assignment_id     => p_assignment_id,
                         p_session_date      => l_pef_new_start_date,
                         p_start_date        => l_pef_start_date,
                         p_end_date          => l_pef_end_date,
                         p_mode              => 'INSERT_OLD');
Line: 8425

             /* Do an update insert for the same %age as of the l_validation_start_date */

             change_entries(p_assignment_id     => p_assignment_id,
                            p_session_date      => l_validation_start_date,
                            p_start_date        => l_pef_start_date,
                            p_end_date          => l_validation_end_date,
                            p_mode              => 'INSERT_OLD');
Line: 8528

             select l_validation_end_date + 1
             into l_pef_next_date
             from SYS.DUAL;
Line: 8595

                     /* Do an update insert as of the l_validation_start_date */

                     change_entries(p_assignment_id     => p_assignment_id,
                                    p_session_date      => l_validation_start_date,
                                    p_start_date        => l_pef_start_date,
                                    p_end_date          => l_pef_end_date,
                                    p_mode              => 'UPDATE_CHANGE_INSERT');
Line: 8605

                     /* Do an update as of the l_validation_start_date */

                     change_entries(p_assignment_id     => p_assignment_id,
                                    p_session_date      => l_validation_start_date,
                                    p_start_date        => l_pef_start_date,
                                    p_end_date          => l_pef_end_date,
                                    p_mode              => 'UPDATE');
Line: 8780

                   /* Do an update insert as of the l_validation_start_date */

                   change_entries(p_assignment_id     => p_assignment_id,
                                  p_session_date      => l_validation_start_date,
                                  p_start_date        => l_pef_start_date,
                                  p_end_date          => l_pef_end_date,
                                  p_mode              => 'UPDATE_CHANGE_INSERT');
Line: 9042

procedure update_percentage (p_assignment_id        in number,
                             p_effective_start_date in date,
                             p_effective_end_date   in date,
                             p_session_date         in date,
                             p_new_location_id      in number,
                             p_business_group_id    in number,
                             p_mode                 in varchar2,
                             p_ret_code             in out nocopy number,
                             p_ret_text             in out nocopy varchar2) is

 l_validation_start_date    date := null;
Line: 9070

       select pet.element_type_id
       from   PAY_ELEMENT_TYPES_F pet
       where  pet.element_name          = 'VERTEX'
       and    p_session_date between pet.effective_start_date
                             and pet.effective_end_date;
Line: 9080

  select pef.effective_start_date,
         pef.effective_end_date,
         pef.effective_end_date + 1
  from   PAY_ELEMENT_ENTRIES_F pef
  where  pef.assignment_id = p_assignment_id
  and    p_session_dt between pef.effective_start_date
         and pef.effective_end_date
  and    pef.element_link_id      = p_element_link
  and    rownum < 2;
Line: 9093

  select paf.location_id
  from   PER_ASSIGNMENTS_F paf
  where  paf.assignment_id = p_assignment_id and
         p_next_eff_date between paf.effective_start_date
         and paf.effective_end_date;
Line: 9101

       select pee.effective_end_date
       from   PAY_ELEMENT_ENTRIES_F pee
       where  pee.assignment_id        = p_assignment_id
       and    p_date between pee.effective_start_date
                             and pee.effective_end_date
       and    pee.element_link_id      = p_element_link
       and rownum < 2;
Line: 9110

    select nvl(hsck.segment18, paf.location_id)
    from   HR_SOFT_CODING_KEYFLEX hsck,
           PER_ASSIGNMENTS_F      paf
    where  paf.assignment_id = p_assignment
    and    p_session_dt between paf.effective_start_date
                     and paf.effective_end_date
    and    hsck.soft_coding_keyflex_id = paf.soft_coding_keyflex_id;
Line: 9122

    /* Check for Update

                        | Session date
                        V
    |-------------------------------------

    */

    if p_mode in ('UPDATE','UPDATE_OVERRIDE') then

       l_validation_start_date := p_session_date;
Line: 9135

       /* Do an update for the element entries for all of the
          existing jurisdictions of the assignment */

       change_entries(p_assignment_id     => p_assignment_id,
                      p_session_date      => p_session_date,
                      p_start_date        => p_effective_start_date,
                      p_end_date          => p_effective_end_date,
                      p_mode              => p_mode);
Line: 9183

     elsif p_mode = 'UPDATE_CHANGE_INSERT' then

       open csr_tax_element;
Line: 9194

                   'pay_us_emp_dt_tax_rules.update_percentage');
Line: 9229

                   'pay_us_emp_dt_tax_rules.update_percentage');
Line: 9243

         /* First do an update insert with the existing value of the
            existing jurisdictions as of the p_effective_end_date + 1 */

         select p_effective_end_date + 1
         into l_new_session_date
         from DUAL;
Line: 9254

                        p_mode              => 'INSERT_OLD');
Line: 9257

         /* Again do an update insert  for the element entries for all of the
            existing jurisdictions of the assignment, as of the session date */

         change_entries(p_assignment_id     => p_assignment_id,
                        p_session_date      => p_session_date,
                        p_start_date        => l_pef_start_date,
                        p_end_date          => l_validation_end_date,
                        p_mode              => 'UPDATE_CHANGE_INSERT');
Line: 9344

                       'pay_us_emp_dt_tax_rules.update_percentage');
Line: 9353

                select l_validation_start_date - 1
                into l_prev_end_date
                from SYS.DUAL;
Line: 9379

                              p_mode              => 'UPDATE_CHANGE_INSERT');
Line: 9434

end update_percentage;
Line: 9451

       select pus.state_code
       from   PAY_US_STATES       pus,
              HR_LOCATIONS        hrl
       where  hrl.location_id   = p_new_location_id
       and    pus.state_abbrev  = nvl(hrl.loc_information17,hrl.region_2);
Line: 9458

   select pef.effective_start_date, pef.effective_end_date,
          pef.sui_jurisdiction_code
   from   PAY_US_EMP_FED_TAX_RULES_F pef
   where  pef.assignment_id = p_assignment_id
   and    p_effective_start_date <= pef.effective_end_date
   and    p_effective_end_date >= pef.effective_start_date;
Line: 9466

   select * from pay_us_emp_fed_tax_rules_f
   where  assignment_id = p_assignment_id
   and    effective_start_date = p_start_date
   and    effective_end_date   = p_end_date;
Line: 9472

   select rowid
   from PAY_US_EMP_FED_TAX_RULES_F
   where assignment_id        = p_assignment_id
   and   effective_start_date = p_start_date
   and   effective_end_date   = p_end_date
   for update nowait;
Line: 9526

           /* Update the federal tax record for the SUI state */
           l_step := 6;
Line: 9528

           update PAY_US_EMP_FED_TAX_RULES_F
           set    sui_state_code = l_work_state_code,
                  sui_jurisdiction_code = l_work_state_code ||'-000-0000'
           where  rowid = l_row_id;
Line: 9548

               select p_effective_start_date -1
               into l_new_date
               from DUAL;
Line: 9565

               /* Update the Federal tax record as of the p_effective_start_date */

               l_step := 10;
Line: 9568

               update PAY_US_EMP_FED_TAX_RULES_F
               set    effective_end_date = l_new_date
               where assignment_id        = p_assignment_id
               and   effective_start_date = l_eff_start_date
               and   effective_end_date   = l_eff_end_date;
Line: 9575

               insert into PAY_US_EMP_FED_TAX_RULES_F
               (emp_fed_tax_rule_id,
                effective_start_date,
                effective_end_date,
                assignment_id,
                sui_state_code,
                sui_jurisdiction_code,
                business_group_id,
                additional_wa_amount,
                filing_status_code,
                fit_override_amount,
                fit_override_rate,
                withholding_allowances,
                cumulative_taxation,
                eic_filing_status_code,
                fit_additional_tax,
                fit_exempt,
                futa_tax_exempt,
                medicare_tax_exempt,
                ss_tax_exempt,
                wage_exempt,
                statutory_employee,
                w2_filed_year,
                supp_tax_override_rate,
                excessive_wa_reject_date,
                object_version_number,
                attribute_category,
                attribute1,
                attribute2,
                attribute3,
                attribute4,
                attribute5,
                attribute6,
                attribute7,
                attribute8,
                attribute9,
                attribute10,
                attribute11,
                attribute12,
                attribute13,
                attribute14,
                attribute15,
                attribute16,
                attribute17,
                attribute18,
                attribute19,
                attribute20,
                attribute21,
                attribute22,
                attribute23,
                attribute24,
                attribute25,
                attribute26,
                attribute27,
                attribute28,
                attribute29,
                attribute30,
                fed_information_category,
                fed_information1,
                fed_information2,
                fed_information3,
                fed_information4,
                fed_information5,
                fed_information6,
                fed_information7,
                fed_information8,
                fed_information9,
                fed_information10,
                fed_information11,
                fed_information12,
                fed_information13,
                fed_information14,
                fed_information15,
                fed_information16,
                fed_information17,
                fed_information18,
                fed_information19,
                fed_information20,
                fed_information21,
                fed_information22,
                fed_information23,
                fed_information24,
                fed_information25,
                fed_information26,
                fed_information27,
                fed_information28,
                fed_information29,
                fed_information30
                )

               values
               (l_fed_rec.emp_fed_tax_rule_id,
                p_effective_start_date,
                l_fed_rec.effective_end_date,
                l_fed_rec.assignment_id,
                l_work_state_code,
                l_work_state_code || '-000-0000',
                l_fed_rec.business_group_id,
                l_fed_rec.additional_wa_amount,
                lpad(l_fed_rec.filing_status_code,2,'0'),
                l_fed_rec.fit_override_amount,
                l_fed_rec.fit_override_rate,
                l_fed_rec.withholding_allowances,
                l_fed_rec.cumulative_taxation,
                l_fed_rec.eic_filing_status_code,
                l_fed_rec.fit_additional_tax,
                l_fed_rec.fit_exempt,
                l_fed_rec.futa_tax_exempt,
                l_fed_rec.medicare_tax_exempt,
                l_fed_rec.ss_tax_exempt,
                l_fed_rec.wage_exempt,
                l_fed_rec.statutory_employee,
                l_fed_rec.w2_filed_year,
                l_fed_rec.supp_tax_override_rate,
                l_fed_rec.excessive_wa_reject_date,
                0,
                l_fed_rec.attribute_category,
                l_fed_rec.attribute1,
                l_fed_rec.attribute2,
                l_fed_rec.attribute3,
                l_fed_rec.attribute4,
                l_fed_rec.attribute5,
                l_fed_rec.attribute6,
                l_fed_rec.attribute7,
                l_fed_rec.attribute8,
                l_fed_rec.attribute9,
                l_fed_rec.attribute10,
                l_fed_rec.attribute11,
                l_fed_rec.attribute12,
                l_fed_rec.attribute13,
                l_fed_rec.attribute14,
                l_fed_rec.attribute15,
                l_fed_rec.attribute16,
                l_fed_rec.attribute17,
                l_fed_rec.attribute18,
                l_fed_rec.attribute19,
                l_fed_rec.attribute20,
                l_fed_rec.attribute21,
                l_fed_rec.attribute22,
                l_fed_rec.attribute23,
                l_fed_rec.attribute24,
                l_fed_rec.attribute25,
                l_fed_rec.attribute26,
                l_fed_rec.attribute27,
                l_fed_rec.attribute28,
                l_fed_rec.attribute29,
                l_fed_rec.attribute30,
                l_fed_rec.fed_information_category,
                l_fed_rec.fed_information1,
                l_fed_rec.fed_information2,
                l_fed_rec.fed_information3,
                l_fed_rec.fed_information4,
                l_fed_rec.fed_information5,
                l_fed_rec.fed_information6,
                l_fed_rec.fed_information7,
                l_fed_rec.fed_information8,
                l_fed_rec.fed_information9,
                l_fed_rec.fed_information10,
                l_fed_rec.fed_information11,
                l_fed_rec.fed_information12,
                l_fed_rec.fed_information13,
                l_fed_rec.fed_information14,
                l_fed_rec.fed_information15,
                l_fed_rec.fed_information16,
                l_fed_rec.fed_information17,
                l_fed_rec.fed_information18,
                l_fed_rec.fed_information19,
                l_fed_rec.fed_information20,
                l_fed_rec.fed_information21,
                l_fed_rec.fed_information22,
                l_fed_rec.fed_information23,
                l_fed_rec.fed_information24,
                l_fed_rec.fed_information25,
                l_fed_rec.fed_information26,
                l_fed_rec.fed_information27,
                l_fed_rec.fed_information28,
                l_fed_rec.fed_information29,
                l_fed_rec.fed_information30
                );
Line: 9756

                  /* Update the workers compensation for the new jurisdiction as of the
                     p_effective_start_date */
                  l_step := 12;
Line: 9764

                                         p_mode                 => 'UPDATE');
Line: 9766

                  /* Update Insert the workers compensation for the new jurisdiction as of the
                     p_effective_start_date */
                  l_step := 13;
Line: 9774

                                         p_mode                 => 'UPDATE_CHANGE_INSERT');
Line: 9781

               select p_effective_end_date +1
               into l_new_date
               from DUAL;
Line: 9797

               /* Update the Federal tax record as of the p_effective_start_date */
               l_step := 15;
Line: 9800

               insert into PAY_US_EMP_FED_TAX_RULES_F
               select * from pay_us_emp_fed_tax_rules_f
               where  assignment_id = p_assignment_id
               and    effective_start_date = l_eff_start_date
               and    effective_end_date   = l_eff_end_date;
Line: 9808

               update PAY_US_EMP_FED_TAX_RULES_F
               set    effective_end_date = p_effective_end_date,
                      sui_state_code     = l_work_state_code,
                      sui_jurisdiction_code = l_work_state_code || '-000-0000'
               where assignment_id        = p_assignment_id
               and   effective_start_date = l_eff_start_date
               and   effective_end_date   = l_eff_end_date
               and   rownum < 2;
Line: 9818

               insert into PAY_US_EMP_FED_TAX_RULES_F
               (emp_fed_tax_rule_id,
                effective_start_date,
                effective_end_date,
                assignment_id,
                sui_state_code,
                sui_jurisdiction_code,
                business_group_id,
                additional_wa_amount,
                filing_status_code,
                fit_override_amount,
                fit_override_rate,
                withholding_allowances,
                cumulative_taxation,
                eic_filing_status_code,
                fit_additional_tax,
                fit_exempt,
                futa_tax_exempt,
                medicare_tax_exempt,
                ss_tax_exempt,
                wage_exempt,
                statutory_employee,
                w2_filed_year,
                supp_tax_override_rate,
                excessive_wa_reject_date,
                object_version_number,
                attribute_category,
                attribute1,
                attribute2,
                attribute3,
                attribute4,
                attribute5,
                attribute6,
                attribute7,
                attribute8,
                attribute9,
                attribute10,
                attribute11,
                attribute12,
                attribute13,
                attribute14,
                attribute15,
                attribute16,
                attribute17,
                attribute18,
                attribute19,
                attribute20,
                attribute21,
                attribute22,
                attribute23,
                attribute24,
                attribute25,
                attribute26,
                attribute27,
                attribute28,
                attribute29,
                attribute30,
                fed_information_category,
                fed_information1,
                fed_information2,
                fed_information3,
                fed_information4,
                fed_information5,
                fed_information6,
                fed_information7,
                fed_information8,
                fed_information9,
                fed_information10,
                fed_information11,
                fed_information12,
                fed_information13,
                fed_information14,
                fed_information15,
                fed_information16,
                fed_information17,
                fed_information18,
                fed_information19,
                fed_information20,
                fed_information21,
                fed_information22,
                fed_information23,
                fed_information24,
                fed_information25,
                fed_information26,
                fed_information27,
                fed_information28,
                fed_information29,
                fed_information30
                )
               values
               (l_fed_rec.emp_fed_tax_rule_id,
                l_new_date,
                l_fed_rec.effective_end_date,
                l_fed_rec.assignment_id,
                l_fed_rec.sui_state_code,
                l_fed_rec.sui_jurisdiction_code,
                l_fed_rec.business_group_id,
                l_fed_rec.additional_wa_amount,
                lpad(l_fed_rec.filing_status_code,2,'0'),
                l_fed_rec.fit_override_amount,
                l_fed_rec.fit_override_rate,
                l_fed_rec.withholding_allowances,
                l_fed_rec.cumulative_taxation,
                l_fed_rec.eic_filing_status_code,
                l_fed_rec.fit_additional_tax,
                l_fed_rec.fit_exempt,
                l_fed_rec.futa_tax_exempt,
                l_fed_rec.medicare_tax_exempt,
                l_fed_rec.ss_tax_exempt,
                l_fed_rec.wage_exempt,
                l_fed_rec.statutory_employee,
                l_fed_rec.w2_filed_year,
                l_fed_rec.supp_tax_override_rate,
                l_fed_rec.excessive_wa_reject_date,
                0,
                l_fed_rec.attribute_category,
                l_fed_rec.attribute1,
                l_fed_rec.attribute2,
                l_fed_rec.attribute3,
                l_fed_rec.attribute4,
                l_fed_rec.attribute5,
                l_fed_rec.attribute6,
                l_fed_rec.attribute7,
                l_fed_rec.attribute8,
                l_fed_rec.attribute9,
                l_fed_rec.attribute10,
                l_fed_rec.attribute11,
                l_fed_rec.attribute12,
                l_fed_rec.attribute13,
                l_fed_rec.attribute14,
                l_fed_rec.attribute15,
                l_fed_rec.attribute16,
                l_fed_rec.attribute17,
                l_fed_rec.attribute18,
                l_fed_rec.attribute19,
                l_fed_rec.attribute20,
                l_fed_rec.attribute21,
                l_fed_rec.attribute22,
                l_fed_rec.attribute23,
                l_fed_rec.attribute24,
                l_fed_rec.attribute25,
                l_fed_rec.attribute26,
                l_fed_rec.attribute27,
                l_fed_rec.attribute28,
                l_fed_rec.attribute29,
                l_fed_rec.attribute30,
                l_fed_rec.fed_information_category,
                l_fed_rec.fed_information1,
                l_fed_rec.fed_information2,
                l_fed_rec.fed_information3,
                l_fed_rec.fed_information4,
                l_fed_rec.fed_information5,
                l_fed_rec.fed_information6,
                l_fed_rec.fed_information7,
                l_fed_rec.fed_information8,
                l_fed_rec.fed_information9,
                l_fed_rec.fed_information10,
                l_fed_rec.fed_information11,
                l_fed_rec.fed_information12,
                l_fed_rec.fed_information13,
                l_fed_rec.fed_information14,
                l_fed_rec.fed_information15,
                l_fed_rec.fed_information16,
                l_fed_rec.fed_information17,
                l_fed_rec.fed_information18,
                l_fed_rec.fed_information19,
                l_fed_rec.fed_information20,
                l_fed_rec.fed_information21,
                l_fed_rec.fed_information22,
                l_fed_rec.fed_information23,
                l_fed_rec.fed_information24,
                l_fed_rec.fed_information25,
                l_fed_rec.fed_information26,
                l_fed_rec.fed_information27,
                l_fed_rec.fed_information28,
                l_fed_rec.fed_information29,
                l_fed_rec.fed_information30
                );
Line: 10007

                  /* Update the workers compensation for the old jurisdiction as of the
                     l_new_date */
                  l_step := 19;
Line: 10015

                                         p_mode                 => 'UPDATE');
Line: 10017

                  /* Update Insert the workers compensation for the old jurisdiction as of the
                     l_new_date */
                  l_step := 20;
Line: 10025

                                         p_mode                 => 'UPDATE_CHANGE_INSERT');
Line: 10032

               select p_effective_end_date +1
               into l_new_date
               from DUAL;
Line: 10048

               /* Update the Federal tax record as of the p_effective_end_date + 1 */

               l_step := 23;
Line: 10051

               update PAY_US_EMP_FED_TAX_RULES_F
               set    effective_end_date = p_effective_end_date
               where assignment_id        = p_assignment_id
               and   effective_start_date = l_eff_start_date
               and   effective_end_date   = l_eff_end_date;
Line: 10058

               insert into PAY_US_EMP_FED_TAX_RULES_F
               (emp_fed_tax_rule_id,
                effective_start_date,
                effective_end_date,
                assignment_id,
                sui_state_code,
                sui_jurisdiction_code,
                business_group_id,
                additional_wa_amount,
                filing_status_code,
                fit_override_amount,
                fit_override_rate,
                withholding_allowances,
                cumulative_taxation,
                eic_filing_status_code,
                fit_additional_tax,
                fit_exempt,
                futa_tax_exempt,
                medicare_tax_exempt,
                ss_tax_exempt,
                wage_exempt,
                statutory_employee,
                w2_filed_year,
                supp_tax_override_rate,
                excessive_wa_reject_date,
                object_version_number,
                attribute_category,
                attribute1,
                attribute2,
                attribute3,
                attribute4,
                attribute5,
                attribute6,
                attribute7,
                attribute8,
                attribute9,
                attribute10,
                attribute11,
                attribute12,
                attribute13,
                attribute14,
                attribute15,
                attribute16,
                attribute17,
                attribute18,
                attribute19,
                attribute20,
                attribute21,
                attribute22,
                attribute23,
                attribute24,
                attribute25,
                attribute26,
                attribute27,
                attribute28,
                attribute29,
                attribute30,
                fed_information_category,
                fed_information1,
                fed_information2,
                fed_information3,
                fed_information4,
                fed_information5,
                fed_information6,
                fed_information7,
                fed_information8,
                fed_information9,
                fed_information10,
                fed_information11,
                fed_information12,
                fed_information13,
                fed_information14,
                fed_information15,
                fed_information16,
                fed_information17,
                fed_information18,
                fed_information19,
                fed_information20,
                fed_information21,
                fed_information22,
                fed_information23,
                fed_information24,
                fed_information25,
                fed_information26,
                fed_information27,
                fed_information28,
                fed_information29,
                fed_information30  )
               values
               (l_fed_rec.emp_fed_tax_rule_id,
                l_new_date,
                l_fed_rec.effective_end_date,
                l_fed_rec.assignment_id,
                l_fed_rec.sui_state_code,
                l_fed_rec.sui_jurisdiction_code,
                l_fed_rec.business_group_id,
                l_fed_rec.additional_wa_amount,
                lpad(l_fed_rec.filing_status_code,2,'0'),
                l_fed_rec.fit_override_amount,
                l_fed_rec.fit_override_rate,
                l_fed_rec.withholding_allowances,
                l_fed_rec.cumulative_taxation,
                l_fed_rec.eic_filing_status_code,
                l_fed_rec.fit_additional_tax,
                l_fed_rec.fit_exempt,
                l_fed_rec.futa_tax_exempt,
                l_fed_rec.medicare_tax_exempt,
                l_fed_rec.ss_tax_exempt,
                l_fed_rec.wage_exempt,
                l_fed_rec.statutory_employee,
                l_fed_rec.w2_filed_year,
                l_fed_rec.supp_tax_override_rate,
                l_fed_rec.excessive_wa_reject_date,
                0,
                l_fed_rec.attribute_category,
                l_fed_rec.attribute1,
                l_fed_rec.attribute2,
                l_fed_rec.attribute3,
                l_fed_rec.attribute4,
                l_fed_rec.attribute5,
                l_fed_rec.attribute6,
                l_fed_rec.attribute7,
                l_fed_rec.attribute8,
                l_fed_rec.attribute9,
                l_fed_rec.attribute10,
                l_fed_rec.attribute11,
                l_fed_rec.attribute12,
                l_fed_rec.attribute13,
                l_fed_rec.attribute14,
                l_fed_rec.attribute15,
                l_fed_rec.attribute16,
                l_fed_rec.attribute17,
                l_fed_rec.attribute18,
                l_fed_rec.attribute19,
                l_fed_rec.attribute20,
                l_fed_rec.attribute21,
                l_fed_rec.attribute22,
                l_fed_rec.attribute23,
                l_fed_rec.attribute24,
                l_fed_rec.attribute25,
                l_fed_rec.attribute26,
                l_fed_rec.attribute27,
                l_fed_rec.attribute28,
                l_fed_rec.attribute29,
                l_fed_rec.attribute30,
                l_fed_rec.fed_information_category,
                l_fed_rec.fed_information1,
                l_fed_rec.fed_information2,
                l_fed_rec.fed_information3,
                l_fed_rec.fed_information4,
                l_fed_rec.fed_information5,
                l_fed_rec.fed_information6,
                l_fed_rec.fed_information7,
                l_fed_rec.fed_information8,
                l_fed_rec.fed_information9,
                l_fed_rec.fed_information10,
                l_fed_rec.fed_information11,
                l_fed_rec.fed_information12,
                l_fed_rec.fed_information13,
                l_fed_rec.fed_information14,
                l_fed_rec.fed_information15,
                l_fed_rec.fed_information16,
                l_fed_rec.fed_information17,
                l_fed_rec.fed_information18,
                l_fed_rec.fed_information19,
                l_fed_rec.fed_information20,
                l_fed_rec.fed_information21,
                l_fed_rec.fed_information22,
                l_fed_rec.fed_information23,
                l_fed_rec.fed_information24,
                l_fed_rec.fed_information25,
                l_fed_rec.fed_information26,
                l_fed_rec.fed_information27,
                l_fed_rec.fed_information28,
                l_fed_rec.fed_information29,
                l_fed_rec.fed_information30
                );
Line: 10237

                  /* Update the workers compensation for the old jurisdiction as of the
                     l_new_date */

                  l_step := 26;
Line: 10246

                                         p_mode                 => 'UPDATE');
Line: 10248

                  /* Update Insert the workers compensation for the old jurisdiction as of the
                     l_new_date */
                  l_step := 27;
Line: 10256

                                         p_mode                 => 'UPDATE_CHANGE_INSERT');
Line: 10261

               select p_effective_start_date -1
               into l_new_date
               from DUAL;
Line: 10281

               /* Update the Federal tax record as of the p_effective_start_date */

               l_step := 30;
Line: 10284

               update PAY_US_EMP_FED_TAX_RULES_F
               set    effective_end_date = l_new_date
               where assignment_id        = p_assignment_id
               and   effective_start_date = l_eff_start_date
               and   effective_end_date   = p_effective_end_date;
Line: 10291

               insert into PAY_US_EMP_FED_TAX_RULES_F
               (emp_fed_tax_rule_id,
                effective_start_date,
                effective_end_date,
                assignment_id,
                sui_state_code,
                sui_jurisdiction_code,
                business_group_id,
                additional_wa_amount,
                filing_status_code,
                fit_override_amount,
                fit_override_rate,
                withholding_allowances,
                cumulative_taxation,
                eic_filing_status_code,
                fit_additional_tax,
                fit_exempt,
                futa_tax_exempt,
                medicare_tax_exempt,
                ss_tax_exempt,
                wage_exempt,
                statutory_employee,
                w2_filed_year,
                supp_tax_override_rate,
                excessive_wa_reject_date,
                object_version_number,
                attribute_category,
                attribute1,
                attribute2,
                attribute3,
                attribute4,
                attribute5,
                attribute6,
                attribute7,
                attribute8,
                attribute9,
                attribute10,
                attribute11,
                attribute12,
                attribute13,
                attribute14,
                attribute15,
                attribute16,
                attribute17,
                attribute18,
                attribute19,
                attribute20,
                attribute21,
                attribute22,
                attribute23,
                attribute24,
                attribute25,
                attribute26,
                attribute27,
                attribute28,
                attribute29,
                attribute30,
                fed_information_category,
                fed_information1,
                fed_information2,
                fed_information3,
                fed_information4,
                fed_information5,
                fed_information6,
                fed_information7,
                fed_information8,
                fed_information9,
                fed_information10,
                fed_information11,
                fed_information12,
                fed_information13,
                fed_information14,
                fed_information15,
                fed_information16,
                fed_information17,
                fed_information18,
                fed_information19,
                fed_information20,
                fed_information21,
                fed_information22,
                fed_information23,
                fed_information24,
                fed_information25,
                fed_information26,
                fed_information27,
                fed_information28,
                fed_information29,
                fed_information30   )
               values
               (l_fed_rec.emp_fed_tax_rule_id,
                p_effective_start_date,
                p_effective_end_date,
                l_fed_rec.assignment_id,
                l_work_state_code,
                l_work_state_code || '-000-0000',
                l_fed_rec.business_group_id,
                l_fed_rec.additional_wa_amount,
                lpad(l_fed_rec.filing_status_code,2,'0'),
                l_fed_rec.fit_override_amount,
                l_fed_rec.fit_override_rate,
                l_fed_rec.withholding_allowances,
                l_fed_rec.cumulative_taxation,
                l_fed_rec.eic_filing_status_code,
                l_fed_rec.fit_additional_tax,
                l_fed_rec.fit_exempt,
                l_fed_rec.futa_tax_exempt,
                l_fed_rec.medicare_tax_exempt,
                l_fed_rec.ss_tax_exempt,
                l_fed_rec.wage_exempt,
                l_fed_rec.statutory_employee,
                l_fed_rec.w2_filed_year,
                l_fed_rec.supp_tax_override_rate,
                l_fed_rec.excessive_wa_reject_date,
                0,
                l_fed_rec.attribute_category,
                l_fed_rec.attribute1,
                l_fed_rec.attribute2,
                l_fed_rec.attribute3,
                l_fed_rec.attribute4,
                l_fed_rec.attribute5,
                l_fed_rec.attribute6,
                l_fed_rec.attribute7,
                l_fed_rec.attribute8,
                l_fed_rec.attribute9,
                l_fed_rec.attribute10,
                l_fed_rec.attribute11,
                l_fed_rec.attribute12,
                l_fed_rec.attribute13,
                l_fed_rec.attribute14,
                l_fed_rec.attribute15,
                l_fed_rec.attribute16,
                l_fed_rec.attribute17,
                l_fed_rec.attribute18,
                l_fed_rec.attribute19,
                l_fed_rec.attribute20,
                l_fed_rec.attribute21,
                l_fed_rec.attribute22,
                l_fed_rec.attribute23,
                l_fed_rec.attribute24,
                l_fed_rec.attribute25,
                l_fed_rec.attribute26,
                l_fed_rec.attribute27,
                l_fed_rec.attribute28,
                l_fed_rec.attribute29,
                l_fed_rec.attribute30,
                l_fed_rec.fed_information_category,
                l_fed_rec.fed_information1,
                l_fed_rec.fed_information2,
                l_fed_rec.fed_information3,
                l_fed_rec.fed_information4,
                l_fed_rec.fed_information5,
                l_fed_rec.fed_information6,
                l_fed_rec.fed_information7,
                l_fed_rec.fed_information8,
                l_fed_rec.fed_information9,
                l_fed_rec.fed_information10,
                l_fed_rec.fed_information11,
                l_fed_rec.fed_information12,
                l_fed_rec.fed_information13,
                l_fed_rec.fed_information14,
                l_fed_rec.fed_information15,
                l_fed_rec.fed_information16,
                l_fed_rec.fed_information17,
                l_fed_rec.fed_information18,
                l_fed_rec.fed_information19,
                l_fed_rec.fed_information20,
                l_fed_rec.fed_information21,
                l_fed_rec.fed_information22,
                l_fed_rec.fed_information23,
                l_fed_rec.fed_information24,
                l_fed_rec.fed_information25,
                l_fed_rec.fed_information26,
                l_fed_rec.fed_information27,
                l_fed_rec.fed_information28,
                l_fed_rec.fed_information29,
                l_fed_rec.fed_information30
                );
Line: 10470

               /* Update Insert the workers compensation for the new jurisdiction as of the
                  p_effective_start_date */
               l_step := 32;
Line: 10478

                                      p_mode                 => 'UPDATE_CHANGE_INSERT');
Line: 10513

    elsif p_mode = 'UPDATE' then
       l_validation_start_date := p_session_date;
Line: 10516

    elsif p_mode = 'UPDATE_CHANGE_INSERT' then
       l_validation_start_date := p_session_date;
Line: 10519

    elsif p_mode = 'UPDATE_OVERRIDE' then
       l_validation_start_date := p_session_date;
Line: 10555

       /* First update the tax rules records */

       update PAY_US_EMP_FED_TAX_RULES_F
       set    effective_start_date = p_new_start_date
       where  assignment_id = p_assignment_id
       and    l_ef_date between effective_start_date and effective_end_date;
Line: 10569

       update PAY_US_EMP_STATE_TAX_RULES_F
       set    effective_start_date = p_new_start_date
       where  assignment_id = p_assignment_id
       and    l_ef_date between effective_start_date and effective_end_date;
Line: 10581

       update PAY_US_EMP_COUNTY_TAX_RULES_F
       set    effective_start_date = p_new_start_date
       where  assignment_id = p_assignment_id
       and    l_ef_date between effective_start_date and effective_end_date;
Line: 10593

       update PAY_US_EMP_CITY_TAX_RULES_F
       set    effective_start_date = p_new_start_date
       where  assignment_id = p_assignment_id
       and    l_ef_date between effective_start_date and effective_end_date;
Line: 10605

       /* Next delete any orphaned rows */
       if p_new_start_date > p_default_date then
	       hr_utility.set_location(l_proc, 10);
Line: 10608

	       delete PAY_US_EMP_FED_TAX_RULES_F
	       where  assignment_id = p_assignment_id
	       and    p_new_start_date >  effective_start_date;
Line: 10612

	       delete PAY_US_EMP_STATE_TAX_RULES_F
	       where  assignment_id = p_assignment_id
	       and    p_new_start_date >  effective_start_date;
Line: 10616

	       delete PAY_US_EMP_COUNTY_TAX_RULES_F
	       where  assignment_id = p_assignment_id
	       and    p_new_start_date >  effective_start_date;
Line: 10620

	       delete PAY_US_EMP_CITY_TAX_RULES_F
	       where  assignment_id = p_assignment_id
	       and    p_new_start_date >  effective_start_date;
Line: 10669

       /* Now time to update the workers comp element entry */

             del_updt_wc_entry_for_dates (p_assignment_id  => p_assignment_id,
                                    p_session_date         => p_default_date,
                                    p_new_start_date       => p_s_start_date,
                                    p_new_end_date         => null,
                                    p_mode                 => 'U');
Line: 10678

       /* Finally update the vertex element entries and close the
          chapter */

             upd_del_entries(p_assignment_id  => p_assignment_id,
                             p_session_date   => p_default_date,
                             p_new_start_date => p_s_start_date,
                             p_new_end_date   => null,
                             p_mode           => 'U');
Line: 10754

  select pus.state_code,
         puc.county_code,
         pcn.city_code
  from   pay_us_city_names pcn,
         pay_us_counties puc,
         pay_us_states pus,
         per_addresses pa,
         per_assignments_f paf
  where  paf.assignment_id         = p_assignment_id
  and    p_effective_start_date between paf.effective_start_date and
                                paf.effective_end_date
  and    pa.person_id              = paf.person_id
  and    pa.primary_flag           = 'Y'
  and    p_effective_start_date between pa.date_from and
                                     nvl(pa.date_to,to_date('12/31/4712','MM/DD/YYYY'))
  and    pa.add_information17 is not null
  and    pa.add_information19 is not null
  and    pa.add_information18 is not null
  and pa.add_information17 = pus.state_abbrev
  and puc.state_code = pus.state_code
  and puc.county_name = pa.add_information19
  and pcn.state_code = puc.state_code
  and pcn.county_code = puc.county_code
  and pcn.city_name = add_information18;
Line: 10864

     /* Insert the default Federal tax Record */

     l_fed_tax_rule_id :=
       insert_def_fed_rec(p_assignment_id        => p_assignment_id,
                          p_effective_start_date => p_effective_start_date,
                          p_effective_end_date   => p_effective_end_date,
                          p_sui_state_code       => l_sui_state_code,
                          p_business_group_id    => p_business_group_id);
Line: 10872

     /* Insert the default State tax record */
     /* Create state record for works and if needed resident state rec also */
     l_state_tax_rule_id :=
     insert_def_state_rec(p_assignment_id        => p_assignment_id,
                          p_effective_start_date => p_effective_start_date,
                          p_effective_end_date   => p_effective_end_date,
                          p_state_code           => l_work_state_code,
                          p_business_group_id    => p_business_group_id,
                          p_percent_time         => 0);
Line: 10883

     insert_def_state_rec(p_assignment_id        => p_assignment_id,
                          p_effective_start_date => p_effective_start_date,
                          p_effective_end_date   => p_effective_end_date,
                          p_state_code           => l_work1_state_code,
                          p_business_group_id    => p_business_group_id,
                          p_percent_time         => 0);
Line: 10892

     insert_def_state_rec(p_assignment_id        => p_assignment_id,
                          p_effective_start_date => p_effective_start_date,
                          p_effective_end_date   => p_effective_end_date,
                          p_state_code           => l_work2_state_code,
                          p_business_group_id    => p_business_group_id,
                          p_percent_time         => 0);
Line: 10901

     insert_def_state_rec(p_assignment_id        => p_assignment_id,
                          p_effective_start_date => p_effective_start_date,
                          p_effective_end_date   => p_effective_end_date,
                          p_state_code           => l_work3_state_code,
                          p_business_group_id    => p_business_group_id,
                          p_percent_time         => 0);
Line: 10913

       insert_def_state_rec(p_assignment_id        => p_assignment_id,
                            p_effective_start_date => p_effective_start_date,
                            p_effective_end_date   => p_effective_end_date,
                            p_state_code           => l_res_state_code,
                            p_business_group_id    => p_business_group_id,
                            p_percent_time         => 0);
Line: 10926

       insert_def_state_rec(p_assignment_id        => p_assignment_id,
                            p_effective_start_date => p_effective_start_date,
                            p_effective_end_date   => p_effective_end_date,
                            p_state_code           => l_add_state_code,
                            p_business_group_id    => p_business_group_id,
                            p_percent_time         => 0);
Line: 10934

     /* Insert the default county tax record */
     l_county_tax_rule_id :=
     insert_def_county_rec(p_assignment_id      => p_assignment_id,
                           p_effective_start_date => p_effective_start_date,
                           p_effective_end_date   => p_effective_end_date,
                           p_state_code           => l_work_state_code,
                           p_county_code          => l_work_county_code,
                           p_business_group_id    => p_business_group_id,
                           p_percent_time         => 0);
Line: 10945

     insert_def_county_rec(p_assignment_id      => p_assignment_id,
                           p_effective_start_date => p_effective_start_date,
                           p_effective_end_date   => p_effective_end_date,
                           p_state_code           => l_work1_state_code,
                           p_county_code          => l_work1_county_code,
                           p_business_group_id    => p_business_group_id,
                           p_percent_time         => 0);
Line: 10955

     insert_def_county_rec(p_assignment_id      => p_assignment_id,
                           p_effective_start_date => p_effective_start_date,
                           p_effective_end_date   => p_effective_end_date,
                           p_state_code           => l_work2_state_code,
                           p_county_code          => l_work2_county_code,
                           p_business_group_id    => p_business_group_id,
                           p_percent_time         => 0);
Line: 10965

     insert_def_county_rec(p_assignment_id      => p_assignment_id,
                           p_effective_start_date => p_effective_start_date,
                           p_effective_end_date   => p_effective_end_date,
                           p_state_code           => l_work3_state_code,
                           p_county_code          => l_work3_county_code,
                           p_business_group_id    => p_business_group_id,
                           p_percent_time         => 0);
Line: 10977

        insert_def_county_rec(p_assignment_id      => p_assignment_id,
                              p_effective_start_date => p_effective_start_date,
                              p_effective_end_date   => p_effective_end_date,
                              p_state_code           => l_res_state_code,
                              p_county_code          => l_res_county_code,
                              p_business_group_id    => p_business_group_id,
                              p_percent_time         => 0);
Line: 10989

        insert_def_county_rec(p_assignment_id      => p_assignment_id,
                              p_effective_start_date => p_effective_start_date,
                              p_effective_end_date   => p_effective_end_date,
                              p_state_code           => l_add_state_code,
                              p_county_code          => l_add_county_code,
                              p_business_group_id    => p_business_group_id,
                              p_percent_time         => 0);
Line: 10998

     /* Insert the default city tax record */
     if l_loc_city = l_work_state_code ||'-'||l_work_county_code ||'-'||l_work_city_code
     then
        l_percent := 100;
Line: 11007

     insert_def_city_rec(p_assignment_id      => p_assignment_id,
                         p_effective_start_date => p_effective_start_date,
                         p_effective_end_date   => p_effective_end_date,
                         p_state_code           => l_work_state_code,
                         p_county_code          => l_work_county_code,
                         p_city_code            => l_work_city_code,
                         p_business_group_id    => p_business_group_id,
                         p_percent_time         => l_percent);
Line: 11025

        insert_def_city_rec(p_assignment_id      => p_assignment_id,
                         p_effective_start_date => p_effective_start_date,
                         p_effective_end_date   => p_effective_end_date,
                         p_state_code           => l_work1_state_code,
                         p_county_code          => l_work1_county_code,
                         p_city_code            => l_work1_city_code,
                         p_business_group_id    => p_business_group_id,
                         p_percent_time         => l_percent);
Line: 11044

        insert_def_city_rec(p_assignment_id      => p_assignment_id,
                         p_effective_start_date => p_effective_start_date,
                         p_effective_end_date   => p_effective_end_date,
                         p_state_code           => l_work2_state_code,
                         p_county_code          => l_work2_county_code,
                         p_city_code            => l_work2_city_code,
                         p_business_group_id    => p_business_group_id,
                         p_percent_time         => l_percent);
Line: 11063

        insert_def_city_rec(p_assignment_id      => p_assignment_id,
                         p_effective_start_date => p_effective_start_date,
                         p_effective_end_date   => p_effective_end_date,
                         p_state_code           => l_work3_state_code,
                         p_county_code          => l_work3_county_code,
                         p_city_code            => l_work3_city_code,
                         p_business_group_id    => p_business_group_id,
                         p_percent_time         => l_percent);
Line: 11077

         insert_def_city_rec(p_assignment_id      => p_assignment_id,
                             p_effective_start_date => p_effective_start_date,
                             p_effective_end_date   => p_effective_end_date,
                             p_state_code           => l_res_state_code,
                             p_county_code          => l_res_county_code,
                             p_city_code            => l_res_city_code,
                             p_business_group_id    => p_business_group_id,
                             p_percent_time         => 0);
Line: 11089

         insert_def_city_rec(p_assignment_id      => p_assignment_id,
                             p_effective_start_date => p_effective_start_date,
                             p_effective_end_date   => p_effective_end_date,
                             p_state_code           => l_add_state_code,
                             p_county_code          => l_add_county_code,
                             p_city_code            => l_add_city_code,
                             p_business_group_id    => p_business_group_id,
                             p_percent_time         => 0);
Line: 11111

  select 'Y'
  from   DUAL
  where  exists ( select null
                  from   PAY_US_EMP_FED_TAX_RULES_F ftr
                  where  ftr.assignment_id = p_assignment_id);
Line: 11120

     select max(effective_end_date)
     from   PER_ASSIGNMENTS_F paf
     where  paf.assignment_id = p_assignment_id;
Line: 11245

   select paf.assignment_id, min(paf.effective_start_date)
     from   per_addresses          pa,
            hr_soft_coding_keyflex hsck,
            per_assignments_f      paf
     where paf.person_id         = p_person
     and   paf.assignment_type   = 'E'
     and   paf.soft_coding_keyflex_id is not null
     and   paf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
     and   paf.location_id       is not null
     and   paf.payroll_id        is not null
     and   paf.pay_basis_id      is not null
     and   pa.person_id           = paf.person_id
    --  and   pa.primary_flag        = 'Y'
     and (paf.effective_start_date between
        pa.date_from and nvl(pa.date_to,to_date('12/31/4712','MM/DD/YYYY'))
     or pa.date_from between paf.effective_start_date and paf.effective_end_date)
group by assignment_id;
Line: 11268

     select paf.assignment_id, min(paf.effective_start_date)
     from   per_addresses          pa,
            hr_soft_coding_keyflex hsck,
            per_assignments_f      paf
     where paf.person_id         = p_person
     and   paf.assignment_type   = 'E'
     and   paf.soft_coding_keyflex_id is not null
     and   paf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
     and   paf.location_id       is not null
     and   paf.payroll_id        is not null
     and   paf.pay_basis_id      is not null
     and   pa.person_id           = paf.person_id
     and   pa.primary_flag        = 'Y'
--     and  (paf.effective_end_date = to_date('12/31/4712','MM/DD/YYYY')

--Added for bug 2535501 June 10, 2003 except for the group by
-- p_effective_start_date is the p_date_from in the Address table
     and  paf.effective_end_date >= p_effective_start_date

 group by assignment_id ;
Line: 11293

     select paf.assignment_id, min(paf.effective_start_date)
     from   per_addresses          pa,
            hr_soft_coding_keyflex hsck,
            per_assignments_f      paf
     where paf.person_id      = p_person
     and   paf.assignment_type = 'E'
     and   paf.soft_coding_keyflex_id is not null
     and   paf.effective_end_date = to_date('12/31/4712','MM/DD/YYYY')
     and   paf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
     and   paf.location_id is not null
     and   paf.payroll_id is not null
     and   paf.pay_basis_id is not null
     and   pa.person_id        = paf.person_id
     and   pa.primary_flag     = 'Y'
     group by assignment_id ;
Line: 11314

         select 1
         from   per_addresses          pa,
                per_people_f           ppf,
                hr_soft_coding_keyflex hsck,
                per_assignments_f      paf
         where  paf.assignment_id = p_assignment
         and    p_session_date between paf.effective_start_date
                and paf.effective_end_date
         and    paf.soft_coding_keyflex_id is not null
         and    paf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         and    paf.location_id is not null
         and    paf.payroll_id is not null
         and    paf.pay_basis_id is not null
         and    ppf.person_id    = paf.person_id
         and    pa.person_id     = ppf.person_id
         and    pa.primary_flag     = 'Y';
Line: 11335

         select min(paf.effective_start_date)
         from   per_addresses          pa,
                per_people_f           ppf,
                hr_soft_coding_keyflex hsck,
                per_assignments_f      paf
         where  paf.assignment_id = p_assignment
         and    paf.soft_coding_keyflex_id is not null
         and    paf.soft_coding_keyflex_id = hsck.soft_coding_keyflex_id
         and    paf.location_id is not null
         and    paf.payroll_id is not null
         and    paf.pay_basis_id is not null
         and    ppf.person_id    = paf.person_id
         and    pa.person_id     = ppf.person_id
         and    pa.primary_flag     = 'Y';
Line: 11351

         select min(effective_start_date)
         from   PAY_US_EMP_FED_TAX_RULES_F pef
         where  pef.assignment_id = p_assignment;
Line: 11356

         select effective_end_date
         from   PAY_US_EMP_FED_TAX_RULES_F pef
         where  pef.assignment_id = p_assignment
         and    pef.effective_start_date = p_default_date;
Line: 11362

 select  pus.state_code,
         puc.county_code,
         pcn.city_code
  from   pay_us_city_names pcn,
         pay_us_counties puc,
         pay_us_states pus,
         per_addresses pa,
         per_assignments_f paf
  where  paf.assignment_id         = p_assignment
  and    p_effective_start_date between paf.effective_start_date and
                                paf.effective_end_date
  and    pa.person_id              = paf.person_id
  and    pa.primary_flag           = 'Y'
  and    p_effective_start_date between pa.date_from and
                                     nvl(pa.date_to,to_date('12/31/4712','MM/DD/YYYY'))
  and    pa.add_information17 is not null
  and    pa.add_information19 is not null
  and    pa.add_information18 is not null
  and pa.add_information17 = pus.state_abbrev
  and puc.state_code = pus.state_code
  and puc.county_name = pa.add_information19
  and pcn.state_code = puc.state_code
  and pcn.county_code = puc.county_code
  and pcn.city_name = add_information18;
Line: 11393

 select  pus.state_code,
         puc.county_code,
         pcn.city_code
  from   pay_us_city_names pcn,
         pay_us_counties puc,
         pay_us_states pus,
         per_addresses pa,
         per_assignments_f paf
  where  paf.assignment_id         = p_assignment
  and    p_effective_start_date between paf.effective_start_date and
                                paf.effective_end_date
  and    pa.person_id              = paf.person_id
  and    pa.primary_flag           = 'Y'
  and    p_effective_start_date between pa.date_from and
                                     nvl(pa.date_to,to_date('12/31/4712','MM/DD/YYYY'))
  and    pa.add_information17 is not null
  and    pa.add_information19 is not null
  and    pa.add_information18 is not null
  and pa.add_information17 = pus.state_abbrev
  and puc.state_code = pus.state_code
  and puc.county_name = pa.add_information19
  and pcn.state_code = puc.state_code
  and pcn.county_code = puc.county_code
  and pcn.city_name = add_information18;
Line: 11424

 select hsck.segment18
 from   HR_SOFT_CODING_KEYFLEX hsck,
        PER_ASSIGNMENTS_F      paf
 where  paf.assignment_id = p_assignment
 and    p_session_dt between paf.effective_start_date
                     and paf.effective_end_date
 and    hsck.soft_coding_keyflex_id = paf.soft_coding_keyflex_id
 and    hsck.segment18 is not null;
Line: 11440

	select	min(paf.effective_start_date) - 1
	  from	per_assignments_f paf
	 where  paf.assignment_id = p_assignment_id
	   and	paf.effective_start_date > p_ef_date
	   and	paf.location_id <> p_loc_id;
Line: 11448

	select 	max(paf.effective_end_date) + 1
	  from 	per_assignments_f paf
	 where 	paf.assignment_id = p_assignment_id
	   and	paf.effective_end_date < p_ef_date
	   and 	paf.location_id <> p_loc_id;
Line: 11456

	select	*
	  from	pay_us_emp_fed_tax_rules_f ftr
	 where	ftr.assignment_id = p_assignment_id
	   and	ftr.effective_start_date <= p_max_date
	   and	ftr.effective_end_date >= p_min_date;
Line: 11463

	select 	pus.state_code
	  from 	pay_us_states pus,
		hr_locations hl
	 where	hl.location_id = p_location_id
	   and	pus.state_abbrev = nvl(loc_information17,region_2);
Line: 11858

	     -- call the procedure which does the update


         IF  hr_utility.chk_product_install(p_product =>'Oracle Payroll',
                                            p_legislation => 'US')
         then
                  if p_assignment_id is not null and p_session_date is not null
        		  then
                       set_sui_wage_base_override(p_assignment_id,
		                                          null,
									              p_session_date) ;
Line: 11900

           select p_effective_end_date + 1
           into   l_next_date
           from   SYS.DUAL;
Line: 11914

              /* First update the tax rules records */

              pull_tax_records(p_assignment_id     => l_assignment_id,
                               p_new_start_date    => p_effective_start_date,
                               p_default_date      => l_default_date);
Line: 11965

      elsif p_mode in ('UPDATE','UPDATE_OVERRIDE','UPDATE_CHANGE_INSERT') then

          /* Update the federal tax record and the worker's comp element entry for
             the new SUI Jurisdiction code and SUI state */

          change_wc_entry (p_assignment_id        => l_assignment_id,
                           p_effective_start_date => p_effective_start_date,
                           p_effective_end_date   => p_effective_end_date,
                           p_session_date         => p_session_date,
                           p_new_location_id      => l_loc_id,
                           p_mode                 => p_mode,
                           p_ret_code             => l_ret_code,
                           p_ret_text             => l_ret_text);
Line: 11979

         /* Change the %age records for the type of update in the
            location of the assignment */

         update_percentage (p_assignment_id        => l_assignment_id,
                            p_effective_start_date => p_effective_start_date,
                            p_effective_end_date   => p_effective_end_date,
                            p_session_date         => p_session_date,
                            p_new_location_id      => p_location_id,
                            p_business_group_id    => p_business_group_id,
                            p_mode                 => p_mode,
                            p_ret_code             => l_ret_code,
                            p_ret_text             => l_ret_text);
Line: 11992

      elsif p_mode = 'DELETE_NEXT_CHANGE' then

         /* In case of DELETE_NEXT_CHANGE, if the next location is different from
            the current location then the assignment screen will error it out.
            If the next location is same as the current location then :

                                  | Session Date
                             L1   v               L1
            Asg.      |--------------------|-------------------------
            Tax Rules                      |-------------------------
            Tax %age                       |-------------------------

            In this scenario, the assignment routine deletes the tax %age records
            but does not delete the tax rules records. So, our tax routine will have
            to delete the tax rules records.

                             | Session Date
                      T1     v  T2        T3       T4      T5
                          L1         L1       L1      L1       L1
            Asg.      |---------|---------|--------|-------|---------
            Tax Rules           |------------------------------------
            Tax %age            |------------------------------------

            Here, the tax rules and the tax %age records will have to be pulled forward to
            time T3.

                                       | Session Date
                          L1        L1 v     L1      L2       L3
            Asg.      |---------|---------|--------|-------|---------
            Tax Rules           |------------------------------------
            Tax %age            |------------------|-------|---------

            In the above scenario, the assignment routine will only delete the next
            assignment record and will not do anything to the tax %age records, which
            is fine and that's how it should be.

                                                        | Session Date
                          L1        L1       L1      L3 v     L3
            Asg.      |---------|---------|--------|-------|---------
            Tax Rules           |------------------------------------
            Tax %age            |------------------|-----------------

            Here also, we do not need to do anything as the %age records do not get affected
            by the deletion of the assignment record.  */

            open csr_get_end_date(p_assignment_id,l_default_date);
Line: 12061

                /* Delete records from PAY_US_EMP_CITY_TAX_RULES_F */

                delete PAY_US_EMP_CITY_TAX_RULES_F
                where assignment_id = p_assignment_id
                and business_group_id = p_business_group_id;
Line: 12067

                /* Delete records from PAY_US_EMP_COUNTY_TAX_RULES_F */

                delete PAY_US_EMP_COUNTY_TAX_RULES_F
                where assignment_id = p_assignment_id
                and business_group_id = p_business_group_id;
Line: 12073

                /* Delete records from PAY_US_EMP_STATE_TAX_RULES_F */

                delete PAY_US_EMP_STATE_TAX_RULES_F
                where assignment_id = p_assignment_id
                and business_group_id = p_business_group_id;
Line: 12079

                /* Delete records from PAY_US_EMP_FED_TAX_RULES_F */

                delete PAY_US_EMP_FED_TAX_RULES_F
                where assignment_id = p_assignment_id
                and business_group_id = p_business_group_id;
Line: 12087

                 select l_default_date + 1
                 into l_next_start_date
                 from DUAL;
Line: 12098

         /* Delete the next set of %age records */
            upd_del_entries(p_assignment_id  => l_assignment_id,
                            p_session_date   => p_session_date,
                            p_new_start_date => null,
                            p_new_end_date   => null,
                            p_mode           => 'F');
Line: 12105

      end if; /* for correction/update/delete */
Line: 12181

     /* we update all records that partially fall within that date range */

     for tax_rec in csr_fed_tax_loc(p_assignment_id,l_loc_min_date,l_loc_max_date) loop

	if tax_rec.effective_start_date < l_loc_min_date then

	/* we go from:
		ASG --------------|-------L1-----------------
		TAX ----------|------------------------------
	   to:
		ASG --------------|-------L1-----------------
		TAX ----------|---|--------------------------
	*/
  	        hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',120);
Line: 12196

		/* insert the middle record */
		insert_fed_tax_row(
     			tax_rec.emp_fed_tax_rule_id,
      			l_loc_min_date,
      			tax_rec.effective_end_date,
      			tax_rec.assignment_id,
      			l_loc_state_code,
      			l_loc_state_code || '-000-0000',
      			tax_rec.business_group_id,
      			tax_rec.additional_wa_amount,
      			tax_rec.filing_status_code,
      			tax_rec.fit_override_amount,
      			tax_rec.fit_override_rate,
      			tax_rec.withholding_allowances,
      			tax_rec.cumulative_taxation,
      			tax_rec.eic_filing_status_code,
      			tax_rec.fit_additional_tax,
      			tax_rec.fit_exempt,
      			tax_rec.futa_tax_exempt,
      			tax_rec.medicare_tax_exempt,
      			tax_rec.ss_tax_exempt,
      			tax_rec.wage_exempt,
      			tax_rec.statutory_employee,
      			tax_rec.w2_filed_year,
      			tax_rec.supp_tax_override_rate,
      			tax_rec.excessive_wa_reject_date,
                tax_rec.attribute_category,
                tax_rec.attribute1,
                tax_rec.attribute2,
                tax_rec.attribute3,
                tax_rec.attribute4,
                tax_rec.attribute5,
                tax_rec.attribute6,
                tax_rec.attribute7,
                tax_rec.attribute8,
                tax_rec.attribute9,
                tax_rec.attribute10,
                tax_rec.attribute11,
                tax_rec.attribute12,
                tax_rec.attribute13,
                tax_rec.attribute14,
                tax_rec.attribute15,
                tax_rec.attribute16,
                tax_rec.attribute17,
                tax_rec.attribute18,
                tax_rec.attribute19,
                tax_rec.attribute20,
                tax_rec.attribute21,
                tax_rec.attribute22,
                tax_rec.attribute23,
                tax_rec.attribute24,
                tax_rec.attribute25,
                tax_rec.attribute26,
                tax_rec.attribute27,
                tax_rec.attribute28,
                tax_rec.attribute29,
                tax_rec.attribute30,
                tax_rec.fed_information_category,
                tax_rec.fed_information1,
                tax_rec.fed_information2,
                tax_rec.fed_information3,
                tax_rec.fed_information4,
                tax_rec.fed_information5,
                tax_rec.fed_information6,
                tax_rec.fed_information7,
                tax_rec.fed_information8,
                tax_rec.fed_information9,
                tax_rec.fed_information10,
                tax_rec.fed_information11,
                tax_rec.fed_information12,
                tax_rec.fed_information13,
                tax_rec.fed_information14,
                tax_rec.fed_information15,
                tax_rec.fed_information16,
                tax_rec.fed_information17,
                tax_rec.fed_information18,
                tax_rec.fed_information19,
                tax_rec.fed_information20,
                tax_rec.fed_information21,
                tax_rec.fed_information22,
                tax_rec.fed_information23,
                tax_rec.fed_information24,
                tax_rec.fed_information25,
                tax_rec.fed_information26,
                tax_rec.fed_information27,
                tax_rec.fed_information28,
                tax_rec.fed_information29,
                tax_rec.fed_information30,
			'UPDATE');
Line: 12287

	/* here we simply update the sui codes */

  		hr_utility.set_location('pay_us_emp_dt_tax_rules.validate_default',125);
Line: 12291

		update pay_us_emp_fed_tax_rules_f
		   set sui_state_code = l_loc_state_code,
		       sui_jurisdiction_code = l_loc_state_code || '-000-0000'
 		 where emp_fed_tax_rule_id = tax_rec.emp_fed_tax_rule_id
		   and effective_start_date = tax_rec.effective_start_date;
Line: 12310

		insert_fed_tax_row(
	     		tax_rec.emp_fed_tax_rule_id,
      			l_loc_max_date + 1,
      			tax_rec.effective_end_date,
      			tax_rec.assignment_id,
      			tax_rec.sui_state_code,
      			tax_rec.sui_jurisdiction_code,
      			tax_rec.business_group_id,
      			tax_rec.additional_wa_amount,
      			tax_rec.filing_status_code,
      			tax_rec.fit_override_amount,
      			tax_rec.fit_override_rate,
      			tax_rec.withholding_allowances,
      			tax_rec.cumulative_taxation,
      			tax_rec.eic_filing_status_code,
      			tax_rec.fit_additional_tax,
      			tax_rec.fit_exempt,
      			tax_rec.futa_tax_exempt,
      			tax_rec.medicare_tax_exempt,
      			tax_rec.ss_tax_exempt,
      			tax_rec.wage_exempt,
      			tax_rec.statutory_employee,
      			tax_rec.w2_filed_year,
      			tax_rec.supp_tax_override_rate,
      			tax_rec.excessive_wa_reject_date,
                tax_rec.attribute_category,
                tax_rec.attribute1,
                tax_rec.attribute2,
                tax_rec.attribute3,
                tax_rec.attribute4,
                tax_rec.attribute5,
                tax_rec.attribute6,
                tax_rec.attribute7,
                tax_rec.attribute8,
                tax_rec.attribute9,
                tax_rec.attribute10,
                tax_rec.attribute11,
                tax_rec.attribute12,
                tax_rec.attribute13,
                tax_rec.attribute14,
                tax_rec.attribute15,
                tax_rec.attribute16,
                tax_rec.attribute17,
                tax_rec.attribute18,
                tax_rec.attribute19,
                tax_rec.attribute20,
                tax_rec.attribute21,
                tax_rec.attribute22,
                tax_rec.attribute23,
                tax_rec.attribute24,
                tax_rec.attribute25,
                tax_rec.attribute26,
                tax_rec.attribute27,
                tax_rec.attribute28,
                tax_rec.attribute29,
                tax_rec.attribute30,
                tax_rec.fed_information_category,
                tax_rec.fed_information1,
                tax_rec.fed_information2,
                tax_rec.fed_information3,
                tax_rec.fed_information4,
                tax_rec.fed_information5,
                tax_rec.fed_information6,
                tax_rec.fed_information7,
                tax_rec.fed_information8,
                tax_rec.fed_information9,
                tax_rec.fed_information10,
                tax_rec.fed_information11,
                tax_rec.fed_information12,
                tax_rec.fed_information13,
                tax_rec.fed_information14,
                tax_rec.fed_information15,
                tax_rec.fed_information16,
                tax_rec.fed_information17,
                tax_rec.fed_information18,
                tax_rec.fed_information19,
                tax_rec.fed_information20,
                tax_rec.fed_information21,
                tax_rec.fed_information22,
                tax_rec.fed_information23,
                tax_rec.fed_information24,
                tax_rec.fed_information25,
                tax_rec.fed_information26,
                tax_rec.fed_information27,
                tax_rec.fed_information28,
                tax_rec.fed_information29,
                tax_rec.fed_information30,
			'UPDATE');
Line: 12438

            select pei_information1,pei_information2
            from per_people_extra_info where person_id=(select distinct person_id from per_all_assignments_f
                                                    where assignment_id=p_assignment_id
                                                    and primary_flag='Y')
                          and information_type like 'PER_US_ADDITIONAL_DETAILS'
                          and pei_information_category like 'PER_US_ADDITIONAL_DETAILS'
			  and (pei_information1 = 'Y'
                or pei_information2 = 'Y');
Line: 12449

select information_type,pei_information_category,pei_information5,pei_information9
from per_people_extra_info where person_id=(select distinct person_id from per_all_assignments_f
                                                    where assignment_id=p_assignment_id
                                                    and primary_flag='Y')
                           and information_type like 'PER_US_ADDITIONAL_DETAILS'
                           and pei_information_category like 'PER_US_ADDITIONAL_DETAILS'
                           and pei_information5 like 'N'
                           and pei_information9 not in ('US');