433: IF (l_asg_start_date <= l_prev_year_start_date and l_asg_end_date >= l_prev_year_end_date )
434: or (l_asg_end_date < l_prev_year_end_date and TO_CHAR(l_asg_end_date,'YYYY') = TO_CHAR(l_prev_year_end_date,'YYYY') )THEN
435:
436:
437: /* Set previous year's taxable income for this assignment to be the sum of balances Standard Taxable Income
438: Special Taxable Income, Retro Standard Taxable Income, Retro Standard Taxable Income Current Quarter
439: and Retro Special Taxable Income for the whole of the previous year */
440:
441: l_prev_year_income:= l_std_tax_income + l_spl_tax_income + l_retrostd_tax_income +
434: or (l_asg_end_date < l_prev_year_end_date and TO_CHAR(l_asg_end_date,'YYYY') = TO_CHAR(l_prev_year_end_date,'YYYY') )THEN
435:
436:
437: /* Set previous year's taxable income for this assignment to be the sum of balances Standard Taxable Income
438: Special Taxable Income, Retro Standard Taxable Income, Retro Standard Taxable Income Current Quarter
439: and Retro Special Taxable Income for the whole of the previous year */
440:
441: l_prev_year_income:= l_std_tax_income + l_spl_tax_income + l_retrostd_tax_income +
442: l_retrostdcurrq_tax_income + l_retrospl_tax_income;
454:
455: --if g_debug then
456: hr_utility.set_location('Inside GET_PREV_YEAR_TAX_INCOME: l_prev_year_income'||l_prev_year_income,2900);
457: --end if;
458: /* Add together the values of balances Standard Taxable Income, Special Taxable
459: Income, Retro Standard Taxable Income, Retro Standard Taxable Income
460: Current Quarter and Retro Special Taxable Income for the previous year.*/
461:
462: l_prev_year_income:= l_std_tax_income + l_spl_tax_income + l_retrostd_tax_income +
455: --if g_debug then
456: hr_utility.set_location('Inside GET_PREV_YEAR_TAX_INCOME: l_prev_year_income'||l_prev_year_income,2900);
457: --end if;
458: /* Add together the values of balances Standard Taxable Income, Special Taxable
459: Income, Retro Standard Taxable Income, Retro Standard Taxable Income
460: Current Quarter and Retro Special Taxable Income for the previous year.*/
461:
462: l_prev_year_income:= l_std_tax_income + l_spl_tax_income + l_retrostd_tax_income +
463: l_retrostdcurrq_tax_income + l_retrospl_tax_income;
543: --if g_debug then
544: hr_utility.set_location('Inside GET_PREV_YEAR_TAX_INCOME: l_total_week_days'||l_total_week_days,3900);
545: --end if;
546:
547: /*Add together the balances Standard Taxable Income, Special Taxable
548: Income, Retro Standard Taxable Income, Retro Standard Taxable Income
549: Current Quarter and Retro Special Taxable Income for this first period.*/
550:
551: l_first_period_income:= l_std_tax_income_ptd + l_spl_tax_income_ptd + l_retrostd_tax_income_ptd +
544: hr_utility.set_location('Inside GET_PREV_YEAR_TAX_INCOME: l_total_week_days'||l_total_week_days,3900);
545: --end if;
546:
547: /*Add together the balances Standard Taxable Income, Special Taxable
548: Income, Retro Standard Taxable Income, Retro Standard Taxable Income
549: Current Quarter and Retro Special Taxable Income for this first period.*/
550:
551: l_first_period_income:= l_std_tax_income_ptd + l_spl_tax_income_ptd + l_retrostd_tax_income_ptd +
552: l_retrostdcurrq_tax_income_ptd + l_retrospl_tax_income_ptd;
577: --if g_debug then
578: hr_utility.set_location('Inside GET_PREV_YEAR_TAX_INCOME: l_first_period_income'||l_first_period_income,4300);
579: --end if;
580:
581: /*Add together the balances Standard Taxable Income, Special Taxable
582: Income, Retro Standard Taxable Income, Retro Standard Taxable Income
583: Current Quarter and Retro Special Taxable Income for rest of the previous year
584: (excluding the first period), and subtract any value of balance Holiday Allowance
585: Payment for the rest of the previous year (excluding the first period). */
578: hr_utility.set_location('Inside GET_PREV_YEAR_TAX_INCOME: l_first_period_income'||l_first_period_income,4300);
579: --end if;
580:
581: /*Add together the balances Standard Taxable Income, Special Taxable
582: Income, Retro Standard Taxable Income, Retro Standard Taxable Income
583: Current Quarter and Retro Special Taxable Income for rest of the previous year
584: (excluding the first period), and subtract any value of balance Holiday Allowance
585: Payment for the rest of the previous year (excluding the first period). */
586: --Bug 3479044
854:
855: Begin
856:
857: --Get the Defined Balance Id's of the required balances
858: l_std_tax_dbalid :=pay_nl_general.get_defined_balance_id('STANDARD_TAXABLE_INCOME_ASG_YTD');
859: l_spl_tax_dbalid :=pay_nl_general.get_defined_balance_id('SPECIAL_TAXABLE_INCOME_ASG_YTD');
860: l_retrostd_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_ASG_YTD');
861: l_retrostdcurrq_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_CURRENT_QUARTER_ASG_YTD');
862: l_retrospl_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_SPECIAL_TAXABLE_INCOME_ASG_YTD');
856:
857: --Get the Defined Balance Id's of the required balances
858: l_std_tax_dbalid :=pay_nl_general.get_defined_balance_id('STANDARD_TAXABLE_INCOME_ASG_YTD');
859: l_spl_tax_dbalid :=pay_nl_general.get_defined_balance_id('SPECIAL_TAXABLE_INCOME_ASG_YTD');
860: l_retrostd_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_ASG_YTD');
861: l_retrostdcurrq_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_CURRENT_QUARTER_ASG_YTD');
862: l_retrospl_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_SPECIAL_TAXABLE_INCOME_ASG_YTD');
863:
864: l_hol_allow_pay_dbalid :=pay_nl_general.get_defined_balance_id('HOLIDAY_ALLOWANCE_PAYMENT_ASG_YTD');
857: --Get the Defined Balance Id's of the required balances
858: l_std_tax_dbalid :=pay_nl_general.get_defined_balance_id('STANDARD_TAXABLE_INCOME_ASG_YTD');
859: l_spl_tax_dbalid :=pay_nl_general.get_defined_balance_id('SPECIAL_TAXABLE_INCOME_ASG_YTD');
860: l_retrostd_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_ASG_YTD');
861: l_retrostdcurrq_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_CURRENT_QUARTER_ASG_YTD');
862: l_retrospl_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_SPECIAL_TAXABLE_INCOME_ASG_YTD');
863:
864: l_hol_allow_pay_dbalid :=pay_nl_general.get_defined_balance_id('HOLIDAY_ALLOWANCE_PAYMENT_ASG_YTD');
865: l_hol_allow_tax_dbalid :=pay_nl_general.get_defined_balance_id('HOLIDAY_ALLOWANCE_TAXABLE_INCOME_ASG_YTD');
865: l_hol_allow_tax_dbalid :=pay_nl_general.get_defined_balance_id('HOLIDAY_ALLOWANCE_TAXABLE_INCOME_ASG_YTD');
866: l_retrohol_allow_tax_dbalid :=pay_nl_general.get_defined_balance_id('RETRO_HOLIDAY_ALLOWANCE_TAXABLE_INCOME_ASG_YTD');
867:
868:
869: l_std_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('STANDARD_TAXABLE_INCOME_ASG_PTD');
870: l_spl_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('SPECIAL_TAXABLE_INCOME_ASG_PTD');
871: l_retrostd_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_ASG_PTD');
872: l_retrostdcurrq_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_CURRENT_QUARTER_ASG_PTD');
873: l_retrospl_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_SPECIAL_TAXABLE_INCOME_ASG_PTD');
867:
868:
869: l_std_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('STANDARD_TAXABLE_INCOME_ASG_PTD');
870: l_spl_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('SPECIAL_TAXABLE_INCOME_ASG_PTD');
871: l_retrostd_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_ASG_PTD');
872: l_retrostdcurrq_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_CURRENT_QUARTER_ASG_PTD');
873: l_retrospl_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_SPECIAL_TAXABLE_INCOME_ASG_PTD');
874:
875:
868:
869: l_std_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('STANDARD_TAXABLE_INCOME_ASG_PTD');
870: l_spl_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('SPECIAL_TAXABLE_INCOME_ASG_PTD');
871: l_retrostd_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_ASG_PTD');
872: l_retrostdcurrq_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_STANDARD_TAXABLE_INCOME_CURRENT_QUARTER_ASG_PTD');
873: l_retrospl_tax_dbalid_ptd :=pay_nl_general.get_defined_balance_id('RETRO_SPECIAL_TAXABLE_INCOME_ASG_PTD');
874:
875:
876: l_hol_allow_pay_dbalid_ptd :=pay_nl_general.get_defined_balance_id('HOLIDAY_ALLOWANCE_PAYMENT_ASG_PTD');