39: l_legislation_code varchar2(150);
40: --
41: begin
42: --
43: hr_utility.set_location('Entering:'|| l_proc, 10);
44: --
45: -- Ensure that all the mandatory parameter are not null
46: --
47: hr_api.mandatory_arg_error
79: --
80: hr_api.set_legislation_context(l_legislation_code);
81: end if;
82: --
83: hr_utility.set_location(' Leaving:'|| l_proc, 20);
84: --
85: end set_security_group_id;
86: --
87: -- ---------------------------------------------------------------------------
108: l_proc varchar2(72) := g_package||'return_legislation_code';
109: --
110: Begin
111: --
112: hr_utility.set_location('Entering:'|| l_proc, 10);
113: --
114: -- Ensure that all the mandatory parameter are not null
115: --
116: hr_api.mandatory_arg_error
126: -- call to this function. Just return the value in the global
127: -- variable.
128: --
129: l_legislation_code := pay_blt_bus.g_legislation_code;
130: hr_utility.set_location(l_proc, 20);
131: else
132: --
133: -- The ID is different to the last call to this function
134: -- or this is the first call to this function.
143: close csr_leg_code;
144: fnd_message.set_name('PAY','HR_7220_INVALID_PRIMARY_KEY');
145: fnd_message.raise_error;
146: end if;
147: hr_utility.set_location(l_proc,30);
148: --
149: -- Set the global variables so the values are
150: -- available for the next call to this function.
151: --
152: close csr_leg_code;
153: pay_blt_bus.g_balance_type_id := p_balance_type_id;
154: pay_blt_bus.g_legislation_code := l_legislation_code;
155: end if;
156: hr_utility.set_location(' Leaving:'|| l_proc, 40);
157: return l_legislation_code;
158: end return_legislation_code;
159: --
160: -- ----------------------------------------------------------------------------
191: --
192: l_proc varchar2(72) := g_package || 'chk_df';
193: --
194: begin
195: hr_utility.set_location('Entering:'||l_proc,10);
196: --
197: if ((p_rec.balance_type_id is not null) and (
198: nvl(pay_blt_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
199: nvl(p_rec.attribute_category, hr_api.g_varchar2) or
290: ,p_attribute20_value => p_rec.attribute20
291: );
292: end if;
293: --
294: hr_utility.set_location(' Leaving:'||l_proc,20);
295: end chk_df;
296: --
297: --
298: -- ----------------------------------------------------------------------------
308: l_proc varchar2(72) := g_package||'chk_assignment_remuneration_fg';
309:
310: --
311: Begin
312: hr_utility.set_location('Entering:'||l_proc, 5);
313: --
314:
315: if p_assignment_remuneration_flag = 'Y' then
316: pay_balance_types_pkg.chk_balance_type
323: p_assignment_remuneration_flag =>p_assignment_remuneration_flag
324: );
325: end if;
326: --
327: hr_utility.set_location('Leaving:'||l_proc, 10);
328: End;
329: --
330: --
331: -- ----------------------------------------------------------------------------
353: and p_effective_date between nvl(start_date_active,p_effective_date)
354: and nvl(end_date_active,p_effective_date);
355: --
356: Begin
357: hr_utility.set_location('Entering:'||l_proc, 5);
358: --
359: If (p_balance_uom <> 'M' and p_currency_code is not null) then
360: fnd_message.set_name('PAY','PAY_34193_UOM_NOT_MONEY');
361: fnd_message.raise_error;
373: Close c_chk_currency;
374: --
375: end if;
376: --
377: hr_utility.set_location('Leaving:'||l_proc, 10);
378: End;
379: --
380: -- ----------------------------------------------------------------------------
381: -- |--------------------------< chk_balance_name >----------------------------|
407: and uet.creator_type = 'B'
408: and dfb.balance_type_id = p_balance_type_id;
409: --
410: Begin
411: hr_utility.set_location('Entering:'||l_proc, 5);
412: --
413: pay_balance_types_pkg.chk_balance_type
414: (null,
415: p_business_group_id,
417: p_balance_name,
418: null,
419: null);
420: --
421: hr_utility.set_location('Entering:'||l_proc, 10);
422: --
423: if( p_balance_name <> nvl(pay_blt_shd.g_old_rec.balance_name,p_balance_name)) then
424: --
425: -- Check db items exist for this balance
427: open chk_db_items;
428: fetch chk_db_items into l_dbi_exists;
429: close chk_db_items;
430: --
431: hr_utility.set_location('Entering:'||l_proc, 15);
432: --
433: if l_dbi_exists is null then
434: -- if database item does not exist
435: p_balance_name_warning := 1;
452: --
453: end if;
454: end if;
455: --
456: hr_utility.set_location('Leaving:'||l_proc, 20);
457: End;
458: --
459: --
460: -- ----------------------------------------------------------------------------
496: nvl(hl.end_date_active,p_effective_date);
497:
498: --
499: Begin
500: hr_utility.set_location('Entering:'||l_proc, 5);
501: --
502: If (p_assignment_remuneration_flag = 'Y' and p_balance_uom <> 'M') then
503: fnd_message.set_name('PAY','PAY_34194_UOM_MUST_BE_MONEY');
504: fnd_message.raise_error;
507: ,p_object_version_number => p_object_version_number)) and
508: nvl(p_balance_uom,hr_api.g_varchar2) <>
509: nvl(pay_blt_shd.g_old_rec.balance_uom,hr_api.g_varchar2)) then
510: --
511: hr_utility.set_location('Entering:'||l_proc|| ' new :'||p_balance_uom||' old '||pay_blt_shd.g_old_rec.balance_uom, 10);
512: --
513: Open c_chk_balance_uom_class(pay_blt_shd.g_old_rec.balance_uom);
514: Fetch c_chk_balance_uom_class into l_class_exists;
515: If c_chk_balance_uom_class%notfound Then
523: Close c_chk_balance_uom_class;
524: --
525: else
526: --
527: hr_utility.set_location('Entering:'||l_proc, 15);
528: --
529: Open c_chk_balance_uom;
530: Fetch c_chk_balance_uom into l_exists;
531: If c_chk_balance_uom%notfound Then
538: End If;
539: Close c_chk_balance_uom;
540: End If;
541: --
542: hr_utility.set_location('Leaving:'||l_proc, 20);
543: End;
544: --
545: -- ----------------------------------------------------------------------------
546: -- |--------------------------< chk_reporting_name >----------------------------|
555: l_proc varchar2(72) := g_package||'chk_reporting_name';
556: l_exists varchar2(1);
557: --
558: Begin
559: hr_utility.set_location('Entering:'||l_proc, 5);
560: --
561: pay_balance_types_pkg.chk_balance_type
562: (null,
563: p_business_group_id,
565: null,
566: p_reporting_name,
567: null);
568: --
569: hr_utility.set_location('Leaving:'||l_proc, 10);
570: End;
571: --
572: --
573: -- ----------------------------------------------------------------------------
595: and p_effective_date between effective_start_date
596: and effective_end_date;
597: --
598: Begin
599: hr_utility.set_location('Entering:'||l_proc, 5);
600: --
601: if (p_balance_category_id is null and
602: pay_balance_types_pkg.chk_balance_category_rule(
603: nvl(p_legislation_code,hr_api.return_legislation_code(p_business_group_id)))) then
607: ,p_argument_value => p_balance_category_id
608: );
609: end if;
610: --
611: hr_utility.set_location('Entering:'||l_proc, 10);
612: --
613: Open c_chk_balance_category;
614: Fetch c_chk_balance_category into l_exists;
615: If c_chk_balance_category%notfound Then
621: --
622: End If;
623: Close c_chk_balance_category;
624: --
625: hr_utility.set_location('Leaving:'||l_proc, 15);
626: End;
627: --
628: --
629: -- ----------------------------------------------------------------------------
657: or business_group_id is null
658: and legislation_code is null) ;
659: --
660: Begin
661: hr_utility.set_location('Entering:'||l_proc, 5);
662: --
663: Open c_chk_base_balance;
664: Fetch c_chk_base_balance into l_exists;
665: If c_chk_base_balance%notfound Then
671: --
672: End If;
673: Close c_chk_base_balance;
674: --
675: hr_utility.set_location('Leaving:'||l_proc, 10);
676: End;
677: --
678: --
679: -- ----------------------------------------------------------------------------
698: and uom = p_balance_uom
699: and p_effective_date between effective_start_date and effective_end_date;
700: --
701: Begin
702: hr_utility.set_location('Entering:'||l_proc, 5);
703: --
704: Open c_chk_input_value;
705: Fetch c_chk_input_value into l_exists;
706: If c_chk_input_value%notfound Then
713: End If;
714: Close c_chk_input_value;
715: --
716: --
717: hr_utility.set_location('Entering:'||l_proc, 10);
718: --
719: --
720: -- INPUT_VALUE_ID can be updated only if its value is null and there is
721: -- no balance feed exist except initial feed or there is no balance
735: --
736: End if;
737:
738:
739: hr_utility.set_location('Leaving:'||l_proc, 10);
740: End;
741: --
742: --
743: -- ----------------------------------------------------------------------------
795: and pbf.effective_end_date;
796:
797:
798: BEGIN
799: hr_utility.set_location('Entering:'||l_proc, 5);
800: --
801: open feed_exists;
802: fetch feed_exists into l_exists;
803: if feed_exists%notfound then
802: fetch feed_exists into l_exists;
803: if feed_exists%notfound then
804: close feed_exists;
805: --
806: hr_utility.set_location('Entering:'||l_proc, 10);
807: --
808: hr_balances.ins_balance_feed
809: (p_option => 'INS_PRIMARY_BALANCE_FEED'
810: ,p_input_value_id => p_input_value_id
824: else
825: close feed_exists;
826: end if;
827: --
828: hr_utility.set_location('Leaving:'||l_proc, 15);
829: --
830: END Insert_primary_balance_feed;
831: --
832: -- ----------------------------------------------------------------------------
851: from fnd_territories
852: where territory_code = p_legislation_code;
853: --
854: Begin
855: hr_utility.set_location('Entering:'||l_proc, 5);
856: --
857: If p_legislation_code is not null then
858:
859: Open c_chk_leg_code;
870: Close c_chk_leg_code;
871:
872: End If;
873: --
874: hr_utility.set_location('Leaving:'||l_proc, 10);
875: End;
876:
877: --
878: -- ----------------------------------------------------------------------------
925: fnd_message.set_token('STEP ', '5');
926: fnd_message.raise_error;
927: END IF;
928: --
929: hr_utility.set_location('Entering:'||l_proc, 10);
930: --
931: -- Ensure that the following attributes are not updated.
932: --
933: If nvl(p_rec.business_group_id,hr_api.g_number) <>
937: raise l_error;
938: --
939: End if;
940: --
941: hr_utility.set_location('Entering:'||l_proc, 15);
942: --
943: If nvl(p_rec.legislation_code,hr_api.g_varchar2) <>
944: nvl(pay_blt_shd.g_old_rec.legislation_code,hr_api.g_varchar2) then
945: --
947: raise l_error;
948: --
949: End if;
950: --
951: hr_utility.set_location('Entering:'||l_proc, 20);
952: --
953: If nvl(p_rec.balance_type_id,hr_api.g_number) <>
954: nvl(pay_blt_shd.g_old_rec.balance_type_id,hr_api.g_number) then
955: --
957: raise l_error;
958: --
959: End if;
960: --
961: hr_utility.set_location('Entering:'||l_proc, 25);
962: -- balance category can be updated only if it is null
963: --
964: If(pay_blt_shd.g_old_rec.balance_category_id is not null and
965: nvl(p_rec.balance_category_id,hr_api.g_number) <>
969: raise l_error;
970: --
971: End if;
972: --
973: hr_utility.set_location('Entering:'||l_proc, 30);
974: -- jurisdiction_level can not be updated
975: --
976: If nvl(p_rec.jurisdiction_level,hr_api.g_number) <>
977: nvl(pay_blt_shd.g_old_rec.jurisdiction_level,hr_api.g_number) then
980: raise l_error;
981: --
982: End if;
983: --
984: hr_utility.set_location('Entering:'||l_proc, 35);
985: -- Tax_Type can not be updated
986: --
987: If nvl(p_rec.tax_type,hr_api.g_varchar2) <>
988: nvl(pay_blt_shd.g_old_rec.tax_type,hr_api.g_varchar2) then
992: --
993: End if;
994: --
995: --
996: hr_utility.set_location('Entering:'||l_proc, 45);
997: --
998: If nvl(p_rec.legislation_subgroup,hr_api.g_varchar2) <>
999: nvl(pay_blt_shd.g_old_rec.legislation_subgroup,hr_api.g_varchar2) then
1000: --
1002: raise l_error;
1003: --
1004: End if;
1005: --
1006: hr_utility.set_location('Leaving :'||l_proc, 50);
1007: EXCEPTION
1008: WHEN l_error THEN
1009: hr_api.argument_changed_error
1010: (p_api_name => l_proc
1068: l_proc varchar2(72) := g_package||'insert_validate';
1069: l_balance_name_warning number;
1070: --
1071: Begin
1072: hr_utility.set_location('Entering:'||l_proc, 5);
1073: --
1074: -- Call all supporting business operations
1075: --
1076: --
1179: end if;
1180:
1181: pay_blt_bus.chk_df(p_rec);
1182: --
1183: hr_utility.set_location(' Leaving:'||l_proc, 10);
1184: End insert_validate;
1185: --
1186: -- ----------------------------------------------------------------------------
1187: -- |---------------------------< update_validate >----------------------------|
1197: l_balance_name_warning number;
1198:
1199: --
1200: Begin
1201: hr_utility.set_location('Entering:'||l_proc, 5);
1202: --
1203: -- Call all supporting business operations
1204: --
1205: --
1314:
1315: --
1316: pay_blt_bus.chk_df(p_rec);
1317: --
1318: hr_utility.set_location(' Leaving:'||l_proc, 10);
1319: End update_validate;
1320: --
1321: -- ----------------------------------------------------------------------------
1322: -- |---------------------------< delete_validate >----------------------------|
1327: --
1328: l_proc varchar2(72) := g_package||'delete_validate';
1329: --
1330: Begin
1331: hr_utility.set_location('Entering:'||l_proc, 5);
1332: --
1333: --
1334: chk_startup_action(false
1335: ,pay_blt_shd.g_old_rec.business_group_id
1349: END IF;
1350: --
1351: -- Call all supporting business operations
1352: --
1353: hr_utility.set_location(' Leaving:'||l_proc, 10);
1354: End delete_validate;
1355: --
1356: end pay_blt_bus;