DBA Data[Home] [Help]

PACKAGE BODY: APPS.IGF_AP_ASSUMPTION_REJECT_EDITS

Source


1 PACKAGE BODY igf_ap_assumption_reject_edits AS
2 /* $Header: IGFAP33B.pls 120.1 2006/04/09 23:49:35 ridas noship $ */
3 
4 /***************************************************************
5 Created By		:	masehgal
6 Date Created By	:	03-Feb-2003
7 Purpose		:	To Check Valid Date
8 Known Limitations,Enhancements or Remarks
9 Change History	:
10 Who			When		What
11 ***************************************************************/
12 
13 /*  DO NOT DELETE the code commented here
14     It is likely to be pulled in in a forthcoming CCR
15   --  CURSOR to be used for fetching the Correction ISIR for the Student
16   --  (  For  edits  2008, 2012, 2025, 2041, 2046, 2060, 2062 )
17   CURSOR   get_corr_record ( cp_base_id    igf_ap_isir_matched.base_id%TYPE )  IS
18      SELECT *
19        FROM igf_ap_isir_matched   isir
20       WHERE isir.base_id  =  cp_base_id
21         AND isir.system_record_type = 'CORRECTION' ;
22 
23   corr_rec    get_corr_record%ROWTYPE ;
24 */
25 
26 
27 PROCEDURE assume_values  (
28                            p_isir_rec       IN  OUT NOCOPY  igf_ap_isir_matched%ROWTYPE ,
29 	                        l_sys_batch_yr   IN              VARCHAR2
30                          ) AS
31 /***************************************************************
32 Created By		:	masehgal
33 Date Created By	:	03-Feb-2003
34 Purpose		:	To make assumption values
35 Known Limitations,Enhancements or Remarks
36 Change History	:
37 Who			When		What
38 ***************************************************************/
39 
40      PROCEDURE chk_num (
41                          p_number  IN           VARCHAR2 ,
42                          ret_num   OUT NOCOPY   NUMBER
43                        ) IS
44      /***************************************************************
45        Created By		:	masehgal
46        Date Created By	:	03-Feb-2003
47        Purpose		:	To Check Valid Date
48        Known Limitations,Enhancements or Remarks
49        Change History	:
50        Who			When		What
51      ***************************************************************/
52 
53      BEGIN
54         ret_num := TO_NUMBER( p_number ) ;
55      EXCEPTION
56         WHEN VALUE_ERROR THEN
57              ret_num := NULL ;
58      END chk_num ;
59 
60 
61      PROCEDURE  a_date_prior_birth  AS
62      /***************************************************************
63        Created By		:	masehgal
64        Date Created By	:	03-Feb-2003
65        Purpose		:	To make assumption for Date of Prior Birth Field
66        Known Limitations,Enhancements or Remarks
67        Change History	:
68        Who			When		What
69      ***************************************************************/
70      --          p_isir_rec.stud_dob_before_date     (1)
71      --          p_isir_rec.date_of_birth            (2)
72      --          p_isir_rec.a_date_of_birth
73 
74      l_prior_date   igf_ap_isir_matched_all.date_of_birth%TYPE ;
75 
76      BEGIN
77         l_prior_date := igf_ap_efc_subf.efc_cutoff_date ( l_sys_batch_yr ) ;
78         --  EDIT 1001
79         IF (    ( p_isir_rec.stud_dob_before_date  IS NULL  OR  p_isir_rec.stud_dob_before_date = '2' )
80             AND (    p_isir_rec.date_of_birth IS NOT NULL
81                  AND p_isir_rec.date_of_birth < l_prior_date )
82            )     THEN
83                  -- assume value  ;
84                  -- skip remaining edits on this field.
85                  p_isir_rec.a_date_of_birth := '1' ;
86         ELSE
87            -- Edit 1001 not met
88            -- Process EDIT 1002
89            IF (    ( p_isir_rec.stud_dob_before_date IS NULL OR  p_isir_rec.stud_dob_before_date = '1' )
90                AND (    p_isir_rec.date_of_birth IS NOT NULL
91                     AND p_isir_rec.date_of_birth >= l_prior_date )
92               )     THEN
93                     -- assume value  ;
94                     -- skip remaining edits on this field.
95                     p_isir_rec.a_date_of_birth := '2' ;
96            ELSE
97                  -- Edit 1002 not met
98                  -- Process EDIT 1003
99                  IF (    p_isir_rec.stud_dob_before_date IS NULL
100                      AND p_isir_rec.date_of_birth IS NULL
101                     )    THEN
102                          -- assume value  ;
103                          p_isir_rec.a_date_of_birth := '2' ;
104                  END IF ;
105            END IF ;
106         END IF ;
107 
108      END a_date_prior_birth ;
109 
110 
111      PROCEDURE  a_stud_married AS
112      /***************************************************************
113        Created By		:	masehgal
114        Date Created By	:	03-Feb-2003
115        Purpose		:	To make assumption for Student's Marital Status
116        Known Limitations,Enhancements or Remarks
117        Change History	:
118        Who			When		What
119      ***************************************************************/
120      --             p_isir_rec.s_married                  (1)
121      --             p_isir_rec.s_marital_status           (2)
122      --             p_isir_rec.s_num_family_members       (3)
123      --             p_isir_rec.s_have_children            (4)
124      --             p_isir_rec.legal_dependents           (5)
125      --             p_isir_rec.spouse_income_from_work    (6)
126      --             p_isir_rec.a_student_married
127 
128      BEGIN
129         -- EDIT 1004
130         IF (    ( p_isir_rec.s_married IS NULL    OR    p_isir_rec.s_married = '2' )
131             AND   p_isir_rec.s_marital_status IN ('2','3')
132            )      THEN
133                   -- assume value
134                   -- skip remainig edits on this field
135                   p_isir_rec.a_student_married := '1' ;
136         ELSE
137            -- EDIT 1005
138            IF (   ( p_isir_rec.s_married IS NULL   OR    p_isir_rec.s_married = '1')
139                AND  p_isir_rec.s_marital_status = '1'
140               )     THEN
141                     -- assume value
142                     -- skip remainig edits on this field
143                     p_isir_rec.a_student_married := '2' ;
144            ELSE
145               -- EDIT 1006
146               IF (    ( p_isir_rec.s_married IS NULL   OR   p_isir_rec.s_married =  '1' )
147                   AND   p_isir_rec.s_marital_status IS NULL
148                   AND (    p_isir_rec.s_num_family_members IS NULL
149                        OR  p_isir_rec.s_num_family_members = 0
150                        OR  p_isir_rec.s_num_family_members = 1 )
151                  )     THEN
152                        -- assume value
153                        -- skip remainig edits on this field
154                        p_isir_rec.a_student_married := '2' ;
155               ELSE
156                  -- EDIT 1007
157                  IF (    p_isir_rec.s_married IS NULL
158                      AND p_isir_rec.s_marital_status IS NULL
159                      AND p_isir_rec.s_num_family_members = 2
160                      AND p_isir_rec.s_have_children = '2'
161                      AND p_isir_rec.legal_dependents = '2'
162                     )    THEN
163                          -- assume value
164                          -- skip remainig edits on this field
165                          p_isir_rec.a_student_married := '1' ;
166                  ELSE
167                      -- EDIT 1008
168                      IF (    ( p_isir_rec.s_married IS NULL   OR   p_isir_rec.s_married = '1' )
169                          AND   p_isir_rec.s_marital_status IS NULL
170                          AND   p_isir_rec.s_num_family_members = 2
171                          AND ( p_isir_rec.s_have_children =  '1'   OR   p_isir_rec.legal_dependents =  '1' )
172                         )     THEN
173                               -- assume value
174                               -- skip remainig edits on this field
175                               p_isir_rec.a_student_married := '2' ;
176                      ELSE
177                         -- EDIT 1009
178                         IF (    ( p_isir_rec.s_married IS NULL   OR   p_isir_rec.s_married = '2')
179                             AND   p_isir_rec.s_marital_status  IS NULL
180                             AND   p_isir_rec.s_num_family_members = 2
181                             AND   p_isir_rec.s_have_children IS NULL
182                             AND   p_isir_rec.legal_dependents IS NULL
183                             AND ( p_isir_rec.spouse_income_from_work is not NULL   AND   p_isir_rec.spouse_income_from_work <> 0 )
184                            )      THEN
185                                   -- assume value
186                                   -- skip remainig edits on this field
187                                   p_isir_rec.a_student_married := '1' ;
188                         ELSE
189                            -- EDIT 1010
190                            IF (    ( p_isir_rec.s_married IS NULL   OR   p_isir_rec.s_married = '1')
191                                AND   p_isir_rec.s_marital_status IS NULL
192                                AND   p_isir_rec.s_num_family_members = 2
193                                AND   p_isir_rec.s_have_children IS NULL
194                                AND   p_isir_rec.legal_dependents IS NULL
195                                AND ( p_isir_rec.spouse_income_from_work IS NULL   OR   p_isir_rec.spouse_income_from_work = 0 )
196                               )      THEN
197                                      -- assume value
198                                      -- skip remainig edits on this field
199                                      p_isir_rec.a_student_married := '2' ;
200                            ELSE
201                               -- EDIT 1011
202                               IF (    ( p_isir_rec.s_married IS NULL   OR   p_isir_rec.s_married = '2' )
203                                   AND   p_isir_rec.s_marital_status  IS NULL
204                                   AND   p_isir_rec.s_num_family_members > 2
205                                   AND ( p_isir_rec.spouse_income_from_work is not NULL   AND   p_isir_rec.spouse_income_from_work <> 0)
206                                  )      THEN
207                                         -- assume value
208                                         -- skip remainig edits on this field
209                                         p_isir_rec.a_student_married := '1' ;
210                               ELSE
211                                  -- EDIT 1012
212                                  IF (    ( p_isir_rec.s_married IS NULL   OR   p_isir_rec.s_married = '1')
213                                      AND   p_isir_rec.s_marital_status  IS NULL
214                                      AND   p_isir_rec.s_num_family_members > 2
215                                      AND ( p_isir_rec.spouse_income_from_work IS NULL   OR   p_isir_rec.spouse_income_from_work = 0 )
216                                     )      THEN
217                                            -- assume value
218                                            -- skip remainig edits on this field
219                                            p_isir_rec.a_student_married := '2' ;
220                                  END IF ;  -- Edit 1012
221                               END IF ;  -- Edit 1011
222                            END IF ;  -- Edit 1010
223                        END IF ;  -- Edit 1009
224                     END IF ;  -- Edit 1008
225                  END IF ;  -- Edit 1007
226               END IF ;  -- Edit 1006
227            END IF ;  -- Edit 1005
228         END IF ;  -- Edit 1004
229 
230      END a_stud_married;
231 
232 
233      PROCEDURE  a_stud_have_children AS
234      /***************************************************************
235        Created By		:	masehgal
236        Date Created By	:	03-Feb-2003
237        Purpose		:	To make assumption for Student's Children
238        Known Limitations,Enhancements or Remarks
239        Change History	:
240        Who			When		What
241      ***************************************************************/
242      --           p_isir_rec.s_num_family_members    (1)
243      --           p_isir_rec.s_have_children         (2)
244      --           p_isir_rec.legal_dependents        (3)
245      --           p_isir_rec.a_have_children
246      --           p_isir_rec.a_s_have_dependents
247 
248      BEGIN
249         -- Edit 1013
250         IF (    (   p_isir_rec.s_num_family_members IS NULL
251                  OR p_isir_rec.s_num_family_members = 0
252                  OR p_isir_rec.s_num_family_members = 1 )
253             AND  p_isir_rec.s_have_children = '1'
254            )     THEN
255                  -- assume value
256                  p_isir_rec.a_have_children := '2' ;
257         END IF ;
258      END a_stud_have_children;
259 
260 
261      PROCEDURE  a_stud_legal_depend AS
262      /***************************************************************
263        Created By		:	masehgal
264        Date Created By	:	03-Feb-2003
265        Purpose		:	To make assumption for Student's Legal Dependents
266        Known Limitations,Enhancements or Remarks
267        Change History	:
268        Who			When		What
269      ***************************************************************/
270      --           p_isir_rec.s_num_family_members    (1)
271      --           p_isir_rec.s_have_children         (2)
272      --           p_isir_rec.legal_dependents        (3)
273      --           p_isir_rec.a_have_children
274      --           p_isir_rec.a_s_have_dependents
275 
276      BEGIN
277         -- Edit 1013
278         IF (    (   p_isir_rec.s_num_family_members IS NULL
279                  OR p_isir_rec.s_num_family_members = 0
280                  OR p_isir_rec.s_num_family_members = 1 )
281             AND  p_isir_rec.legal_dependents = '1'
282            )     THEN
283                  -- assume value
284                  p_isir_rec.a_s_have_dependents := '2' ;
285         END IF ;
286 
287      END a_stud_legal_depend;
288 
289 
290      PROCEDURE  a_stud_veteran_status AS
291      /***************************************************************
292        Created By		:	masehgal
293        Date Created By	:	03-Feb-2003
294        Purpose		:	To make assumption Student's Veteran Status
298      ***************************************************************/
295        Known Limitations,Enhancements or Remarks
296        Change History	:
297        Who			When		What
299      --              p_isir_rec.s_veteran      (1)
300      --              p_isir_rec.va_match_flag  (2)
301      --              p_isir_rec.a_va_status
302 
303      BEGIN
304         -- Edit 1014
305         IF p_isir_rec.batch_year IN ('6','7') THEN
306           -- this edit not required for award year 5
307           NULL;
308         ELSE
309           IF (    p_isir_rec.s_veteran = '1'
310               AND p_isir_rec.va_match_flag IN ('2','3')
311              )    THEN
312                   -- assume value
313                   p_isir_rec.a_va_status := '2' ;
314           END IF ;
315         END IF;
316 
317      END a_stud_veteran_status;
318 
319 
320      PROCEDURE  assum_depend_status AS
321      /***************************************************************
322        Created By		:	masehgal
323        Date Created By	:	03-Feb-2003
324        Purpose		:	To make assumption for Student's Dependency Status
325        Known Limitations,Enhancements or Remarks
326        Change History	:
327        Who			When		What
328      ***************************************************************/
329      --           p_isir_rec.a_date_of_birth            (1)
330      --           p_isir_rec.stud_dob_before_date       (2)
331      --           p_isir_rec.a_va_status                (3)
332      --           p_isir_rec.s_veteran                  (4)
333      --           p_isir_rec.deg_beyond_bachelor        (5)
334      --           p_isir_rec.a_student_married          (6)
335      --           p_isir_rec.s_married                  (7)
336      --           p_isir_rec.orphan_ward_of_court       (8)
337      --           p_isir_rec.a_have_children            (9)
338      --           p_isir_rec.s_have_children            (10)
339      --           p_isir_rec.a_s_have_dependents        (11)
340      --           p_isir_rec.legal_dependents           (12)
341      --           p_isir_rec.dependency_status
342      --           p_isir_rec.dependency_override_ind    (14)
343 
344      BEGIN
345         -- Dependency Edit --1015
346         IF (   (NVL (p_isir_rec.a_date_of_birth     , p_isir_rec.stud_dob_before_date ) = '1' )
347             OR (NVL (p_isir_rec.a_va_status         , p_isir_rec.s_veteran            ) = '1' )
348             OR (NVL (p_isir_rec.deg_beyond_bachelor , '0'                             ) = '1' )
349             OR (NVL (p_isir_rec.orphan_ward_of_court, '0'                             ) = '1' )
350             OR (NVL (p_isir_rec.a_have_children     , p_isir_rec.s_have_children      ) = '1' )
351             OR (NVL (p_isir_rec.a_s_have_dependents , p_isir_rec.legal_dependents     ) = '1' )
352             OR (NVL (p_isir_rec.a_student_married   , p_isir_rec.s_married            ) = '1' )
353            )    THEN
354                 --  assume values ;
355                 -- skip remainig edits on this field
356                 p_isir_rec.dependency_status := 'I' ;
357         ELSE --1016
358                --  assume values ;
359                -- skip remainig edits on this field
360                p_isir_rec.dependency_status := 'D' ;
361         END IF ;
362 
363         --Edit 1017 (new edit 1016)
364         IF  p_isir_rec.dependency_status = 'D' AND p_isir_rec.dependency_override_ind = '1'  THEN
365             p_isir_rec.dependency_status := 'I' ;
366         END IF ;
367      END assum_depend_status;
368 
369 
370      PROCEDURE  a_p_marital_status AS
371      /***************************************************************
372        Created By		:	masehgal
373        Date Created By	:	03-Feb-2003
374        Purpose		:	To make assumption for Parent's Marital Status
375        Known Limitations,Enhancements or Remarks
376        Change History	:
377        Who			When		What
378      ***************************************************************/
379      --              p_isir_rec.p_marital_status           (1)
380      --              p_isir_rec.p_num_family_member        (2)
381      --              p_isir_rec.a_p_marital_status
382 
383      BEGIN
384         -- Edit  2001
385         IF (    p_isir_rec.p_marital_status IS NULL
386             AND p_isir_rec.p_num_family_member > 2
387            )    THEN
388                 -- assume value ;
389                 p_isir_rec.a_p_marital_status := '1' ;
390         END IF ;
391 
392         -- Edit 2002
393         IF (    p_isir_rec.p_marital_status IS NULL
394             AND p_isir_rec.p_num_family_member = 2
395            )    THEN
396                 -- assume value ;
397                 p_isir_rec.a_p_marital_status := '2' ;
398         END IF ;
399 
400      END a_p_marital_status;
401 
402 
403      PROCEDURE  a_p_num_in_fam AS
404      /***************************************************************
405        Created By		:	masehgal
406        Date Created By	:	03-Feb-2003
407        Purpose		:	To make assumption for Parent's Family Number
408        Known Limitations,Enhancements or Remarks
409        Change History	:
410        Who			When		What
411      ***************************************************************/
412      --           p_isir_rec.p_num_family_member  (1)
413      --           p_isir_rec.a_p_marital_status   (2)
414      --           p_isir_rec.p_marital_status     (3)
415      --           p_isir_rec.a_parents_num_family
416 
417      BEGIN
418 
419         -- Edit 2003
423             AND ( p_isir_rec.p_marital_status = '1' )
420         IF (    (   p_isir_rec.p_num_family_member IS NULL
421                  OR p_isir_rec.p_num_family_member = 1
422                  OR p_isir_rec.p_num_family_member = 2     )
424            )     THEN
425                  -- assume value ;
426                  p_isir_rec.a_parents_num_family := 3 ;
427         END IF ;
428 
429         -- Edit 2004
430         IF (    (     NVL ( p_isir_rec.a_parents_num_family, p_isir_rec.p_num_family_member) IS NULL
431                   OR  NVL ( p_isir_rec.a_parents_num_family, p_isir_rec.p_num_family_member) = 1 )
432             AND ( p_isir_rec.p_marital_status  IN ('2','3','4'))
433            )     THEN
434                  -- assume value ;
435                  p_isir_rec.a_parents_num_family := 2 ;
436         END IF ;
437 
438      END a_p_num_in_fam;
439 
440 
441      PROCEDURE  a_p_num_in_col AS
442      /***************************************************************
443        Created By		:	masehgal
444        Date Created By	:	03-Feb-2003
445        Purpose		:	To make assumption for Parent's Number of Family Members in College
446        Known Limitations,Enhancements or Remarks
447        Change History	:
448        Who			When		What
449      ***************************************************************/
450      --              p_isir_rec.p_num_in_college        (1)
451      --              p_isir_rec.a_parents_num_family    (2)
452      --              p_isir_rec.p_num_family_member     (3)
453      --              p_isir_rec.faa_adjustment          (4)
454      --              p_isir_rec.a_p_marital_status      (5)
455      --              p_isir_rec.p_marital_status        (6)
456      --              p_isir_rec.system_record_type      (7)
457      --              p_isir_rec.a_parents_num_college
458 
459      BEGIN
460         -- Edit 2005
461         IF ( p_isir_rec.p_num_in_college IS NULL   OR   p_isir_rec.p_num_in_college = 0 ) THEN
462              -- assume value ;
463              p_isir_rec.a_parents_num_college := 1 ;
464         END IF ;
465 
466         -- Edit 2006
467         IF (    NVL ( p_isir_rec.a_parents_num_college, p_isir_rec.p_num_in_college) = NVL ( p_isir_rec.a_parents_num_family, p_isir_rec.p_num_family_member )
468             AND NVL ( p_isir_rec.a_parents_num_college, p_isir_rec.p_num_in_college) > 1
469             AND NVL ( p_isir_rec.faa_adjustment,'2' ) <> '1'
470            )    THEN
471                 -- assume value ;
472                 p_isir_rec.a_parents_num_college := 1 ;
473         END IF ;
474 
475         -- Edit 2007
476         IF p_isir_rec.assum_override_1 = '1' THEN
477            NULL ;
478         ELSE
479            -- if override is not set only then make assumptions
480 
481           -- Edit 2007 .. if Override not set
482 /*  DO NOT DELETE the code commented here
483     It is likely to be pulled in in a forthcoming CCR
484 
485                  IF     p_isir_rec.system_record_type <> 'CORRECTION'
486                     AND p_isir_rec.p_num_in_college > 6 THEN
487 */
488            IF  NVL ( p_isir_rec.a_parents_num_college, p_isir_rec.p_num_in_college) > 6 THEN
489                -- assume value ;
490                p_isir_rec.a_parents_num_college := 1 ;
491            END IF;
492 
493 /*  DO NOT DELETE the code commented here
494     It is likely to be pulled in in a forthcoming CCR
495                        -- Edit 2008
496                        -- Select the Correction Record for the same student and in that record
497                        IF  corr_rec.p_num_in_college > 6 THEN
498                            -- Assume value ;
499                            -- skip remainig edits on this field
500                            p_isir_rec.a_parents_num_college := NULL ;
501                        END IF ; -- Edit 2008
502 */
503         END IF ; -- for override condition
504 
505         -- Edit 2009
506         IF NVL ( p_isir_rec.a_parents_num_college, p_isir_rec.p_num_in_college) > NVL ( p_isir_rec.a_parents_num_family, p_isir_rec.p_num_family_member )  THEN
507            -- Assume value ;
508            p_isir_rec.a_parents_num_college := 1 ;
509         END IF ;
510 
511         -- Edit 2010
512         IF (    NVL ( p_isir_rec.a_parents_num_college, p_isir_rec.p_num_in_college) > NVL ( p_isir_rec.a_parents_num_family, p_isir_rec.p_num_family_member ) - 2
513             AND p_isir_rec.p_marital_status = '1'
514             AND NVL ( p_isir_rec.faa_adjustment, '2')  <> '1'
515            )    THEN
516                 --Assume value ;
517                 p_isir_rec.a_parents_num_college := NVL ( p_isir_rec.a_parents_num_family, p_isir_rec.p_num_family_member ) - 2  ;
518         END IF ;
519 
520 
521      END a_p_num_in_col;
522 
523 
524      PROCEDURE  a_p_agi AS
525      /***************************************************************
526        Created By		:	masehgal
527        Date Created By	:	03-Feb-2003
528        Purpose		:	To make assumption for Parent's AGI
529        Known Limitations,Enhancements or Remarks
530        Change History	:
531        Who			When		What
532      ***************************************************************/
533      --              p_isir_rec.p_adjusted_gross_income    (1)
534      --              p_isir_rec.p_type_tax_return          (2)
535      --              p_isir_rec.p_tax_return_status        (3)
536      --              p_isir_rec.f_income_work              (4)
537      --              p_isir_rec.m_income_work              (5)
538      --              p_isir_rec.system_record_type         (6)
542         -- Edit 2011
539      --              p_isir_rec.a_parents_agi
540 
541      BEGIN
543         IF p_isir_rec.assum_override_2 = '1' THEN
544            NULL ;
545         ELSE
546            -- skip assumption if override flag set
547 /*  DO NOT DELETE the code commented here
548     It is likely to be pulled in in a forthcoming CCR
549 
550            IF      p_isir_rec.system_record_type <> 'CORRECTION'
551               AND (p_isir_rec.p_adjusted_gross_income IS NULL   OR   p_isir_rec.p_adjusted_gross_income = 0 )
552 */
553            IF (    (p_isir_rec.p_adjusted_gross_income IS NULL   OR   p_isir_rec.p_adjusted_gross_income = 0 )
554                AND (     p_isir_rec.p_type_tax_return IS NOT NULL
555                     OR ( p_isir_rec.p_type_tax_return IS NULL   AND   p_isir_rec.p_tax_return_status in ('1','2')))
556                AND (   ( p_isir_rec.f_income_work IS NOT NULL   AND   p_isir_rec.f_income_work <> 0 )
557                     OR ( p_isir_rec.m_income_work IS NOT NULL   AND   p_isir_rec.m_income_work <> 0 ) )
558               )     THEN
559                     -- assume value ;
560                     IF NVL(p_isir_rec.f_income_work,0) + NVL(p_isir_rec.m_income_work,0) > 999999 THEN
561                        p_isir_rec.a_parents_agi := 999999 ;
562                     ELSIF NVL(p_isir_rec.f_income_work,0) + NVL(p_isir_rec.m_income_work,0) < -999999 THEN
563                        p_isir_rec.a_parents_agi := -999999 ;
564                     ELSE
565                        p_isir_rec.a_parents_agi := NVL(p_isir_rec.f_income_work,0) + NVL(p_isir_rec.m_income_work,0);
566                     END IF ;
567            END IF ; -- Edit 2011
568 
569 /*
570            -- ASSUMED EDIT FOR -VE to +VE Conversion
571            IF NVL(p_isir_rec.a_parents_agi , p_isir_rec.p_adjusted_gross_income) < 0 THEN
572                 -- assume value ;
573                 p_isir_rec.a_parents_agi := 0 - NVL(p_isir_rec.a_parents_agi , p_isir_rec.p_adjusted_gross_income) ;
574            END IF ;  -- Edit ends
575 */
576 
577 
578 /*  DO NOT DELETE the code commented here
579     It is likely to be pulled in in a forthcoming CCR
580            -- Edit 2012
581            IF     p_isir_rec.system_record_type <> 'CORRECTION'
582               --  Select the Correction Record for the same student and in that record (1) = 0
583               AND corr_rec.p_adjusted_gross_income = 0  THEN
584                   -- assume value ;
585                   p_isir_rec.a_parents_agi := NULL ;
586            END IF ; -- Edit 2012
587 */
588         END IF ; -- Override condition
589 
590      END a_p_agi;
591 
592 
593      PROCEDURE  a_f_work_income AS
594      /***************************************************************
595        Created By		:	masehgal
596        Date Created By	:	03-Feb-2003
597        Purpose		:	To make assumption for Father's Income from work
598        Known Limitations,Enhancements or Remarks
599        Change History	:
600        Who			When		What
601      ***************************************************************/
602      --              p_isir_rec.a_parents_agi              (1)
603      --              p_isir_rec.p_adjusted_gross_income    (2)
604      --              p_isir_rec.p_tax_return_status        (3)
605      --              p_isir_rec.f_income_work              (4)
606      --              p_isir_rec.m_income_work              (5)
607      --              p_isir_rec.p_cal_tax_status           (6)
608      --              p_isir_rec.a_f_work_income
609 
610      BEGIN
611 
612         -- Edit 2013
613         IF (     NVL ( p_isir_rec.a_parents_agi, p_isir_rec.p_adjusted_gross_income ) > 0
614             AND   p_isir_rec.p_tax_return_status = '3'
615             AND ( p_isir_rec.f_income_work IS NULL   OR   p_isir_rec.f_income_work = 0 )
616             AND ( p_isir_rec.m_income_work IS NULL   OR   p_isir_rec.m_income_work = 0 )
617            )      THEN
618                   -- assume value ;
619                   p_isir_rec.a_f_work_income := NVL ( p_isir_rec.a_parents_agi, p_isir_rec.p_adjusted_gross_income ) ;
620         END IF ; -- Edit 2013
621      END a_f_work_income;
622 
623 
624      PROCEDURE  a_p_tax_status AS
625      /***************************************************************
626        Created By		:	masehgal
627        Date Created By	:	03-Feb-2003
628        Purpose		:	To make assumption for Parent's Tax Status
629        Known Limitations,Enhancements or Remarks
630        Change History	:
631        Who			When		      What
632        ridas    04-Apr-06     Added new logic for Edits 2016 and 2018 for Award Year 06-07
633                               FA160 build
634      ***************************************************************/
635      --              p_isir_rec.p_type_tax_return          (1)
636      --              p_isir_rec.p_tax_return_status        (2)
637      --              p_isir_rec.a_parents_agi              (3)
638      --              p_isir_rec.p_adjusted_gross_income    (4)
639      --              p_isir_rec.p_cal_tax_status
640 
641      BEGIN
642         -- Edit  2014
643         IF p_isir_rec.p_type_tax_return is not NULL THEN
644            -- assume value ;
645            p_isir_rec.p_cal_tax_status  := '1' ;
646         END IF ;
647 
648         -- Edit 2015
649         IF (    p_isir_rec.p_type_tax_return IS NULL
650             AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IN ('1','2')
654         END IF ;
651            )    THEN
652                 -- assume value ;
653                 p_isir_rec.p_cal_tax_status  := '1' ;
655 
656         -- Edit 2016
657         IF p_isir_rec.batch_year = '7' THEN
658           IF (p_isir_rec.p_type_tax_return IS NULL AND NVL(p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IS NULL
659                AND (NVL(p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income) IS NOT NULL
660                AND NVL(p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income) <>0)
661               ) THEN
662                -- assume value
663                p_isir_rec.p_cal_tax_status  := '1' ;
664           END IF;
665         ELSE
666           IF (    p_isir_rec.p_type_tax_return IS NULL
667               AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IS NULL
668               AND (NVL(p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income) IS NOT NULL )
669              )     THEN
670                    -- assume value ;
671                p_isir_rec.p_cal_tax_status  := '1' ;
672           END IF ;
673         END IF; --Edit 2016
674 
675         -- Edit 2017
676         IF (    p_isir_rec.p_type_tax_return IS NULL
677             AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) = '3'
678            )    THEN
679                 -- assume value ;
680                 p_isir_rec.p_cal_tax_status  := '4' ;
681         END IF ;
682 
683         -- Edit 2018
684         IF p_isir_rec.batch_year = '7' THEN
685            IF (p_isir_rec.p_type_tax_return IS NULL AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IS NULL
686               AND (NVL (p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income) IS NULL
687                    OR NVL (p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income) =0)
688               ) THEN
689                -- assume value ;
690                p_isir_rec.p_cal_tax_status  := '4' ;
691            END IF ;
692         ELSE
693            IF (    p_isir_rec.p_type_tax_return IS NULL
694                 AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IS NULL
695                 AND NVL (p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income) IS NULL
696                )    THEN
697                     -- assume value ;
698                 p_isir_rec.p_cal_tax_status  := '4' ;
699            END IF ;
700         END IF ; -- Edit 2018
701 
702      END a_p_tax_status;
703 
704 /*
705      PROCEDURE ASSUMED_EDIT_FOR_P_AGI  AS
706 
707      BEGIN
708         -- ASSUMED EDIT FOR -VE to +VE Conversion
709          IF (     NVL(p_isir_rec.a_parents_agi , p_isir_rec.p_adjusted_gross_income) < 0
710               AND p_isir_rec.p_tax_return_status in ('1','2')
711             ) THEN
712               -- assume value ;
713               p_isir_rec.a_parents_agi := 0 - p_isir_rec.a_parents_agi ;
714         END IF ;  -- Edit 2019
715      END ASSUMED_EDIT_FOR_P_AGI;
716 */
717 
718 
719      PROCEDURE  a_p_us_tax_paid AS
720      /***************************************************************
721        Created By		:	masehgal
722        Date Created By	:	03-Feb-2003
723        Purpose		:	To make assumption for Parent's Tax Payment Status
724        Known Limitations,Enhancements or Remarks
725        Change History	:
726        Who			When		What
727      ***************************************************************/
728      --           p_isir_rec.p_taxes_paid         (1)
729      --           p_isir_rec.p_cal_tax_status     (2)
730      --           p_isir_rec.a_p_us_tax_paid
731 
732      BEGIN
733         -- Edit 2019
734         IF (    p_isir_rec.p_taxes_paid IS NULL
735             AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IN ('1','2','3')
736            )    THEN
737                 -- assume value ;
738                 p_isir_rec.a_p_us_tax_paid := 0 ;
739         END IF ;  -- Edit 2019
740      END a_p_us_tax_paid;
741 
742 
743      PROCEDURE  a_f_work_income_resume AS
744      /***************************************************************
745        Created By		:	masehgal
746        Date Created By	:	03-Feb-2003
747        Purpose		:	To make assumption for Mother's Income from work
748        Known Limitations,Enhancements or Remarks
749        Change History	:
750        Who			When		What
751      ***************************************************************/
752      -- p_isir_rec.f_income_work            (1)
753      -- p_isir_rec.m_income_work            (2)
754      -- p_isir_rec.a_parents_agi            (3)
755      -- p_isir_rec.p_adjusted_gross_income  (4)
756      -- p_isir_rec.a_f_work_income
757      -- p_isir_rec.a_f_work_income
758 
759      BEGIN
760         -- Edit 2020
761         IF (    NVL( p_isir_rec.a_f_work_income, p_isir_rec.f_income_work) IS NULL
762             AND    ( p_isir_rec.m_income_work IS NULL  OR  p_isir_rec.m_income_work = 0 )
763             AND (    NVL( p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income ) IS NOT NULL
764                  AND NVL( p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income ) <> 0        )
765            )     THEN
766                  -- assume value
767                  p_isir_rec.a_f_work_income := NVL (p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income ) ;
768         END IF ;
769 
770         -- Edit 2022
774                 -- assume value
771         IF (    NVL ( p_isir_rec.a_f_work_income, p_isir_rec.f_income_work) <  0
772             AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IN ('4','5')
773            )    THEN
775                 p_isir_rec.a_f_work_income := 0 - NVL ( p_isir_rec.a_f_work_income, p_isir_rec.f_income_work) ;
776         END IF ; -- Edit 2022
777 
778      END a_f_work_income_resume;
779 
780 
781      PROCEDURE  a_m_work_income AS
782      /***************************************************************
783        Created By		:	masehgal
784        Date Created By	:	03-Feb-2003
785        Purpose		:	To make assumption for Mother's Income from work
786        Known Limitations,Enhancements or Remarks
787        Change History	:
788        Who			When		What
789      ***************************************************************/
790      --              p_isir_rec.a_f_work_income         (1)
791      --              p_isir_rec.f_income_work           (2)
792      --              p_isir_rec.m_income_work           (3)
793      --              p_isir_rec.a_parents_agi           (4)
794      --              p_isir_rec.p_adjusted_gross_income (5)
795      --              p_isir_rec.a_m_work_income
796 
797      BEGIN
798         -- Edit 2021
799         IF (    NVL(p_isir_rec.a_f_work_income, p_isir_rec.f_income_work) = 0
800             AND p_isir_rec.m_income_work IS NULL
801             AND (    NVL (p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income ) IS NOT NULL
802                  AND NVL (p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income ) <> 0        )
803            )     THEN
804                  -- assume value
805                  -- skip remaining edits on this field
806                  p_isir_rec.a_m_work_income := NVL (p_isir_rec.a_parents_agi ,p_isir_rec.p_adjusted_gross_income ) ;
807         END IF ;
808 
809         -- Edit 2023
810         IF (    NVL ( p_isir_rec.a_m_work_income , p_isir_rec.m_income_work) <  0
811             AND NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IN ('4','5')
812            )    THEN
813                 -- assume value
814                 p_isir_rec.a_m_work_income := 0 - p_isir_rec.m_income_work ;
815         END IF ; -- Edit 2023
816      END a_m_work_income ;
817 
818 
819      PROCEDURE  a_p_total_wsc AS
820      /***************************************************************
821        Created By		:	masehgal
822        Date Created By	:	03-Feb-2003
823        Purpose		:	To make assumption for Parent's Total Income from Worksheet C
824        Known Limitations,Enhancements or Remarks
825        Change History	:
826        Who			When		What
827      ***************************************************************/
828      -- p_isir_rec.p_income_wsc             (1)
829      -- p_isir_rec.a_parents_agi            (2)
830      -- p_isir_rec.p_adjusted_gross_income  (3)
831      -- p_isir_rec.p_income_wsa             (4)
832      -- p_isir_rec.p_income_wsb             (5)
833      -- p_isir_rec.p_cal_tax_status         (6)
834      -- p_isir_rec.a_f_work_income          (7)
835      -- p_isir_rec.f_income_work            (8)
836      -- p_isir_rec.a_m_work_income          (9)
837      -- p_isir_rec.m_income_work            (10)
838      -- p_isir_rec.system_record_type       (11)
839      -- p_isir_rec.a_p_total_wsc
840 
841      BEGIN
842 
843         -- Edit 2024
844         IF p_isir_rec.assum_override_5 = '1'  THEN
845            NULL ;
846         ELSE
847            -- skip assumption if override flag is set
848 /*  DO NOT DELETE the code commented here
849     It is likely to be pulled in in a forthcoming CCR
850 
851            IF      p_isir_rec.system_record_type <> 'CORRECTION'
852               AND (     (p_isir_rec.p_income_wsc > 0
853 */
854            IF (    (     (p_isir_rec.p_income_wsc > 0
855                      AND (   (    NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IN ('1','2','3')
856                               AND p_isir_rec.p_income_wsc > 0.9 * (GREATEST (NVL (NVL (p_isir_rec.a_parents_agi, p_isir_rec.p_adjusted_gross_income ) ,0 ) , 0 )  +
857                                                                    GREATEST (     NVL (p_isir_rec.p_income_wsa ,0 ),0 )                                         +
858                                                                    GREATEST (     NVL (p_isir_rec.p_income_wsb ,0 ),0 )                                         ) ) )
859                           OR (    NVL ( p_isir_rec.p_cal_tax_status, p_isir_rec.p_tax_return_status) IN ('4','5')
860                               AND p_isir_rec.p_income_wsc > 0.9 * (GREATEST (NVL (NVL (p_isir_rec.a_f_work_income, p_isir_rec.f_income_work )         ,0 ) , 0 )  +
861                                                                    GREATEST (NVL (NVL (p_isir_rec.a_m_work_income, p_isir_rec.m_income_work )         ,0 ) , 0 )  +
862                                                                    GREATEST (     NVL (p_isir_rec.p_income_wsa ,0 ),0 )                                         +
863                                                                    GREATEST (     NVL (p_isir_rec.p_income_wsb ,0 ),0 )                                         ) ) ) )
864               )      THEN
865                      -- Assume value ;
866                      p_isir_rec.a_p_total_wsc := 0 ;
867            END IF ; -- Edit 2024
868 
869 /*  DO NOT DELETE the code commented here
870     It is likely to be pulled in in a forthcoming CCR
871 
872            -- do not skip Edit 2025
876                    AND (   (    corr_rec.p_cal_tax_status IN ('1','2','3')
873            -- Edit 2025
874            IF     p_isir_rec.system_record_type <> 'CORRECTION'
875               AND (     (corr_rec.p_income_wsc > 0
877                             AND corr_rec.p_income_wsc > 0.9 * (GREATEST (NVL (NVL (corr_rec.a_parents_agi, corr_rec.p_adjusted_gross_income ) ,0 ) , 0 )  +
878                                                                GREATEST (     NVL (corr_rec.p_income_wsa ,0 ),0 )                                         +
879                                                                GREATEST (     NVL (corr_rec.p_income_wsb ,0 ),0 )                                         ) ) )
880                         OR (    corr_rec.p_cal_tax_status IN ('4','5')
881                             AND corr_rec.p_income_wsc > 0.9 * (GREATEST (NVL (NVL (corr_rec.a_f_work_income, corr_rec.f_income_work )         ,0 ) , 0 )  +
882                                                                GREATEST (NVL (NVL (corr_rec.a_m_work_income, corr_rec.m_income_work )         ,0 ) , 0 )  +
883                                                                GREATEST (     NVL (corr_rec.p_income_wsa ,0 ),0 )                                         +
884                                                                GREATEST (     NVL (corr_rec.p_income_wsb ,0 ),0 )                                         ) ) ) )   THEN
885                                 -- Assume value ;
886                                 p_isir_rec.a_p_total_wsc := NULL ;
887            END IF ; -- Edit 2025
888 */
889         END IF ; -- Override Condition
890 
891      END a_p_total_wsc;
892 
893 
894      PROCEDURE  a_stud_citizenship AS
895      /***************************************************************
896        Created By		:	masehgal
897        Date Created By	:	03-Feb-2003
898        Purpose		:	To make assumption for Student's Citizenship
899        Known Limitations,Enhancements or Remarks
900        Change History	:
901        Who			When		What
902      ***************************************************************/
903      --              p_isir_rec.citizenship_status      (1)
904      --              p_isir_rec.alien_reg_number        (2)
905      --              p_isir_rec.ssn_match_flag          (3)
906      --              p_isir_rec.ssa_citizenship_flag    (4)
907      --              p_isir_rec.a_citizenship
908 
909      l_val_num   NUMBER ;
910 
911      BEGIN
912         chk_num ( p_isir_rec.alien_reg_number , l_val_num ) ;
913         -- Edit 2026
914         IF (    p_isir_rec.citizenship_status IS NULL
915             AND (l_val_num is not NULL   AND   LENGTH(l_val_num) < 9   AND   LENGTH(l_val_num) > 7 )
916            )     THEN
917                  -- assume value ;
918                  p_isir_rec.a_citizenship := '2' ;
919         END IF ;
920 
921         -- Edit 2027
922         IF (    (p_isir_rec.citizenship_status IS NULL     OR   p_isir_rec.citizenship_status = '2')
923             AND  p_isir_rec.alien_reg_number IS NULL
924             AND  p_isir_rec.ssn_match_flag = 4
925             AND (p_isir_rec.ssa_citizenship_flag IS NULL   OR   p_isir_rec.ssa_citizenship_flag = 'A')
926            )     THEN
927                  -- assume value
928                  p_isir_rec.a_citizenship := '1' ;
929         END IF ; -- Edit 2027
930 
931      END a_stud_citizenship;
932 
933 
934      PROCEDURE  a_stud_marital_status AS
935      /***************************************************************
936        Created By		:	masehgal
937        Date Created By	:	03-Feb-2003
938        Purpose		:	To make assumption for Student's Marital Status
939        Known Limitations,Enhancements or Remarks
940        Change History	:
941        Who			When		What
942      ***************************************************************/
943      --              p_isir_rec.dependency_status        (1)
944      --              p_isir_rec.s_marital_status         (2)
945      --              p_isir_rec.s_num_family_members     (3)
946      --              p_isir_rec.a_have_children          (4)
947      --              p_isir_rec.s_have_children          (5)
948      --              p_isir_rec.a_s_have_dependents      (6)
949      --              p_isir_rec.legal_dependents         (7)
950      --              p_isir_rec.spouse_income_from_work  (8)
951      --              p_isir_rec.a_student_marital_status
952 
953      BEGIN
954         -- Edit 2028
955         IF (    p_isir_rec.dependency_status = 'I'
956             AND p_isir_rec.s_marital_status IS NULL
957             AND p_isir_rec.s_num_family_members = 1
958            )    THEN
959                 -- assume value
960                 p_isir_rec.a_student_marital_status := '1' ;
961         END IF ;
962 
963         -- Edit 2029
964         IF (    p_isir_rec.dependency_status = 'I'
965                AND NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) IS NULL
966                AND p_isir_rec.s_num_family_members = 2
967                AND NVL(p_isir_rec.a_have_children ,p_isir_rec.s_have_children) = '2'
968                AND NVL(p_isir_rec.a_s_have_dependents ,p_isir_rec.legal_dependents) = '2'
969               )    THEN
970                    -- assume value
971                    p_isir_rec.a_student_marital_status := '2' ;
972         END IF ;
973 
974         -- Edit 2030
975         IF (    p_isir_rec.dependency_status = 'I'
976             AND NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status )  IS NULL
977             AND p_isir_rec.s_num_family_members = 2
978             AND NVL(p_isir_rec.a_have_children , p_isir_rec.s_have_children) = '1'
982                 p_isir_rec.a_student_marital_status := '1' ;
979             AND NVL(p_isir_rec.a_s_have_dependents , p_isir_rec.legal_dependents) = '1'
980            )    THEN
981                 -- assume value
983         END IF ;
984 
985         -- Edit 2031
986         IF (      p_isir_rec.dependency_status = 'I'
987             AND   NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status )  IS NULL
988             AND   p_isir_rec.s_num_family_members = 2
989             AND ( p_isir_rec.spouse_income_from_work is not NULL   AND   p_isir_rec.spouse_income_from_work <> 0 )
990            )      THEN
991                   -- assume value
992                   p_isir_rec.a_student_marital_status := '2' ;
993         END IF ;
994 
995         -- Edit 2032
996         IF (      p_isir_rec.dependency_status = 'I'
997             AND   NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status )  IS NULL
998             AND   p_isir_rec.s_num_family_members = 2
999             AND ( p_isir_rec.spouse_income_from_work IS NULL   OR   p_isir_rec.spouse_income_from_work = 0 )
1000            )      THEN
1001                   -- assume value
1002                   p_isir_rec.a_student_marital_status := '1' ;
1003         END IF ;
1004 
1005         -- Edit 2033
1006         IF (      p_isir_rec.dependency_status = 'I'
1007             AND   NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) IS NULL
1008             AND   p_isir_rec.s_num_family_members > 2
1009             AND ( p_isir_rec.spouse_income_from_work is not NULL   AND   p_isir_rec.spouse_income_from_work <> 0 )
1010            )      THEN
1011                   -- assume value
1012                   p_isir_rec.a_student_marital_status := '2' ;
1013         END IF ;
1014 
1015         -- Edit 2034
1016         IF (      p_isir_rec.dependency_status = 'I'
1017             AND   NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) IS NULL
1018             AND   p_isir_rec.s_num_family_members > 2
1019             AND ( p_isir_rec.spouse_income_from_work IS NULL   OR   p_isir_rec.spouse_income_from_work = 0)
1020            )      THEN
1021                   -- assume value
1022                   p_isir_rec.a_student_marital_status := '1' ;
1023         END IF ;
1024 
1025 
1026      END a_stud_marital_status;
1027 
1028 
1029      PROCEDURE  a_stud_num_in_family AS
1030      /***************************************************************
1031        Created By		:	masehgal
1032        Date Created By	:	03-Feb-2003
1033        Purpose		:	To make assumption for Student's Number in Family
1034        Known Limitations,Enhancements or Remarks
1035        Change History	:
1036        Who			When		What
1037      ***************************************************************/
1038      --              p_isir_rec.dependency_status          (1)
1039      --              p_isir_rec.a_student_marital_status   (2)
1040      --              p_isir_rec.s_marital_status           (3)
1041      --              p_isir_rec.s_num_family_members       (4)
1042      --              p_isir_rec.a_have_children            (5)
1043      --              p_isir_rec.s_have_children            (6)
1044      --              p_isir_rec.a_s_have_dependents        (7)
1045      --              p_isir_rec.legal_dependents           (8)
1046      --              p_isir_rec.spouse_income_from_work    (9)
1047      --              p_isir_rec.a_s_num_in_family
1048 
1049      BEGIN
1050         -- Edit 2035
1051         IF (     p_isir_rec.dependency_status = 'I'
1052             AND  NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) = '2'
1053             AND (p_isir_rec.s_num_family_members IS NULL   OR   p_isir_rec.s_num_family_members = 0)
1054            )     THEN
1055                  -- assume value ;
1056                  p_isir_rec.a_s_num_in_family := 2 ;
1057         END IF ;
1058 
1059         -- Edit 2036
1060         IF (     p_isir_rec.dependency_status = 'I'
1061             AND  NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) in ('1','3')
1062             AND (    NVL (p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) IS NULL
1063                  OR  NVL (p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) = 0 )
1064            )     THEN
1065                  -- assume value ;
1066                  p_isir_rec.a_s_num_in_family := 1 ;
1067         END IF ;
1068 
1069         -- Edit 2037
1070         IF (     p_isir_rec.dependency_status = 'I'
1071             AND  NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) = '2'
1072             AND  NVL (p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) = 1
1073             AND (p_isir_rec.spouse_income_from_work is not NULL   AND   p_isir_rec.spouse_income_from_work <> 0 )
1074            )     THEN
1075                  -- assume value ;
1076                  p_isir_rec.a_s_num_in_family := 2 ;
1077         END IF ;
1078 
1079         -- Edit 2038
1080         IF (    p_isir_rec.dependency_status = 'I'
1081             AND NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) in ('1','3')
1082             AND NVL (p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) > 1
1083             AND NVL( p_isir_rec.a_have_children , p_isir_rec.s_have_children ) = '2'
1084             AND NVL( p_isir_rec.a_s_have_dependents , p_isir_rec.legal_dependents ) = '2'
1085            )    THEN
1086                 -- assume value ;
1087                 p_isir_rec.a_s_num_in_family := 1 ;
1088         END IF ; -- Edit 2038
1089 
1093      PROCEDURE  a_stud_num_in_college AS
1090      END a_stud_num_in_family;
1091 
1092 
1094      /***************************************************************
1095        Created By		:	masehgal
1096        Date Created By	:	03-Feb-2003
1097        Purpose		:	To make assumption for Student's Number in College
1098        Known Limitations,Enhancements or Remarks
1099        Change History	:
1100        Who			When		What
1101      ***************************************************************/
1102      --              p_isir_rec.dependency_status       (1)
1103      --              p_isir_rec.s_num_in_college        (2)
1104      --              p_isir_rec.a_s_num_in_family       (3)
1105      --              p_isir_rec.s_num_family_members    (4)
1106      --              p_isir_rec.system_record_type      (5)
1107      --              p_isir_rec.a_s_num_in_college
1108 
1109      BEGIN
1110         -- Edit 2039
1111         IF (     p_isir_rec.dependency_status = 'I'
1112             AND (p_isir_rec.s_num_in_college IS NULL   OR   p_isir_rec.s_num_in_college = 0 )
1113            )     THEN
1114                  -- assume value ;
1115                  p_isir_rec.a_s_num_in_college := 1;
1116         END IF ;
1117 
1118         -- Edit 2040
1119         IF p_isir_rec.assum_override_3 = '1'  THEN
1120            NULL ;
1121         ELSE
1122             -- skip assumption if override SET
1123 /*  DO NOT DELETE the code commented here
1124     It is likely to be pulled in in a forthcoming CCR
1125 
1126               IF     p_isir_rec.system_record_type <> 'CORRECTION'
1127                  AND p_isir_rec.dependency_status = 'I'
1128 */
1129            IF (    p_isir_rec.dependency_status = 'I'
1130                AND NVL ( p_isir_rec.a_s_num_in_college , p_isir_rec.s_num_in_college ) > 2
1131                AND NVL ( p_isir_rec.a_s_num_in_college , p_isir_rec.s_num_in_college ) = NVL( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members )
1132               )    THEN
1133                    -- assume value ;
1134                    -- skip other edits on this field
1135                    p_isir_rec.a_s_num_in_college := 1;
1136            END IF ;
1137         END IF ; -- override condition
1138 
1139         -- Edit 2042
1140         IF (    p_isir_rec.dependency_status = 'I'
1141             AND NVL ( p_isir_rec.a_s_num_in_college , p_isir_rec.s_num_in_college ) > NVL( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members )
1142             )    THEN
1143                  -- assume value ;
1144                  -- skip othjer edits on this field
1145                  p_isir_rec.a_s_num_in_college := 1 ;
1146         END IF ; -- Edit 2042
1147 
1148 /*  DO NOT DELETE the code commented here
1149     It is likely to be pulled in in a forthcoming CCR
1150 
1151               -- Edit 2041
1152               IF     p_isir_rec.system_record_type <> 'CORRECTION'
1153                  --  Select the Correction Record for the same student and in that record
1154                  AND corr_rec.s_num_in_college > 2
1155                  AND NVL( corr_rec.a_s_num_in_family , corr_rec.s_num_family_members ) > 2
1156                  AND corr_rec.s_num_in_college = NVL( corr_rec.a_s_num_in_family , corr_rec.s_num_family_members ) THEN
1157                      -- assume value ;
1158                      -- skip othjer edits on this field
1159                      corr_rec.a_s_num_in_college := NULL ;
1160               ELSE
1161                  -- Edit 2043
1162                  IF     p_isir_rec.dependency_status = 'I'
1163                     AND p_isir_rec.s_num_in_college > NVL( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members )  THEN
1164                         -- assume value ;
1165                         p_isir_rec.a_s_num_in_college := 1 ;
1166                  END IF ; -- Edit 2043
1167               END IF ; -- Edit 2041
1168 */
1169 
1170      END a_stud_num_in_college;
1171 
1172 
1173 
1174      PROCEDURE  a_stud_marital_status_resume AS
1175      /***************************************************************
1176        Created By		:	masehgal
1177        Date Created By	:	03-Feb-2003
1178        Purpose		:	To make assumption for Student's Number in Family
1179        Known Limitations,Enhancements or Remarks
1180        Change History	:
1181        Who			When		What
1182      ***************************************************************/
1183      --              p_isir_rec.dependency_status          (1)
1184      --              p_isir_rec.a_student_marital_status   (2)
1185      --              p_isir_rec.s_marital_status           (3)
1186      --              p_isir_rec.s_num_family_members       (4)
1187      --              p_isir_rec.a_have_children            (5)
1188      --              p_isir_rec.s_have_children            (6)
1189      --              p_isir_rec.a_s_have_dependents        (7)
1190      --              p_isir_rec.legal_dependents           (8)
1191      --              p_isir_rec.spouse_income_from_work    (9)
1192      --              p_isir_rec.a_s_num_in_family
1193 
1194         -- Edit 2043
1195      BEGIN
1196         IF (    p_isir_rec.dependency_status = 'D'
1197             AND NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) IS NULL
1198            )    THEN
1199                 -- assume value
1200                 p_isir_rec.a_student_marital_status := '1' ;
1201         END IF ; -- Edit 2043
1202      END a_stud_marital_status_resume ;
1203 
1204 
1205      PROCEDURE  a_spouse_work_income AS
1209        Purpose		:	To make assumption for Spouse's Income from work
1206      /***************************************************************
1207        Created By		:	masehgal
1208        Date Created By	:	03-Feb-2003
1210        Known Limitations,Enhancements or Remarks
1211        Change History	:
1212        Who			When		What
1213      ***************************************************************/
1214      --              p_isir_rec.dependency_status          (1)
1215      --              p_isir_rec.a_student_marital_status   (2)
1216      --              p_isir_rec.s_marital_status           (3)
1217      --              p_isir_rec.spouse_income_from_work    (4)
1218      --              p_isir_rec.a_spouse_income_work
1219 
1220      BEGIN
1221          -- Edit 2044
1222          IF (     p_isir_rec.dependency_status = 'D'
1223              AND  NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) = '1'
1224              AND (p_isir_rec.spouse_income_from_work IS NOT NULL  AND  p_isir_rec.spouse_income_from_work <> 0 )
1225             )     THEN
1226                   -- assume value ;
1227                   p_isir_rec.a_spouse_income_work := 0 ;
1228          END IF ; -- Edit 2044
1229      END a_spouse_work_income;
1230 
1231 
1232      PROCEDURE  a_stud_agi AS
1233      /***************************************************************
1234        Created By		:	masehgal
1235        Date Created By	:	03-Feb-2003
1236        Purpose		:	To make assumption for Student's AGI
1237        Known Limitations,Enhancements or Remarks
1238        Change History	:
1239        Who			When		What
1240      ***************************************************************/
1241      --              p_isir_rec.s_adjusted_gross_income    (1)
1242      --              p_isir_rec.s_type_tax_return          (2)
1243      --              p_isir_rec.s_tax_return_status        (3)
1244      --              p_isir_rec.s_income_from_work         (4)
1245      --              p_isir_rec.spouse_income_from_work    (5)
1246      --              p_isir_rec.system_record_type         (6)
1247      --              p_isir_rec.a_student_agi
1248 
1249      BEGIN
1250         -- Edit 2045
1251         IF p_isir_rec.assum_override_4  = '1' THEN
1252            NULL ;
1253         ELSE
1254            -- skip assumption if override set
1255 /*  DO NOT DELETE the code commented here
1256     It is likely to be pulled in in a forthcoming CCR
1257 
1258            IF    p_isir_rec.system_record_type <> 'CORRECTION'
1259              AND (p_isir_rec.s_adjusted_gross_income IS NULL  OR     p_isir_rec.s_adjusted_gross_income = 0 )
1260 */
1261            IF (    (p_isir_rec.s_adjusted_gross_income IS NULL  OR     p_isir_rec.s_adjusted_gross_income = 0 )
1262                AND (p_isir_rec.s_type_tax_return IS NOT NULL    OR    (       p_isir_rec.s_type_tax_return IS NULL
1263                                                                         AND   p_isir_rec.s_tax_return_status IN ('1','2')))
1264                AND (   (p_isir_rec.s_income_from_work IS NOT NULL       AND   p_isir_rec.s_income_from_work <> 0 )
1265                     OR (    NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work ) IS NOT NULL
1266                         AND NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work ) <> 0 ))
1267               )     THEN
1268                     -- assume value ;
1269                     -- skip other edits on this field
1270                     IF NVL(p_isir_rec.s_income_from_work,0) + NVL(NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work ),0) > 999999 THEN
1271                        p_isir_rec.a_student_agi := 999999 ;
1272                     ELSIF NVL(p_isir_rec.s_income_from_work,0) + NVL(NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work ),0) < -999999 THEN
1273                        p_isir_rec.a_student_agi := -999999 ;
1274                     ELSE
1275                        p_isir_rec.a_student_agi := NVL(p_isir_rec.s_income_from_work,0) + NVL(NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work ),0) ;
1276                     END IF ;
1277            END IF ; -- Edit 2045
1278         END IF ; -- Override Condition
1279 
1280 
1281 /*  DO NOT DELETE the code commented here
1282     It is likely to be pulled in in a forthcoming CCR
1283 
1284            -- Edit 2046
1285            IF     p_isir_rec.system_record_type <> 'CORRECTION'
1286               --  Select the Correction Record for the same student and in that record  if    (1)   =  0
1287               AND corr_rec.s_adjusted_gross_income = 0  THEN
1288                   -- assume vaue
1289                   p_isir_rec.a_student_agi := NULL ;
1290            END IF ; -- Edit 2046
1291 */
1292 
1293      END a_stud_agi;
1294 
1295 
1296      PROCEDURE  a_stud_work_income AS
1297      /***************************************************************
1298        Created By		:	masehgal
1299        Date Created By	:	03-Feb-2003
1300        Purpose		:	To make assumption for Student's Income from Work
1301        Known Limitations,Enhancements or Remarks
1302        Change History	:
1303        Who			When		What
1304      ***************************************************************/
1305      --              p_isir_rec.a_student_agi              (1)
1306      --              p_isir_rec.s_adjusted_gross_income    (2)
1307      --              p_isir_rec.s_tax_return_status        (3)
1308      --              p_isir_rec.s_income_from_work         (4)
1309      --              p_isir_rec.spouse_income_from_work    (5)
1310      --              p_isir_rec.a_s_income_work
1311 
1312      BEGIN
1316             AND (p_isir_rec.s_income_from_work IS NULL   OR   p_isir_rec.s_income_from_work = 0 )
1313         -- Edit 2047
1314         IF (     NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) > 0
1315             AND  p_isir_rec.s_tax_return_status = '3'
1317             AND (    NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work ) IS NULL
1318                  OR  NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work )= 0 )
1319            )     THEN
1320                  -- assume value ;
1321                  p_isir_rec.a_s_income_work := NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) ;
1322         END IF ; -- Edit 2047
1323 
1324      END a_stud_work_income;
1325 
1326 
1327      PROCEDURE  a_stud_tax_status AS
1328      /***************************************************************
1329        Created By		:	masehgal
1330        Date Created By	:	03-Feb-2003
1331        Purpose		:	To make assumption for Student's Tax Status
1332        Known Limitations,Enhancements or Remarks
1333        Change History	:
1334        Who			When		      What
1335        ridas    04-Apr-06     Added new logic for Edits 2050 and 2052 for Award Year 06-07
1336                               FA160 build
1337 
1338      ***************************************************************/
1339      --              p_isir_rec.s_type_tax_return       (1)
1340      --              p_isir_rec.s_tax_return_status     (2)
1341      --              p_isir_rec.a_student_agi           (3)
1342      --              p_isir_rec.s_adjusted_gross_income (4)
1343      --              p_isir_rec.s_cal_tax_status
1344 
1345      BEGIN
1346         -- Edit 2048
1347         IF p_isir_rec.s_type_tax_return IS NOT NULL THEN
1348             -- assume value ;
1349             p_isir_rec.s_cal_tax_status := '1' ;
1350         END IF ;
1351 
1352         -- Edit 2049
1353         IF (    p_isir_rec.s_type_tax_return IS NULL
1354             AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IN ('1','2')
1355            )    THEN
1356                 -- assume value ;
1357                 p_isir_rec.s_cal_tax_status := '1' ;
1358         END IF ;
1359 
1360         -- Edit 2050
1361         IF p_isir_rec.batch_year = '7' THEN
1362            IF (p_isir_rec.s_type_tax_return IS NULL AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IS NULL
1363               AND (NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) > 0
1364                    OR NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) < 0 )
1365              ) THEN
1366                  -- assume value ;
1367                  p_isir_rec.s_cal_tax_status := '1' ;
1368            END IF;
1369         ELSE
1370            IF (    p_isir_rec.s_type_tax_return IS NULL
1371                 AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IS NULL
1372                 AND (   NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) = 0
1373                      OR NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) > 0
1374                      OR NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) < 0 )
1375                     )   THEN
1376                         -- assume value ;
1377                  p_isir_rec.s_cal_tax_status := '1' ;
1378            END IF ;
1379         END IF; -- Edit 2050
1380 
1381 
1382         -- Edit 2051
1383         IF (    p_isir_rec.s_type_tax_return IS NULL
1384             AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) = '3'
1385            )    THEN
1386                 -- assume value ;
1387                 p_isir_rec.s_cal_tax_status := '4' ;
1388         END IF ;
1389 
1390         -- Edit 2052
1391         IF p_isir_rec.batch_year = '7' THEN
1392            IF (p_isir_rec.s_type_tax_return IS NULL
1393                AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IS NULL
1394                AND (NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) IS NULL
1395                     OR NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income) = 0)
1396               )    THEN
1397                  -- assume value ;
1398                  p_isir_rec.s_cal_tax_status := '4' ;
1399            END IF ;
1400         ELSE
1401            IF (    p_isir_rec.s_type_tax_return IS NULL
1402               AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IS NULL
1403               AND NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) IS NULL
1404              )    THEN
1405                   -- assume value ;
1406                  p_isir_rec.s_cal_tax_status := '4' ;
1407            END IF ;
1408         END IF ; -- Edit 2052
1409 
1410      END a_stud_tax_status;
1411 
1412 
1413      PROCEDURE  a_stud_us_tax_paid AS
1414      /***************************************************************
1415        Created By		:	masehgal
1416        Date Created By	:	03-Feb-2003
1417        Purpose		:	To make assumption for Student's Tax Payment Status
1418        Known Limitations,Enhancements or Remarks
1419        Change History	:
1420        Who			When		What
1421      ***************************************************************/
1422      --              p_isir_rec.s_fed_taxes_paid     (1)
1423      --              p_isir_rec.s_cal_tax_status     (2)
1424      --              p_isir_rec.a_s_us_tax_paid
1425 
1426      BEGIN
1427         -- Edit 2053
1431                 -- assume value ;
1428         IF (    p_isir_rec.s_fed_taxes_paid IS NULL
1429             AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IN ('1','2','3')
1430            )    THEN
1432                 p_isir_rec.a_s_us_tax_paid := 0 ;
1433         END IF ; -- Edit 2053
1434      END a_stud_us_tax_paid;
1435 
1436 
1437      PROCEDURE  a_stud_work_income_resume AS
1438      /***************************************************************
1439        Created By		:	masehgal
1440        Date Created By	:	03-Feb-2003
1441        Purpose		:	To make assumption for Student's Income from Work
1442        Known Limitations,Enhancements or Remarks
1443        Change History	:
1444        Who			When		What
1445      ***************************************************************/
1446      --              p_isir_rec.dependency_status          (1)
1447      --              p_isir_rec.a_student_agi              (2)
1448      --              p_isir_rec.s_adjusted_gross_income    (3)
1449      --              p_isir_rec.s_income_from_work         (4)
1450      --              p_isir_rec.spouse_income_from_work    (5)
1451      --              p_isir_rec.s_cal_tax_status           (6)
1452      --              p_isir_rec.a_s_income_work
1453 
1454      BEGIN
1455         -- Edit 2054
1456         IF (     p_isir_rec.dependency_status = 'D'
1457             AND  NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) IS NOT NULL
1458             AND  NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) <> 0
1459             AND  p_isir_rec.s_income_from_work IS NULL
1460            )     THEN
1461                  -- assume value ;
1462                  p_isir_rec.a_s_income_work := NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income );
1463         END IF ;
1464 
1465         -- Edit 2055
1466         IF (     p_isir_rec.dependency_status = 'I'
1467             AND  NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) IS NOT NULL
1468             AND  NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) <> 0
1469             AND  NVL ( p_isir_rec.a_s_income_work , p_isir_rec.s_income_from_work ) IS NULL
1470             AND (    NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work ) IS NULL
1471                  OR  NVL(p_isir_rec.a_spouse_income_work, p_isir_rec.spouse_income_from_work )= 0 )
1472                 )    THEN
1473                      -- assume value ;
1474                      p_isir_rec.a_s_income_work := NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income );
1475         END IF ;
1476 
1477         -- Edit 2056
1478         IF (    NVL ( p_isir_rec.a_s_income_work , p_isir_rec.s_income_from_work ) < 0
1479             AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) in ('4','5')
1480            )    THEN
1481                 -- assume value ;
1482                 p_isir_rec.a_s_income_work := 0 - p_isir_rec.s_income_from_work ;
1483         END IF ; -- Edit 2056
1484 
1485      END a_stud_work_income_resume ;
1486 
1487 
1488      PROCEDURE  a_spouse_work_income_resume AS
1489      /***************************************************************
1490        Created By		:	masehgal
1491        Date Created By	:	03-Feb-2003
1492        Purpose		:	To make assumption for Student's Income from Work
1493        Known Limitations,Enhancements or Remarks
1494        Change History	:
1495        Who			When		What
1496      ***************************************************************/
1497      --              p_isir_rec.dependency_status          (1)
1498      --              p_isir_rec.a_student_agi              (2)
1499      --              p_isir_rec.s_adjusted_gross_income    (3)
1500      --              p_isir_rec.a_s_income_work            (4)
1501      --              p_isir_rec.s_income_from_work         (5)
1502      --              p_isir_rec.spouse_income_from_work    (6)
1503      --              p_isir_rec.s_cal_tax_status           (7)
1504      --              p_isir_rec.a_student_marital_status   (8)
1505      --              p_isir_rec.s_marital_status           (9)
1506      --              p_isir_rec.a_spouse_income_work
1507 
1508      BEGIN
1509 
1510         -- Edit 2057
1511         IF (     p_isir_rec.dependency_status = 'I'
1512             AND (    NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) IS NOT NULL
1513                  AND NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) <> 0 )
1514             AND  NVL( p_isir_rec.a_s_income_work , p_isir_rec.s_income_from_work ) = 0
1515             AND  p_isir_rec.spouse_income_from_work IS NULL
1516             AND  NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) = '2'
1517            )     THEN
1518                  -- assume value ;
1519                  p_isir_rec.a_spouse_income_work := NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) ;
1520 
1521         END IF ;
1522 
1523         -- Edit 2058
1524         IF (    p_isir_rec.dependency_status = 'I'
1525             AND NVL ( p_isir_rec.a_spouse_income_work , p_isir_rec.spouse_income_from_work ) < 0
1526             AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) in ('4','5')
1527            )    THEN
1528                 -- assume value ;
1529                 p_isir_rec.a_spouse_income_work := 0 - NVL ( p_isir_rec.a_spouse_income_work , p_isir_rec.spouse_income_from_work )  ;
1530 
1531         END IF ; -- Edit 2058
1532 
1533      END a_spouse_work_income_resume;
1534 
1535 
1539        Date Created By	:	03-Feb-2003
1536      PROCEDURE  a_stud_total_wsc AS
1537      /***************************************************************
1538        Created By		:	masehgal
1540        Purpose		:	To make assumption for Student's Total Income from Worksheet C
1541        Known Limitations,Enhancements or Remarks
1542        Change History	:
1543        Who			When		What
1544      ***************************************************************/
1545      --              p_isir_rec.s_toa_amt_from_wsc         (1)
1546      --              p_isir_rec.dependency_status          (2)
1547      --              p_isir_rec.a_student_agi              (3)
1548      --              p_isir_rec.s_adjusted_gross_income    (4)
1549      --              p_isir_rec.s_toa_amt_from_wsa         (5)
1550      --              p_isir_rec.s_toa_amt_from_wsb         (6)
1551      --              p_isir_rec.s_cal_tax_status           (7)
1552      --              p_isir_rec.a_s_income_work            (8)
1553      --              p_isir_rec.s_income_from_work         (9)
1554      --              p_isir_rec.a_spouse_income_work       (10)
1555      --              p_isir_rec.spouse_income_from_work    (11)
1556      --              p_isir_rec.system_record_type         (12)
1557      --              p_isir_rec.a_s_total_wsc
1558 
1559      BEGIN
1560         -- Edit 2059, 2061
1561         IF p_isir_rec.assum_override_6 = '1' THEN
1562            NULL ;
1563         ELSE
1564            -- skip edit if override SET
1565 /*  DO NOT DELETE the code commented here
1566     It is likely to be pulled in in a forthcoming CCR
1567 
1568            IF     p_isir_rec.system_record_type <> 'CORRECTION'
1569               AND (   (    p_isir_rec.dependency_status IN ('I','D')
1570 */
1571            IF (    (   (    p_isir_rec.dependency_status IN ('I','D')
1572                         AND p_isir_rec.s_toa_amt_from_wsc > 0
1573                         AND p_isir_rec.s_toa_amt_from_wsc >= (GREATEST (NVL (NVL ( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ) , 0 ), 0 )  +
1574                                                               GREATEST      (NVL ( p_isir_rec.s_toa_amt_from_wsa , 0   ) , 0 )                               +
1575                                                               GREATEST      (NVL ( p_isir_rec.s_toa_amt_from_wsb , 0   ) , 0 )                                )
1576                         AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IN ('1','2','3')    )
1577                     OR (    p_isir_rec.dependency_status IN ('I','D')
1578                         AND p_isir_rec.s_toa_amt_from_wsc > 0
1579                         AND p_isir_rec.s_toa_amt_from_wsc >= (GREATEST (NVL (NVL ( p_isir_rec.a_s_income_work      , p_isir_rec.s_income_from_work     ) , 0 ), 0 )  +
1580                                                               GREATEST (NVL (NVL ( p_isir_rec.a_spouse_income_work , p_isir_rec.spouse_income_from_work) , 0 ), 0 )  +
1581                                                               GREATEST      (NVL ( p_isir_rec.s_toa_amt_from_wsa , 0   ) , 0 )                                     +
1582                                                               GREATEST      (NVL ( p_isir_rec.s_toa_amt_from_wsb , 0   ) , 0 )                                      )
1583                         AND NVL ( p_isir_rec.s_cal_tax_status , p_isir_rec.s_tax_return_status ) IN ('4','5')        )  )
1584               )     THEN
1585                     -- assume value ;
1586                     -- skip remainig edits on this field
1587                     p_isir_rec.a_s_total_wsc := 0 ;
1588            END IF ; -- Edit 2059, 2061
1589 
1590 /*  DO NOT DELETE the code commented here
1591     It is likely to be pulled in in a forthcoming CCR
1592 
1593            -- Edit 2060, 2062
1594            -- select values from the correction record and check...
1595            IF     p_isir_rec.system_record_type <> 'CORRECTION'
1596               AND (   (    corr_rec.dependency_status IN ('I','D')
1597                        AND corr_rec.s_toa_amt_from_wsc > 0
1598                        AND corr_rec.s_toa_amt_from_wsc >= (GREATEST (NVL (NVL ( corr_rec.a_student_agi , corr_rec.s_adjusted_gross_income ) , 0 ), 0 )  +
1599                                                            GREATEST      (NVL ( corr_rec.s_toa_amt_from_wsa , 0   ) , 0 )                               +
1600                                                            GREATEST      (NVL ( corr_rec.s_toa_amt_from_wsb , 0   ) , 0, l_s_wsb )                       )
1601                        AND corr_rec.s_cal_tax_status IN ( '1',  '2' , '3' )                                  )
1602                    OR (    corr_rec.dependency_status IN ('I','D')
1603                        AND corr_rec.s_toa_amt_from_wsc > 0
1604                        AND corr_rec.s_toa_amt_from_wsc >= (GREATEST (NVL (NVL ( corr_rec.a_s_income_work      , corr_rec.s_income_from_work     ) , 0 ), 0 )  +
1605                                                            GREATEST (NVL (NVL ( corr_rec.a_spouse_income_work , corr_rec.spouse_income_from_work) , 0 ), 0 )  +
1606                                                            GREATEST      (NVL ( corr_rec.s_toa_amt_from_wsa , 0   ) , 0 )                               +
1607                                                            GREATEST      (NVL ( corr_rec.s_toa_amt_from_wsb , 0   ) , 0, l_s_wsb )                       )
1608                        AND corr_rec.s_cal_tax_status IN ( '4',  '5')                                               )  )   THEN
1609                            -- assume value ;
1610                            -- skip remainig edits on this field
1611                            p_isir_rec.a_s_total_wsc := NULL ;
1612            END IF ; -- Edit 2060, 2062
1613 */
1614         END IF ; -- Override Condition
1618 BEGIN -- main assumptions
1615      END a_stud_total_wsc;
1616 
1617 
1619 
1620 /*  DO NOT DELETE the code commented here
1621     It is likely to be pulled in in a forthcoming CCR
1622 
1623    -- open correction cursor and fetch correction values
1624    OPEN  get_corr_record ( p_isir_rec.base_id ) ;
1625    FETCH get_corr_record INTO corr_rec ;
1626    CLOSE get_corr_record ;
1627 */
1628 
1629    -- Calls to the local procedures sequentially ;
1630    -- Model Determination related Edits
1631    a_date_prior_birth ;
1632    a_stud_married ;
1633    a_stud_have_children ;
1634    a_stud_legal_depend ;
1635    a_stud_veteran_status ;
1636    assum_depend_status ;
1637 
1638  -- Calculate parent releated assumed values for students only if he is a dependenty
1639    IF p_isir_rec.dependency_status = 'D' THEN
1640       a_p_marital_status ;
1641       a_p_num_in_fam ;
1642       a_p_num_in_col ;
1643       a_p_agi ;
1644       a_f_work_income ;
1645       a_p_tax_status ;
1646       a_p_us_tax_paid ;
1647       a_f_work_income_resume ;
1648       a_m_work_income ;
1649       a_p_total_wsc ;
1650    END IF;
1651 
1652    a_stud_citizenship ;
1653    a_stud_marital_status ;
1654    a_stud_num_in_family ;
1655    a_stud_num_in_college ;
1656    a_stud_marital_status_resume ;
1657    a_spouse_work_income ;
1658    a_stud_agi ;
1659    a_stud_work_income ;
1660    a_stud_tax_status ;
1661    a_stud_us_tax_paid ;
1662    a_stud_work_income_resume ;
1663    a_spouse_work_income_resume ;
1664    a_stud_total_wsc ;
1665 
1666 EXCEPTION
1667   WHEN OTHERS THEN
1668        FND_MESSAGE.SET_NAME('IGS','IGS_GE_UNHANDLED_EXP');
1669        FND_MESSAGE.SET_TOKEN('NAME','IGF_AP_ASSUMPTION_REJECT_EDITS.ASSUME_VALUES' );
1670        IGS_GE_MSG_STACK.ADD;
1671        APP_EXCEPTION.RAISE_EXCEPTION;
1672 END assume_values ;
1673 
1674 
1675 PROCEDURE reject_edits ( p_isir_rec      IN  OUT NOCOPY   igf_ap_isir_matched%ROWTYPE ,
1676 	                      p_sys_batch_yr  IN               VARCHAR2 ,
1677                          p_reject_codes      OUT NOCOPY   VARCHAR2 )   AS
1678 /***************************************************************
1679 Created By		:	masehgal
1680 Date Created By	:	03-Feb-2003
1681 Purpose		:	To display reject reasons for Student
1682 Known Limitations,Enhancements or Remarks
1683 Change History	:
1684 Who			When		What
1685 ***************************************************************/
1686 
1687    PROCEDURE reject_edit_4001   AS
1688    /***************************************************************
1689    Created By		:	masehgal
1690    Date Created By	:	03-Feb-2003
1691    Purpose		:	To display reject reasons for Student
1692    Known Limitations,Enhancements or Remarks
1693    Change History	:
1694    Who			When		What
1695    ***************************************************************/
1696    -- Application Model                      p_isir_rec.dependency_status       (1)
1697    -- Parents' Adjusted Gross Income         p_isir_rec.p_adjusted_gross_income (2)
1698    -- Fathers' Income From Work              p_isir_rec.f_income_work           (3)
1699    -- Mothers' Income From Work              p_isir_rec.m_income_work           (4)
1700    -- Parents Total Amount from Worksheet    p_isir_rec.p_income_wsa            (5)
1701    -- Parents Total  Amountfrom Worksheet    p_isir_rec.p_income_wsb            (6)
1702 
1703    BEGIN
1704       IF (    p_isir_rec.dependency_status = 'D'   AND   p_isir_rec.p_adjusted_gross_income IS NULL
1705           AND p_isir_rec.f_income_work IS NULL     AND   p_isir_rec.m_income_work IS NULL
1706           AND p_isir_rec.p_income_wsa IS NULL      AND   p_isir_rec.p_income_wsb IS NULL
1707          )    THEN
1708               -- append reject code ;     stack  reject message ;
1709               p_reject_codes := p_reject_codes || '02' ;
1710               FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4001');
1711               IGS_GE_MSG_STACK.ADD;
1712       END IF ;
1713    END reject_edit_4001 ;
1714 
1715 
1716    PROCEDURE reject_edit_4002   AS
1717    /***************************************************************
1718    Created By		:	masehgal
1719    Date Created By	:	03-Feb-2003
1720    Purpose		:	To display reject reasons for Student
1721    Known Limitations,Enhancements or Remarks
1722    Change History	:
1723    Who			When		What
1724    ***************************************************************/
1725    -- Application Model                   p_isir_rec.dependency_status          (1)
1726    -- Student's Adjusted Gross Income     p_isir_rec.s_adjusted_gross_income    (2)
1727    -- Student's Income From Work          p_isir_rec.s_income_from_work         (3)
1728    -- Spouse's Income From Work           p_isir_rec.spouse_income_from_work    (4)
1729    -- Student Total Amountfrom WorksheetA p_isir_rec.s_toa_amt_from_wsa         (5)
1730    -- Student Total Amountfrom WorksheetB p_isir_rec.s_toa_amt_from_wsb         (6)
1731 
1732    BEGIN
1733       IF (    p_isir_rec.dependency_status = 'I'       AND   p_isir_rec.s_adjusted_gross_income IS NULL
1734           AND p_isir_rec.s_income_from_work IS NULL    AND   p_isir_rec.spouse_income_from_work IS NULL
1735           AND p_isir_rec.s_toa_amt_from_wsa  IS NULL   AND   p_isir_rec.s_toa_amt_from_wsb IS NULL
1736          )    THEN
1737               -- append reject code ;   stack  reject message ;
1738               p_reject_codes := p_reject_codes || '02' ;
1739               FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4002');
1740               IGS_GE_MSG_STACK.ADD;
1741       END IF ;
1742    END reject_edit_4002 ;
1743 
1744 
1748    Date Created By	:	03-Feb-2003
1745    PROCEDURE reject_edit_4003   AS
1746    /***************************************************************
1747    Created By		:	masehgal
1749    Purpose		:	To display reject reasons for Student
1750    Known Limitations,Enhancements or Remarks
1751    Change History	:
1752    Who			When		What
1753    ***************************************************************/
1754    -- Application Model             p_isir_rec.dependency_status       (1)
1755    -- Simplified Need Test          p_isir_rec.simplified_need_test    (2)
1756    -- Automatic Zero EFC            p_isir_rec.auto_zero_efc           (3)
1757    -- Net Worth of Investments      p_isir_rec.auto_zero_efc   (4)
1758    -- Net Worth of Business/ Farm   p_isir_rec.p_busi_farm_networth    (5)
1759    -- Cash , Savings and Checks     p_isir_rec.p_cash_savings            (6)
1760 
1761    BEGIN
1762       IF (    p_isir_rec.dependency_status = 'D'           AND  NVL( p_isir_rec.simplified_need_test, 'N') <> 'Y'
1763           AND NVL( p_isir_rec.auto_zero_efc, 'N') <> 'Y'   AND  p_isir_rec.p_investment_networth IS NULL
1764           AND p_isir_rec.p_business_networth IS NULL       AND  p_isir_rec.p_cash_saving IS NULL
1765           AND  p_isir_rec.s_investment_networth IS NULL    AND  p_isir_rec.s_busi_farm_networth IS NULL
1766           AND  p_isir_rec.s_cash_savings IS NULL
1767          )    THEN
1768               -- append reject code ;  stack  reject message ;
1769               p_reject_codes := p_reject_codes || '01' ;
1770               FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4003');
1771               IGS_GE_MSG_STACK.ADD;
1772       END IF ;
1773    END reject_edit_4003 ;
1774 
1775 
1776    PROCEDURE reject_edit_4004   AS
1777    /***************************************************************
1778    Created By		:	masehgal
1779    Date Created By	:	03-Feb-2003
1780    Purpose		:	To display reject reasons for Student
1781    Known Limitations,Enhancements or Remarks
1782    Change History	:
1783    Who			When		What
1784    ***************************************************************/
1785    -- Application Model          p_isir_rec.dependency_status       (1)
1786    -- Simplified Need Test       p_isir_rec.simplified_need_test    (2)
1787    -- Automatic Zero EFC         p_isir_rec.auto_zero_efc           (3)
1788    -- Net Worth of Investments   p_isir_rec.s_investment_networth   (4)
1789    -- Net Worth of Business/Farm p_isir_rec.s_busi_farm_networth    (5)
1790    -- Cash , Savings and Checks  p_isir_rec.s_cash_savings          (6)
1791 
1792    BEGIN
1793       IF (    p_isir_rec.dependency_status = 'I'           AND  NVL( p_isir_rec.simplified_need_test, 'N') <> 'Y'
1794           AND NVL( p_isir_rec.auto_zero_efc, 'N') <> 'Y'   AND  p_isir_rec.s_investment_networth IS NULL
1795           AND p_isir_rec.s_busi_farm_networth IS NULL      AND  p_isir_rec.s_cash_savings IS NULL
1796          )    THEN
1797               -- append reject code ;stack  reject message ;
1798               p_reject_codes := p_reject_codes || '01' ;
1799               FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4004');
1800               IGS_GE_MSG_STACK.ADD;
1801       END IF ;
1802    END reject_edit_4004 ;
1803 
1804 
1805    PROCEDURE reject_edit_4005   AS
1806    /***************************************************************
1807    Created By		:	masehgal
1808    Date Created By	:	03-Feb-2003
1809    Purpose		:	To display reject reasons for Student
1810    Known Limitations,Enhancements or Remarks
1811    Change History	:
1812    Who			When		What
1813    ***************************************************************/
1814    -- Assumed Citizenship  p_isir_rec.a_citizenship        (1)
1815    -- Citizenship Status   p_isir_rec.citizenship_status   (2)
1816 
1817    BEGIN
1818       IF (   NVL ( p_isir_rec.a_citizenship , p_isir_rec.citizenship_status ) IS NULL
1819           OR NVL ( p_isir_rec.a_citizenship , p_isir_rec.citizenship_status ) = '3'
1820          )   THEN
1821              -- append reject code ;stack  reject message ;
1822              p_reject_codes := p_reject_codes || '17' ;
1823              FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4005');
1824              IGS_GE_MSG_STACK.ADD;
1825       END IF ;
1826    END reject_edit_4005 ;
1827 
1828 
1829    PROCEDURE reject_edit_4006   AS
1830    /***************************************************************
1831    Created By		:	masehgal
1832    Date Created By	:	03-Feb-2003
1833    Purpose		:	To display reject reasons for Student
1834    Known Limitations,Enhancements or Remarks
1835    Change History	:
1836    Who			When		What
1837    ***************************************************************/
1838    -- First Name           p_isir_rec.first_name           (1)
1839    -- Last Name            p_isir_rec.last_name            (2)
1840    -- System Record Type   p_isir_rec.system_record_type   (3)
1841 
1842    BEGIN
1843       IF (    p_isir_rec.first_name IS NULL
1844           AND p_isir_rec.last_name  IS NULL
1845          )    THEN
1846               -- append reject code ;stack  reject message ;
1847               p_reject_codes := p_reject_codes || '13' ;
1848               FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4006');
1849               IGS_GE_MSG_STACK.ADD;
1850       END IF ;
1851    END reject_edit_4006 ;
1852 
1853 
1854    PROCEDURE reject_edit_4007_4008   AS
1855    /***************************************************************
1856    Created By		:	masehgal
1857    Date Created By	:	03-Feb-2003
1858    Purpose		:	To display reject reasons for Student
1862    ***************************************************************/
1859    Known Limitations,Enhancements or Remarks
1860    Change History	:
1861    Who			When		What
1863    -- First Name           p_isir_rec.first_name           (1)
1864    -- Last Name            p_isir_rec.last_name            (2)
1865    -- System Record Type   p_isir_rec.system_record_type   (3)
1866 
1867    BEGIN
1868 /*  DO NOT DELETE the code commented here
1869     It is likely to be pulled in in a forthcoming CCR
1870 
1871       IF       p_isir_rec.system_record_type <> 'CORRECTION'
1872          AND ( p_isir_rec.first_name IS NULL   OR   p_isir_rec.last_name IS NULL )  THEN
1873 
1874                --   Select the Correction Record for the same student and in that record
1875                IF NOT ( corr_rec.first_name IS NULL    OR    corr_rec.last_name IS NULL )  THEN
1876 */
1877       IF     ( p_isir_rec.first_name IS NULL   OR   p_isir_rec.last_name IS NULL )  THEN
1878                   -- append reject code ; stack  reject message ;
1879                   p_reject_codes := p_reject_codes || 'N ' ;
1880                   FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4007');
1881                   IGS_GE_MSG_STACK.ADD;
1882 --             END IF ;
1883       END IF ;
1884    END reject_edit_4007_4008 ;
1885 
1886 
1887    PROCEDURE reject_edit_4015_4013   AS
1888    /***************************************************************
1889    Created By		:	masehgal
1890    Date Created By	:	03-Feb-2003
1891    Purpose		:	To display reject reasons for Student
1892    Known Limitations,Enhancements or Remarks
1893    Change History	:
1894    Who			When		What
1895    ***************************************************************/
1896    -- date of birth           p_isir_rec.date_of_birth        (1)
1897    -- ssn match flag          p_isir_rec.ssn_match_flag       (2)
1898    -- system record type      p_isir_rec.system_record_type   (3)
1899 
1900 
1901    BEGIN
1902 
1903       IF p_isir_rec.date_of_birth IS NULL THEN
1904          -- append reject code ;stack  reject message
1905          p_reject_codes := p_reject_codes || '05' ;
1906          FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4013');
1907          IGS_GE_MSG_STACK.ADD;
1908       END IF ;
1909    END reject_edit_4015_4013 ;
1910 
1911 
1912    PROCEDURE reject_edit_4016_4014_4015(p_sys_batch_yr IN VARCHAR2 )  AS
1913    /***************************************************************
1914    Created By		:	masehgal
1915    Date Created By	:	03-Feb-2003
1916    Purpose		:	To display reject reasons for Student
1917    Known Limitations,Enhancements or Remarks
1918    Change History	:
1919    Who			When		What
1920    nsidana   11/18/2003   FA129 EFC updates for 2004-2005.
1921    cdcruz    12/31/2003   Bug# 3330571 Corrected the date being displayed for Reject
1922                           Edit 4014.
1923    ridas     04/04/2006   Added new maximum date for Award Year 06-07
1924                           FA160
1925    ***************************************************************/
1926    -- date of birth           p_isir_rec.date_of_birth        (1)
1927    -- ssn match flag          p_isir_rec.ssn_match_flag       (2)
1928    -- system record type      p_isir_rec.system_record_type   (3)
1929 
1930    min_date   DATE := TO_DATE('1899/12/31','YYYY/MM/DD');
1931    max_date   DATE;
1932 
1933    BEGIN
1934       IF (p_sys_batch_yr='0304') THEN
1935            max_date   := TO_DATE('1929/01/01','YYYY/MM/DD');
1936       ELSIF p_sys_batch_yr = '0405' THEN
1937            max_date    := TO_DATE('1930/01/01','YYYY/MM/DD');
1938       ELSIF p_sys_batch_yr = '0506' THEN
1939            max_date    := TO_DATE('1931/01/01','YYYY/MM/DD');
1940       ELSIF p_sys_batch_yr = '0607' THEN
1941            max_date    := TO_DATE('1932/01/01','YYYY/MM/DD');
1942      ELSE
1943            max_date    := TO_DATE('1928/01/01','YYYY/MM/DD');
1944      END IF;
1945 
1946       IF (    min_date < p_isir_rec.date_of_birth
1947           AND p_isir_rec.date_of_birth < max_date
1948           AND NVL ( p_isir_rec.ssn_match_flag, '3' ) <>  '4'
1949          )    THEN
1950                  -- append reject code ;  stack  reject message ;
1951                  p_reject_codes := p_reject_codes || 'A ' ;
1952                  FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4014');
1953                  FND_MESSAGE.SET_TOKEN ('MAX_YR', TO_CHAR ((max_date - 1), 'YYYY'));
1954                  IGS_GE_MSG_STACK.ADD;
1955       END IF ;
1956    END reject_edit_4016_4014_4015 ;
1957 
1958 
1959    PROCEDURE reject_edit_4018_4016_4017(p_sys_batch_yr IN VARCHAR2 )  AS
1960    /***************************************************************
1961    Created By		:	masehgal
1962    Date Created By	:	03-Feb-2003
1963    Purpose		:	To display reject reasons for Student
1964    Known Limitations,Enhancements or Remarks
1965    Change History	:
1966    Who			When		What
1967    nsidana  11/18/2003  FA129 EFC updates for 2004-2005
1968    ridas    04/04/2006  Added new minimum date for Award Year 06-07
1969                         FA160
1970    ***************************************************************/
1971    -- Application Model             p_isir_rec.dependency_status    (1)
1972    -- Date of Birth                 p_isir_rec.date_of_birth        (2)
1973    -- Orphan or  Ward  Of Court     p_isir_rec.orphan_ward_of_court (3)
1974    -- SSN Match Flag                p_isir_rec.ssn_match_flag       (4)
1975    -- System  Record  Type          p_isir_rec.system_record_type   (5)
1976 
1977    min_date    DATE;
1978 
1979    BEGIN
1980        IF p_sys_batch_yr = '0304' THEN
1984        ELSIF p_sys_batch_yr = '0506' THEN
1981           min_date     := TO_DATE('1987/09/01','YYYY/MM/DD');
1982        ELSIF p_sys_batch_yr = '0405' THEN
1983           min_date     := TO_DATE('1988/09/01','YYYY/MM/DD');
1985           min_date     := TO_DATE('1989/09/01','YYYY/MM/DD');
1986        ELSIF p_sys_batch_yr = '0607' THEN
1987           min_date     := TO_DATE('1990/09/01','YYYY/MM/DD');
1988        ELSE
1989           min_date     := TO_DATE('1986/09/01','YYYY/MM/DD');
1990        END IF;
1991 
1992       IF (     p_isir_rec.dependency_status =  'I'
1993           AND ( min_date < p_isir_rec.date_of_birth   AND   p_isir_rec.date_of_birth < TRUNC( SYSDATE) )
1994           AND  NVL( p_isir_rec.orphan_ward_of_court,'2') <> '1'
1995           AND  NVL( p_isir_rec.ssn_match_flag,'3') <> '4'
1996          )     THEN
1997                 --append reject code ;  stack  reject message ;
1998                 p_reject_codes := p_reject_codes || 'B ' ;
1999                 FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4016');
2000                 IGS_GE_MSG_STACK.ADD;
2001       END IF ;
2002 
2003    END reject_edit_4018_4016_4017 ;
2004 
2005 
2006    PROCEDURE reject_edit_4020_4018   AS
2007    /***************************************************************
2008    Created By		:	masehgal
2009    Date Created By	:	03-Feb-2003
2010    Purpose		:	To display reject reasons for Student
2011    Known Limitations,Enhancements or Remarks
2012    Change History	:
2013    Who			When		What
2014    ***************************************************************/
2015    -- Application Model                         p_isir_rec.dependency_status          (1)
2016    -- Assumed Parents' US Tax Paid              p_isir_rec.a_p_us_tax_paid            (2)
2017    -- Parents' U.S. Income Tax Paid             p_isir_rec.p_taxes_paid               (3)
2018    -- Assumed Parents' Adjusted Gross Income    p_isir_rec.a_parents_agi              (4)
2019    -- Parents' Adjusted Gross Income            p_isir_rec.p_adjusted_gross_income    (5)
2020 
2021    BEGIN
2022       IF (     p_isir_rec.dependency_status = 'D'
2023           AND (    NVL ( p_isir_rec.a_p_us_tax_paid , p_isir_rec.p_taxes_paid ) IS NOT NULL
2024                AND NVL ( p_isir_rec.a_p_us_tax_paid , p_isir_rec.p_taxes_paid ) > 0         )
2025           AND  NVL ( p_isir_rec.a_p_us_tax_paid , p_isir_rec.p_taxes_paid ) >= NVL ( p_isir_rec.a_parents_agi , p_isir_rec.p_adjusted_gross_income )
2026          )     THEN
2027                -- append reject code ;stack  reject message ;
2028                p_reject_codes := p_reject_codes || '12' ;
2029                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4018');
2030                IGS_GE_MSG_STACK.ADD;
2031       END IF ;
2032    END reject_edit_4020_4018 ;
2033 
2034 
2035    PROCEDURE reject_edit_4019   AS
2036    /***************************************************************
2037    Created By		:	masehgal
2038    Date Created By	:	03-Feb-2003
2039    Purpose		:	To display reject reasons for Student
2040    Known Limitations,Enhancements or Remarks
2041    Change History	:
2042    Who			When		What
2043    ***************************************************************/
2044    -- Application Model                   p_isir_rec.dependency_status          (1)
2045    -- Assumed Students' US Tax Paid       p_isir_rec.a_s_us_tax_paid            (2)
2046    -- Students' U.S. Income Tax Paid      p_isir_rec.s_fed_taxes_paid           (3)
2047    -- Assumed Student's Gross Income      p_isir_rec.a_student_agi              (4)
2048    -- Student's Adjusted Gross Income     p_isir_rec.s_adjusted_gross_income    (5)
2049 
2050    BEGIN
2051       IF (     p_isir_rec.dependency_status = 'I'
2052           AND (      NVL ( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) IS NOT NULL
2053                AND   NVL ( p_isir_rec.a_s_us_tax_paid, p_isir_rec.s_fed_taxes_paid ) > 0           )
2054           AND  NVL ( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) >=  NVL ( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income )
2055          )     THEN
2056                -- append reject code ;stack  reject message ;
2057                p_reject_codes := p_reject_codes || '12' ;
2058                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4019');
2059                IGS_GE_MSG_STACK.ADD;
2060       END IF ;
2061    END reject_edit_4019 ;
2062 
2063 
2064    PROCEDURE reject_edit_4021   AS
2065    /***************************************************************
2066    Created By		:	svuppala
2067    Date Created By	:	16-Nov-2004
2068    Purpose		:	To display reject reasons for Student
2069    Known Limitations,Enhancements or Remarks
2070    Change History	:
2071    Who			When		What
2072    ***************************************************************/
2073    -- Application Model                   p_isir_rec.dependency_status          (1)
2074    -- Assumed Students' US Tax Paid       p_isir_rec.a_s_us_tax_paid            (2)
2075    -- Students' U.S. Income Tax Paid      p_isir_rec.s_fed_taxes_paid           (3)
2076    -- Assumed Student's Gross Income      p_isir_rec.a_student_agi              (4)
2077    -- Student's Adjusted Gross Income     p_isir_rec.s_adjusted_gross_income    (5)
2078 
2079    BEGIN
2080       IF (     p_isir_rec.dependency_status = 'I'
2081           AND (      NVL ( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) IS NOT NULL
2082                AND   NVL ( p_isir_rec.a_s_us_tax_paid, p_isir_rec.s_fed_taxes_paid ) > 0           )
2083           AND  NVL ( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) >=
2084                NVL ( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income )
2088                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4021');
2085          )     THEN
2086                -- append reject code ;stack  reject message ;
2087                p_reject_codes := p_reject_codes || '03' ;
2089                IGS_GE_MSG_STACK.ADD;
2090       END IF ;
2091    END reject_edit_4021 ;
2092 
2093 
2094    PROCEDURE reject_edit_4045_4047   AS
2095    /***************************************************************
2096     Created By           :        ridas
2097     Date Created By      :        04-Apr-2006
2098     Purpose              :        To display reject reasons for Student
2099     Known Limitations,Enhancements or Remarks
2100     Change History       :
2101     Who                  When                What
2102     ***************************************************************/
2103     -- Dependency Status                   p_isir_rec.dependency_status          (1)
2104     -- Father's SSN Match Flag             p_isir_rec.father_ssn_match_type      (2)
2105     -- Mother's SSN Match Flag             p_isir_rec.mother_ssn_match_type      (3)
2106    BEGIN
2107      --edit 4045
2108      IF (       p_isir_rec.dependency_status = 'D'
2109            AND  p_isir_rec.father_ssn_match_type = '3'
2110            AND  p_isir_rec.mother_ssn_match_type <> '4')
2111       THEN
2112 
2113               p_reject_codes := p_reject_codes || 'E' ;
2114               FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4045');
2115               IGS_GE_MSG_STACK.ADD;
2116      END IF ;
2117 
2118      --edit 4047
2119      IF (       p_isir_rec.dependency_status = 'D'
2120            AND  p_isir_rec.mother_ssn_match_type = '3'
2121            AND  p_isir_rec.father_ssn_match_type <> '4')
2122       THEN
2123 
2124               p_reject_codes := p_reject_codes || 'F' ;
2125               FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4047');
2126               IGS_GE_MSG_STACK.ADD;
2127      END IF ;
2128    END reject_edit_4045_4047 ;
2129 
2130 
2131 
2132  PROCEDURE reject_edit_4049   AS
2133    /***************************************************************
2134    Created By		:	svuppala
2135    Date Created By	:	16-Nov-2004
2136    Purpose		:	To display reject reasons for Student
2137    Known Limitations,Enhancements or Remarks
2138    Change History	:
2139    Who			When		What
2140    ***************************************************************/
2141    -- Application Model                   p_isir_rec.dependency_status          (1)
2142    -- Assumed Students' US Tax Paid       p_isir_rec.a_s_us_tax_paid            (2)
2143    -- Students' U.S. Income Tax Paid      p_isir_rec.s_fed_taxes_paid           (3)
2144    -- Assumed Student's Gross Income      p_isir_rec.a_student_agi              (4)
2145    -- Student's Adjusted Gross Income     p_isir_rec.s_adjusted_gross_income    (5)
2146 
2147    BEGIN
2148       IF (       p_isir_rec.dependency_status = 'D'
2149             AND  p_isir_rec.FATHER_SSN = RPAD('0', LENGTH(p_isir_rec.FATHER_SSN),'0')
2150             AND  (p_isir_rec.MOTHER_SSN IS NULL OR p_isir_rec.MOTHER_SSN =
2151                                                         RPAD('0', LENGTH(p_isir_rec.MOTHER_SSN),'0'))
2152             AND  p_isir_rec.P_TAX_RETURN_STATUS IN ('1','2')
2153             AND  NVL ( p_isir_rec.P_TYPE_TAX_RETURN,'0') <> '3' )
2154        THEN
2155 
2156                p_reject_codes := p_reject_codes || 'J' ;
2157                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4049');
2158                IGS_GE_MSG_STACK.ADD;
2159       END IF ;
2160    END reject_edit_4049 ;
2161 
2162 
2163    PROCEDURE reject_edit_4051   AS
2164    /***************************************************************
2165    Created By		:	svuppala
2166    Date Created By	:	16-Nov-2004
2167    Purpose		:	To display reject reasons for Student
2168    Known Limitations,Enhancements or Remarks
2169    Change History	:
2170    Who			When		What
2171    ***************************************************************/
2172    -- Application Model                   p_isir_rec.dependency_status          (1)
2173    -- Assumed Students' US Tax Paid       p_isir_rec.a_s_us_tax_paid            (2)
2174    -- Students' U.S. Income Tax Paid      p_isir_rec.s_fed_taxes_paid           (3)
2175    -- Assumed Student's Gross Income      p_isir_rec.a_student_agi              (4)
2176    -- Student's Adjusted Gross Income     p_isir_rec.s_adjusted_gross_income    (5)
2177 
2178    BEGIN
2179       IF (       p_isir_rec.dependency_status = 'D'
2180             AND  p_isir_rec.mother_SSN = RPAD('0', LENGTH(p_isir_rec.mother_SSN),'0')
2181             AND  (p_isir_rec.father_SSN IS NULL OR p_isir_rec.father_SSN =
2182                                                         RPAD('0', LENGTH(p_isir_rec.father_SSN),'0'))
2183             AND  p_isir_rec.P_TAX_RETURN_STATUS IN ('1','2')
2184             AND  NVL ( p_isir_rec.P_TYPE_TAX_RETURN,'0') <> '3' )
2185        THEN
2186 
2187                p_reject_codes := p_reject_codes || 'K' ;
2188                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4051');
2189                IGS_GE_MSG_STACK.ADD;
2190       END IF ;
2191    END reject_edit_4051 ;
2192 
2193    PROCEDURE reject_edit_4022_4020_4021   AS
2194    /***************************************************************
2195    Created By		:	masehgal
2196    Date Created By	:	03-Feb-2003
2197    Purpose		:	To display reject reasons for Student
2198    Known Limitations,Enhancements or Remarks
2199    Change History	:
2200    Who			When		What
2201    ***************************************************************/
2205    -- Assumed Parents' Adjusted Gross Income    p_isir_rec.a_parents_agi              (4)
2202    -- Application Model                         p_isir_rec.dependency_status          (1)
2203    -- Assumed Parents' US Tax Paid              p_isir_rec.a_p_us_tax_paid            (2)
2204    -- Parents' U.S. Income Tax Paid             p_isir_rec.p_taxes_paid               (3)
2206    -- Parents' Adjusted Gross Income            p_isir_rec.p_adjusted_gross_income    (5)
2207    -- FAA Adjustment                            p_isir_rec.faa_adjustment             (6)
2208    -- System  Record  Type                      p_isir_rec.system_record_type         (7)
2209 
2210    BEGIN
2211 /*  DO NOT DELETE the code commented here
2212     It is likely to be pulled in in a forthcoming CCR
2213 
2214       IF      p_isir_rec.system_record_type <> 'CORRECTION'
2215          AND  p_isir_rec.dependency_status = 'D'
2216 */
2217       IF (     p_isir_rec.dependency_status = 'D'
2218           AND (    NVL( p_isir_rec.a_p_us_tax_paid , p_isir_rec.p_taxes_paid ) IS NOT NULL
2219                AND NVL( p_isir_rec.a_p_us_tax_paid , p_isir_rec.p_taxes_paid ) > 0           )
2220           AND  NVL( p_isir_rec.a_p_us_tax_paid  , p_isir_rec.p_taxes_paid ) >= 0.4 * NVL( p_isir_rec.a_parents_agi, p_isir_rec.p_adjusted_gross_income )
2221           AND  NVL( p_isir_rec.a_p_us_tax_paid  , p_isir_rec.p_taxes_paid ) <  NVL( p_isir_rec.a_parents_agi , p_isir_rec.p_adjusted_gross_income )
2222           AND  NVL( p_isir_rec.faa_adjustment, '2' ) <> '1'
2223          )     THEN
2224 /*  DO NOT DELETE the code commented here
2225     It is likely to be pulled in in a forthcoming CCR
2226 
2227               --   Select the Correction Record for the same student and in that record
2228               IF NOT ( NVL ( corr_rec.a_p_us_tax_paid  , corr_rec.p_taxes_paid  ) <> NVL ( p_isir_rec.a_p_us_tax_paid  , p_isir_rec.p_taxes_paid ) )  THEN
2229 */
2230                  -- append reject code ;  stack  reject message ;
2231                  p_reject_codes := p_reject_codes || 'C ' ;
2232                  FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4020');
2233                  IGS_GE_MSG_STACK.ADD;
2234 --            END IF ;
2235       END IF ;
2236    END reject_edit_4022_4020_4021 ;
2237 
2238 
2239    PROCEDURE reject_edit_4024_4022_4023   AS
2240    /***************************************************************
2241    Created By		:	masehgal
2242    Date Created By	:	03-Feb-2003
2243    Purpose		:	To display reject reasons for Student
2244    Known Limitations,Enhancements or Remarks
2245    Change History	:
2246    Who			When		What
2247    ***************************************************************/
2248    -- Application Model                p_isir_rec.dependency_status       (1)
2249    -- Assumed Students' US Tax Paid    p_isir_rec.a_s_us_tax_paid         (2)
2250    -- Students'  U.S. Income Tax Paid  p_isir_rec.s_fed_taxes_paid        (3)
2251    -- Assumed Student's Gross Income   p_isir_rec.a_student_agi           (4)
2252    -- Student's Adjusted Gross Income  p_isir_rec.s_adjusted_gross_income (5)
2253    -- FAA Adjustment                   p_isir_rec.faa_adjustment          (6)
2254    -- System  Record  Type             p_isir_rec.system_record_type      (7)
2255 
2256    BEGIN
2257 /*  DO NOT DELETE the code commented here
2258     It is likely to be pulled in in a forthcoming CCR
2259 
2260       IF      p_isir_rec.system_record_type <> 'CORRECTION'
2261          AND  p_isir_rec.dependency_status =  'I'
2262 */
2263       IF (     p_isir_rec.dependency_status =  'I'
2264           AND (     NVL( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) IS NOT NULL
2265                AND  NVL( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) > 0         )
2266           AND  NVL( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) >= 0.4 * (NVL( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ))
2267           AND  NVL( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) <  NVL ( p_isir_rec.a_student_agi, p_isir_rec.s_adjusted_gross_income )
2268           AND  NVL( p_isir_rec.faa_adjustment,'2') <> '1'
2269          )     THEN
2270 /*  DO NOT DELETE the code commented here
2271     It is likely to be pulled in in a forthcoming CCR
2272 
2273               --   Select the Correction Record for the same student and in that record
2274               IF  NOT ( NVL( corr_rec.a_s_us_tax_paid , corr_rec.s_fed_taxes_paid ) <> NVL ( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) )  THEN
2275 */
2276                   -- append reject code ; stack  reject message ;
2277                   p_reject_codes := p_reject_codes || 'C ' ;
2278                   FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4022');
2279                   IGS_GE_MSG_STACK.ADD;
2280  --           END IF ;
2281       END IF ;
2282    END reject_edit_4024_4022_4023 ;
2283 
2284 
2285    PROCEDURE reject_edit_4028_4024   AS
2286    /***************************************************************
2287    Created By		:	masehgal
2288    Date Created By	:	03-Feb-2003
2289    Purpose		:	To display reject reasons for Student
2290    Known Limitations,Enhancements or Remarks
2291    Change History	:
2292    Who			When		What
2293    nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2294                                         This is reject edit 4024 for the year 0304 and 4026 for year 0405
2295    ***************************************************************/
2296    -- Application Model                   p_isir_rec.dependency_status    (1)
2297    -- Assumed Parents' Marital Status     p_isir_rec.a_p_marital_status   (2)
2298    -- Parents' Marital Status             p_isir_rec.p_marital_status     (3)
2299    -- Assumed Parents' Number in Family   p_isir_rec.a_parents_num_family (4)
2303       IF (     p_isir_rec.dependency_status = 'D'
2300    -- Parent's' Number of Family Members  p_isir_rec.p_num_family_member  (5)
2301 
2302    BEGIN
2304           AND  p_isir_rec.p_marital_status  IS NULL
2305           AND (    NVL ( p_isir_rec.a_parents_num_family , p_isir_rec.p_num_family_member ) IS NULL
2306                OR  NVL ( p_isir_rec.a_parents_num_family , p_isir_rec.p_num_family_member ) = 0
2307                OR  NVL ( p_isir_rec.a_parents_num_family , p_isir_rec.p_num_family_member ) = 1     )
2308          )     THEN
2309                -- append reject code ;stack  reject message ;
2310                p_reject_codes := p_reject_codes || '10' ;
2311                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4024');
2312                IGS_GE_MSG_STACK.ADD;
2313       END IF ;
2314    END reject_edit_4028_4024 ;
2315 
2316 
2317    PROCEDURE reject_edit_4029_4025   AS
2318    /***************************************************************
2319    Created By		:	masehgal
2320    Date Created By	:	03-Feb-2003
2321    Purpose		:	To display reject reasons for Student
2322    Known Limitations,Enhancements or Remarks
2323    Change History	:
2324    Who			When		What
2325     nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2326                                       This is reject edit 4025 for the year 0304 and 4027 for year 0405
2327    ***************************************************************/
2328    -- Application Model                   p_isir_rec.dependency_status          (1)
2329    -- Assumed Students' Marital Status    p_isir_rec.a_student_marital_status   (2)
2330    -- Students' Marital Status            p_isir_rec.s_marital_status           (3)
2331    -- Assumed Students' Number in Family  p_isir_rec.a_s_num_in_family          (4)
2332    -- Students' Number of Family Members  p_isir_rec.s_num_family_members       (5)
2333 
2334    BEGIN
2335       IF (     p_isir_rec.dependency_status = 'I'
2336           AND  NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) IS NULL
2337           AND (   NVL ( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) IS NULL
2338                OR NVL ( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) = 0
2339                OR NVL ( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) = 1     )
2340          )     THEN
2341                -- append reject code ;stack  reject message
2342                p_reject_codes := p_reject_codes || '10' ;
2343                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4025');
2344                IGS_GE_MSG_STACK.ADD;
2345       END IF ;
2346    END reject_edit_4029_4025 ;
2347 
2348    PROCEDURE reject_edit_4026_4024_4025_new (p_sys_batch_yr IN VARCHAR2) AS
2349    /***************************************************************
2350    Created By		:	nsidana
2351    Date Created By	:11/18/2003
2352    Purpose		:	To display reject reasons for Student
2353    Known Limitations,Enhancements or Remarks
2354    Change History	:
2355    Who			When		What
2356    ***************************************************************/
2357     BEGIN
2358 
2359         IF p_sys_batch_yr  = '0304' then
2360             RETURN;
2361         END IF;
2362 
2363         IF (p_isir_rec.dependency_status = 'D'    AND
2364              (NVL(p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) IS NOT NULL) AND
2365              (NVL(p_isir_rec.a_s_us_tax_paid, p_isir_rec.s_fed_taxes_paid ) > 0)  AND
2366              (NVL ( p_isir_rec.a_s_us_tax_paid , p_isir_rec.s_fed_taxes_paid ) < NVL ( p_isir_rec.a_student_agi , p_isir_rec.s_adjusted_gross_income ))    AND
2367              (NVL (p_isir_rec.a_s_us_tax_paid, p_isir_rec.s_fed_taxes_paid) >= 0.4* NVL (p_isir_rec.a_student_agi, p_isir_rec.s_adjusted_gross_income))  AND
2368              (NVL(p_isir_rec.faa_adjustment, '2' ) <> '1'))
2369         THEN
2370              p_reject_codes := p_reject_codes || 'G' ;
2371              FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4024_25_NEW');
2372              IGS_GE_MSG_STACK.ADD;
2373         END IF ;
2374     END reject_edit_4026_4024_4025_new ;
2375 
2376    PROCEDURE reject_edit_4030_4026_4027   AS
2377    /***************************************************************
2378    Created By		:	masehgal
2379    Date Created By	:	03-Feb-2003
2380    Purpose		:	To display reject reasons for Student
2381    Known Limitations,Enhancements or Remarks
2382    Change History	:
2383    Who			When		What
2384     nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2385                                         This is reject edit 4026_4027 for the year 0304 and 4028_4028
2386                                          for year 0405
2387    ***************************************************************/
2388    -- Application Model                   p_isir_rec.dependency_status       (1)
2389    -- Assumed Parents' Number in Family   p_isir_rec.a_parents_num_family    (2)
2390    -- Parents' Number of Family Members   p_isir_rec.p_num_family_member     (3)
2391    -- FAA Adjustment                      p_isir_rec.faa_adjustment          (4)
2392    -- System  Record  Type                p_isir_rec.system_record_type      (5)
2393 
2394    BEGIN
2395 /*  DO NOT DELETE the code commented here
2396     It is likely to be pulled in in a forthcoming CCR
2397 
2398       IF     p_isir_rec.system_record_type <> 'CORRECTION'
2399          AND p_isir_rec.dependency_status =  'D'
2400 */
2401       IF (    p_isir_rec.dependency_status = 'D'
2402           AND NVL( p_isir_rec.a_parents_num_family , p_isir_rec.p_num_family_member ) >= 15
2403           AND NVL( p_isir_rec.faa_adjustment,'2') <> '1'
2404          )    THEN
2405 /*  DO NOT DELETE the code commented here
2406     It is likely to be pulled in in a forthcoming CCR
2407 
2411                  -- append reject code ; stack  reject message ;
2408              --   Select the Correction Record for the same student and in that record
2409              IF  NOT ( NVL ( corr_rec.a_parents_num_family , corr_rec.p_num_family_member ) <> NVL ( p_isir_rec.a_parents_num_family , p_isir_rec.p_num_family_member ) )  THEN
2410 */
2412                  p_reject_codes := p_reject_codes || 'W ' ;
2413                  FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4026');
2414                  IGS_GE_MSG_STACK.ADD;
2415 --           END IF ;
2416       END IF ;
2417    END reject_edit_4030_4026_4027 ;
2418 
2419 
2420    PROCEDURE reject_edit_4032_4028_4029   AS
2421    /***************************************************************
2422    Created By		:	masehgal
2423    Date Created By	:	03-Feb-2003
2424    Purpose		:	To display reject reasons for Student
2425    Known Limitations,Enhancements or Remarks
2426    Change History	:
2427    Who			When		What
2428     nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2429                                       This is reject edit 4028_4029 for the year 0304 and 4030_31
2430                                       for year 0405
2431    ***************************************************************/
2432    -- Application Model                   p_isir_rec.dependency_status       (1)
2433    -- Assumed Students' Number in Family  p_isir_rec.a_s_num_in_family       (2)
2434    -- Students' Number of Family Members  p_isir_rec.s_num_family_members    (3)
2435    -- FAA Adjustment                      p_isir_rec.faa_adjustment          (4)
2436    -- System Record Type                  p_isir_rec.system_record_type      (5)
2437 
2438    BEGIN
2439 /*  DO NOT DELETE the code commented here
2440     It is likely to be pulled in in a forthcoming CCR
2441 
2442       IF     p_isir_rec.system_record_type <> 'CORRECTION'
2443          AND p_isir_rec.dependency_status =  'I'
2444 */
2445       IF (    p_isir_rec.dependency_status =  'I'
2446           AND NVL ( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) >= 15
2447           AND NVL ( p_isir_rec.faa_adjustment,'2') <> '1'
2448          )    THEN
2449 /*  DO NOT DELETE the code commented here
2450     It is likely to be pulled in in a forthcoming CCR
2451 
2452              --   Select the Correction Record for the same student and in that record
2453              IF NOT ( NVL (corr_rec.a_s_num_in_family ,corr_rec.s_num_family_members ) <> NVL ( p_isir_rec.a_s_num_in_family , p_isir_rec.s_num_family_members ) )  THEN
2454 */
2455                 -- append reject code ; stack  reject message ;
2456                  p_reject_codes := p_reject_codes || 'W ' ;
2457                 FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4028');
2458                 IGS_GE_MSG_STACK.ADD;
2459 --           END IF ;
2460       END IF ;
2461    END reject_edit_4032_4028_4029 ;
2462 
2463 
2464    PROCEDURE reject_edit_4034_4030   AS
2465       /***************************************************************
2466    Created By		:	masehgal
2467    Date Created By	:	03-Feb-2003
2468    Purpose		:	To display reject reasons for Student
2469    Known Limitations,Enhancements or Remarks
2470    Change History	:
2471    Who			When		What
2472     nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2473                                       This is reject edit 4030 for the year 0304 and 4032 for year 0405
2474    ***************************************************************/
2475    -- Application Model                         p_isir_rec.dependency_status       (1)
2476    -- Parents' Marital Status                   p_isir_rec.p_marital_status        (3)
2477    -- Assumed Fathers' Income Earned from Work  p_isir_rec.a_f_work_income         (4)
2478    -- Father's Income From Work                 p_isir_rec.f_income_work           (5)
2479    -- Assumed Mothers Income from  Work         p_isir_rec.a_m_work_income         (6)
2480    -- Mothers Income from Work                  p_isir_rec.m_income_work           (7)
2481    -- FAA Adjustment                            p_isir_rec.faa_adjustment          (8)
2482 
2483    BEGIN
2484       IF (     p_isir_rec.dependency_status = 'D'
2485 --          AND  NVL( p_isir_rec.p_marital_status, '1' ) IN ('2','3','4')
2486           AND  p_isir_rec.p_marital_status IN ('2','3','4')
2487           AND (    NVL( p_isir_rec.a_f_work_income , p_isir_rec.f_income_work ) IS NOT NULL
2488                AND NVL( NVL ( p_isir_rec.a_f_work_income , p_isir_rec.f_income_work ), 1 ) <>  0 )
2489           AND (    NVL( p_isir_rec.a_m_work_income , p_isir_rec.m_income_work ) IS NOT NULL
2490                AND NVL( NVL ( p_isir_rec.a_m_work_income , p_isir_rec.m_income_work ), 1 ) <>  0 )
2491           AND  NVL( p_isir_rec.faa_adjustment,'2') <> '1'
2492          )     THEN
2493                -- append reject code ;stack  reject message
2494                p_reject_codes := p_reject_codes || '11' ;
2495                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4030');
2496                IGS_GE_MSG_STACK.ADD;
2497       END IF ;
2498    END reject_edit_4034_4030 ;
2499 
2500 
2501    PROCEDURE reject_edit_4035_4031   AS
2502    /***************************************************************
2503    Created By		:	masehgal
2504    Date Created By	:	03-Feb-2003
2505    Purpose		:	To display reject reasons for Student
2506    Known Limitations,Enhancements or Remarks
2507    Change History	:
2508    Who			When		What
2509     nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2510                                       This is reject edit 4031for the year 0304 and 4033 for year 0405
2511    ***************************************************************/
2515    -- Assumed Spouse Income From Work     p_isir_rec.a_spouse_income_work       (4)
2512    -- Application Model                   p_isir_rec.dependency_status          (1)
2513    -- Assumed Students' Marital Status    p_isir_rec.a_student_marital_status   (2)
2514    -- Students' Marital Status            p_isir_rec.s_marital_status           (3)
2516    -- Spouse Income From  Work            p_isir_rec.spouse_income_from_work    (5)
2517    -- FAA Adjustment                      p_isir_rec.faa_adjustment             (6)
2518 
2519    BEGIN
2520       IF (     p_isir_rec.dependency_status = 'I'
2521           AND  NVL( p_isir_rec.a_student_marital_status, p_isir_rec.s_marital_status ) IN ('1','3')
2522           AND (    NVL ( p_isir_rec.a_spouse_income_work , p_isir_rec.spouse_income_from_work ) IS NOT NULL
2523                AND NVL ( NVL ( p_isir_rec.a_spouse_income_work , p_isir_rec.spouse_income_from_work ), 1) <> 0 )
2524           AND  NVL ( p_isir_rec.faa_adjustment,'2') <> '1'
2525          )     THEN
2526                -- append reject code ;stack  reject message ;
2527                p_reject_codes := p_reject_codes || '11' ;
2528                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4031');
2529                IGS_GE_MSG_STACK.ADD;
2530       END IF ;
2531    END reject_edit_4035_4031 ;
2532 
2533 
2534    PROCEDURE reject_edit_4036_4032   AS
2535    /***************************************************************
2536    Created By		:	masehgal
2537    Date Created By	:	03-Feb-2003
2538    Purpose		:	To display reject reasons for Student
2539    Known Limitations,Enhancements or Remarks
2540    Change History	:
2541    Who			When		What
2542     nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2543                                       This is reject edit 4032 for the year 0304 and 4034 for year 0405
2544    ***************************************************************/
2545    -- Application Model    p_isir_rec.dependency_status    (1)
2546    -- Signed By            p_isir_rec.signed_by            (2)
2547 
2548    BEGIN
2549       IF (     p_isir_rec.dependency_status = 'D'
2550           AND (p_isir_rec.signed_by IS NULL   OR   p_isir_rec.signed_by = 'A' )
2551          )     THEN
2552                -- append reject code ;stack  reject message ;
2553                p_reject_codes := p_reject_codes || '15' ;
2554                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4032');
2555                IGS_GE_MSG_STACK.ADD;
2556       END IF ;
2557    END reject_edit_4036_4032 ;
2558 
2559 
2560    PROCEDURE reject_edit_4037_4033   AS
2561    /***************************************************************
2562    Created By		:	masehgal
2563    Date Created By	:	03-Feb-2003
2564    Purpose		:	To display reject reasons for Student
2565    Known Limitations,Enhancements or Remarks
2566    Change History	:
2567    Who			When		What
2568     nsidana 11/18/2003   FA129 EFC updates for 2004-2005
2569                                       This is reject edit 4033 for the year 0304 and 4035 for year 0405
2570    ***************************************************************/
2571    -- Application Model    p_isir_rec.dependency_status    (1)
2572    -- Signed By            p_isir_rec.signed_by            (2)
2573 
2574    BEGIN
2575       IF (     p_isir_rec.dependency_status = 'I'
2576           AND (p_isir_rec.signed_by IS NULL   OR   p_isir_rec.signed_by = 'P' )
2577          )     THEN
2578                -- append reject code ;stack  reject message ;
2579                p_reject_codes := p_reject_codes || '14' ;
2580                FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4033');
2581                IGS_GE_MSG_STACK.ADD;
2582       END IF ;
2583    END reject_edit_4037_4033 ;
2584 
2585 
2586    PROCEDURE reject_edit_4038_4034(p_sys_batch_yr IN VARCHAR2) AS
2587    /***************************************************************
2588    Created By		:	masehgal
2589    Date Created By	:	03-Feb-2003
2590    Purpose		:	To display reject reasons for Student
2591    Known Limitations,Enhancements or Remarks
2592    Change History	:
2593    Who			When		What
2594    nsidana 11/18/2003 FA129 EFC updates for 2004-2005.
2595                                       This is reject edit 4034 for year 0304 and edit 4036 for year 0405.
2596    ***************************************************************/
2597    -- Application Model                p_isir_rec.dependency_status    (1)
2598    -- Father's / Step Father's SSN     p_isir_rec.father_ssn           (2)
2599    -- Mother's / Step Mother's SSN     p_isir_rec.mother_ssn           (3)
2600 
2601    BEGIN
2602       IF p_sys_batch_yr = '0304' THEN
2603             IF (p_isir_rec.dependency_status = 'D'  AND
2604                   p_isir_rec.father_ssn IS NULL  AND
2605                   p_isir_rec.mother_ssn IS NULL )
2606              THEN
2607                     -- append reject code ;stack  reject message ;
2608                     p_reject_codes := p_reject_codes || '09' ;
2609                     FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4034');
2610                     IGS_GE_MSG_STACK.ADD;
2611             END IF ;
2612       ELSIF p_sys_batch_yr = '0405' THEN
2613              IF (p_isir_rec.dependency_status = 'D'  AND
2614                   (p_isir_rec.father_ssn IS NULL  OR  p_isir_rec.f_last_name IS NULL OR p_isir_rec. FATHER_STEP_FATHER_BIRTH_DATE IS NULL)   AND
2615                   (p_isir_rec.mother_ssn IS NULL  OR p_isir_rec.m_last_name IS NULL  OR p_isir_rec. MOTHER_STEP_MOTHER_BIRTH_DATE IS NULL))
2616              THEN
2617                   p_reject_codes := p_reject_codes || '09' ;
2618                   FND_MESSAGE.SET_NAME('IGF','IGF_AP_REJECT_EDIT_4034_NEW');
2622    END reject_edit_4038_4034 ;
2619                   IGS_GE_MSG_STACK.ADD;
2620               END IF ;
2621       END IF;
2623 
2624 
2625 BEGIN
2626 /*
2627    -- open correction cursor and fetch correction values
2628    OPEN  get_corr_record ( p_isir_rec.base_id ) ;
2629    FETCH get_corr_record INTO corr_rec ;
2630    CLOSE get_corr_record ;
2631 */
2632 
2633    -- initialize reject_code holder
2634    p_reject_codes := NULL ;
2635    -- Call reject reasons sequentially
2636    reject_edit_4001 ;
2637    reject_edit_4002 ;
2638    reject_edit_4003 ;
2639    reject_edit_4004 ;
2640    reject_edit_4005 ;
2641    reject_edit_4006 ;
2642    IF NVL(p_isir_rec.reject_override_n,'2') <> '1' THEN
2643       reject_edit_4007_4008 ;
2644    END IF ;
2645    reject_edit_4015_4013 ;
2646    IF NVL(p_isir_rec.reject_override_a,'2') <> '1' THEN
2647      reject_edit_4016_4014_4015(p_sys_batch_yr) ;
2648    END IF ;
2649    IF NVL(p_isir_rec.reject_override_b,'2') <> '1' THEN
2650       reject_edit_4018_4016_4017(p_sys_batch_yr);
2651    END IF ;
2652    reject_edit_4020_4018 ;
2653 
2654    IF p_sys_batch_yr IN ('0304','0405') THEN
2655       reject_edit_4019;
2656    ELSE
2657     reject_edit_4021;
2658    END IF ;
2659 
2660    IF NVL(p_isir_rec.reject_override_c,'2') <> '1' THEN
2661       reject_edit_4022_4020_4021 ;
2662       reject_edit_4024_4022_4023 ;
2663    END IF ;
2664 
2665    --Bug #4937475
2666    IF NVL(p_isir_rec.reject_override_g_flag,'2') <> '1' THEN
2667       reject_edit_4026_4024_4025_new(p_sys_batch_yr) ;   -- nsidana 11/18/2003 : New reject edit added aspart of FA129 (EFC updates for 2004-2005).
2668    END IF;
2669 
2670    reject_edit_4028_4024 ;
2671    reject_edit_4029_4025 ;
2672    IF NVL(p_isir_rec.reject_override_w,'2') <> '1' THEN
2673       reject_edit_4030_4026_4027 ;
2674       reject_edit_4032_4028_4029 ;
2675    END IF ;
2676    reject_edit_4034_4030 ;
2677    reject_edit_4035_4031 ;
2678    reject_edit_4036_4032 ;
2679    reject_edit_4037_4033 ;
2680    reject_edit_4038_4034 (p_sys_batch_yr);
2681 
2682    IF p_sys_batch_yr NOT IN ('0304','0405') THEN
2683       reject_edit_4049;
2684    END IF;
2685 
2686    IF p_sys_batch_yr NOT IN ('0304','0405') THEN
2687       reject_edit_4051;
2688       reject_edit_4045_4047;
2689    END IF;
2690 
2691 
2692 EXCEPTION
2693   WHEN OTHERS THEN
2694        FND_MESSAGE.SET_NAME('IGS','IGS_GE_UNHANDLED_EXP');
2695        FND_MESSAGE.SET_TOKEN('NAME','IGF_AP_ASSUMPTION_REJECT_EDITS.REJECT_EDITS' );
2696        IGS_GE_MSG_STACK.ADD;
2697        APP_EXCEPTION.RAISE_EXCEPTION;
2698 
2699 END reject_edits ;
2700 
2701 
2702 END igf_ap_assumption_reject_edits;