540: IF l_pay_basis NOT IN ('PD','WC') THEN
541: --end Bug# 8928564
542: -- Exclude NAF positions (Non-Apropriated Fund Positions) using CPDF dynamics function
543: IF NOT ghr_cpdf_dynrpt.exclude_position(l_position_id, p_rpt_date) THEN
544: l_duty_station := hr_api.g_varchar2;
545:
546: IF l_duty_station_code in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
547: 'RM','HQ','PS','BQ','WQ','VQ') THEN
548: l_duty_station := 'T';
549: ELSIF l_duty_station_code not in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
550: 'RM','HQ','PS','BQ','WQ','VQ')
551: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
552: l_duty_station := 'F';
553: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
554: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
555: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
556: l_duty_station := 'W';
557: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
550: 'RM','HQ','PS','BQ','WQ','VQ')
551: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
552: l_duty_station := 'F';
553: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
554: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
555: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
556: l_duty_station := 'W';
557: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
558: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
553: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
554: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
555: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
556: l_duty_station := 'W';
557: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
558: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
559: or l_msa_code is null)
560: and (l_duty_station_code >= '00' and l_duty_station_code <= '99')
561: THEN
554: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
555: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
556: l_duty_station := 'W';
557: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
558: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
559: or l_msa_code is null)
560: and (l_duty_station_code >= '00' and l_duty_station_code <= '99')
561: THEN
562: l_duty_station := 'O';
648:
649: -- For line 5, check if they're Permanent Appointments(Tenure code 1 or 2)
650: IF (l_tenure in ('1','2') and l_position_code in ('1','2') ) OR
651: (l_tenure = '0' and l_position_code in ('3','4')
652: and (nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
653: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
654: )
655: ) THEN
656: IF l_duty_station = 'T' THEN
649: -- For line 5, check if they're Permanent Appointments(Tenure code 1 or 2)
650: IF (l_tenure in ('1','2') and l_position_code in ('1','2') ) OR
651: (l_tenure = '0' and l_position_code in ('3','4')
652: and (nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
653: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
654: )
655: ) THEN
656: IF l_duty_station = 'T' THEN
657: p_l5b := p_l5b + 1;
694: l_position_code in ('1','2')
695: )
696: or
697: (l_tenure = '0' and l_position_code in ('3','4')
698: and (nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
699: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
700: )
701: )
702: )
695: )
696: or
697: (l_tenure = '0' and l_position_code in ('3','4')
698: and (nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
699: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
700: )
701: )
702: )
703: THEN
738:
739: -- Line 7 - Part time with Permanent Appointments
740: IF ((l_tenure in ('1','2') and l_position_code in ('1','2')) OR
741: ( l_tenure = '0' and l_position_code in ('3','4')
742: and ( nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
743: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
744: )
745: ) AND l_susp_flag = 'N' )THEN
746:
739: -- Line 7 - Part time with Permanent Appointments
740: IF ((l_tenure in ('1','2') and l_position_code in ('1','2')) OR
741: ( l_tenure = '0' and l_position_code in ('3','4')
742: and ( nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
743: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
744: )
745: ) AND l_susp_flag = 'N' )THEN
746:
747: IF l_duty_station = 'T' THEN
766: and (
767: (l_tenure in ('1','2') and l_position_code in ('1','2'))
768: or
769: (l_tenure = '0' and l_position_code in ('3','4')
770: and (nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
771: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
772: )
773: )
774: )
767: (l_tenure in ('1','2') and l_position_code in ('1','2'))
768: or
769: (l_tenure = '0' and l_position_code in ('3','4')
770: and (nvl(l_cur_appt1,hr_api.g_varchar2) not in ('V4M','V4P')
771: and nvl(l_cur_appt2,hr_api.g_varchar2) not in ('V4M','V4P')
772: )
773: )
774: )
775: THEN
880: OR
881: (l_tenure = '0'
882: and l_position_code in ('3','4')
883: and (
884: nvl(l_cur_appt1,hr_api.g_varchar2)
885: not in ('V4M','V4P')
886: and
887: nvl(l_cur_appt2,hr_api.g_varchar2)
888: not in ('V4M','V4P')
883: and (
884: nvl(l_cur_appt1,hr_api.g_varchar2)
885: not in ('V4M','V4P')
886: and
887: nvl(l_cur_appt2,hr_api.g_varchar2)
888: not in ('V4M','V4P')
889: )
890: )
891: THEN
955:
956:
957:
958: IF nvl(l_susp_flag,'N') = 'N'
959: and nvl(l_cur_appt1,hr_api.g_varchar2)
960: not in ('MBM', 'MAM', 'QDK','NCM',
961: 'YBM', 'YGM', 'Y3M','Y1M',
962: 'Y2M', 'Y1K', 'Y2K','Y3K',
963: 'Y4K', 'Y5K')
960: not in ('MBM', 'MAM', 'QDK','NCM',
961: 'YBM', 'YGM', 'Y3M','Y1M',
962: 'Y2M', 'Y1K', 'Y2K','Y3K',
963: 'Y4K', 'Y5K')
964: and nvl(l_cur_appt2,hr_api.g_varchar2)
965: not in ('MBM', 'MAM', 'QDK','NCM',
966: 'YBM', 'YGM', 'Y3M','Y1M',
967: 'Y2M', 'Y1K', 'Y2K','Y3K',
968: 'Y4K', 'Y5K') THEN
1222:
1223: -- Exclude NAF positions (Non-Apropriated Fund Positions) using CPDF dynamics function
1224: IF NOT ghr_cpdf_dynrpt.exclude_position(l_position_id, p_rpt_date) THEN
1225:
1226: l_duty_station := hr_api.g_varchar2;
1227: IF l_duty_station_code in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
1228: 'RM','HQ','PS','BQ','WQ','VQ') THEN
1229: p_l17b := p_l17b + l_total_sal;
1230: ELSIF l_duty_station_code not in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
1230: ELSIF l_duty_station_code not in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
1231: 'RM','HQ','PS','BQ','WQ','VQ')
1232: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1233: p_l17c := p_l17c + l_total_sal;
1234: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1235: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1236: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1237: p_l17d := p_l17d + l_total_sal;
1238: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1231: 'RM','HQ','PS','BQ','WQ','VQ')
1232: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1233: p_l17c := p_l17c + l_total_sal;
1234: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1235: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1236: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1237: p_l17d := p_l17d + l_total_sal;
1238: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1239: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1234: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1235: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1236: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1237: p_l17d := p_l17d + l_total_sal;
1238: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1239: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1240: or l_msa_code is null )
1241: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1242: p_l17e := p_l17e + l_total_sal;
1235: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1236: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1237: p_l17d := p_l17d + l_total_sal;
1238: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1239: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1240: or l_msa_code is null )
1241: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1242: p_l17e := p_l17e + l_total_sal;
1243: END IF;
1247: ELSIF l_duty_station_code not in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
1248: 'RM','HQ','PS','BQ','WQ','VQ')
1249: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1250: p_l18c := p_l18c + l_total_lump;
1251: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1252: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1253: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1254: p_l18d := p_l18d + l_total_lump;
1255: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1248: 'RM','HQ','PS','BQ','WQ','VQ')
1249: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1250: p_l18c := p_l18c + l_total_lump;
1251: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1252: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1253: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1254: p_l18d := p_l18d + l_total_lump;
1255: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1256: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1251: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1252: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1253: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1254: p_l18d := p_l18d + l_total_lump;
1255: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1256: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1257: or l_msa_code is null )
1258: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1259: p_l18e := p_l18e + l_total_lump;
1252: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1253: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1254: p_l18d := p_l18d + l_total_lump;
1255: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1256: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1257: or l_msa_code is null )
1258: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1259: p_l18e := p_l18e + l_total_lump;
1260: END IF;
1647: --end Bug# 8928564
1648:
1649: IF NOT ghr_cpdf_dynrpt.exclude_position(l_position_id, p_rpt_date) THEN
1650:
1651: l_duty_station := hr_api.g_varchar2;
1652:
1653: -- Bug 3264666
1654: -- Check if the NTE date more than report date + 30 days.
1655:
1689: ELSIF l_duty_station_code not in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
1690: 'RM','HQ','PS','BQ','WQ','VQ')
1691: AND (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1692: l_duty_station := 'F';
1693: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1694: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1695: AND (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1696: l_duty_station := 'W';
1697: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1690: 'RM','HQ','PS','BQ','WQ','VQ')
1691: AND (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1692: l_duty_station := 'F';
1693: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1694: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1695: AND (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1696: l_duty_station := 'W';
1697: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1698: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1693: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1694: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1695: AND (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1696: l_duty_station := 'W';
1697: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1698: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1699: or l_msa_code is null )
1700: AND (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1701: l_duty_station := 'O';
1694: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1695: AND (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1696: l_duty_station := 'W';
1697: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1698: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1699: or l_msa_code is null )
1700: AND (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1701: l_duty_station := 'O';
1702: END IF;
1802: --end Bug# 8928564
1803: -- Exclude NAF positions (Non-Appropriate Fund positions)
1804: IF NOT ghr_cpdf_dynrpt.exclude_position(l_position_id, p_rpt_date) THEN
1805:
1806: l_duty_station := hr_api.g_varchar2;
1807:
1808: IF l_duty_station_code in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
1809: 'RM','HQ','PS','BQ','WQ','VQ') THEN
1810: l_duty_station := 'T';
1811: ELSIF l_duty_station_code not in ('GQ','RQ','AQ','FM','JQ','CQ','MQ',
1812: 'RM','HQ','PS','BQ','WQ','VQ')
1813: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1814: l_duty_station := 'F';
1815: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1816: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1817: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1818: l_duty_station := 'W';
1819: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1812: 'RM','HQ','PS','BQ','WQ','VQ')
1813: and (l_duty_station_code >= 'AA' and l_duty_station_code <= 'ZZ') THEN
1814: l_duty_station := 'F';
1815: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1816: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1817: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1818: l_duty_station := 'W';
1819: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1820: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1815: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) = '8840'
1816: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1817: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1818: l_duty_station := 'W';
1819: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1820: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1821: or l_msa_code is null )
1822: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1823: l_duty_station := 'O';
1816: or nvl(l_msa_code,hr_api.g_varchar2) = '47900' )
1817: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1818: l_duty_station := 'W';
1819: ELSIF (nvl(l_msa_code,hr_api.g_varchar2) <> '8840'
1820: or nvl(l_msa_code,hr_api.g_varchar2) <> '47900'
1821: or l_msa_code is null )
1822: and (l_duty_station_code >= '00' and l_duty_station_code <= '99') THEN
1823: l_duty_station := 'O';
1824: END IF;