313: );
314:
315: hr_api.validate_bus_grp_id
316: (p_business_group_id => p_business_group_id
317: ,p_associated_column1 => pay_psd_shd.g_tab_nam||'.BUSINESS_GROUP_ID');
318:
319: hr_multi_message.end_validation_set;
320:
321: hr_utility.set_location(' Leaving:'|| l_proc, 20);
582: -- a) The current g_old_rec is current and
583: -- b) Employee Social Security Information has changed
584: -- c) A record is being inserted
585: --
586: l_api_updating := pay_psd_shd.api_updating
587: (p_sii_details_id => p_sii_details_id
588: ,p_effective_date => p_effective_date
589: ,p_object_version_number => p_object_version_number);
590:
587: (p_sii_details_id => p_sii_details_id
588: ,p_effective_date => p_effective_date
589: ,p_object_version_number => p_object_version_number);
590:
591: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.emp_social_security_info,
592: hr_api.g_varchar2)
593: <> nvl(p_emp_social_security_info,hr_api.g_varchar2)) or
594: (NOT l_api_updating)) then
595:
691: -- a) The current g_old_rec is current and
692: -- b) Old Age Contribution value has changed
693: -- c) A record is being inserted
694: --
695: l_api_updating := pay_psd_shd.api_updating
696: (p_sii_details_id => p_sii_details_id
697: ,p_effective_date => p_effective_date
698: ,p_object_version_number => p_object_version_number);
699:
696: (p_sii_details_id => p_sii_details_id
697: ,p_effective_date => p_effective_date
698: ,p_object_version_number => p_object_version_number);
699:
700: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.old_age_contribution,
701: hr_api.g_varchar2)
702: <> nvl(p_old_age_contribution,hr_api.g_varchar2)) or
703: (NOT l_api_updating)) then
704:
814: -- a) The current g_old_rec is current and
815: -- b) Pension Contribution value has changed
816: -- c) A record is being inserted
817: --
818: l_api_updating := pay_psd_shd.api_updating
819: (p_sii_details_id => p_sii_details_id
820: ,p_effective_date => p_effective_date
821: ,p_object_version_number => p_object_version_number);
822:
819: (p_sii_details_id => p_sii_details_id
820: ,p_effective_date => p_effective_date
821: ,p_object_version_number => p_object_version_number);
822:
823: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.pension_contribution,
824: hr_api.g_varchar2)
825: <> nvl(p_pension_contribution,hr_api.g_varchar2)) or
826: (NOT l_api_updating)) then
827:
938: -- a) The current g_old_rec is current and
939: -- b) Sickness Contribution value has changed
940: -- c) A record is being inserted
941: --
942: l_api_updating := pay_psd_shd.api_updating
943: (p_sii_details_id => p_sii_details_id
944: ,p_effective_date => p_effective_date
945: ,p_object_version_number => p_object_version_number);
946:
943: (p_sii_details_id => p_sii_details_id
944: ,p_effective_date => p_effective_date
945: ,p_object_version_number => p_object_version_number);
946:
947: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.sickness_contribution,
948: hr_api.g_varchar2)
949: <> nvl(p_sickness_contribution,hr_api.g_varchar2)) or
950: (NOT l_api_updating)) then
951:
1062: -- a) The current g_old_rec is current and
1063: -- b) Work Injury Contribution value has changed
1064: -- c) A record is being inserted
1065: --
1066: l_api_updating := pay_psd_shd.api_updating
1067: (p_sii_details_id => p_sii_details_id
1068: ,p_effective_date => p_effective_date
1069: ,p_object_version_number => p_object_version_number);
1070:
1067: (p_sii_details_id => p_sii_details_id
1068: ,p_effective_date => p_effective_date
1069: ,p_object_version_number => p_object_version_number);
1070:
1071: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.work_injury_contribution,
1072: hr_api.g_varchar2)
1073: <> nvl(p_work_injury_contribution,hr_api.g_varchar2)) or
1074: (NOT l_api_updating)) then
1075:
1186: -- a) The current g_old_rec is current and
1187: -- b) Labor Contribution value has changed
1188: -- c) A record is being inserted
1189: --
1190: l_api_updating := pay_psd_shd.api_updating
1191: (p_sii_details_id => p_sii_details_id
1192: ,p_effective_date => p_effective_date
1193: ,p_object_version_number => p_object_version_number);
1194:
1191: (p_sii_details_id => p_sii_details_id
1192: ,p_effective_date => p_effective_date
1193: ,p_object_version_number => p_object_version_number);
1194:
1195: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.labor_contribution,
1196: hr_api.g_varchar2)
1197: <> nvl(p_labor_contribution,hr_api.g_varchar2)) or
1198: (NOT l_api_updating)) then
1199:
1309: -- a) The current g_old_rec is current and
1310: -- b) Health Contribution value has changed
1311: -- c) A record is being inserted
1312: --
1313: l_api_updating := pay_psd_shd.api_updating
1314: (p_sii_details_id => p_sii_details_id
1315: ,p_effective_date => p_effective_date
1316: ,p_object_version_number => p_object_version_number);
1317:
1314: (p_sii_details_id => p_sii_details_id
1315: ,p_effective_date => p_effective_date
1316: ,p_object_version_number => p_object_version_number);
1317:
1318: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.health_contribution,
1319: hr_api.g_varchar2)
1320: <> nvl(p_health_contribution,hr_api.g_varchar2)) or
1321: (NOT l_api_updating)) then
1322:
1434: -- a) The current g_old_rec is current and
1435: -- b) Unemployment Contribution value has changed
1436: -- c) A record is being inserted
1437: --
1438: l_api_updating := pay_psd_shd.api_updating
1439: (p_sii_details_id => p_sii_details_id
1440: ,p_effective_date => p_effective_date
1441: ,p_object_version_number => p_object_version_number);
1442:
1439: (p_sii_details_id => p_sii_details_id
1440: ,p_effective_date => p_effective_date
1441: ,p_object_version_number => p_object_version_number);
1442:
1443: if ((l_api_updating and nvl(pay_psd_shd.g_old_rec.unemployment_contribution,
1444: hr_api.g_varchar2)
1445: <> nvl(p_unemployment_contribution,hr_api.g_varchar2)) or
1446: (NOT l_api_updating)) then
1447:
1559: -- a) The current g_old_rec is current and
1560: -- b) Old Age Contribution End Reason value has changed
1561:
1562: --
1563: l_api_updating := pay_psd_shd.api_updating
1564: (p_sii_details_id => p_sii_details_id
1565: ,p_effective_date => p_effective_date
1566: ,p_object_version_number => p_object_version_number);
1567:
1568: -- If the Contribution type has changed from Mandatory/Voluntary to No Contribution
1569: -- then the Contribution End Reason is mandatory
1570:
1571: if p_old_age_contribution = 'N' and
1572: nvl(pay_psd_shd.g_old_rec.old_age_contribution,'N') <> 'N' then
1573: if p_old_age_cont_end_reason is null then
1574: hr_utility.set_message(801,'PAY_375844_CONT_END_REQD');
1575: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','OLD_AGE_CONTRIBUTION'));
1576: hr_utility.raise_error;
1576: hr_utility.raise_error;
1577: end if;
1578: end if;
1579:
1580: if (l_api_updating and nvl(pay_psd_shd.g_old_rec.old_age_cont_end_reason,
1581: hr_api.g_varchar2)
1582: <> nvl(p_old_age_cont_end_reason,hr_api.g_varchar2)) then
1583: --
1584: -- If Old Age Contribution End Reason is not null then
1618: -- OLD_AGE_CONT_END_REASON has
1619: -- been changed from NULL to a not NULL value, then an error should be raised
1620:
1621: if p_old_age_contribution = 'N' and
1622: pay_psd_shd.g_old_rec.old_age_contribution = 'N' then
1623: hr_utility.set_message(801,'PAY_375847_INCORREC_END_REASON');
1624: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','OLD_AGE_CONTRIBUTION'));
1625: hr_utility.raise_error;
1626: end if;
1714: -- a) The current g_old_rec is current and
1715: -- b) Pension Contribution End Reason value has changed
1716:
1717: --
1718: l_api_updating := pay_psd_shd.api_updating
1719: (p_sii_details_id => p_sii_details_id
1720: ,p_effective_date => p_effective_date
1721: ,p_object_version_number => p_object_version_number);
1722:
1723: -- If the Contribution type has changed from Mandatory/Voluntary to No Contribution
1724: -- then the Contribution End Reason is mandatory
1725:
1726: if p_pension_contribution = 'N' and
1727: nvl(pay_psd_shd.g_old_rec.pension_contribution,'N') <> 'N' then
1728: if p_pension_cont_end_reason is null then
1729: hr_utility.set_message(801,'PAY_375844_CONT_END_REQD');
1730: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','PENSION_CONTRIBUTION'));
1731: hr_utility.raise_error;
1731: hr_utility.raise_error;
1732: end if;
1733: end if;
1734:
1735: if (l_api_updating and nvl(pay_psd_shd.g_old_rec.pension_cont_end_reason,
1736: hr_api.g_varchar2)
1737: <> nvl(p_pension_cont_end_reason,hr_api.g_varchar2)) then
1738: --
1739: -- If Pension Contribution End Reason is not null then
1773: -- PENSION_CONT_END_REASON has
1774: -- been changed from NULL to a not NULL value, then an error should be raised
1775:
1776: if p_pension_contribution = 'N' and
1777: pay_psd_shd.g_old_rec.pension_contribution = 'N' then
1778: hr_utility.set_message(801,'PAY_375847_INCORREC_END_REASON');
1779: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','PENSION_CONTRIBUTION'));
1780: end if;
1781:
1867: -- a) The current g_old_rec is current and
1868: -- b) Sickness Contribution End Reason value has changed
1869:
1870: --
1871: l_api_updating := pay_psd_shd.api_updating
1872: (p_sii_details_id => p_sii_details_id
1873: ,p_effective_date => p_effective_date
1874: ,p_object_version_number => p_object_version_number);
1875:
1876: -- If the Contribution type has changed from Mandatory/Voluntary to No Contribution
1877: -- then the Contribution End Reason is mandatory
1878:
1879: if p_sickness_contribution = 'N' and
1880: nvl(pay_psd_shd.g_old_rec.sickness_contribution,'N') <> 'N' then
1881: if p_sickness_cont_end_reason is null then
1882: hr_utility.set_message(801,'PAY_375844_CONT_END_REQD');
1883: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','SICKNESS_CONTRIBUTION'));
1884: hr_utility.raise_error;
1884: hr_utility.raise_error;
1885: end if;
1886: end if;
1887:
1888: if (l_api_updating and nvl(pay_psd_shd.g_old_rec.sickness_cont_end_reason,
1889: hr_api.g_varchar2)
1890: <> nvl(p_sickness_cont_end_reason,hr_api.g_varchar2)) then
1891: --
1892: -- If Sickness Contribution End Reason is not null then
1926: -- SICKNESS_CONT_END_REASON has
1927: -- been changed from NULL to a not NULL value, then an error should be raised
1928:
1929: if p_sickness_contribution = 'N' and
1930: pay_psd_shd.g_old_rec.sickness_contribution = 'N' then
1931: hr_utility.set_message(801,'PAY_375847_INCORREC_END_REASON');
1932: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','SICKNESS_CONTRIBUTION'));
1933: end if;
1934:
2020: -- a) The current g_old_rec is current and
2021: -- b) Work Injury Contribution End Reason value has changed
2022:
2023: --
2024: l_api_updating := pay_psd_shd.api_updating
2025: (p_sii_details_id => p_sii_details_id
2026: ,p_effective_date => p_effective_date
2027: ,p_object_version_number => p_object_version_number);
2028:
2029: -- If the Contribution type has changed from Mandatory/Voluntary to No Contribution
2030: -- then the Contribution End Reason is mandatory
2031:
2032: if p_work_injury_contribution = 'N' and
2033: nvl(pay_psd_shd.g_old_rec.work_injury_contribution,'N') <> 'N' then
2034: if p_work_injury_cont_end_reason is null then
2035: hr_utility.set_message(801,'PAY_375844_CONT_END_REQD');
2036: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','WORK_INJURY_CONTRIBUTION'));
2037: hr_utility.raise_error;
2037: hr_utility.raise_error;
2038: end if;
2039: end if;
2040:
2041: if (l_api_updating and nvl(pay_psd_shd.g_old_rec.work_injury_cont_end_reason,
2042: hr_api.g_varchar2)
2043: <> nvl(p_work_injury_cont_end_reason,hr_api.g_varchar2)) then
2044: --
2045: -- If Work Injury Contribution End Reason is not null then
2079: -- WORK_INJURY_CONT_END_REASON has
2080: -- been changed from NULL to a not NULL value, then an error should be raised
2081:
2082: if p_work_injury_contribution = 'N' and
2083: pay_psd_shd.g_old_rec.work_injury_contribution = 'N' then
2084: hr_utility.set_message(801,'PAY_375847_INCORREC_END_REASON');
2085: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','WORK_INJURY_CONTRIBUTION'));
2086: end if;
2087:
2173: -- a) The current g_old_rec is current and
2174: -- b) Labor Contribution End Reason value has changed
2175:
2176: --
2177: l_api_updating := pay_psd_shd.api_updating
2178: (p_sii_details_id => p_sii_details_id
2179: ,p_effective_date => p_effective_date
2180: ,p_object_version_number => p_object_version_number);
2181:
2182: -- If the Contribution type has changed from Mandatory/Voluntary to No Contribution
2183: -- then the Contribution End Reason is mandatory
2184:
2185: if p_labor_contribution = 'N' and
2186: nvl(pay_psd_shd.g_old_rec.labor_contribution,'N') <> 'N' then
2187: if p_labor_fund_cont_end_reason is null then
2188: hr_utility.set_message(801,'PAY_375844_CONT_END_REQD');
2189: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','LABOR_CONTRIBUTION'));
2190: hr_utility.raise_error;
2190: hr_utility.raise_error;
2191: end if;
2192: end if;
2193:
2194: if (l_api_updating and nvl(pay_psd_shd.g_old_rec.labor_fund_cont_end_reason,
2195: hr_api.g_varchar2)
2196: <> nvl(p_labor_fund_cont_end_reason,hr_api.g_varchar2)) then
2197: --
2198: -- If Labor Fund Contribution End Reason is not null then
2232: -- LABOR_FUND_CONT_END_REASON has
2233: -- been changed from NULL to a not NULL value, then an error should be raised
2234:
2235: if p_labor_contribution = 'N' and
2236: pay_psd_shd.g_old_rec.labor_contribution = 'N' then
2237: hr_utility.set_message(801,'PAY_375847_INCORREC_END_REASON');
2238: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','LABOR_CONTRIBUTION'));
2239: end if;
2240:
2326: -- a) The current g_old_rec is current and
2327: -- b) Health Contribution End Reason value has changed
2328:
2329: --
2330: l_api_updating := pay_psd_shd.api_updating
2331: (p_sii_details_id => p_sii_details_id
2332: ,p_effective_date => p_effective_date
2333: ,p_object_version_number => p_object_version_number);
2334:
2335: -- If the Contribution type has changed from Mandatory/Voluntary to No Contribution
2336: -- then the Contribution End Reason is mandatory
2337:
2338: if p_health_contribution = 'N' and
2339: nvl(pay_psd_shd.g_old_rec.health_contribution,'N') <> 'N' then
2340: if p_health_cont_end_reason is null then
2341: hr_utility.set_message(801,'PAY_375844_CONT_END_REQD');
2342: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','HEALTH_CONTRIBUTION'));
2343: hr_utility.raise_error;
2343: hr_utility.raise_error;
2344: end if;
2345: end if;
2346:
2347: if (l_api_updating and nvl(pay_psd_shd.g_old_rec.health_cont_end_reason,
2348: hr_api.g_varchar2)
2349: <> nvl(p_health_cont_end_reason,hr_api.g_varchar2)) then
2350: --
2351: -- If Health Contribution End Reason is not null then
2385: -- HEALTH_CONT_END_REASON has
2386: -- been changed from NULL to a not NULL value, then an error should be raised
2387:
2388: if p_health_contribution = 'N' and
2389: pay_psd_shd.g_old_rec.health_contribution = 'N' then
2390: hr_utility.set_message(801,'PAY_375847_INCORREC_END_REASON');
2391: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','HEALTH_CONTRIBUTION'));
2392: end if;
2393:
2479: -- a) The current g_old_rec is current and
2480: -- b) Unemployment Contribution End Reason value has changed
2481:
2482: --
2483: l_api_updating := pay_psd_shd.api_updating
2484: (p_sii_details_id => p_sii_details_id
2485: ,p_effective_date => p_effective_date
2486: ,p_object_version_number => p_object_version_number);
2487:
2488: -- If the Contribution type has changed from Mandatory/Voluntary to No Contribution
2489: -- then the Contribution End Reason is mandatory
2490:
2491: if p_unemployment_contribution = 'N' and
2492: nvl(pay_psd_shd.g_old_rec.unemployment_contribution,'N') <> 'N' then
2493: if p_unemployment_cont_end_reason is null then
2494: hr_utility.set_message(801,'PAY_375844_CONT_END_REQD');
2495: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','UNEMPLOYMENT_CONTRIBUTION'));
2496: hr_utility.raise_error;
2496: hr_utility.raise_error;
2497: end if;
2498: end if;
2499:
2500: if (l_api_updating and nvl(pay_psd_shd.g_old_rec.unemployment_cont_end_reason,
2501: hr_api.g_varchar2)
2502: <> nvl(p_unemployment_cont_end_reason,hr_api.g_varchar2)) then
2503: --
2504: -- If Unemployment Contribution End Reason is not null then
2538: -- UNEMPLOYMENT_CONT_END_REASON has
2539: -- been changed from NULL to a not NULL value, then an error should be raised
2540:
2541: if p_unemployment_contribution = 'N' and
2542: pay_psd_shd.g_old_rec.unemployment_contribution = 'N' then
2543: hr_utility.set_message(801,'PAY_375847_INCORREC_END_REASON');
2544: hr_utility.set_message_token('TYPE',hr_general.decode_lookup('PL_FORM_LABELS','UNEMPLOYMENT_CONTRIBUTION'));
2545: end if;
2546:
2590: -- {End Of Comments}
2591: -- ----------------------------------------------------------------------------
2592: Procedure chk_non_updateable_args
2593: (p_effective_date in date
2594: ,p_rec in pay_psd_shd.g_rec_type
2595: ) IS
2596: --
2597: l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
2598: --
2600: --
2601: -- Only proceed with the validation if a row exists for the current
2602: -- record in the HR Schema.
2603: --
2604: IF NOT pay_psd_shd.api_updating
2605: (p_sii_details_id => p_rec.sii_details_id
2606: ,p_effective_date => p_effective_date
2607: ,p_object_version_number => p_rec.object_version_number
2608: ) THEN
2613: END IF;
2614: --
2615:
2616: if nvl(p_rec.business_group_id, hr_api.g_number) <>
2617: nvl(pay_psd_shd.g_old_rec.business_group_id
2618: ,hr_api.g_number
2619: ) then
2620: hr_api.argument_changed_error
2621: (p_api_name => l_proc
2619: ) then
2620: hr_api.argument_changed_error
2621: (p_api_name => l_proc
2622: ,p_argument => 'BUSINESS_GROUP_ID'
2623: ,p_base_table => pay_psd_shd.g_tab_nam
2624: );
2625: end if;
2626:
2627: if nvl(p_rec.contract_category, hr_api.g_varchar2) <>
2624: );
2625: end if;
2626:
2627: if nvl(p_rec.contract_category, hr_api.g_varchar2) <>
2628: nvl(pay_psd_shd.g_old_rec.contract_category
2629: ,hr_api.g_varchar2
2630: ) then
2631: hr_api.argument_changed_error
2632: (p_api_name => l_proc
2630: ) then
2631: hr_api.argument_changed_error
2632: (p_api_name => l_proc
2633: ,p_argument => 'CONTRACT_CATEGORY'
2634: ,p_base_table => pay_psd_shd.g_tab_nam
2635: );
2636: end if;
2637:
2638: if nvl(p_rec.per_or_asg_id, hr_api.g_number) <>
2635: );
2636: end if;
2637:
2638: if nvl(p_rec.per_or_asg_id, hr_api.g_number) <>
2639: nvl(pay_psd_shd.g_old_rec.per_or_asg_id
2640: ,hr_api.g_number
2641: ) then
2642: hr_api.argument_changed_error
2643: (p_api_name => l_proc
2641: ) then
2642: hr_api.argument_changed_error
2643: (p_api_name => l_proc
2644: ,p_argument => 'PER_OR_ASG_ID'
2645: ,p_base_table => pay_psd_shd.g_tab_nam
2646: );
2647: end if;
2648:
2649: --
2827: -- ----------------------------------------------------------------------------
2828: -- |---------------------------< insert_validate >----------------------------|
2829: -- ----------------------------------------------------------------------------
2830: Procedure insert_validate
2831: (p_rec in pay_psd_shd.g_rec_type
2832: ,p_effective_date in date
2833: ,p_datetrack_mode in varchar2
2834: ,p_validation_start_date in date
2835: ,p_validation_end_date in date
2843: -- Call all supporting business operations
2844: --
2845: hr_api.validate_bus_grp_id
2846: (p_business_group_id => p_rec.business_group_id
2847: ,p_associated_column1 => pay_psd_shd.g_tab_nam
2848: || '.BUSINESS_GROUP_ID');
2849: --
2850: -- After validating the set of important attributes,
2851: -- if Multiple Message detection is enabled and at least
3042: -- ----------------------------------------------------------------------------
3043: -- |---------------------------< update_validate >----------------------------|
3044: -- ----------------------------------------------------------------------------
3045: Procedure update_validate
3046: (p_rec in pay_psd_shd.g_rec_type
3047: ,p_effective_date in date
3048: ,p_datetrack_mode in varchar2
3049: ,p_validation_start_date in date
3050: ,p_validation_end_date in date
3058: -- Call all supporting business operations
3059: --
3060: hr_api.validate_bus_grp_id
3061: (p_business_group_id => p_rec.business_group_id
3062: ,p_associated_column1 => pay_psd_shd.g_tab_nam
3063: || '.BUSINESS_GROUP_ID');
3064: --
3065: -- After validating the set of important attributes,
3066: -- if Multiple Message detection is enabled and at least
3247: -- ----------------------------------------------------------------------------
3248: -- |---------------------------< delete_validate >----------------------------|
3249: -- ----------------------------------------------------------------------------
3250: Procedure delete_validate
3251: (p_rec in pay_psd_shd.g_rec_type
3252: ,p_effective_date in date
3253: ,p_datetrack_mode in varchar2
3254: ,p_validation_start_date in date
3255: ,p_validation_end_date in date