51: l_return NUMBER := 0;
52: BEGIN
53: --
54: --
55: l_attachment_seq_no := pay_kr_wg_report_pkg.get_attach_seq_no(p_element_entry_id);
56:
57:
58: if g_debug then
59: hr_utility.set_location('Got the attachment seq no : '||l_attachment_seq_no, 10);
1296:
1297: -- Real Attachment Total = Attachment Total Base + Total Prepaid Interest + Interest this period
1298:
1299: g_court_orders(i).real_attach_total_by_creditor := g_court_orders(i).attachment_total_base + g_court_orders(i).interest_amount +
1300: nvl(pay_kr_wg_report_pkg.paid_interest(p_assignment_id , g_court_orders(i).element_entry_id , p_date_earned ),0) ;
1301:
1302: ELSE -- Interest Base Case
1303: --------------------------------------------------------------------------
1304: -- Attachment Total Base = Principal Base + Court Fee Base + Interest Base
1441:
1442: -- Employee attachment total = Real Attachment Total - Prepaid Debt
1443:
1444: g_court_orders(i).emp_attach_total_by_creditor := g_court_orders(i).real_attach_total_by_creditor -
1445: nvl(pay_kr_wg_report_pkg.paid_amount(p_assignment_id , g_court_orders(i).element_entry_id, p_date_earned ),0);
1446:
1447: -- Bug 2713144 Distribution Base = Real Attachment Total By Creditor
1448:
1449: g_court_orders(i).distribution_base := g_court_orders(i).real_attach_total_by_creditor;
1452:
1453: -- Employee attachment total = Real Attachment Total - Prepaid Debt -- Bug 2713144
1454:
1455: g_court_orders(i).emp_attach_total_by_creditor := g_court_orders(i).real_attach_total_by_creditor -
1456: nvl(pay_kr_wg_report_pkg.paid_amount(p_assignment_id , g_court_orders(i).element_entry_id, p_date_earned ),0);
1457:
1458: -- Bug 2713144 Distribution Base = Real Attachment Total
1459:
1460: g_court_orders(i).distribution_base := g_court_orders(i).real_attach_total_by_creditor;
1506: -- Redistrubution amount should be calcualted only if obligation release
1507: -- has not earlier been processed.
1508: --
1509: IF g_court_orders(i).obligation_release_processed = 'N' THEN -- 4866417
1510: g_court_orders(i).wg_adjustment_amount := nvl(pay_kr_wg_report_pkg.paid_amount(p_assignment_id, g_court_orders(i).element_entry_id, p_date_earned ),0);
1511: g_emp_total.wg_adjustment := g_emp_total.wg_adjustment + g_court_orders(i).wg_adjustment_amount;
1512: END IF;
1513: --
1514: if g_debug then