509: -- compare a null measure with a none null measure
510: -- compare a none null measure with a null measure
511: if(p_block1.type='MEASURE' AND p_block2.type='MEASURE') then
512: if p_block1.measure <> p_block2.measure then
513: hxc_block_attribute_update.g_tc_api_flag := 'N';
514: return true;
515: end if;
516: if nvl(p_block1.measure,0) <> p_block2.measure then
517: hxc_block_attribute_update.g_tc_api_flag := 'N';
513: hxc_block_attribute_update.g_tc_api_flag := 'N';
514: return true;
515: end if;
516: if nvl(p_block1.measure,0) <> p_block2.measure then
517: hxc_block_attribute_update.g_tc_api_flag := 'N';
518: return true;
519: end if;
520: if p_block1.measure <> nvl(p_block2.measure,0) then
521: hxc_block_attribute_update.g_tc_api_flag := 'N';
517: hxc_block_attribute_update.g_tc_api_flag := 'N';
518: return true;
519: end if;
520: if p_block1.measure <> nvl(p_block2.measure,0) then
521: hxc_block_attribute_update.g_tc_api_flag := 'N';
522: return true;
523: end if;
524: end if;
525: if(p_block1.type='RANGE' AND p_block2.type = 'RANGE') then
524: end if;
525: if(p_block1.type='RANGE' AND p_block2.type = 'RANGE') then
526: -- 2. Start Time
527: if(nvl(p_block1.start_time,'NULL') <> nvl(p_block2.start_time,'NULL')) then
528: hxc_block_attribute_update.g_tc_api_flag := 'N';
529: return true;
530: end if;
531: -- 3. Stop Time
532: if(nvl(p_block1.stop_time,'NULL') <> nvl(p_block2.stop_time,'NULL')) then
529: return true;
530: end if;
531: -- 3. Stop Time
532: if(nvl(p_block1.stop_time,'NULL') <> nvl(p_block2.stop_time,'NULL')) then
533: hxc_block_attribute_update.g_tc_api_flag := 'N';
534: return true;
535: end if;
536: end if;
537: -- 4. Comment
535: end if;
536: end if;
537: -- 4. Comment
538: if(nvl(p_block1.comment_text,'NULL') <> nvl(p_block2.comment_text,'NULL')) then
539: hxc_block_attribute_update.g_tc_api_flag := 'N';
540: return true;
541: end if;
542: -- 5. Approval Status
543: if(nvl(p_block1.approval_status,'NULL') <> nvl(p_block2.approval_status,'NULL')) then
540: return true;
541: end if;
542: -- 5. Approval Status
543: if(nvl(p_block1.approval_status,'NULL') <> nvl(p_block2.approval_status,'NULL')) then
544: hxc_block_attribute_update.g_tc_api_flag := 'N';
545: return true;
546: end if;
547: -- 6. Unit of measure
548: if(nvl(p_block1.unit_of_measure,'NULL') <> nvl(p_block2.unit_of_measure,'NULL')) then
545: return true;
546: end if;
547: -- 6. Unit of measure
548: if(nvl(p_block1.unit_of_measure,'NULL') <> nvl(p_block2.unit_of_measure,'NULL')) then
549: hxc_block_attribute_update.g_tc_api_flag := 'N';
550: return true;
551: end if;
552: -- 7. Parent Building block OVN
553: -- Actually, this one won't work, since the parent OVN isn't updated yet.
552: -- 7. Parent Building block OVN
553: -- Actually, this one won't work, since the parent OVN isn't updated yet.
554: -- Is this a problem?
555: if(nvl(p_block1.parent_building_block_ovn,0) <> nvl(p_block2.parent_building_block_ovn,0)) then
556: hxc_block_attribute_update.g_tc_api_flag := 'N';
557: return true;
558: end if;
559: -- 8. Date to
560: if(nvl(p_block1.date_to,hr_general.end_of_time) <> nvl(p_block2.date_to,hr_general.end_of_time)) then
557: return true;
558: end if;
559: -- 8. Date to
560: if(nvl(p_block1.date_to,hr_general.end_of_time) <> nvl(p_block2.date_to,hr_general.end_of_time)) then
561: hxc_block_attribute_update.g_tc_api_flag := 'N';
562: return true;
563: end if;
564: -- 9. Type
565: if(nvl(p_block1.type,'RANGE') <> nvl(p_block2.type,'RANGE')) then
562: return true;
563: end if;
564: -- 9. Type
565: if(nvl(p_block1.type,'RANGE') <> nvl(p_block2.type,'RANGE')) then
566: hxc_block_attribute_update.g_tc_api_flag := 'N';
567: return true;
568: end if;
569: -- 10. Approval style id
570: if(nvl(p_block1.approval_style_id,1) <> nvl(p_block2.approval_style_id,1)) then
567: return true;
568: end if;
569: -- 10. Approval style id
570: if(nvl(p_block1.approval_style_id,1) <> nvl(p_block2.approval_style_id,1)) then
571: hxc_block_attribute_update.g_tc_api_flag := 'N';
572: return true;
573: end if;
574: -- 11. Translation Display Key
575: if(nvl(p_block1.translation_display_key,'NULL') <> nvl(p_block2.translation_display_key,'NULL')) then
587: -- when resubmitted from ss translation display key is not null
588: hr_utility.trace('OTL: HXC_TIMECARD_BLOCK_UTILS:FALSE');
589:
590: -- Added for Bug 12774447
591: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
592:
593: if hxc_block_attribute_update.g_tc_api_flag is null then
594: hxc_block_attribute_update.g_tc_api_flag := 'Y';
595: elsif hxc_block_attribute_update.g_tc_api_flag <> 'N' then
589:
590: -- Added for Bug 12774447
591: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
592:
593: if hxc_block_attribute_update.g_tc_api_flag is null then
594: hxc_block_attribute_update.g_tc_api_flag := 'Y';
595: elsif hxc_block_attribute_update.g_tc_api_flag <> 'N' then
596: hxc_block_attribute_update.g_tc_api_flag := 'Y';
597: end if;
590: -- Added for Bug 12774447
591: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
592:
593: if hxc_block_attribute_update.g_tc_api_flag is null then
594: hxc_block_attribute_update.g_tc_api_flag := 'Y';
595: elsif hxc_block_attribute_update.g_tc_api_flag <> 'N' then
596: hxc_block_attribute_update.g_tc_api_flag := 'Y';
597: end if;
598:
591: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
592:
593: if hxc_block_attribute_update.g_tc_api_flag is null then
594: hxc_block_attribute_update.g_tc_api_flag := 'Y';
595: elsif hxc_block_attribute_update.g_tc_api_flag <> 'N' then
596: hxc_block_attribute_update.g_tc_api_flag := 'Y';
597: end if;
598:
599: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
592:
593: if hxc_block_attribute_update.g_tc_api_flag is null then
594: hxc_block_attribute_update.g_tc_api_flag := 'Y';
595: elsif hxc_block_attribute_update.g_tc_api_flag <> 'N' then
596: hxc_block_attribute_update.g_tc_api_flag := 'Y';
597: end if;
598:
599: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
600:
595: elsif hxc_block_attribute_update.g_tc_api_flag <> 'N' then
596: hxc_block_attribute_update.g_tc_api_flag := 'Y';
597: end if;
598:
599: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
600:
601: return true;
602: else
603: hxc_block_attribute_update.g_tc_api_flag := 'N';
599: hr_utility.trace(' hxc_block_attribute_update.g_tc_api_flag ::'||hxc_block_attribute_update.g_tc_api_flag);
600:
601: return true;
602: else
603: hxc_block_attribute_update.g_tc_api_flag := 'N';
604: hr_utility.trace('OTL: HXC_TIMECARD_BLOCK_UTILS:TRUE');
605: return true;
606: end if;
607: end if;
607: end if;
608: elsif((p_block1.scope=hxc_timecard.c_timecard_scope)OR(p_block1.scope=hxc_timecard.c_template_scope)) then
609: -- 1. Comment
610: if(nvl(p_block1.comment_text,'NULL') <> nvl(p_block2.comment_text,'NULL')) then
611: hxc_block_attribute_update.g_tc_api_flag := 'N';
612: return true;
613: end if;
614: -- 2. Approval Status
615: if(nvl(p_block1.approval_status,'NULL') <> nvl(p_block2.approval_status,'NULL')) then
612: return true;
613: end if;
614: -- 2. Approval Status
615: if(nvl(p_block1.approval_status,'NULL') <> nvl(p_block2.approval_status,'NULL')) then
616: hxc_block_attribute_update.g_tc_api_flag := 'N';
617: return true;
618: end if;
619: -- 3. Date to
620: if(nvl(p_block1.date_to,hr_general.end_of_time) <> nvl(p_block2.date_to,hr_general.end_of_time)) then
617: return true;
618: end if;
619: -- 3. Date to
620: if(nvl(p_block1.date_to,hr_general.end_of_time) <> nvl(p_block2.date_to,hr_general.end_of_time)) then
621: hxc_block_attribute_update.g_tc_api_flag := 'N';
622: return true;
623: end if;
624: -- 4. Approval style id
625: if(nvl(p_block1.approval_style_id,1) <> nvl(p_block2.approval_style_id,1)) then
622: return true;
623: end if;
624: -- 4. Approval style id
625: if(nvl(p_block1.approval_style_id,1) <> nvl(p_block2.approval_style_id,1)) then
626: hxc_block_attribute_update.g_tc_api_flag := 'N';
627: return true;
628: end if;
629: elsif(p_block1.scope='DAY') then
630: -- 1. Approval Status
628: end if;
629: elsif(p_block1.scope='DAY') then
630: -- 1. Approval Status
631: if(nvl(p_block1.approval_status,'NULL') <> nvl(p_block2.approval_status,'NULL')) then
632: hxc_block_attribute_update.g_tc_api_flag := 'N';
633: return true;
634: end if;
635: -- 2. Date to
636: if(nvl(p_block1.date_to,hr_general.end_of_time) <> nvl(p_block2.date_to,hr_general.end_of_time)) then
633: return true;
634: end if;
635: -- 2. Date to
636: if(nvl(p_block1.date_to,hr_general.end_of_time) <> nvl(p_block2.date_to,hr_general.end_of_time)) then
637: hxc_block_attribute_update.g_tc_api_flag := 'N';
638: return true;
639: end if;
640: -- 3. Approval style id
641: if(nvl(p_block1.approval_style_id,1) <> nvl(p_block2.approval_style_id,1)) then
638: return true;
639: end if;
640: -- 3. Approval style id
641: if(nvl(p_block1.approval_style_id,1) <> nvl(p_block2.approval_style_id,1)) then
642: hxc_block_attribute_update.g_tc_api_flag := 'N';
643: return true;
644: end if;
645: end if;
646: