[Home] [Help]
82: -- ----------------------------------------------------------------------------
83: -- |-----------------------< chk_non_updateable_args >------------------------|
84: -- ----------------------------------------------------------------------------
85: Procedure chk_non_updateable_args
86: (p_rec in pay_siv_shd.g_rec_type
87: ) is
88: --
89: -- Cursor to disallow update if a balance has been generated from
90: -- this shadow balance.
110: l_disallow varchar2(1);
111: --
112: Begin
113: hr_utility.set_location('Entering:'||l_proc, 5);
114: l_api_updating := pay_siv_shd.api_updating
115: (p_input_value_id => p_rec.input_value_id
116: ,p_object_version_number => p_rec.object_version_number
117: );
118: if not l_api_updating then
140: --
141: -- p_element_type_id
142: --
143: if nvl(p_rec.element_type_id, hr_api.g_number) <>
144: nvl(pay_siv_shd.g_old_rec.element_type_id, hr_api.g_number)
145: then
146: l_argument := 'p_element_type_id';
147: raise l_error;
148: end if;
149: --
150: -- p_uom
151: --
152: if nvl(p_rec.uom, hr_api.g_varchar2) <>
153: nvl(pay_siv_shd.g_old_rec.uom, hr_api.g_varchar2)
154: then
155: --
156: -- Check to see if the update is allowed.
157: --
264: l_api_updating boolean;
265: --
266: Begin
267: hr_utility.set_location('Entering:'||l_proc, 5);
268: l_api_updating := pay_siv_shd.api_updating
269: (p_input_value_id => p_input_value_id
270: ,p_object_version_number => p_object_version_number
271: );
272: if (l_api_updating and nvl(p_display_sequence, hr_api.g_number) <>
269: (p_input_value_id => p_input_value_id
270: ,p_object_version_number => p_object_version_number
271: );
272: if (l_api_updating and nvl(p_display_sequence, hr_api.g_number) <>
273: nvl(pay_siv_shd.g_old_rec.display_sequence, hr_api.g_number)) or
274: not l_api_updating
275: then
276: --
277: -- Check that display_sequence is not null.
351: end chk_lookup;
352: --
353: Begin
354: hr_utility.set_location('Entering:'||l_proc, 5);
355: l_api_updating := pay_siv_shd.api_updating
356: (p_input_value_id => p_input_value_id
357: ,p_object_version_number => p_object_version_number
358: );
359: --
362: chk_lookup
363: (p_effective_date => p_effective_date
364: ,p_caller => l_proc
365: ,p_argument_name => 'generate_db_items_flag'
366: ,p_old_lookup_code => pay_siv_shd.g_old_rec.generate_db_items_flag
367: ,p_lookup_code => p_generate_db_items_flag
368: ,p_lookup_type => 'YES_NO'
369: ,p_mandatory => true
370: ,p_updatable => true
376: chk_lookup
377: (p_effective_date => p_effective_date
378: ,p_caller => l_proc
379: ,p_argument_name => 'hot_default_flag'
380: ,p_old_lookup_code => pay_siv_shd.g_old_rec.hot_default_flag
381: ,p_lookup_code => p_hot_default_flag
382: ,p_lookup_type => 'YES_NO'
383: ,p_mandatory => true
384: ,p_updatable => true
390: chk_lookup
391: (p_effective_date => p_effective_date
392: ,p_caller => l_proc
393: ,p_argument_name => 'mandatory_flag'
394: ,p_old_lookup_code => pay_siv_shd.g_old_rec.mandatory_flag
395: ,p_lookup_code => p_mandatory_flag
396: ,p_lookup_type => 'YES_NO_NEVER'
397: ,p_mandatory => true
398: ,p_updatable => true
404: chk_lookup
405: (p_effective_date => p_effective_date
406: ,p_caller => l_proc
407: ,p_argument_name => 'uom'
408: ,p_old_lookup_code => pay_siv_shd.g_old_rec.uom
409: ,p_lookup_code => p_uom
410: ,p_lookup_type => 'UNITS'
411: ,p_mandatory => true
412: ,p_updatable => true
418: chk_lookup
419: (p_effective_date => p_effective_date
420: ,p_caller => l_proc
421: ,p_argument_name => 'warning_or_error'
422: ,p_old_lookup_code => pay_siv_shd.g_old_rec.warning_or_error
423: ,p_lookup_code => p_warning_or_error
424: ,p_lookup_type => 'WARNING_ERROR'
425: ,p_mandatory => false
426: ,p_updatable => true
455: l_rgeflg varchar2(2000);
456: --
457: Begin
458: hr_utility.set_location('Entering:'||l_proc, 5);
459: l_api_updating := pay_siv_shd.api_updating
460: (p_input_value_id => p_input_value_id
461: ,p_object_version_number => p_object_version_number
462: );
463: if (l_api_updating and nvl(p_name, hr_api.g_varchar2) <>
460: (p_input_value_id => p_input_value_id
461: ,p_object_version_number => p_object_version_number
462: );
463: if (l_api_updating and nvl(p_name, hr_api.g_varchar2) <>
464: nvl(pay_siv_shd.g_old_rec.name, hr_api.g_varchar2)) or
465: not l_api_updating
466: then
467: --
468: -- Check that the name is not already in use.
523: l_chk_default boolean;
524: --
525: Begin
526: hr_utility.set_location('Entering:'||l_proc, 5);
527: l_api_updating := pay_siv_shd.api_updating
528: (p_input_value_id => p_input_value_id
529: ,p_object_version_number => p_object_version_number
530: );
531: --
532: -- Has the UOM changed ?
533: --
534: l_uom_changed :=
535: l_api_updating and nvl(p_uom, hr_api.g_varchar2) <>
536: nvl(pay_siv_shd.g_old_rec.uom, hr_api.g_varchar2);
537: --
538: -- Check the lookup type.
539: --
540: l_chk_default := false;
538: -- Check the lookup type.
539: --
540: l_chk_default := false;
541: if (l_api_updating and nvl(p_lookup_type, hr_api.g_varchar2) <>
542: nvl(pay_siv_shd.g_old_rec.lookup_type, hr_api.g_varchar2)) or
543: not l_api_updating or
544: l_uom_changed
545: then
546: if p_lookup_type is not null then
575: --
576: -- Check the default value.
577: --
578: if (l_api_updating and nvl(p_default_value, hr_api.g_varchar2) <>
579: nvl(pay_siv_shd.g_old_rec.default_value, hr_api.g_varchar2)) or
580: not l_api_updating or
581: l_chk_default
582: then
583: if p_default_value is not null and p_lookup_type is not null and
719: --
720: -- The code needs to check the minimum, maximum, and default values
721: -- using checkformat and the supplied UOM.
722: --
723: l_api_updating := pay_siv_shd.api_updating
724: (p_input_value_id => p_input_value_id
725: ,p_object_version_number => p_object_version_number
726: );
727: --
728: -- Did the UOM get updated ? Note: it should have already been checked
729: -- for validity.
730: --
731: if (l_api_updating and nvl(p_uom, hr_api.g_varchar2) <>
732: nvl(pay_siv_shd.g_old_rec.uom, hr_api.g_varchar2)) or
733: not l_api_updating
734: then
735: l_uom_updated := true;
736: l_uom := p_uom;
734: then
735: l_uom_updated := true;
736: l_uom := p_uom;
737: else
738: l_uom := pay_siv_shd.g_old_rec.uom;
739: end if;
740: --
741: -- Decide what needs checking.
742: --
740: --
741: -- Decide what needs checking.
742: --
743: if (l_api_updating and nvl(p_default_value, hr_api.g_varchar2) <>
744: nvl(pay_siv_shd.g_old_rec.default_value, hr_api.g_varchar2)) or
745: not l_api_updating
746: then
747: l_chk_def := true;
748: l_def := p_default_value;
746: then
747: l_chk_def := true;
748: l_def := p_default_value;
749: else
750: l_def := pay_siv_shd.g_old_rec.default_value;
751: end if;
752: --
753: if (l_api_updating and nvl(p_max_value, hr_api.g_varchar2) <>
754: nvl(pay_siv_shd.g_old_rec.max_value, hr_api.g_varchar2)) or
750: l_def := pay_siv_shd.g_old_rec.default_value;
751: end if;
752: --
753: if (l_api_updating and nvl(p_max_value, hr_api.g_varchar2) <>
754: nvl(pay_siv_shd.g_old_rec.max_value, hr_api.g_varchar2)) or
755: not l_api_updating
756: then
757: l_chk_max := true;
758: l_max := p_max_value;
756: then
757: l_chk_max := true;
758: l_max := p_max_value;
759: else
760: l_max := pay_siv_shd.g_old_rec.max_value;
761: end if;
762: --
763: if (l_api_updating and nvl(p_min_value, hr_api.g_varchar2) <>
764: nvl(pay_siv_shd.g_old_rec.min_value, hr_api.g_varchar2)) or
760: l_max := pay_siv_shd.g_old_rec.max_value;
761: end if;
762: --
763: if (l_api_updating and nvl(p_min_value, hr_api.g_varchar2) <>
764: nvl(pay_siv_shd.g_old_rec.min_value, hr_api.g_varchar2)) or
765: not l_api_updating
766: then
767: l_chk_min := true;
768: l_min := p_min_value;
766: then
767: l_chk_min := true;
768: l_min := p_min_value;
769: else
770: l_min := pay_siv_shd.g_old_rec.min_value;
771: end if;
772: --
773: -- If anything's changed (or it's the first time) then everything has
774: -- to be checked.
913: l_inconsistent varchar2(1);
914: --
915: Begin
916: hr_utility.set_location('Entering:'||l_proc, 5);
917: l_api_updating := pay_siv_shd.api_updating
918: (p_input_value_id => p_input_value_id
919: ,p_object_version_number => p_object_version_number
920: );
921: if (l_api_updating and nvl(p_default_value_column, hr_api.g_varchar2) <>
918: (p_input_value_id => p_input_value_id
919: ,p_object_version_number => p_object_version_number
920: );
921: if (l_api_updating and nvl(p_default_value_column, hr_api.g_varchar2) <>
922: nvl(pay_siv_shd.g_old_rec.default_value_column, hr_api.g_varchar2)) or
923: not l_api_updating
924: then
925: if p_default_value_column is not null then
926: --
1003: l_valid varchar2(1);
1004: --
1005: Begin
1006: hr_utility.set_location('Entering:'||l_proc, 5);
1007: l_api_updating := pay_siv_shd.api_updating
1008: (p_input_value_id => p_input_value_id
1009: ,p_object_version_number => p_object_version_number
1010: );
1011: if (l_api_updating and nvl(p_exclusion_rule_id, hr_api.g_number) <>
1008: (p_input_value_id => p_input_value_id
1009: ,p_object_version_number => p_object_version_number
1010: );
1011: if (l_api_updating and nvl(p_exclusion_rule_id, hr_api.g_number) <>
1012: nvl(pay_siv_shd.g_old_rec.exclusion_rule_id, hr_api.g_number)) or
1013: not l_api_updating
1014: then
1015: if p_exclusion_rule_id is not null then
1016: open csr_exclusion_rule_id_valid;
1161: Begin
1162:
1163: hr_utility.set_location('Entering:'||l_proc, 5);
1164:
1165: l_api_updating := pay_siv_shd.api_updating
1166: (p_input_value_id => p_input_value_id
1167: ,p_object_version_number => p_object_version_number
1168: );
1169:
1167: ,p_object_version_number => p_object_version_number
1168: );
1169:
1170: if (l_api_updating and nvl(p_formula_id, hr_api.g_number) <>
1171: nvl(pay_siv_shd.g_old_rec.formula_id, hr_api.g_number)) or
1172: not l_api_updating
1173: then
1174:
1175: if p_formula_id is not null then
1215: -- |---------------------------< insert_validate >----------------------------|
1216: -- ----------------------------------------------------------------------------
1217: Procedure insert_validate
1218: (p_effective_date in date
1219: ,p_rec in out nocopy pay_siv_shd.g_rec_type
1220: ) is
1221: --
1222: l_proc varchar2(72) := g_package||'insert_validate';
1223: l_template_id number;
1331: -- |---------------------------< update_validate >----------------------------|
1332: -- ----------------------------------------------------------------------------
1333: Procedure update_validate
1334: (p_effective_date in date
1335: ,p_rec in out nocopy pay_siv_shd.g_rec_type
1336: ) is
1337: --
1338: l_proc varchar2(72) := g_package||'update_validate';
1339: l_template_id number;
1442: --
1443: -- ----------------------------------------------------------------------------
1444: -- |---------------------------< delete_validate >----------------------------|
1445: -- ----------------------------------------------------------------------------
1446: Procedure delete_validate(p_rec in pay_siv_shd.g_rec_type) is
1447: --
1448: l_proc varchar2(72) := g_package||'delete_validate';
1449: --
1450: Begin