14: g_int_asgwgitd NUMBER;
15: g_ded_asgitd NUMBER;
16: g_ded_asgrun NUMBER;
17: g_ded_asgwgitd NUMBER;
18: g_debug constant BOOLEAN :=hr_utility.debug_enabled;
19:
20: ---------------------------------------------------------------------------------
21: /* FUNCTION processing_type */
22: ---------------------------------------------------------------------------------
71: OPEN csr_obligation;
72: FETCH csr_obligation INTO l_obligation, l_effective_date;
73: CLOSE csr_obligation;
74: if g_debug then
75: hr_utility.trace('l_obligation : '||l_obligation);
76: end if;
77: -- Bug : 4866417
78: -- Removed the equal condition
79: IF l_obligation ='Y' AND nvl(p_effective_date, g_effective_date) > l_effective_date THEN
82: RETURN false;
83: EXCEPTION
84: WHEN OTHERS THEN
85: if g_debug then
86: hr_utility.trace('Error Occured Obligation_exists');
87: end if;
88: raise;
89: END Obligation_exists;
90: --==================================================================================
123: OPEN csr_element_entry ;
124: FETCH csr_element_entry INTO l_element_entry_id;
125: CLOSE csr_element_entry ;
126: if g_debug then
127: hr_utility.trace('Element Entry Id : '||to_char(l_element_entry_id));
128: end if ;
129: return l_element_entry_id;
130: EXCEPTION
131: WHEN OTHERS THEN
129: return l_element_entry_id;
130: EXCEPTION
131: WHEN OTHERS THEN
132: if g_debug then
133: hr_utility.trace('Error Occured get_element_entry_id');
134: end if;
135: raise;
136: END get_element_entry_id;
137: --======================================================================================
170: return l_attach_seq_no;
171: EXCEPTION
172: WHEN OTHERS THEN
173: if g_debug then
174: hr_utility.trace('Error Occured get_attach_seq_no');
175: end if;
176: raise;
177: END get_attach_seq_no;
178: --======================================================================================
264: RETURN l_exists;
265: EXCEPTION
266: WHEN OTHERS THEN
267: if g_debug then
268: hr_utility.trace('Error Occured wage_garnishment_exists');
269: end if;
270: raise;
271: END wage_garnishment_exists;
272: --============================================================================================
325:
326: l_amount:=pay_balance_pkg.get_value (l_defined_balance_id, p_assignment_action_id);
327: END IF;
328: IF g_debug then
329: hr_utility.trace('l_amount : '||to_char(l_amount));
330: END IF;
331:
332: return nvl(l_amount,0);
333:
333:
334: EXCEPTION
335: WHEN OTHERS THEN
336: if g_debug then
337: hr_utility.trace('Error Occured get_wg_paid_amount');
338: end if;
339: raise;
340: END get_wg_paid_amount;
341: --==================================================================================
394: END IF;
395: l_amount:=pay_balance_pkg.get_value (l_defined_balance_id, p_assignment_action_id);
396: END IF;
397: if g_debug then
398: hr_utility.trace('l_amount : '||to_char(l_amount));
399: end if;
400: return nvl(l_amount,0);
401: EXCEPTION
402: WHEN OTHERS THEN
400: return nvl(l_amount,0);
401: EXCEPTION
402: WHEN OTHERS THEN
403: if g_debug then
404: hr_utility.trace('Error Occured get_wg_interest_paid');
405: end if;
406: raise;
407: END get_wg_interest_paid;
408: --==================================================================================
464: CLOSE csr_asg_action;
465: end if;
466:
467: if g_debug then
468: hr_utility.trace('l_action_sequence : '||to_char(l_action_sequence));
469: hr_utility.trace('l_asg_action_id : '||to_char(l_asg_action_id));
470: end if;
471: --
472: return l_asg_action_id;
465: end if;
466:
467: if g_debug then
468: hr_utility.trace('l_action_sequence : '||to_char(l_action_sequence));
469: hr_utility.trace('l_asg_action_id : '||to_char(l_asg_action_id));
470: end if;
471: --
472: return l_asg_action_id;
473: --
473: --
474: EXCEPTION
475: WHEN OTHERS THEN
476: if g_debug then
477: hr_utility.trace('Error Occured get_max_asg_action_id');
478: end if;
479: raise;
480: END get_max_asg_action_id;
481: --===========================================================================================
510: OPEN csr_paid_amount;
511: FETCH csr_paid_amount INTO l_paid_amount_this_run;
512: CLOSE csr_paid_amount;
513: if g_debug then
514: hr_utility.trace('Paid amount this run : '||to_char(l_paid_amount_this_run));
515: end if;
516: return l_paid_amount_this_run;
517: EXCEPTION
518: WHEN OTHERS THEN
516: return l_paid_amount_this_run;
517: EXCEPTION
518: WHEN OTHERS THEN
519: if g_debug then
520: hr_utility.trace('Error Ocured in paid_amount_this_run');
521: end if;
522: raise;
523: END paid_amount_this_run;
524: --===========================================================================================
531: BEGIN
532: l_paid_amount_this_run := 0;
533: l_paid_amount_this_run := get_wg_paid_amount(p_assignment_action_id, NULL, '_ASG_RUN' );
534: if g_debug then
535: hr_utility.trace('total_paid_amount_this_run : '||to_char(l_paid_amount_this_run));
536: end if;
537: return l_paid_amount_this_run;
538: EXCEPTION
539: WHEN OTHERS THEN
537: return l_paid_amount_this_run;
538: EXCEPTION
539: WHEN OTHERS THEN
540: if g_debug then
541: hr_utility.trace('Error Occured total_paid_amount_this_run');
542: end if;
543: raise;
544: END paid_amount_this_run;
545: --===========================================================================================
583: OPEN csr_attachment_base (l_effective_date);
584: FETCH csr_attachment_base INTO l_attachment_total_base;
585: CLOSE csr_attachment_base;
586: if g_debug then
587: hr_utility.trace('attachment_total_base : '||to_char(l_attachment_total_base));
588: end if;
589: return nvl(l_attachment_total_base, 0);
590: EXCEPTION
591: WHEN OTHERS THEN
589: return nvl(l_attachment_total_base, 0);
590: EXCEPTION
591: WHEN OTHERS THEN
592: if g_debug then
593: hr_utility.trace('Error Occured in attachment_total_base');
594: end if;
595: raise;
596: END attachment_total_base;
597: --===========================================================================================
612: l_attachment_base := attachment_total_base (p_element_entry_id, p_effective_date);
613: l_total_interest_paid := paid_interest (p_assignment_id, p_element_entry_id, p_effective_date);
614: l_real_attachment_total := l_attachment_base + l_total_interest_paid;
615: if g_debug then
616: hr_utility.trace('Real Attachment Total : '||to_char(l_real_attachment_total));
617: end if;
618: return l_real_attachment_total;
619: EXCEPTION
620: WHEN OTHERS THEN
618: return l_real_attachment_total;
619: EXCEPTION
620: WHEN OTHERS THEN
621: if g_debug then
622: hr_utility.trace('Error Ocured in real_attachment_total');
623: end if;
624: raise;
625: END real_attachment_total;
626: --===========================================================================================
645: ,p_effective_date => p_effective_date)
646: -
647: paid_amount(p_assignment_id, p_element_entry_id, p_effective_date);
648: if g_debug then
649: hr_utility.trace('Unpaid Debt : '||to_char(l_unpaid_debt));
650: end if;
651: return l_unpaid_debt;
652: EXCEPTION
653: WHEN OTHERS THEN
651: return l_unpaid_debt;
652: EXCEPTION
653: WHEN OTHERS THEN
654: if g_debug then
655: hr_utility.trace('End Of unpaid_debt');
656: end if;
657: raise;
658: END unpaid_debt;
659: --===============================================================================================
684: ELSE
685: l_paid_amount := get_wg_paid_amount (l_assignment_action_id, l_attachment_seq_no, '_ASG_WG_ITD');
686: END IF;
687: if g_debug then
688: hr_utility.trace('l_paid_amount : '||to_char(l_paid_amount));
689: end if;
690: return l_paid_amount;
691: EXCEPTION
692: WHEN OTHERS THEN
690: return l_paid_amount;
691: EXCEPTION
692: WHEN OTHERS THEN
693: if g_debug then
694: hr_utility.trace('Error occured in paid_amount to single Creditor');
695: end if;
696: raise;
697: END paid_amount;
698: --===============================================================================================
726: OPEN csr_interest;
727: FETCH csr_interest INTO l_interest_paid_this_run;
728: CLOSE csr_interest;
729: if g_debug then
730: hr_utility.trace('paid_interest_this_run to a creditor '||to_char(p_element_entry_id)||' is :'||to_char(l_interest_paid_this_run));
731: end if;
732: return l_interest_paid_this_run;
733: EXCEPTION
734: WHEN OTHERS THEN
732: return l_interest_paid_this_run;
733: EXCEPTION
734: WHEN OTHERS THEN
735: if g_debug then
736: hr_utility.trace('Error Ocured in paid_interest_this_run to a creditor');
737: end if;
738: raise;
739: END paid_interest_this_run;
740: --================================================================================================
747: BEGIN
748: l_paid_interest_to_all := 0;
749: l_paid_interest_to_all := get_wg_interest_paid (p_assignment_action_id, NULL, '_ASG_RUN' );
750: if g_debug then
751: hr_utility.trace('l_paid_interest_to_all : '||to_char(l_paid_interest_to_all));
752: end if;
753: return l_paid_interest_to_all;
754: EXCEPTION
755: WHEN OTHERS THEN
753: return l_paid_interest_to_all;
754: EXCEPTION
755: WHEN OTHERS THEN
756: if g_debug then
757: hr_utility.trace('Error Ocured in paid_interest_this_run to all creditors');
758: end if;
759: raise;
760: END paid_interest_this_run;
761: --====================================================================================================
775: l_attachment_seq_no := get_attach_seq_no (p_element_entry_id);
776: l_paid_interest := get_wg_interest_paid (l_assignment_action_id, l_attachment_seq_no, '_ASG_WG_ITD');
777: --
778: if g_debug then
779: hr_utility.trace('Total Interest paid to the creditor '||to_char(p_element_entry_id)||' is : '||to_char(l_paid_interest));
780: end if;
781: return l_paid_interest;
782: EXCEPTION
783: WHEN OTHERS THEN
781: return l_paid_interest;
782: EXCEPTION
783: WHEN OTHERS THEN
784: if g_debug then
785: hr_utility.trace('Error Occured in paid_interest to a creditors');
786: end if;
787: raise;
788: END paid_interest;
789: --====================================================================================================