[Home] [Help]
305: --------------------- initialize -----------------------
306: SAVEPOINT Update_Fund_Utils;
307:
308: IF OZF_DEBUG_HIGH_ON THEN
309: OZF_Utility_PVT.debug_message(l_full_name||': start');
310: END IF;
311:
312: x_return_status := FND_API.g_ret_sts_success;
313:
330: FETCH csr_object_class INTO l_source_object_class;
331: CLOSE csr_object_class;
332:
333: IF OZF_DEBUG_HIGH_ON THEN
334: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id: ' || l_line_util_rec.claim_line_id);
335: OZF_Utility_PVT.debug_message('l_source_object_class: ' || l_source_object_class);
336: END IF;
337: --Bug# 8513457 fixed by ateotia (-)
338:
331: CLOSE csr_object_class;
332:
333: IF OZF_DEBUG_HIGH_ON THEN
334: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id: ' || l_line_util_rec.claim_line_id);
335: OZF_Utility_PVT.debug_message('l_source_object_class: ' || l_source_object_class);
336: END IF;
337: --Bug# 8513457 fixed by ateotia (-)
338:
339: --association_currency_code set in Update_Group_Line_Util program unit. In some processes, like
355: --Set UNIVERSAL currency from profile.
356: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
357:
358: IF OZF_DEBUG_HIGH_ON THEN
359: OZF_Utility_PVT.debug_message('Currencies at Update_Fund_Utils API...');
360: OZF_Utility_PVT.debug_message('p_asso_amount = '||p_asso_amount);
361: OZF_Utility_PVT.debug_message('l_line_util_rec.amount = '||l_line_util_rec.amount);
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
356: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
357:
358: IF OZF_DEBUG_HIGH_ON THEN
359: OZF_Utility_PVT.debug_message('Currencies at Update_Fund_Utils API...');
360: OZF_Utility_PVT.debug_message('p_asso_amount = '||p_asso_amount);
361: OZF_Utility_PVT.debug_message('l_line_util_rec.amount = '||l_line_util_rec.amount);
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
357:
358: IF OZF_DEBUG_HIGH_ON THEN
359: OZF_Utility_PVT.debug_message('Currencies at Update_Fund_Utils API...');
360: OZF_Utility_PVT.debug_message('p_asso_amount = '||p_asso_amount);
361: OZF_Utility_PVT.debug_message('l_line_util_rec.amount = '||l_line_util_rec.amount);
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
358: IF OZF_DEBUG_HIGH_ON THEN
359: OZF_Utility_PVT.debug_message('Currencies at Update_Fund_Utils API...');
360: OZF_Utility_PVT.debug_message('p_asso_amount = '||p_asso_amount);
361: OZF_Utility_PVT.debug_message('l_line_util_rec.amount = '||l_line_util_rec.amount);
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
359: OZF_Utility_PVT.debug_message('Currencies at Update_Fund_Utils API...');
360: OZF_Utility_PVT.debug_message('p_asso_amount = '||p_asso_amount);
361: OZF_Utility_PVT.debug_message('l_line_util_rec.amount = '||l_line_util_rec.amount);
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
360: OZF_Utility_PVT.debug_message('p_asso_amount = '||p_asso_amount);
361: OZF_Utility_PVT.debug_message('l_line_util_rec.amount = '||l_line_util_rec.amount);
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
368: OZF_Utility_PVT.debug_message('l_fu_fund_currency = '||l_fu_fund_currency);
361: OZF_Utility_PVT.debug_message('l_line_util_rec.amount = '||l_line_util_rec.amount);
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
368: OZF_Utility_PVT.debug_message('l_fu_fund_currency = '||l_fu_fund_currency);
369: OZF_Utility_PVT.debug_message('l_fu_req_currency = '||l_fu_req_currency );
362: OZF_Utility_PVT.debug_message('l_line_util_rec.claim_line_id = '||l_line_util_rec.claim_line_id);
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
368: OZF_Utility_PVT.debug_message('l_fu_fund_currency = '||l_fu_fund_currency);
369: OZF_Utility_PVT.debug_message('l_fu_req_currency = '||l_fu_req_currency );
370: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id );
363: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
368: OZF_Utility_PVT.debug_message('l_fu_fund_currency = '||l_fu_fund_currency);
369: OZF_Utility_PVT.debug_message('l_fu_req_currency = '||l_fu_req_currency );
370: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id );
371:
364: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
368: OZF_Utility_PVT.debug_message('l_fu_fund_currency = '||l_fu_fund_currency);
369: OZF_Utility_PVT.debug_message('l_fu_req_currency = '||l_fu_req_currency );
370: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id );
371:
372: END IF;
365: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
368: OZF_Utility_PVT.debug_message('l_fu_fund_currency = '||l_fu_fund_currency);
369: OZF_Utility_PVT.debug_message('l_fu_req_currency = '||l_fu_req_currency );
370: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id );
371:
372: END IF;
373: --p_asso_amount (earning/adjustment amount) passed in TRANSACTIONAL or FUNCTIONAL
366: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
367: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code = '||l_currency_rec.universal_currency_code );
368: OZF_Utility_PVT.debug_message('l_fu_fund_currency = '||l_fu_fund_currency);
369: OZF_Utility_PVT.debug_message('l_fu_req_currency = '||l_fu_req_currency );
370: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id );
371:
372: END IF;
373: --p_asso_amount (earning/adjustment amount) passed in TRANSACTIONAL or FUNCTIONAL
374: --currency. Need to calculate amount remaining to be reduced accordingly.
375: IF l_currency_rec.association_currency_code = l_currency_rec.transaction_currency_code THEN
376: --l_fu_plan_amt_rem := l_fu_plan_amt_rem + NVL(p_asso_amount,0);
377: l_fu_plan_amt_rem := - NVL(p_asso_amount,0);
378: IF l_fu_plan_amt_rem IS NOT NULL AND l_fu_plan_amt_rem <> 0 THEN
379: OZF_UTILITY_PVT.Convert_Currency
380: ( p_from_currency => l_currency_rec.transaction_currency_code
381: , p_to_currency => l_currency_rec.functional_currency_code
382: , p_conv_date => l_fu_exc_date
383: , p_conv_type => l_fu_exc_type
391: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
392: RAISE FND_API.g_exc_unexpected_error;
393: END IF;
394: IF l_fu_acctd_amt_rem IS NOT NULL THEN
395: l_fu_acctd_amt_rem := OZF_UTILITY_PVT.CurrRound(l_fu_acctd_amt_rem, l_currency_rec.functional_currency_code);
396: END IF;
397: ELSE
398: l_fu_acctd_amt_rem := 0;
399: END IF;
400: ELSE
401: --l_fu_acctd_amt_rem := l_fu_acctd_amt_rem + NVL(p_asso_amount,0);
402: l_fu_acctd_amt_rem := - NVL(p_asso_amount,0);
403: IF l_fu_acctd_amt_rem IS NOT NULL AND l_fu_acctd_amt_rem <> 0 THEN
404: OZF_UTILITY_PVT.Convert_Currency
405: ( p_from_currency => l_currency_rec.functional_currency_code
406: , p_to_currency => l_currency_rec.transaction_currency_code
407: , p_conv_date => l_fu_exc_date
408: , p_conv_type => l_fu_exc_type
416: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
417: RAISE FND_API.g_exc_unexpected_error;
418: END IF;
419: IF l_fu_plan_amt_rem IS NOT NULL THEN
420: l_fu_plan_amt_rem := OZF_UTILITY_PVT.CurrRound(l_fu_plan_amt_rem, l_currency_rec.transaction_currency_code);
421: END IF;
422: ELSE
423: l_fu_plan_amt_rem := 0;
424: END IF;
432: ELSIF l_fu_fund_currency = l_currency_rec.functional_currency_code THEN
433: l_fu_amt_rem := l_fu_acctd_amt_rem;
434: ELSE
435: IF l_fu_plan_amt_rem IS NOT NULL AND l_fu_plan_amt_rem <> 0 THEN
436: OZF_UTILITY_PVT.Convert_Currency
437: ( p_from_currency => l_currency_rec.transaction_currency_code
438: , p_to_currency => l_fu_fund_currency
439: , p_conv_date => l_fu_exc_date
440: , p_conv_type => l_fu_exc_type
448: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
449: RAISE FND_API.g_exc_unexpected_error;
450: END IF;
451: IF l_fu_amt_rem IS NOT NULL THEN
452: l_fu_amt_rem := OZF_UTILITY_PVT.CurrRound(l_fu_amt_rem, l_fu_fund_currency);
453: END IF;
454: ELSE
455: l_fu_amt_rem := 0;
456: END IF;
463: ELSIF l_currency_rec.universal_currency_code = l_fu_fund_currency THEN
464: l_fu_univ_amt_rem := l_fu_amt_rem;
465: ELSE
466: IF l_fu_plan_amt_rem IS NOT NULL AND l_fu_plan_amt_rem <> 0 THEN
467: OZF_UTILITY_PVT.Convert_Currency
468: ( p_from_currency => l_currency_rec.transaction_currency_code
469: , p_to_currency => l_currency_rec.universal_currency_code
470: , p_conv_date => l_fu_exc_date
471: , p_conv_type => l_fu_exc_type
479: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
480: RAISE FND_API.g_exc_unexpected_error;
481: END IF;
482: IF l_fu_univ_amt_rem IS NOT NULL THEN
483: l_fu_univ_amt_rem := OZF_UTILITY_PVT.CurrRound(l_fu_univ_amt_rem, l_currency_rec.universal_currency_code);
484: END IF;
485: ELSE
486: l_fu_univ_amt_rem := 0;
487: END IF;
496: ELSIF l_fu_req_currency = l_currency_rec.universal_currency_code THEN
497: l_fu_req_amt_rem := l_fu_univ_amt_rem;
498: ELSE
499: IF l_fu_plan_amt_rem IS NOT NULL AND l_fu_plan_amt_rem <> 0 THEN
500: OZF_UTILITY_PVT.Convert_Currency
501: ( p_from_currency => l_currency_rec.transaction_currency_code
502: , p_to_currency => l_fu_req_currency
503: , p_conv_date => l_fu_exc_date
504: , p_conv_type => l_fu_exc_type
512: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
513: RAISE FND_API.g_exc_unexpected_error;
514: END IF;
515: IF l_fu_req_amt_rem IS NOT NULL THEN
516: l_fu_req_amt_rem := OZF_UTILITY_PVT.CurrRound(l_fu_req_amt_rem, l_fu_req_currency);
517: END IF;
518: ELSE
519: l_fu_req_amt_rem := 0;
520: END IF;
525: l_fu_univ_amt_rem := 0;
526: END IF;
527:
528: IF OZF_DEBUG_HIGH_ON THEN
529: OZF_Utility_PVT.debug_message('l_fu_amt_rem : '||l_fu_amt_rem);
530: OZF_Utility_PVT.debug_message('l_fu_acctd_amt_rem : '||l_fu_acctd_amt_rem);
531: OZF_Utility_PVT.debug_message('l_fu_plan_amt_rem : '||l_fu_plan_amt_rem);
532: OZF_Utility_PVT.debug_message('l_fu_univ_amt_rem : '||l_fu_univ_amt_rem);
533: OZF_Utility_PVT.debug_message('l_fu_req_amt_rem : '||l_fu_req_amt_rem);
526: END IF;
527:
528: IF OZF_DEBUG_HIGH_ON THEN
529: OZF_Utility_PVT.debug_message('l_fu_amt_rem : '||l_fu_amt_rem);
530: OZF_Utility_PVT.debug_message('l_fu_acctd_amt_rem : '||l_fu_acctd_amt_rem);
531: OZF_Utility_PVT.debug_message('l_fu_plan_amt_rem : '||l_fu_plan_amt_rem);
532: OZF_Utility_PVT.debug_message('l_fu_univ_amt_rem : '||l_fu_univ_amt_rem);
533: OZF_Utility_PVT.debug_message('l_fu_req_amt_rem : '||l_fu_req_amt_rem);
534: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id : '||l_line_util_rec.utilization_id);
527:
528: IF OZF_DEBUG_HIGH_ON THEN
529: OZF_Utility_PVT.debug_message('l_fu_amt_rem : '||l_fu_amt_rem);
530: OZF_Utility_PVT.debug_message('l_fu_acctd_amt_rem : '||l_fu_acctd_amt_rem);
531: OZF_Utility_PVT.debug_message('l_fu_plan_amt_rem : '||l_fu_plan_amt_rem);
532: OZF_Utility_PVT.debug_message('l_fu_univ_amt_rem : '||l_fu_univ_amt_rem);
533: OZF_Utility_PVT.debug_message('l_fu_req_amt_rem : '||l_fu_req_amt_rem);
534: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id : '||l_line_util_rec.utilization_id);
535: END IF;
528: IF OZF_DEBUG_HIGH_ON THEN
529: OZF_Utility_PVT.debug_message('l_fu_amt_rem : '||l_fu_amt_rem);
530: OZF_Utility_PVT.debug_message('l_fu_acctd_amt_rem : '||l_fu_acctd_amt_rem);
531: OZF_Utility_PVT.debug_message('l_fu_plan_amt_rem : '||l_fu_plan_amt_rem);
532: OZF_Utility_PVT.debug_message('l_fu_univ_amt_rem : '||l_fu_univ_amt_rem);
533: OZF_Utility_PVT.debug_message('l_fu_req_amt_rem : '||l_fu_req_amt_rem);
534: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id : '||l_line_util_rec.utilization_id);
535: END IF;
536: --Reduce utilization amount remaining columns of respective currencies.
529: OZF_Utility_PVT.debug_message('l_fu_amt_rem : '||l_fu_amt_rem);
530: OZF_Utility_PVT.debug_message('l_fu_acctd_amt_rem : '||l_fu_acctd_amt_rem);
531: OZF_Utility_PVT.debug_message('l_fu_plan_amt_rem : '||l_fu_plan_amt_rem);
532: OZF_Utility_PVT.debug_message('l_fu_univ_amt_rem : '||l_fu_univ_amt_rem);
533: OZF_Utility_PVT.debug_message('l_fu_req_amt_rem : '||l_fu_req_amt_rem);
534: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id : '||l_line_util_rec.utilization_id);
535: END IF;
536: --Reduce utilization amount remaining columns of respective currencies.
537: -- Fix for Bug 9776744
530: OZF_Utility_PVT.debug_message('l_fu_acctd_amt_rem : '||l_fu_acctd_amt_rem);
531: OZF_Utility_PVT.debug_message('l_fu_plan_amt_rem : '||l_fu_plan_amt_rem);
532: OZF_Utility_PVT.debug_message('l_fu_univ_amt_rem : '||l_fu_univ_amt_rem);
533: OZF_Utility_PVT.debug_message('l_fu_req_amt_rem : '||l_fu_req_amt_rem);
534: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id : '||l_line_util_rec.utilization_id);
535: END IF;
536: --Reduce utilization amount remaining columns of respective currencies.
537: -- Fix for Bug 9776744
538: IF NVL(l_source_object_class,'X') <> 'SD_SUPPLIER' THEN
564: l_line_util_rec.fxgl_acctd_amount := Calculate_FXGL_Amount(l_line_util_rec,l_currency_rec);
565: l_line_util_rec.utilized_acctd_amount := l_line_util_rec.acctd_amount - l_line_util_rec.fxgl_acctd_amount;
566:
567: IF OZF_DEBUG_HIGH_ON THEN
568: OZF_Utility_PVT.debug_message('l_line_util_rec.fxgl_acctd_amount : '||l_line_util_rec.fxgl_acctd_amount );
569: OZF_Utility_PVT.debug_message('l_line_util_rec.utilized_acctd_amount : '||l_line_util_rec.utilized_acctd_amount );
570: END IF;
571: --nepanda : fix for bug # 9508390 - issue # 1
572: l_line_util_rec.util_curr_amount := NVL(l_line_util_rec.util_curr_amount, 0) + l_fu_amt_rem;
565: l_line_util_rec.utilized_acctd_amount := l_line_util_rec.acctd_amount - l_line_util_rec.fxgl_acctd_amount;
566:
567: IF OZF_DEBUG_HIGH_ON THEN
568: OZF_Utility_PVT.debug_message('l_line_util_rec.fxgl_acctd_amount : '||l_line_util_rec.fxgl_acctd_amount );
569: OZF_Utility_PVT.debug_message('l_line_util_rec.utilized_acctd_amount : '||l_line_util_rec.utilized_acctd_amount );
570: END IF;
571: --nepanda : fix for bug # 9508390 - issue # 1
572: l_line_util_rec.util_curr_amount := NVL(l_line_util_rec.util_curr_amount, 0) + l_fu_amt_rem;
573: l_line_util_rec.plan_curr_amount := NVL(l_line_util_rec.plan_curr_amount, 0) + l_fu_req_amt_rem;
573: l_line_util_rec.plan_curr_amount := NVL(l_line_util_rec.plan_curr_amount, 0) + l_fu_req_amt_rem;
574: l_line_util_rec.univ_curr_amount := NVL(l_line_util_rec.univ_curr_amount, 0) + l_fu_univ_amt_rem;
575:
576: IF OZF_DEBUG_HIGH_ON THEN
577: OZF_Utility_PVT.debug_message('l_line_util_rec.util_curr_amount : '||l_line_util_rec.util_curr_amount );
578: OZF_Utility_PVT.debug_message('l_line_util_rec.plan_curr_amount : '||l_line_util_rec.plan_curr_amount );
579: OZF_Utility_PVT.debug_message('l_line_util_rec.univ_curr_amount : '||l_line_util_rec.univ_curr_amount );
580: END IF;
581:
574: l_line_util_rec.univ_curr_amount := NVL(l_line_util_rec.univ_curr_amount, 0) + l_fu_univ_amt_rem;
575:
576: IF OZF_DEBUG_HIGH_ON THEN
577: OZF_Utility_PVT.debug_message('l_line_util_rec.util_curr_amount : '||l_line_util_rec.util_curr_amount );
578: OZF_Utility_PVT.debug_message('l_line_util_rec.plan_curr_amount : '||l_line_util_rec.plan_curr_amount );
579: OZF_Utility_PVT.debug_message('l_line_util_rec.univ_curr_amount : '||l_line_util_rec.univ_curr_amount );
580: END IF;
581:
582: END IF; --'CALCULATE' check
575:
576: IF OZF_DEBUG_HIGH_ON THEN
577: OZF_Utility_PVT.debug_message('l_line_util_rec.util_curr_amount : '||l_line_util_rec.util_curr_amount );
578: OZF_Utility_PVT.debug_message('l_line_util_rec.plan_curr_amount : '||l_line_util_rec.plan_curr_amount );
579: OZF_Utility_PVT.debug_message('l_line_util_rec.univ_curr_amount : '||l_line_util_rec.univ_curr_amount );
580: END IF;
581:
582: END IF; --'CALCULATE' check
583:
591: p_data => x_msg_data
592: );
593:
594: IF OZF_DEBUG_HIGH_ON THEN
595: OZF_Utility_PVT.debug_message(l_full_name ||': end');
596: END IF;
597:
598: EXCEPTION
599: WHEN FND_API.g_exc_error THEN
1004: END IF;
1005:
1006: -- Added Debug For Multi Currency - kpatro
1007: IF OZF_DEBUG_HIGH_ON THEN
1008: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_Where_Clause:Start -----');
1009: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1010: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1005:
1006: -- Added Debug For Multi Currency - kpatro
1007: IF OZF_DEBUG_HIGH_ON THEN
1008: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_Where_Clause:Start -----');
1009: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1010: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1013: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
1006: -- Added Debug For Multi Currency - kpatro
1007: IF OZF_DEBUG_HIGH_ON THEN
1008: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_Where_Clause:Start -----');
1009: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1010: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1013: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
1014: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1007: IF OZF_DEBUG_HIGH_ON THEN
1008: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_Where_Clause:Start -----');
1009: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1010: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1013: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
1014: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1015: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_Where_Clause:End ------------');
1008: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_Where_Clause:Start -----');
1009: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1010: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1013: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
1014: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1015: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_Where_Clause:End ------------');
1016: END IF;
1009: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1010: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1013: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
1014: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1015: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_Where_Clause:End ------------');
1016: END IF;
1017: -- Bug5059770: Allow pay over for offers with zero available amount
1010: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1013: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
1014: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1015: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_Where_Clause:End ------------');
1016: END IF;
1017: -- Bug5059770: Allow pay over for offers with zero available amount
1018: --Bug 5154157 : Reverted change made for bug 4927201 as this will not be called if
1011: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1012: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1013: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
1014: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1015: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_Where_Clause:End ------------');
1016: END IF;
1017: -- Bug5059770: Allow pay over for offers with zero available amount
1018: --Bug 5154157 : Reverted change made for bug 4927201 as this will not be called if
1019: -- total amount is to be overpaid
1227: l_currency_rec currency_rec_type := p_currency_rec;
1228: BEGIN
1229: --------------------- initialize -----------------------
1230: IF OZF_DEBUG_HIGH_ON THEN
1231: OZF_Utility_PVT.debug_message(l_full_name||': start');
1232: END IF;
1233:
1234: --------------------- start -----------------------
1235: l_funds_util_flt := p_funds_util_flt;
1253: IF l_funds_util_flt.offer_type IS NOT NULL THEN
1254: l_price_list_flag := 'N';
1255: END IF;
1256:
1257: l_resource_id := ozf_utility_pvt.get_resource_id(fnd_global.user_id);
1258: l_is_admin := ams_access_PVT.Check_Admin_Access(l_resource_id);
1259: l_orgId := MO_GLOBAL.GET_CURRENT_ORG_ID();
1260:
1261: -- Added Debug For Multi Currency - kpatro
1259: l_orgId := MO_GLOBAL.GET_CURRENT_ORG_ID();
1260:
1261: -- Added Debug For Multi Currency - kpatro
1262: IF OZF_DEBUG_HIGH_ON THEN
1263: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_From_Clause:Start -----');
1264: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1265: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1266: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1267: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1260:
1261: -- Added Debug For Multi Currency - kpatro
1262: IF OZF_DEBUG_HIGH_ON THEN
1263: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_From_Clause:Start -----');
1264: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1265: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1266: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1267: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1268: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1261: -- Added Debug For Multi Currency - kpatro
1262: IF OZF_DEBUG_HIGH_ON THEN
1263: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_From_Clause:Start -----');
1264: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1265: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1266: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1267: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1268: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1269: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_From_Clause:End ------------');
1262: IF OZF_DEBUG_HIGH_ON THEN
1263: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_From_Clause:Start -----');
1264: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1265: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1266: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1267: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1268: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1269: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_From_Clause:End ------------');
1270: END IF;
1263: OZF_Utility_PVT.debug_message('----- Get_Utiz_Sql_Stmt_From_Clause:Start -----');
1264: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1265: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1266: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1267: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1268: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1269: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_From_Clause:End ------------');
1270: END IF;
1271: IF l_offer_flag = 'Y' THEN
1264: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code : ' || l_currency_rec.claim_currency_code);
1265: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1266: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1267: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1268: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1269: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_From_Clause:End ------------');
1270: END IF;
1271: IF l_offer_flag = 'Y' THEN
1272: -- restrict offer access if user is sales rep
1265: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code : ' || l_currency_rec.functional_currency_code);
1266: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code : ' || l_currency_rec.transaction_currency_code);
1267: OZF_Utility_PVT.debug_message('p_summary_view : ' || p_summary_view);
1268: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check);
1269: OZF_Utility_PVT.debug_message('----------------------------Get_Utiz_Sql_Stmt_From_Clause:End ------------');
1270: END IF;
1271: IF l_offer_flag = 'Y' THEN
1272: -- restrict offer access if user is sales rep
1273: IF l_funds_util_flt.reference_type = 'LEAD_REFERRAL' THEN
1272: -- restrict offer access if user is sales rep
1273: IF l_funds_util_flt.reference_type = 'LEAD_REFERRAL' THEN
1274: l_sales_rep := FND_API.g_false;
1275: ELSE
1276: l_resource_id := ozf_utility_pvt.get_resource_id(fnd_global.user_id);
1277: l_sales_rep := ozf_utility_pvt.has_sales_rep_role(l_resource_id);
1278: END IF;
1279:
1280:
1273: IF l_funds_util_flt.reference_type = 'LEAD_REFERRAL' THEN
1274: l_sales_rep := FND_API.g_false;
1275: ELSE
1276: l_resource_id := ozf_utility_pvt.get_resource_id(fnd_global.user_id);
1277: l_sales_rep := ozf_utility_pvt.has_sales_rep_role(l_resource_id);
1278: END IF;
1279:
1280:
1281: FND_DSQL.add_text('SELECT fu.utilization_id, fu.cust_account_id '||
1475:
1476: BEGIN
1477: --------------------- initialize -----------------------
1478: IF OZF_DEBUG_HIGH_ON THEN
1479: OZF_Utility_PVT.debug_message(l_full_name||': start');
1480: END IF;
1481:
1482: IF FND_API.to_boolean(p_init_msg_list) THEN
1483: FND_MSG_PUB.initialize;
1521: CLOSE csr_request_offer;
1522: END IF;
1523:
1524: IF OZF_DEBUG_HIGH_ON THEN
1525: OZF_Utility_PVT.debug_message('----- p_funds_util_flt -----');
1526: OZF_Utility_PVT.debug_message('cust_account_id : ' || l_funds_util_flt.cust_account_id);
1527: OZF_Utility_PVT.debug_message('activity_type : ' || l_funds_util_flt.activity_type);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1522: END IF;
1523:
1524: IF OZF_DEBUG_HIGH_ON THEN
1525: OZF_Utility_PVT.debug_message('----- p_funds_util_flt -----');
1526: OZF_Utility_PVT.debug_message('cust_account_id : ' || l_funds_util_flt.cust_account_id);
1527: OZF_Utility_PVT.debug_message('activity_type : ' || l_funds_util_flt.activity_type);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1523:
1524: IF OZF_DEBUG_HIGH_ON THEN
1525: OZF_Utility_PVT.debug_message('----- p_funds_util_flt -----');
1526: OZF_Utility_PVT.debug_message('cust_account_id : ' || l_funds_util_flt.cust_account_id);
1527: OZF_Utility_PVT.debug_message('activity_type : ' || l_funds_util_flt.activity_type);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1524: IF OZF_DEBUG_HIGH_ON THEN
1525: OZF_Utility_PVT.debug_message('----- p_funds_util_flt -----');
1526: OZF_Utility_PVT.debug_message('cust_account_id : ' || l_funds_util_flt.cust_account_id);
1527: OZF_Utility_PVT.debug_message('activity_type : ' || l_funds_util_flt.activity_type);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1525: OZF_Utility_PVT.debug_message('----- p_funds_util_flt -----');
1526: OZF_Utility_PVT.debug_message('cust_account_id : ' || l_funds_util_flt.cust_account_id);
1527: OZF_Utility_PVT.debug_message('activity_type : ' || l_funds_util_flt.activity_type);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1526: OZF_Utility_PVT.debug_message('cust_account_id : ' || l_funds_util_flt.cust_account_id);
1527: OZF_Utility_PVT.debug_message('activity_type : ' || l_funds_util_flt.activity_type);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1527: OZF_Utility_PVT.debug_message('activity_type : ' || l_funds_util_flt.activity_type);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1528: OZF_Utility_PVT.debug_message('activity_id : ' || l_funds_util_flt.activity_id);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1536: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
1529: OZF_Utility_PVT.debug_message('offer_type : ' || l_funds_util_flt.offer_type);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1536: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
1537: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
1530: OZF_Utility_PVT.debug_message('product_level_type : ' || l_funds_util_flt.product_level_type);
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1536: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
1537: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
1538: OZF_Utility_PVT.debug_message('----------------------------');
1531: OZF_Utility_PVT.debug_message('product_id : ' || l_funds_util_flt.product_id);
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1536: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
1537: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
1538: OZF_Utility_PVT.debug_message('----------------------------');
1539: END IF;
1532: OZF_Utility_PVT.debug_message('Process_By : ' || l_funds_util_flt.autopay_check); -- Added For Multi Currency - kpatro
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1536: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
1537: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
1538: OZF_Utility_PVT.debug_message('----------------------------');
1539: END IF;
1540:
1533: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1536: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
1537: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
1538: OZF_Utility_PVT.debug_message('----------------------------');
1539: END IF;
1540:
1541: -- use FND_DSQL package to handle dynamic sql and bind variables
1534: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
1535: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
1536: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
1537: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
1538: OZF_Utility_PVT.debug_message('----------------------------');
1539: END IF;
1540:
1541: -- use FND_DSQL package to handle dynamic sql and bind variables
1542: FND_DSQL.init;
1632:
1633: IF OZF_DEBUG_HIGH_ON THEN
1634: --l_utiz_sql := FND_DSQL.get_text(TRUE);
1635: l_utiz_sql := SUBSTR(FND_DSQL.get_text(TRUE),1,4000);
1636: OZF_Utility_PVT.debug_message('----- UTIZ SQL -----');
1637: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1, 250));
1638: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1633: IF OZF_DEBUG_HIGH_ON THEN
1634: --l_utiz_sql := FND_DSQL.get_text(TRUE);
1635: l_utiz_sql := SUBSTR(FND_DSQL.get_text(TRUE),1,4000);
1636: OZF_Utility_PVT.debug_message('----- UTIZ SQL -----');
1637: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1, 250));
1638: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1634: --l_utiz_sql := FND_DSQL.get_text(TRUE);
1635: l_utiz_sql := SUBSTR(FND_DSQL.get_text(TRUE),1,4000);
1636: OZF_Utility_PVT.debug_message('----- UTIZ SQL -----');
1637: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1, 250));
1638: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1635: l_utiz_sql := SUBSTR(FND_DSQL.get_text(TRUE),1,4000);
1636: OZF_Utility_PVT.debug_message('----- UTIZ SQL -----');
1637: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1, 250));
1638: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1636: OZF_Utility_PVT.debug_message('----- UTIZ SQL -----');
1637: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1, 250));
1638: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1637: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1, 250));
1638: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1638: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1639: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 501, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1640: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 751, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1641: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1001, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1642: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1251, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1643: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1501, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1651: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3751, 250));
1644: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 1751, 250));
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1651: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3751, 250));
1652: OZF_Utility_PVT.debug_message('--------------------');
1645: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2001, 250));
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1651: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3751, 250));
1652: OZF_Utility_PVT.debug_message('--------------------');
1653: OZF_Utility_PVT.debug_message(l_full_name||': end');
1646: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2251, 250));
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1651: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3751, 250));
1652: OZF_Utility_PVT.debug_message('--------------------');
1653: OZF_Utility_PVT.debug_message(l_full_name||': end');
1654: END IF;
1647: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 2751, 250));
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1651: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3751, 250));
1652: OZF_Utility_PVT.debug_message('--------------------');
1653: OZF_Utility_PVT.debug_message(l_full_name||': end');
1654: END IF;
1655:
1648: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3001, 250));
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1651: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3751, 250));
1652: OZF_Utility_PVT.debug_message('--------------------');
1653: OZF_Utility_PVT.debug_message(l_full_name||': end');
1654: END IF;
1655:
1656:
1649: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3251, 250));
1650: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3501, 250));
1651: OZF_Utility_PVT.debug_message(SUBSTR(l_utiz_sql, 3751, 250));
1652: OZF_Utility_PVT.debug_message('--------------------');
1653: OZF_Utility_PVT.debug_message(l_full_name||': end');
1654: END IF;
1655:
1656:
1657:
1691: WHERE cust_account_id = cv_cust_account_id;
1692:
1693: BEGIN
1694: IF OZF_DEBUG_HIGH_ON THEN
1695: OZF_Utility_PVT.debug_message(l_full_name||': start');
1696: END IF;
1697:
1698: -- bug # 7379700 fixed by ateotia (+)
1699: IF p_site_use_id is not null THEN
1729:
1730: x_cust_trade_profile := l_cust_trade_profile;
1731:
1732: IF OZF_DEBUG_HIGH_ON THEN
1733: OZF_Utility_PVT.debug_message(l_full_name||': end');
1734: END IF;
1735: END Get_Cust_Trade_Profile;
1736: ---------------------------------------------------------------------
1737: -- PROCEDURE
1768: -- Initialize API return status to sucess
1769: x_return_status := FND_API.G_RET_STS_SUCCESS;
1770:
1771: IF OZF_DEBUG_HIGH_ON THEN
1772: OZF_Utility_PVT.debug_message(l_full_name||': start');
1773: END IF;
1774:
1775: -- get payment method information from trade profile
1776: Get_Cust_Trade_Profile(
1834: l_active_vendor_num NUMBER ; --Bug 16301629
1835:
1836: BEGIN
1837: IF OZF_DEBUG_HIGH_ON THEN
1838: OZF_Utility_PVT.debug_message(l_full_name||': start');
1839: END IF;
1840:
1841: -- Initialize API return status to sucess
1842: x_return_status := FND_API.G_RET_STS_SUCCESS;
1919: END IF;
1920: END IF;
1921:
1922: IF OZF_DEBUG_HIGH_ON THEN
1923: OZF_Utility_PVT.debug_message(l_full_name||': end');
1924: END IF;
1925: EXCEPTION
1926: WHEN OTHERS THEN
1927: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1959: WHERE org_id = MO_GLOBAL.GET_CURRENT_ORG_ID();
1960:
1961: BEGIN
1962: IF OZF_DEBUG_HIGH_ON THEN
1963: OZF_Utility_PVT.debug_message(l_full_name||': start');
1964: END IF;
1965:
1966: IF p_funds_util_flt.prorate_earnings_flag IS NOT NULL THEN
1967: l_prorate_earnings_flag := p_funds_util_flt.prorate_earnings_flag;
1978: END IF;
1979: x_prorate_earnings_flag := l_prorate_earnings_flag;
1980:
1981: IF OZF_DEBUG_HIGH_ON THEN
1982: OZF_Utility_PVT.debug_message(l_full_name||': end');
1983: END IF;
1984: END Get_Prorate_Earnings_Flag;
1985:
1986: ---------------------------------------------------------------------
2066:
2067: BEGIN
2068: ----------------------- initialize --------------------
2069: IF OZF_DEBUG_HIGH_ON THEN
2070: OZF_Utility_PVT.debug_message(l_full_name||': start');
2071: END IF;
2072:
2073: x_return_status := FND_API.g_ret_sts_success;
2074:
2080: FETCH csr_acc_adjustment INTO x_adj_util_id;
2081: CLOSE csr_acc_adjustment;
2082:
2083: IF OZF_DEBUG_HIGH_ON THEN
2084: OZF_Utility_PVT.debug_message('x_adj_util_id:' || x_adj_util_id);
2085: END IF;
2086: IF x_adj_util_id IS NOT NULL THEN
2087: RETURN;
2088: END IF;
2098: , x_return_status => l_return_status
2099: );
2100:
2101: IF OZF_DEBUG_HIGH_ON THEN
2102: OZF_Utility_PVT.debug_message('Offer sourcing budget: '||l_fund_id);
2103: END IF;
2104:
2105:
2106: l_act_budgets_rec.parent_src_apprvd_amt := 0;
2111: l_act_budgets_rec.budget_source_id := p_offer_id;
2112: l_act_budgets_rec.request_currency := l_plan_curr_code;
2113: l_act_budgets_rec.request_date := SYSDATE;
2114: l_act_budgets_rec.status_code := 'APPROVED';
2115: l_act_budgets_rec.user_status_id := ozf_utility_pvt.get_default_user_status (
2116: 'OZF_BUDGETSOURCE_STATUS'
2117: ,l_act_budgets_rec.status_code
2118: );
2119: l_act_budgets_rec.transfer_type := 'UTILIZED';
2117: ,l_act_budgets_rec.status_code
2118: );
2119: l_act_budgets_rec.transfer_type := 'UTILIZED';
2120: l_act_budgets_rec.approval_date := SYSDATE;
2121: l_act_budgets_rec.approver_id := ozf_utility_pvt.get_resource_id (fnd_global.user_id);
2122: l_act_budgets_rec.parent_source_id := l_fund_id;
2123:
2124: l_act_util_rec.gl_date := SYSDATE;
2125: IF p_reference_type = 'LEAD_REFERRAL' THEN
2165: OPEN csr_acc_adjustment(p_offer_id, p_cust_account_id, p_fund_id, p_product_id, p_product_level_type);
2166: FETCH csr_acc_adjustment INTO x_adj_util_id;
2167: CLOSE csr_acc_adjustment;
2168: IF OZF_DEBUG_HIGH_ON THEN
2169: OZF_Utility_PVT.debug_message(' New - 1:x_adj_util_id:' || x_adj_util_id);
2170: END IF;
2171:
2172:
2173: ------------------------- finish -------------------------------
2171:
2172:
2173: ------------------------- finish -------------------------------
2174: IF OZF_DEBUG_HIGH_ON THEN
2175: OZF_Utility_PVT.debug_message(l_full_name ||': end');
2176: END IF;
2177:
2178:
2179:
2287: --------------------- initialize -----------------------
2288: SAVEPOINT Create_Line_Util_Tbl;
2289:
2290: IF OZF_DEBUG_HIGH_ON THEN
2291: OZF_Utility_PVT.debug_message(l_full_name||': start');
2292: END IF;
2293:
2294: IF FND_API.to_boolean(p_init_msg_list) THEN
2295: FND_MSG_PUB.initialize;
2322: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
2323: , P_Commit => FND_API.G_FALSE
2324: , P_object_id => l_claim_id
2325: , P_object_type => G_CLAIM_OBJECT_TYPE
2326: , P_user_id => OZF_UTILITY_PVT.get_resource_id(NVL(FND_GLOBAL.user_id,-1))
2327: , X_Return_Status => l_return_status
2328: , X_Msg_Count => x_msg_count
2329: , X_Msg_Data => x_msg_data
2330: , X_access => l_access);
2489: --Fix for Bug 12369487
2490: l_last_line_util_id := l_line_util_id;
2491:
2492: IF OZF_DEBUG_LOW_ON THEN
2493: OZF_Utility_PVT.debug_message('l_last_line_util_id :'|| l_last_line_util_id );
2494: END IF;
2495:
2496: /*OPEN csr_claim_line_util_amount(l_line_util_id);
2497: FETCH csr_claim_line_util_amount INTO l_line_util_amount;
2499:
2500:
2501:
2502: IF OZF_DEBUG_LOW_ON THEN
2503: OZF_Utility_PVT.debug_message(' l_line_util_amount'||l_line_util_amount);
2504: END IF;
2505:
2506:
2507: --l_sum_amount := NVL(l_sum_amount,0) + l_line_util_amount;
2526: CLOSE csr_line_util_sum_amount;
2527: END IF;
2528:
2529: IF OZF_DEBUG_LOW_ON THEN
2530: OZF_Utility_PVT.debug_message('l_original_total_amount'||l_original_total_amount);
2531: OZF_Utility_PVT.debug_message('l_sum_amount'||l_sum_amount);
2532: END IF;
2533:
2534: l_entered_diff_amount := l_original_total_amount;
2527: END IF;
2528:
2529: IF OZF_DEBUG_LOW_ON THEN
2530: OZF_Utility_PVT.debug_message('l_original_total_amount'||l_original_total_amount);
2531: OZF_Utility_PVT.debug_message('l_sum_amount'||l_sum_amount);
2532: END IF;
2533:
2534: l_entered_diff_amount := l_original_total_amount;
2535:
2533:
2534: l_entered_diff_amount := l_original_total_amount;
2535:
2536: IF OZF_DEBUG_LOW_ON THEN
2537: OZF_Utility_PVT.debug_message('l_entered_diff_amount'||l_entered_diff_amount);
2538: END IF;
2539:
2540: IF (l_entered_diff_amount <> l_sum_amount) THEN
2541:
2573: p_data => x_msg_data
2574: );
2575:
2576: IF OZF_DEBUG_HIGH_ON THEN
2577: OZF_Utility_PVT.debug_message(l_full_name ||': end');
2578: END IF;
2579:
2580: EXCEPTION
2581: WHEN FND_API.g_exc_error THEN
2667: --------------------- initialize -----------------------
2668: SAVEPOINT Create_Line_Util;
2669:
2670: IF OZF_DEBUG_HIGH_ON THEN
2671: OZF_Utility_PVT.debug_message(l_full_name||': start');
2672: END IF;
2673:
2674: IF FND_API.to_boolean(p_init_msg_list) THEN
2675: FND_MSG_PUB.initialize;
2691: IF l_line_util_rec.utilization_id > -1 THEN
2692: IF l_currency_rec.association_currency_code = l_currency_rec.transaction_currency_code THEN
2693: IF l_line_util_rec.amount IS NOT NULL AND l_line_util_rec.amount <> 0 THEN
2694: -- Bugfix 5528210
2695: OZF_UTILITY_PVT.Convert_Currency
2696: ( p_from_currency => l_currency_rec.association_currency_code
2697: , p_to_currency => l_currency_rec.functional_currency_code
2698: , p_conv_type => l_line_util_rec.exchange_rate_type
2699: , p_conv_date => l_line_util_rec.exchange_rate_date
2714: l_line_util_rec.acctd_amount := l_line_util_rec.amount;
2715: END IF;
2716:
2717:
2718: l_line_util_rec.acctd_amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.acctd_amount, l_currency_rec.functional_currency_code);
2719: l_line_util_rec.amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.amount, l_currency_rec.association_currency_code);
2720:
2721: IF OZF_DEBUG_HIGH_ON THEN
2722: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount = '||l_line_util_rec.acctd_amount);
2715: END IF;
2716:
2717:
2718: l_line_util_rec.acctd_amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.acctd_amount, l_currency_rec.functional_currency_code);
2719: l_line_util_rec.amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.amount, l_currency_rec.association_currency_code);
2720:
2721: IF OZF_DEBUG_HIGH_ON THEN
2722: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount = '||l_line_util_rec.acctd_amount);
2723: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id);
2718: l_line_util_rec.acctd_amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.acctd_amount, l_currency_rec.functional_currency_code);
2719: l_line_util_rec.amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.amount, l_currency_rec.association_currency_code);
2720:
2721: IF OZF_DEBUG_HIGH_ON THEN
2722: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount = '||l_line_util_rec.acctd_amount);
2723: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id);
2724: OZF_Utility_PVT.debug_message('l_line_util_rec.amount - Before Update_Fund_Utils() : '||l_line_util_rec.amount);
2725: END IF;
2726:
2719: l_line_util_rec.amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.amount, l_currency_rec.association_currency_code);
2720:
2721: IF OZF_DEBUG_HIGH_ON THEN
2722: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount = '||l_line_util_rec.acctd_amount);
2723: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id);
2724: OZF_Utility_PVT.debug_message('l_line_util_rec.amount - Before Update_Fund_Utils() : '||l_line_util_rec.amount);
2725: END IF;
2726:
2727: Update_Fund_Utils(
2720:
2721: IF OZF_DEBUG_HIGH_ON THEN
2722: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount = '||l_line_util_rec.acctd_amount);
2723: OZF_Utility_PVT.debug_message('l_line_util_rec.utilization_id = '||l_line_util_rec.utilization_id);
2724: OZF_Utility_PVT.debug_message('l_line_util_rec.amount - Before Update_Fund_Utils() : '||l_line_util_rec.amount);
2725: END IF;
2726:
2727: Update_Fund_Utils(
2728: p_line_util_rec => l_line_util_rec
2741: RAISE FND_API.g_exc_unexpected_error;
2742: END IF;
2743:
2744: IF OZF_DEBUG_HIGH_ON THEN
2745: OZF_Utility_PVT.debug_message('l_line_util_rec.amount - After Update_Fund_Utils() : '||l_line_util_rec.amount);
2746: END IF;
2747:
2748: ELSE
2749: IF l_line_util_rec.currency_code <> l_currency_rec.functional_currency_code THEN
2746: END IF;
2747:
2748: ELSE
2749: IF l_line_util_rec.currency_code <> l_currency_rec.functional_currency_code THEN
2750: OZF_UTILITY_PVT.Convert_Currency(
2751: p_from_currency => l_line_util_rec.currency_code --claim currency
2752: ,p_to_currency => l_currency_rec.functional_currency_code
2753: ,p_conv_type => l_line_util_rec.exchange_rate_type
2754: ,p_conv_rate => l_line_util_rec.exchange_rate
2766: --Since, amount column of OZF_CLAIM_LINES_UTIL table expect amount in CLAIM currency. Hence, need to convert
2767: --l_line_util_rec.amount into CLAIM currency, before creation of association record.
2768: IF l_line_util_rec.amount IS NOT NULL AND l_line_util_rec.amount <> 0 THEN
2769: IF l_currency_rec.association_currency_code <> l_currency_rec.claim_currency_code THEN
2770: OZF_UTILITY_PVT.Convert_Currency
2771: ( p_from_currency => l_currency_rec.association_currency_code
2772: , p_to_currency => l_currency_rec.claim_currency_code
2773: , p_conv_type => l_line_util_rec.exchange_rate_type
2774: --, p_conv_rate => l_line_util_rec.exchange_rate
2785: RAISE FND_API.g_exc_unexpected_error;
2786: END IF;
2787:
2788: IF OZF_DEBUG_HIGH_ON THEN
2789: OZF_Utility_PVT.debug_message('p_from_currency : '||l_currency_rec.association_currency_code);
2790: OZF_Utility_PVT.debug_message('p_to_currency : '||l_currency_rec.claim_currency_code);
2791: OZF_Utility_PVT.debug_message('p_conv_type : '||l_line_util_rec.exchange_rate_type);
2792: OZF_Utility_PVT.debug_message('p_conv_rate : '||l_line_util_rec.exchange_rate);
2793: OZF_Utility_PVT.debug_message('p_conv_date : '||l_line_util_rec.exchange_rate_date);
2786: END IF;
2787:
2788: IF OZF_DEBUG_HIGH_ON THEN
2789: OZF_Utility_PVT.debug_message('p_from_currency : '||l_currency_rec.association_currency_code);
2790: OZF_Utility_PVT.debug_message('p_to_currency : '||l_currency_rec.claim_currency_code);
2791: OZF_Utility_PVT.debug_message('p_conv_type : '||l_line_util_rec.exchange_rate_type);
2792: OZF_Utility_PVT.debug_message('p_conv_rate : '||l_line_util_rec.exchange_rate);
2793: OZF_Utility_PVT.debug_message('p_conv_date : '||l_line_util_rec.exchange_rate_date);
2794: OZF_Utility_PVT.debug_message('p_from_amount : '||l_line_util_rec.amount);
2787:
2788: IF OZF_DEBUG_HIGH_ON THEN
2789: OZF_Utility_PVT.debug_message('p_from_currency : '||l_currency_rec.association_currency_code);
2790: OZF_Utility_PVT.debug_message('p_to_currency : '||l_currency_rec.claim_currency_code);
2791: OZF_Utility_PVT.debug_message('p_conv_type : '||l_line_util_rec.exchange_rate_type);
2792: OZF_Utility_PVT.debug_message('p_conv_rate : '||l_line_util_rec.exchange_rate);
2793: OZF_Utility_PVT.debug_message('p_conv_date : '||l_line_util_rec.exchange_rate_date);
2794: OZF_Utility_PVT.debug_message('p_from_amount : '||l_line_util_rec.amount);
2795: OZF_Utility_PVT.debug_message('x_to_amount : '||l_line_util_amount);
2788: IF OZF_DEBUG_HIGH_ON THEN
2789: OZF_Utility_PVT.debug_message('p_from_currency : '||l_currency_rec.association_currency_code);
2790: OZF_Utility_PVT.debug_message('p_to_currency : '||l_currency_rec.claim_currency_code);
2791: OZF_Utility_PVT.debug_message('p_conv_type : '||l_line_util_rec.exchange_rate_type);
2792: OZF_Utility_PVT.debug_message('p_conv_rate : '||l_line_util_rec.exchange_rate);
2793: OZF_Utility_PVT.debug_message('p_conv_date : '||l_line_util_rec.exchange_rate_date);
2794: OZF_Utility_PVT.debug_message('p_from_amount : '||l_line_util_rec.amount);
2795: OZF_Utility_PVT.debug_message('x_to_amount : '||l_line_util_amount);
2796: END IF;
2789: OZF_Utility_PVT.debug_message('p_from_currency : '||l_currency_rec.association_currency_code);
2790: OZF_Utility_PVT.debug_message('p_to_currency : '||l_currency_rec.claim_currency_code);
2791: OZF_Utility_PVT.debug_message('p_conv_type : '||l_line_util_rec.exchange_rate_type);
2792: OZF_Utility_PVT.debug_message('p_conv_rate : '||l_line_util_rec.exchange_rate);
2793: OZF_Utility_PVT.debug_message('p_conv_date : '||l_line_util_rec.exchange_rate_date);
2794: OZF_Utility_PVT.debug_message('p_from_amount : '||l_line_util_rec.amount);
2795: OZF_Utility_PVT.debug_message('x_to_amount : '||l_line_util_amount);
2796: END IF;
2797:
2790: OZF_Utility_PVT.debug_message('p_to_currency : '||l_currency_rec.claim_currency_code);
2791: OZF_Utility_PVT.debug_message('p_conv_type : '||l_line_util_rec.exchange_rate_type);
2792: OZF_Utility_PVT.debug_message('p_conv_rate : '||l_line_util_rec.exchange_rate);
2793: OZF_Utility_PVT.debug_message('p_conv_date : '||l_line_util_rec.exchange_rate_date);
2794: OZF_Utility_PVT.debug_message('p_from_amount : '||l_line_util_rec.amount);
2795: OZF_Utility_PVT.debug_message('x_to_amount : '||l_line_util_amount);
2796: END IF;
2797:
2798: IF l_line_util_amount IS NOT NULL AND l_line_util_amount <> 0 THEN
2791: OZF_Utility_PVT.debug_message('p_conv_type : '||l_line_util_rec.exchange_rate_type);
2792: OZF_Utility_PVT.debug_message('p_conv_rate : '||l_line_util_rec.exchange_rate);
2793: OZF_Utility_PVT.debug_message('p_conv_date : '||l_line_util_rec.exchange_rate_date);
2794: OZF_Utility_PVT.debug_message('p_from_amount : '||l_line_util_rec.amount);
2795: OZF_Utility_PVT.debug_message('x_to_amount : '||l_line_util_amount);
2796: END IF;
2797:
2798: IF l_line_util_amount IS NOT NULL AND l_line_util_amount <> 0 THEN
2799: l_line_util_rec.amount := OZF_UTILITY_PVT.CurrRound(l_line_util_amount, l_currency_rec.claim_currency_code);
2795: OZF_Utility_PVT.debug_message('x_to_amount : '||l_line_util_amount);
2796: END IF;
2797:
2798: IF l_line_util_amount IS NOT NULL AND l_line_util_amount <> 0 THEN
2799: l_line_util_rec.amount := OZF_UTILITY_PVT.CurrRound(l_line_util_amount, l_currency_rec.claim_currency_code);
2800: END IF;
2801: END IF;
2802: ELSE
2803: l_line_util_rec.amount := 0;
2802: ELSE
2803: l_line_util_rec.amount := 0;
2804: END IF;
2805: IF OZF_DEBUG_HIGH_ON THEN
2806: OZF_Utility_PVT.debug_message('Inserting association record...');
2807: OZF_Utility_PVT.debug_message('claim_line_id : '||l_line_util_rec.claim_line_id);
2808: OZF_Utility_PVT.debug_message('utilization_id : '||l_line_util_rec.utilization_id);
2809: OZF_Utility_PVT.debug_message('amount : '||l_line_util_rec.amount);
2810: OZF_Utility_PVT.debug_message('acctd amount : '||l_line_util_rec.acctd_amount);
2803: l_line_util_rec.amount := 0;
2804: END IF;
2805: IF OZF_DEBUG_HIGH_ON THEN
2806: OZF_Utility_PVT.debug_message('Inserting association record...');
2807: OZF_Utility_PVT.debug_message('claim_line_id : '||l_line_util_rec.claim_line_id);
2808: OZF_Utility_PVT.debug_message('utilization_id : '||l_line_util_rec.utilization_id);
2809: OZF_Utility_PVT.debug_message('amount : '||l_line_util_rec.amount);
2810: OZF_Utility_PVT.debug_message('acctd amount : '||l_line_util_rec.acctd_amount);
2811: END IF;
2804: END IF;
2805: IF OZF_DEBUG_HIGH_ON THEN
2806: OZF_Utility_PVT.debug_message('Inserting association record...');
2807: OZF_Utility_PVT.debug_message('claim_line_id : '||l_line_util_rec.claim_line_id);
2808: OZF_Utility_PVT.debug_message('utilization_id : '||l_line_util_rec.utilization_id);
2809: OZF_Utility_PVT.debug_message('amount : '||l_line_util_rec.amount);
2810: OZF_Utility_PVT.debug_message('acctd amount : '||l_line_util_rec.acctd_amount);
2811: END IF;
2812:
2805: IF OZF_DEBUG_HIGH_ON THEN
2806: OZF_Utility_PVT.debug_message('Inserting association record...');
2807: OZF_Utility_PVT.debug_message('claim_line_id : '||l_line_util_rec.claim_line_id);
2808: OZF_Utility_PVT.debug_message('utilization_id : '||l_line_util_rec.utilization_id);
2809: OZF_Utility_PVT.debug_message('amount : '||l_line_util_rec.amount);
2810: OZF_Utility_PVT.debug_message('acctd amount : '||l_line_util_rec.acctd_amount);
2811: END IF;
2812:
2813:
2806: OZF_Utility_PVT.debug_message('Inserting association record...');
2807: OZF_Utility_PVT.debug_message('claim_line_id : '||l_line_util_rec.claim_line_id);
2808: OZF_Utility_PVT.debug_message('utilization_id : '||l_line_util_rec.utilization_id);
2809: OZF_Utility_PVT.debug_message('amount : '||l_line_util_rec.amount);
2810: OZF_Utility_PVT.debug_message('acctd amount : '||l_line_util_rec.acctd_amount);
2811: END IF;
2812:
2813:
2814: IF l_line_util_rec.claim_line_util_id IS NULL THEN
2900: p_data => x_msg_data
2901: );
2902:
2903: IF OZF_DEBUG_HIGH_ON THEN
2904: OZF_Utility_PVT.debug_message(l_full_name ||': end');
2905: END IF;
2906:
2907: EXCEPTION
2908: WHEN FND_API.g_exc_error THEN
2985: --------------------- initialize -----------------------
2986: SAVEPOINT Update_Line_Util_Tbl;
2987:
2988: IF OZF_DEBUG_HIGH_ON THEN
2989: OZF_Utility_PVT.debug_message(l_full_name||': start');
2990: END IF;
2991:
2992: IF FND_API.to_boolean(p_init_msg_list) THEN
2993: FND_MSG_PUB.initialize;
3019: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
3020: , P_Commit => FND_API.G_FALSE
3021: , P_object_id => l_claim_id
3022: , P_object_type => G_CLAIM_OBJECT_TYPE
3023: , P_user_id => OZF_UTILITY_PVT.get_resource_id(NVL(FND_GLOBAL.user_id,-1))
3024: , X_Return_Status => l_return_status
3025: , X_Msg_Count => x_msg_count
3026: , X_Msg_Data => x_msg_data
3027: , X_access => l_access);
3044: IF i IS NOT NULL THEN
3045: LOOP
3046: l_line_util_rec := p_line_util_tbl(i);
3047: IF l_line_util_rec.claim_line_util_id IS NOT NULL THEN
3048: l_line_util_rec.amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.amount, l_line_util_rec.currency_code);
3049: l_line_util_rec.update_from_tbl_flag := FND_API.g_true;
3050: Update_Line_Util(
3051: p_api_version => l_api_version
3052: , p_init_msg_list => FND_API.g_false
3096: p_data => x_msg_data
3097: );
3098:
3099: IF OZF_DEBUG_HIGH_ON THEN
3100: OZF_Utility_PVT.debug_message(l_full_name ||': end');
3101: END IF;
3102:
3103: EXCEPTION
3104: WHEN FND_API.g_exc_error THEN
3223: -------------------- initialize -------------------------
3224: SAVEPOINT Update_Line_Util;
3225:
3226: IF OZF_DEBUG_HIGH_ON THEN
3227: OZF_Utility_PVT.debug_message(l_full_name||': start');
3228: END IF;
3229:
3230: IF FND_API.to_boolean(p_init_msg_list) THEN
3231: FND_MSG_PUB.initialize;
3243: x_return_status := FND_API.g_ret_sts_success;
3244:
3245: ----------------------- validate ----------------------
3246: IF OZF_DEBUG_HIGH_ON THEN
3247: OZF_Utility_PVT.debug_message(l_full_name ||': validate');
3248: END IF;
3249:
3250: -- replace g_miss_char/num/date with current column values
3251: Complete_Line_Util_Rec(
3275: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
3276: , P_Commit => FND_API.G_FALSE
3277: , P_object_id => l_claim_id
3278: , P_object_type => G_CLAIM_OBJECT_TYPE
3279: , P_user_id => OZF_UTILITY_PVT.get_resource_id(NVL(FND_GLOBAL.user_id,-1))
3280: , X_Return_Status => l_return_status
3281: , X_Msg_Count => x_msg_count
3282: , X_Msg_Data => x_msg_data
3283: , X_access => l_access);
3310: -- Convert amount --> acctd_amount(functional currency)
3311: IF l_currency_rec.functional_currency_code = l_line_util_rec.currency_code THEN
3312: l_line_util_rec.acctd_amount := l_line_util_rec.amount ;
3313: ELSE
3314: OZF_UTILITY_PVT.Convert_Currency(
3315: p_from_currency => l_line_util_rec.currency_code
3316: ,p_to_currency => l_currency_rec.functional_currency_code
3317: ,p_conv_type => l_line_util_rec.exchange_rate_type
3318: ,p_conv_rate => l_line_util_rec.exchange_rate
3327: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
3328: RAISE FND_API.g_exc_unexpected_error;
3329: END IF;
3330: IF l_line_util_rec.acctd_amount IS NOT NULL THEN
3331: l_line_util_rec.acctd_amount := OZF_UTILITY_PVT.CurrRound(l_line_util_rec.acctd_amount, l_currency_rec.functional_currency_code);
3332: END IF;
3333:
3334: END IF;
3335:
3335:
3336:
3337: --------------------- update utilization ----------------------
3338: IF OZF_DEBUG_HIGH_ON THEN
3339: OZF_Utility_PVT.debug_message(l_full_name ||': update funds utilized');
3340: END IF;
3341:
3342: l_update_fund_amount := l_lu_old_amt - l_line_util_rec.amount;
3343:
3345: l_currency_rec.association_currency_code := l_currency_rec.transaction_currency_code;
3346: ELSE
3347: l_currency_rec.association_currency_code := l_currency_rec.functional_currency_code;
3348: IF l_update_fund_amount IS NOT NULL and l_update_fund_amount <> 0 THEN
3349: OZF_UTILITY_PVT.Convert_Currency
3350: ( p_from_currency => l_currency_rec.claim_currency_code
3351: , p_to_currency => l_currency_rec.functional_currency_code
3352: , p_conv_date => l_line_util_rec.exchange_rate_date
3353: , p_conv_type => l_line_util_rec.exchange_rate_type
3366: END IF;
3367: END IF;
3368:
3369: IF OZF_DEBUG_HIGH_ON THEN
3370: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount1 = '||l_line_util_rec.acctd_amount);
3371: OZF_Utility_PVT.debug_message('l_line_util_rec.amount1 - Before Update_Fund_Utils() : '||l_line_util_rec.amount);
3372: OZF_Utility_PVT.debug_message('l_update_fund_amount : '|| l_update_fund_amount);
3373: END IF;
3374: Update_Fund_Utils(
3367: END IF;
3368:
3369: IF OZF_DEBUG_HIGH_ON THEN
3370: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount1 = '||l_line_util_rec.acctd_amount);
3371: OZF_Utility_PVT.debug_message('l_line_util_rec.amount1 - Before Update_Fund_Utils() : '||l_line_util_rec.amount);
3372: OZF_Utility_PVT.debug_message('l_update_fund_amount : '|| l_update_fund_amount);
3373: END IF;
3374: Update_Fund_Utils(
3375: p_line_util_rec => l_line_util_rec
3368:
3369: IF OZF_DEBUG_HIGH_ON THEN
3370: OZF_Utility_PVT.debug_message('l_line_util_rec.acctd_amount1 = '||l_line_util_rec.acctd_amount);
3371: OZF_Utility_PVT.debug_message('l_line_util_rec.amount1 - Before Update_Fund_Utils() : '||l_line_util_rec.amount);
3372: OZF_Utility_PVT.debug_message('l_update_fund_amount : '|| l_update_fund_amount);
3373: END IF;
3374: Update_Fund_Utils(
3375: p_line_util_rec => l_line_util_rec
3376: , p_asso_amount => NVL(l_update_fund_amount,0)
3392:
3393:
3394: -------------------------- update -------------------------
3395: IF OZF_DEBUG_HIGH_ON THEN
3396: OZF_Utility_PVT.debug_message(l_full_name ||': update lines utilized');
3397: END IF;
3398:
3399: UPDATE ozf_claim_lines_util_all SET
3400: object_version_number = l_line_util_rec.object_version_number,
3442: p_data => x_msg_data
3443: );
3444:
3445: IF OZF_DEBUG_HIGH_ON THEN
3446: OZF_Utility_PVT.debug_message(l_full_name ||': end');
3447: END IF;
3448:
3449: EXCEPTION
3450: WHEN FND_API.g_exc_error THEN
3533: --------------------- initialize -----------------------
3534: SAVEPOINT Delete_All_Line_Util;
3535:
3536: IF OZF_DEBUG_HIGH_ON THEN
3537: OZF_Utility_PVT.debug_message(l_full_name||': start');
3538: END IF;
3539:
3540: IF FND_API.to_boolean(p_init_msg_list) THEN
3541: FND_MSG_PUB.initialize;
3662: p_data => x_msg_data
3663: );
3664:
3665: IF OZF_DEBUG_HIGH_ON THEN
3666: OZF_Utility_PVT.debug_message(l_full_name ||': end');
3667: END IF;
3668:
3669: EXCEPTION
3670: WHEN FND_API.g_exc_error THEN
3750: --------------------- initialize -----------------------
3751: SAVEPOINT Delete_Line_Util_Tbl;
3752:
3753: IF OZF_DEBUG_HIGH_ON THEN
3754: OZF_Utility_PVT.debug_message(l_full_name||': start');
3755: END IF;
3756:
3757: IF FND_API.to_boolean(p_init_msg_list) THEN
3758: FND_MSG_PUB.initialize;
3784: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
3785: , P_Commit => FND_API.G_FALSE
3786: , P_object_id => l_claim_id
3787: , P_object_type => G_CLAIM_OBJECT_TYPE
3788: , P_user_id => OZF_UTILITY_PVT.get_resource_id(NVL(FND_GLOBAL.user_id,-1))
3789: , X_Return_Status => l_return_status
3790: , X_Msg_Count => x_msg_count
3791: , X_Msg_Data => x_msg_data
3792: , X_access => l_access);
3874: p_data => x_msg_data
3875: );
3876:
3877: IF OZF_DEBUG_HIGH_ON THEN
3878: OZF_Utility_PVT.debug_message(l_full_name ||': end');
3879: END IF;
3880:
3881: EXCEPTION
3882: WHEN FND_API.g_exc_error THEN
3988: --------------------- initialize -----------------------
3989: SAVEPOINT Delete_Line_Util;
3990:
3991: IF OZF_DEBUG_HIGH_ON THEN
3992: OZF_Utility_PVT.debug_message(l_full_name||': start');
3993: END IF;
3994:
3995: IF FND_API.to_boolean(p_init_msg_list) THEN
3996: FND_MSG_PUB.initialize;
4027: , p_validation_level => FND_API.G_VALID_LEVEL_FULL
4028: , P_Commit => FND_API.G_FALSE
4029: , P_object_id => l_claim_id
4030: , P_object_type => G_CLAIM_OBJECT_TYPE
4031: , P_user_id => OZF_UTILITY_PVT.get_resource_id(NVL(FND_GLOBAL.user_id,-1))
4032: , X_Return_Status => l_return_status
4033: , X_Msg_Count => x_msg_count
4034: , X_Msg_Data => x_msg_data
4035: , X_access => l_access);
4054: ----------------- Update Utilization -----------------
4055: -- skip dummy utils
4056: IF l_utilization_id <> -1 THEN
4057: IF OZF_DEBUG_HIGH_ON THEN
4058: OZF_Utility_PVT.debug_message(l_full_name ||': update funds_utilized');
4059: END IF;
4060:
4061: l_line_util_rec.utilization_id := l_utilization_id;
4062: l_line_util_rec.claim_line_id := l_claim_line_id;
4061: l_line_util_rec.utilization_id := l_utilization_id;
4062: l_line_util_rec.claim_line_id := l_claim_line_id;
4063:
4064: IF OZF_DEBUG_LOW_ON THEN
4065: OZF_Utility_PVT.debug_message('l_utilization_id' || l_utilization_id);
4066: OZF_Utility_PVT.debug_message('l_claim_line_id' || l_claim_line_id);
4067: OZF_Utility_PVT.debug_message('l_del_line_util_amt' || l_del_line_util_amt);
4068: END IF;
4069:
4062: l_line_util_rec.claim_line_id := l_claim_line_id;
4063:
4064: IF OZF_DEBUG_LOW_ON THEN
4065: OZF_Utility_PVT.debug_message('l_utilization_id' || l_utilization_id);
4066: OZF_Utility_PVT.debug_message('l_claim_line_id' || l_claim_line_id);
4067: OZF_Utility_PVT.debug_message('l_del_line_util_amt' || l_del_line_util_amt);
4068: END IF;
4069:
4070: Update_Fund_Utils(
4063:
4064: IF OZF_DEBUG_LOW_ON THEN
4065: OZF_Utility_PVT.debug_message('l_utilization_id' || l_utilization_id);
4066: OZF_Utility_PVT.debug_message('l_claim_line_id' || l_claim_line_id);
4067: OZF_Utility_PVT.debug_message('l_del_line_util_amt' || l_del_line_util_amt);
4068: END IF;
4069:
4070: Update_Fund_Utils(
4071: p_line_util_rec => l_line_util_rec
4087: END IF; -- IF l_utilization_rec.utilization_id <> -1
4088:
4089: ------------------------ delete ------------------------
4090: IF OZF_DEBUG_HIGH_ON THEN
4091: OZF_Utility_PVT.debug_message(l_full_name ||': delete');
4092: END IF;
4093:
4094: DELETE FROM ozf_claim_lines_util_all
4095: WHERE claim_line_util_id = p_line_util_id
4114: p_data => x_msg_data
4115: );
4116:
4117: IF OZF_DEBUG_HIGH_ON THEN
4118: OZF_Utility_PVT.debug_message(l_full_name ||': end');
4119: END IF;
4120:
4121: EXCEPTION
4122: WHEN FND_API.g_exc_error THEN
4463: FND_DSQL.add_text(' GROUP BY common_uom_code, common_currency_code ');
4464:
4465: IF OZF_DEBUG_HIGH_ON THEN
4466: l_temp_sql := FND_DSQL.get_text(TRUE);
4467: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4468: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4469: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4470: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4471: OZF_Utility_PVT.debug_message('---------------------------------------');
4464:
4465: IF OZF_DEBUG_HIGH_ON THEN
4466: l_temp_sql := FND_DSQL.get_text(TRUE);
4467: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4468: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4469: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4470: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4471: OZF_Utility_PVT.debug_message('---------------------------------------');
4472: END IF;
4465: IF OZF_DEBUG_HIGH_ON THEN
4466: l_temp_sql := FND_DSQL.get_text(TRUE);
4467: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4468: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4469: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4470: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4471: OZF_Utility_PVT.debug_message('---------------------------------------');
4472: END IF;
4473:
4466: l_temp_sql := FND_DSQL.get_text(TRUE);
4467: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4468: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4469: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4470: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4471: OZF_Utility_PVT.debug_message('---------------------------------------');
4472: END IF;
4473:
4474: l_emp_csr := DBMS_SQL.open_cursor;
4467: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4468: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4469: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4470: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4471: OZF_Utility_PVT.debug_message('---------------------------------------');
4472: END IF;
4473:
4474: l_emp_csr := DBMS_SQL.open_cursor;
4475: FND_DSQL.set_cursor(l_emp_csr);
4530: IF l_common_amount < l_requirement_value THEN
4531: l_performance_flag := FND_API.g_false;
4532: END IF;
4533: ELSE
4534: OZF_UTILITY_PVT.Convert_Currency(
4535: p_from_currency => l_offer_currency
4536: ,p_to_currency => l_common_curr_code
4537: ,p_conv_date => SYSDATE
4538: ,p_from_amount => l_requirement_value
4552: END IF;
4553: ELSE
4554: -- no rows returned
4555: IF OZF_DEBUG_HIGH_ON THEN
4556: OZF_Utility_PVT.debug_message('No sales transactions found');
4557: END IF;
4558: l_performance_flag := FND_API.g_false;
4559: END IF;
4560: DBMS_SQL.close_cursor(l_emp_csr);
4584: FND_DSQL.add_text(' GROUP BY uom_code ');
4585:
4586: IF OZF_DEBUG_HIGH_ON THEN
4587: l_temp_sql := FND_DSQL.get_text(TRUE);
4588: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4589: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4590: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4591: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4592: OZF_Utility_PVT.debug_message('---------------------------------------');
4585:
4586: IF OZF_DEBUG_HIGH_ON THEN
4587: l_temp_sql := FND_DSQL.get_text(TRUE);
4588: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4589: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4590: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4591: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4592: OZF_Utility_PVT.debug_message('---------------------------------------');
4593: END IF;
4586: IF OZF_DEBUG_HIGH_ON THEN
4587: l_temp_sql := FND_DSQL.get_text(TRUE);
4588: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4589: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4590: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4591: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4592: OZF_Utility_PVT.debug_message('---------------------------------------');
4593: END IF;
4594:
4587: l_temp_sql := FND_DSQL.get_text(TRUE);
4588: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4589: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4590: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4591: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4592: OZF_Utility_PVT.debug_message('---------------------------------------');
4593: END IF;
4594:
4595: l_emp_csr := DBMS_SQL.open_cursor;
4588: OZF_Utility_PVT.debug_message('----- Check_Offer_Performance SQL -----');
4589: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 1, 254));
4590: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 255, 254));
4591: OZF_Utility_PVT.debug_message(SUBSTR(l_temp_sql, 509, 254));
4592: OZF_Utility_PVT.debug_message('---------------------------------------');
4593: END IF;
4594:
4595: l_emp_csr := DBMS_SQL.open_cursor;
4596: FND_DSQL.set_cursor(l_emp_csr);
4653: IF l_common_amount < l_requirement_value THEN
4654: l_performance_flag := FND_API.g_false;
4655: END IF;
4656: ELSE
4657: OZF_UTILITY_PVT.Convert_Currency(
4658: p_from_currency => l_offer_currency
4659: ,p_to_currency => l_common_curr_code
4660: ,p_conv_date => SYSDATE
4661: ,p_from_amount => l_requirement_value
4675: END IF;
4676: ELSE
4677: -- no rows returned
4678: IF OZF_DEBUG_HIGH_ON THEN
4679: OZF_Utility_PVT.debug_message('No sales transactions found');
4680: END IF;
4681: l_performance_flag := FND_API.g_false;
4682: END IF;
4683: DBMS_SQL.close_cursor(l_emp_csr);
4759: CLOSE csr_claim_info;
4760:
4761: l_claim_rec.claim_id := l_claim_id;
4762: l_claim_rec.object_version_number := l_object_version_number;
4763: l_claim_rec.USER_STATUS_ID := to_number( ozf_utility_pvt.GET_DEFAULT_USER_STATUS(
4764: P_STATUS_TYPE=> 'OZF_CLAIM_STATUS',
4765: P_STATUS_CODE=> 'CLOSED'
4766: ));
4767:
4949: --------------------- initialize -----------------------
4950: SAVEPOINT Create_Claim_For_Accruals;
4951:
4952: IF OZF_DEBUG_HIGH_ON THEN
4953: OZF_Utility_PVT.debug_message(l_full_name||': start');
4954: OZF_Utility_PVT.debug_message('l_claim_rec.claim_number : ' || l_claim_rec.claim_number);
4955: END IF;
4956:
4957: IF FND_API.to_boolean(p_init_msg_list) THEN
4950: SAVEPOINT Create_Claim_For_Accruals;
4951:
4952: IF OZF_DEBUG_HIGH_ON THEN
4953: OZF_Utility_PVT.debug_message(l_full_name||': start');
4954: OZF_Utility_PVT.debug_message('l_claim_rec.claim_number : ' || l_claim_rec.claim_number);
4955: END IF;
4956:
4957: IF FND_API.to_boolean(p_init_msg_list) THEN
4958: FND_MSG_PUB.initialize;
4974: l_funds_util_flt := p_funds_util_flt;
4975: l_total_acctd_amount_rem := 0;
4976:
4977: IF OZF_DEBUG_HIGH_ON THEN
4978: OZF_Utility_PVT.debug_message('Claim Currency Code in Create Claim For Accruals :' || l_claim_rec.currency_code);
4979: END IF;
4980:
4981: -- Added For Multi Currency - kpatro
4982: IF(l_claim_rec.currency_code IS NOT NULL) THEN
4999: --Set UNIVERSAL currency from profile.
5000: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
5001:
5002: IF OZF_DEBUG_HIGH_ON THEN
5003: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
5004: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
5005: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
5006: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
5007: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
5000: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
5001:
5002: IF OZF_DEBUG_HIGH_ON THEN
5003: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
5004: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
5005: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
5006: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
5007: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
5008: END IF;
5001:
5002: IF OZF_DEBUG_HIGH_ON THEN
5003: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
5004: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
5005: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
5006: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
5007: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
5008: END IF;
5009:
5002: IF OZF_DEBUG_HIGH_ON THEN
5003: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
5004: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
5005: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
5006: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
5007: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
5008: END IF;
5009:
5010: Get_Utiz_Sql_Stmt(
5003: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
5004: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
5005: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
5006: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
5007: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
5008: END IF;
5009:
5010: Get_Utiz_Sql_Stmt(
5011: p_api_version => 1.0
5070: CLOSE csr_batch_accepted_amount;
5071: l_pass_acctd_amount := 'T';
5072: ELSE
5073: */
5074: OZF_UTILITY_PVT.Convert_Currency(
5075: p_from_currency => l_currency_code
5076: ,p_to_currency => l_claim_rec.currency_code
5077: ,p_conv_type => l_exchange_rate_type
5078: ,p_conv_date => SYSDATE
5093: END IF;
5094:
5095: IF l_amount IS NOT NULL AND l_amount <> 0 THEN
5096: IF OZF_DEBUG_HIGH_ON THEN
5097: OZF_Utility_PVT.debug_message('---------------------------------');
5098: OZF_Utility_PVT.debug_message('Line ' || l_counter || ': Amount='||l_amount);
5099: OZF_Utility_PVT.debug_message('Plan Type : ' || l_plan_type);
5100: OZF_Utility_PVT.debug_message('Plan Id : ' || l_plan_id);
5101: OZF_Utility_PVT.debug_message('Product Level Type: ' || l_product_level_type);
5094:
5095: IF l_amount IS NOT NULL AND l_amount <> 0 THEN
5096: IF OZF_DEBUG_HIGH_ON THEN
5097: OZF_Utility_PVT.debug_message('---------------------------------');
5098: OZF_Utility_PVT.debug_message('Line ' || l_counter || ': Amount='||l_amount);
5099: OZF_Utility_PVT.debug_message('Plan Type : ' || l_plan_type);
5100: OZF_Utility_PVT.debug_message('Plan Id : ' || l_plan_id);
5101: OZF_Utility_PVT.debug_message('Product Level Type: ' || l_product_level_type);
5102: OZF_Utility_PVT.debug_message('Product Id : ' || l_product_id);
5095: IF l_amount IS NOT NULL AND l_amount <> 0 THEN
5096: IF OZF_DEBUG_HIGH_ON THEN
5097: OZF_Utility_PVT.debug_message('---------------------------------');
5098: OZF_Utility_PVT.debug_message('Line ' || l_counter || ': Amount='||l_amount);
5099: OZF_Utility_PVT.debug_message('Plan Type : ' || l_plan_type);
5100: OZF_Utility_PVT.debug_message('Plan Id : ' || l_plan_id);
5101: OZF_Utility_PVT.debug_message('Product Level Type: ' || l_product_level_type);
5102: OZF_Utility_PVT.debug_message('Product Id : ' || l_product_id);
5103: -- Added For Bug 8402328
5096: IF OZF_DEBUG_HIGH_ON THEN
5097: OZF_Utility_PVT.debug_message('---------------------------------');
5098: OZF_Utility_PVT.debug_message('Line ' || l_counter || ': Amount='||l_amount);
5099: OZF_Utility_PVT.debug_message('Plan Type : ' || l_plan_type);
5100: OZF_Utility_PVT.debug_message('Plan Id : ' || l_plan_id);
5101: OZF_Utility_PVT.debug_message('Product Level Type: ' || l_product_level_type);
5102: OZF_Utility_PVT.debug_message('Product Id : ' || l_product_id);
5103: -- Added For Bug 8402328
5104: OZF_Utility_PVT.debug_message('l_funds_util_flt.utilization_id : ' || l_funds_util_flt.utilization_id);
5097: OZF_Utility_PVT.debug_message('---------------------------------');
5098: OZF_Utility_PVT.debug_message('Line ' || l_counter || ': Amount='||l_amount);
5099: OZF_Utility_PVT.debug_message('Plan Type : ' || l_plan_type);
5100: OZF_Utility_PVT.debug_message('Plan Id : ' || l_plan_id);
5101: OZF_Utility_PVT.debug_message('Product Level Type: ' || l_product_level_type);
5102: OZF_Utility_PVT.debug_message('Product Id : ' || l_product_id);
5103: -- Added For Bug 8402328
5104: OZF_Utility_PVT.debug_message('l_funds_util_flt.utilization_id : ' || l_funds_util_flt.utilization_id);
5105: END IF;
5098: OZF_Utility_PVT.debug_message('Line ' || l_counter || ': Amount='||l_amount);
5099: OZF_Utility_PVT.debug_message('Plan Type : ' || l_plan_type);
5100: OZF_Utility_PVT.debug_message('Plan Id : ' || l_plan_id);
5101: OZF_Utility_PVT.debug_message('Product Level Type: ' || l_product_level_type);
5102: OZF_Utility_PVT.debug_message('Product Id : ' || l_product_id);
5103: -- Added For Bug 8402328
5104: OZF_Utility_PVT.debug_message('l_funds_util_flt.utilization_id : ' || l_funds_util_flt.utilization_id);
5105: END IF;
5106: IF p_claim_rec.created_from = 'AUTOPAY' THEN
5100: OZF_Utility_PVT.debug_message('Plan Id : ' || l_plan_id);
5101: OZF_Utility_PVT.debug_message('Product Level Type: ' || l_product_level_type);
5102: OZF_Utility_PVT.debug_message('Product Id : ' || l_product_id);
5103: -- Added For Bug 8402328
5104: OZF_Utility_PVT.debug_message('l_funds_util_flt.utilization_id : ' || l_funds_util_flt.utilization_id);
5105: END IF;
5106: IF p_claim_rec.created_from = 'AUTOPAY' THEN
5107: FND_FILE.PUT_LINE(FND_FILE.LOG, '---------------------------------');
5108: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Line ' || l_counter || ': Amount='||l_amount);
5124: END IF;
5125:
5126: --Added Debug For Multi Currency - kpatro
5127: IF OZF_DEBUG_HIGH_ON THEN
5128: OZF_Utility_PVT.debug_message('l_bill_to_site_id : ' || l_bill_to_site_id);
5129: OZF_Utility_PVT.debug_message('l_funds_util_flt.bill_to_site_use_id : ' || l_funds_util_flt.bill_to_site_use_id);
5130: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
5131: OZF_Utility_PVT.debug_message('l_currency_code : ' || l_currency_code);
5132: END IF;
5125:
5126: --Added Debug For Multi Currency - kpatro
5127: IF OZF_DEBUG_HIGH_ON THEN
5128: OZF_Utility_PVT.debug_message('l_bill_to_site_id : ' || l_bill_to_site_id);
5129: OZF_Utility_PVT.debug_message('l_funds_util_flt.bill_to_site_use_id : ' || l_funds_util_flt.bill_to_site_use_id);
5130: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
5131: OZF_Utility_PVT.debug_message('l_currency_code : ' || l_currency_code);
5132: END IF;
5133: --R12.1 enhancements. Added condition so that earnings accrued only against
5126: --Added Debug For Multi Currency - kpatro
5127: IF OZF_DEBUG_HIGH_ON THEN
5128: OZF_Utility_PVT.debug_message('l_bill_to_site_id : ' || l_bill_to_site_id);
5129: OZF_Utility_PVT.debug_message('l_funds_util_flt.bill_to_site_use_id : ' || l_funds_util_flt.bill_to_site_use_id);
5130: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
5131: OZF_Utility_PVT.debug_message('l_currency_code : ' || l_currency_code);
5132: END IF;
5133: --R12.1 enhancements. Added condition so that earnings accrued only against
5134: --the respective bill_to_site_id should be added.
5127: IF OZF_DEBUG_HIGH_ON THEN
5128: OZF_Utility_PVT.debug_message('l_bill_to_site_id : ' || l_bill_to_site_id);
5129: OZF_Utility_PVT.debug_message('l_funds_util_flt.bill_to_site_use_id : ' || l_funds_util_flt.bill_to_site_use_id);
5130: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
5131: OZF_Utility_PVT.debug_message('l_currency_code : ' || l_currency_code);
5132: END IF;
5133: --R12.1 enhancements. Added condition so that earnings accrued only against
5134: --the respective bill_to_site_id should be added.
5135:
5133: --R12.1 enhancements. Added condition so that earnings accrued only against
5134: --the respective bill_to_site_id should be added.
5135:
5136: IF OZF_DEBUG_HIGH_ON THEN
5137: OZF_Utility_PVT.debug_message('l_bill_to_site_id : ' || l_bill_to_site_id);
5138: OZF_Utility_PVT.debug_message('l_funds_util_flt.bill_to_site_use_id : ' || l_funds_util_flt.bill_to_site_use_id);
5139: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
5140: END IF;
5141: -- The Claim Created From Autopay should be grouped based on Currency Code Also - kpatro
5134: --the respective bill_to_site_id should be added.
5135:
5136: IF OZF_DEBUG_HIGH_ON THEN
5137: OZF_Utility_PVT.debug_message('l_bill_to_site_id : ' || l_bill_to_site_id);
5138: OZF_Utility_PVT.debug_message('l_funds_util_flt.bill_to_site_use_id : ' || l_funds_util_flt.bill_to_site_use_id);
5139: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
5140: END IF;
5141: -- The Claim Created From Autopay should be grouped based on Currency Code Also - kpatro
5142: IF l_performance_flag = FND_API.g_true THEN
5135:
5136: IF OZF_DEBUG_HIGH_ON THEN
5137: OZF_Utility_PVT.debug_message('l_bill_to_site_id : ' || l_bill_to_site_id);
5138: OZF_Utility_PVT.debug_message('l_funds_util_flt.bill_to_site_use_id : ' || l_funds_util_flt.bill_to_site_use_id);
5139: OZF_Utility_PVT.debug_message('l_funds_util_flt.utiz_currency_code : ' || l_funds_util_flt.utiz_currency_code);
5140: END IF;
5141: -- The Claim Created From Autopay should be grouped based on Currency Code Also - kpatro
5142: IF l_performance_flag = FND_API.g_true THEN
5143: IF l_bill_to_site_id IS NOT NULL
5247:
5248: END IF;--nirma
5249: ELSE
5250: IF OZF_DEBUG_HIGH_ON THEN
5251: OZF_Utility_PVT.debug_message('Performance requirements not met.');
5252: END IF;
5253: IF p_claim_rec.created_from = 'AUTOPAY' THEN
5254: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Performance requirements not met.');
5255: END IF;
5261: END LOOP;
5262: DBMS_SQL.close_cursor(l_emp_csr);
5263:
5264: IF OZF_DEBUG_HIGH_ON THEN
5265: OZF_Utility_PVT.debug_message('l_total_acctd_amount_rem: ' || l_total_acctd_amount_rem);
5266: END IF;
5267: -- Flow initiated from promotional payment
5268: IF (l_claim_rec.created_from = 'PROMO_CLAIM') THEN
5269: l_claim_rec.amount := l_total_acctd_amount_rem;
5280: l_claim_rec.amount := l_total_acctd_amount_rem;
5281:
5282: -- create claim in OPEN status, ignoring the status passed in
5283: l_claim_rec.status_code := 'OPEN';
5284: l_claim_rec.user_status_id := to_number(ozf_utility_pvt.get_default_user_status(
5285: p_status_type => 'OZF_CLAIM_STATUS',
5286: p_status_code => l_claim_rec.status_code));
5287:
5288: OZF_CLAIM_PVT.Create_Claim(
5299: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5300: END IF;
5301:
5302: IF OZF_DEBUG_HIGH_ON THEN
5303: OZF_Utility_PVT.debug_message('Claim created id: ' || l_claim_id);
5304: END IF;
5305:
5306: IF l_line_tbl.count > 0 THEN --ninarasi
5307: FOR i IN l_line_tbl.FIRST..l_line_tbl.LAST LOOP
5328: RAISE FND_API.g_exc_error;
5329: END IF;
5330:
5331: IF OZF_DEBUG_HIGH_ON THEN
5332: OZF_Utility_PVT.debug_message('Claim lines created for claim_id=' || l_claim_id);
5333: END IF;
5334:
5335: OPEN csr_claim_line(l_claim_id);
5336: LOOP
5361: END LOOP;
5362: CLOSE csr_claim_line;
5363: ELSIF l_claim_rec.created_from = 'PROMO_CLAIM' and l_claim_rec.amount <> 0 THEN
5364: IF OZF_DEBUG_HIGH_ON THEN
5365: OZF_Utility_PVT.debug_message('Created Form: ' || l_claim_rec.created_from);
5366: OZF_Utility_PVT.debug_message('Amount: ' || l_claim_rec.amount);
5367: END IF;
5368:
5369: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
5362: CLOSE csr_claim_line;
5363: ELSIF l_claim_rec.created_from = 'PROMO_CLAIM' and l_claim_rec.amount <> 0 THEN
5364: IF OZF_DEBUG_HIGH_ON THEN
5365: OZF_Utility_PVT.debug_message('Created Form: ' || l_claim_rec.created_from);
5366: OZF_Utility_PVT.debug_message('Amount: ' || l_claim_rec.amount);
5367: END IF;
5368:
5369: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR) THEN
5370: FND_MESSAGE.Set_Name('OZF', 'OZF_ACCRUAL_SCAN_DATA_ERROR');
5395: p_data => x_msg_data
5396: );
5397:
5398: IF OZF_DEBUG_HIGH_ON THEN
5399: OZF_Utility_PVT.debug_message(l_full_name ||': end');
5400: END IF;
5401:
5402: EXCEPTION
5403: WHEN FND_API.g_exc_error THEN
5572: --------------------- initialize -----------------------
5573: SAVEPOINT Create_Claim_Existing_Accruals;
5574:
5575: IF OZF_DEBUG_HIGH_ON THEN
5576: OZF_Utility_PVT.debug_message(l_full_name||': start');
5577: END IF;
5578:
5579: IF FND_API.to_boolean(p_init_msg_list) THEN
5580: FND_MSG_PUB.initialize;
5606: l_batch_fund_id := l_funds_util_flt.fund_id;
5607: l_batch_currency_code := batch_lines_rec.currency_code;
5608:
5609: IF OZF_DEBUG_HIGH_ON THEN
5610: OZF_Utility_PVT.debug_message('Customer Account Id : ' || l_funds_util_flt.cust_account_id);
5611: OZF_UTILITY_PVT.debug_message('Fund_id : ' || l_batch_fund_id);
5612: OZF_UTILITY_PVT.debug_message('Product Amount : ' || l_batch_product_amount);
5613: OZF_UTILITY_PVT.debug_message('Product id : ' || l_batch_product_id);
5614: END IF;
5607: l_batch_currency_code := batch_lines_rec.currency_code;
5608:
5609: IF OZF_DEBUG_HIGH_ON THEN
5610: OZF_Utility_PVT.debug_message('Customer Account Id : ' || l_funds_util_flt.cust_account_id);
5611: OZF_UTILITY_PVT.debug_message('Fund_id : ' || l_batch_fund_id);
5612: OZF_UTILITY_PVT.debug_message('Product Amount : ' || l_batch_product_amount);
5613: OZF_UTILITY_PVT.debug_message('Product id : ' || l_batch_product_id);
5614: END IF;
5615:
5608:
5609: IF OZF_DEBUG_HIGH_ON THEN
5610: OZF_Utility_PVT.debug_message('Customer Account Id : ' || l_funds_util_flt.cust_account_id);
5611: OZF_UTILITY_PVT.debug_message('Fund_id : ' || l_batch_fund_id);
5612: OZF_UTILITY_PVT.debug_message('Product Amount : ' || l_batch_product_amount);
5613: OZF_UTILITY_PVT.debug_message('Product id : ' || l_batch_product_id);
5614: END IF;
5615:
5616: -- Fetching cust_account_id, plan_type, plan_id, product_id, amount for the utilization based on the batch's cust_account_id, Fund_id, Product_id.
5609: IF OZF_DEBUG_HIGH_ON THEN
5610: OZF_Utility_PVT.debug_message('Customer Account Id : ' || l_funds_util_flt.cust_account_id);
5611: OZF_UTILITY_PVT.debug_message('Fund_id : ' || l_batch_fund_id);
5612: OZF_UTILITY_PVT.debug_message('Product Amount : ' || l_batch_product_amount);
5613: OZF_UTILITY_PVT.debug_message('Product id : ' || l_batch_product_id);
5614: END IF;
5615:
5616: -- Fetching cust_account_id, plan_type, plan_id, product_id, amount for the utilization based on the batch's cust_account_id, Fund_id, Product_id.
5617: FOR get_utils_rec IN csr_get_utils(l_funds_util_flt.cust_account_id, l_batch_fund_id, l_batch_product_id)
5624: l_accrual_amount := get_utils_rec.amount;
5625: l_currency_code := get_utils_rec.currency_code;
5626:
5627: IF OZF_DEBUG_HIGH_ON THEN
5628: OZF_Utility_PVT.debug_message('get_utils_rec.cust_account_id : ' || l_cust_account_id);
5629: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_type : ' || l_plan_type);
5630: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_id : ' || l_plan_id);
5631: OZF_UTILITY_PVT.debug_message('get_utils_rec.product_id : ' || l_product_id);
5632: OZF_UTILITY_PVT.debug_message('get_utils_rec.amount : ' || l_accrual_amount);
5625: l_currency_code := get_utils_rec.currency_code;
5626:
5627: IF OZF_DEBUG_HIGH_ON THEN
5628: OZF_Utility_PVT.debug_message('get_utils_rec.cust_account_id : ' || l_cust_account_id);
5629: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_type : ' || l_plan_type);
5630: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_id : ' || l_plan_id);
5631: OZF_UTILITY_PVT.debug_message('get_utils_rec.product_id : ' || l_product_id);
5632: OZF_UTILITY_PVT.debug_message('get_utils_rec.amount : ' || l_accrual_amount);
5633: OZF_UTILITY_PVT.debug_message('get_utils_rec.currency_code : ' || l_currency_code);
5626:
5627: IF OZF_DEBUG_HIGH_ON THEN
5628: OZF_Utility_PVT.debug_message('get_utils_rec.cust_account_id : ' || l_cust_account_id);
5629: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_type : ' || l_plan_type);
5630: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_id : ' || l_plan_id);
5631: OZF_UTILITY_PVT.debug_message('get_utils_rec.product_id : ' || l_product_id);
5632: OZF_UTILITY_PVT.debug_message('get_utils_rec.amount : ' || l_accrual_amount);
5633: OZF_UTILITY_PVT.debug_message('get_utils_rec.currency_code : ' || l_currency_code);
5634: END IF;
5627: IF OZF_DEBUG_HIGH_ON THEN
5628: OZF_Utility_PVT.debug_message('get_utils_rec.cust_account_id : ' || l_cust_account_id);
5629: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_type : ' || l_plan_type);
5630: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_id : ' || l_plan_id);
5631: OZF_UTILITY_PVT.debug_message('get_utils_rec.product_id : ' || l_product_id);
5632: OZF_UTILITY_PVT.debug_message('get_utils_rec.amount : ' || l_accrual_amount);
5633: OZF_UTILITY_PVT.debug_message('get_utils_rec.currency_code : ' || l_currency_code);
5634: END IF;
5635:
5628: OZF_Utility_PVT.debug_message('get_utils_rec.cust_account_id : ' || l_cust_account_id);
5629: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_type : ' || l_plan_type);
5630: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_id : ' || l_plan_id);
5631: OZF_UTILITY_PVT.debug_message('get_utils_rec.product_id : ' || l_product_id);
5632: OZF_UTILITY_PVT.debug_message('get_utils_rec.amount : ' || l_accrual_amount);
5633: OZF_UTILITY_PVT.debug_message('get_utils_rec.currency_code : ' || l_currency_code);
5634: END IF;
5635:
5636: -- Calling Currency_conversion for converting accrual to batch currency
5629: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_type : ' || l_plan_type);
5630: OZF_UTILITY_PVT.debug_message('get_utils_rec.plan_id : ' || l_plan_id);
5631: OZF_UTILITY_PVT.debug_message('get_utils_rec.product_id : ' || l_product_id);
5632: OZF_UTILITY_PVT.debug_message('get_utils_rec.amount : ' || l_accrual_amount);
5633: OZF_UTILITY_PVT.debug_message('get_utils_rec.currency_code : ' || l_currency_code);
5634: END IF;
5635:
5636: -- Calling Currency_conversion for converting accrual to batch currency
5637:
5635:
5636: -- Calling Currency_conversion for converting accrual to batch currency
5637:
5638: IF l_currency_code <> l_batch_currency_code THEN
5639: OZF_UTILITY_PVT.Convert_Currency(
5640: p_from_currency => l_currency_code
5641: ,p_to_currency => l_batch_currency_code
5642: ,p_conv_date => SYSDATE
5643: ,p_from_amount => l_accrual_amount -- accrual amount
5655:
5656: IF l_amount IS NOT NULL AND l_amount <> 0 THEN
5657:
5658: IF OZF_DEBUG_HIGH_ON THEN
5659: OZF_Utility_PVT.debug_message('-------------Before using Accruals Logic------------');
5660: OZF_Utility_PVT.debug_message('Line No ' || l_counter);
5661: OZF_Utility_PVT.debug_message('l_cust_account_id = ' || l_cust_account_id);
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5656: IF l_amount IS NOT NULL AND l_amount <> 0 THEN
5657:
5658: IF OZF_DEBUG_HIGH_ON THEN
5659: OZF_Utility_PVT.debug_message('-------------Before using Accruals Logic------------');
5660: OZF_Utility_PVT.debug_message('Line No ' || l_counter);
5661: OZF_Utility_PVT.debug_message('l_cust_account_id = ' || l_cust_account_id);
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5657:
5658: IF OZF_DEBUG_HIGH_ON THEN
5659: OZF_Utility_PVT.debug_message('-------------Before using Accruals Logic------------');
5660: OZF_Utility_PVT.debug_message('Line No ' || l_counter);
5661: OZF_Utility_PVT.debug_message('l_cust_account_id = ' || l_cust_account_id);
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5665: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5658: IF OZF_DEBUG_HIGH_ON THEN
5659: OZF_Utility_PVT.debug_message('-------------Before using Accruals Logic------------');
5660: OZF_Utility_PVT.debug_message('Line No ' || l_counter);
5661: OZF_Utility_PVT.debug_message('l_cust_account_id = ' || l_cust_account_id);
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5665: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5666: OZF_Utility_PVT.debug_message('l_currency_code = ' || l_currency_code);
5659: OZF_Utility_PVT.debug_message('-------------Before using Accruals Logic------------');
5660: OZF_Utility_PVT.debug_message('Line No ' || l_counter);
5661: OZF_Utility_PVT.debug_message('l_cust_account_id = ' || l_cust_account_id);
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5665: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5666: OZF_Utility_PVT.debug_message('l_currency_code = ' || l_currency_code);
5667: OZF_Utility_PVT.debug_message('----------------------------------------------------');
5660: OZF_Utility_PVT.debug_message('Line No ' || l_counter);
5661: OZF_Utility_PVT.debug_message('l_cust_account_id = ' || l_cust_account_id);
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5665: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5666: OZF_Utility_PVT.debug_message('l_currency_code = ' || l_currency_code);
5667: OZF_Utility_PVT.debug_message('----------------------------------------------------');
5668: END IF;
5661: OZF_Utility_PVT.debug_message('l_cust_account_id = ' || l_cust_account_id);
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5665: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5666: OZF_Utility_PVT.debug_message('l_currency_code = ' || l_currency_code);
5667: OZF_Utility_PVT.debug_message('----------------------------------------------------');
5668: END IF;
5669:
5662: OZF_Utility_PVT.debug_message('l_plan_type = ' || l_plan_type);
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5665: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5666: OZF_Utility_PVT.debug_message('l_currency_code = ' || l_currency_code);
5667: OZF_Utility_PVT.debug_message('----------------------------------------------------');
5668: END IF;
5669:
5670: -- USE l_amount from Accruals and continue with the ITERATION
5663: OZF_Utility_PVT.debug_message('l_plan_id = ' || l_plan_id);
5664: OZF_Utility_PVT.debug_message('l_product_id = ' || l_product_id);
5665: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5666: OZF_Utility_PVT.debug_message('l_currency_code = ' || l_currency_code);
5667: OZF_Utility_PVT.debug_message('----------------------------------------------------');
5668: END IF;
5669:
5670: -- USE l_amount from Accruals and continue with the ITERATION
5671:
5678: l_batch_product_amount := 0;
5679: END IF;
5680:
5681: IF OZF_DEBUG_HIGH_ON THEN
5682: OZF_Utility_PVT.debug_message('-------------After using Accruals ------------');
5683: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5684: OZF_Utility_PVT.debug_message('l_amount_utilized = ' || l_amount_utilized);
5685: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5686: OZF_Utility_PVT.debug_message('----------------------------------------------');
5679: END IF;
5680:
5681: IF OZF_DEBUG_HIGH_ON THEN
5682: OZF_Utility_PVT.debug_message('-------------After using Accruals ------------');
5683: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5684: OZF_Utility_PVT.debug_message('l_amount_utilized = ' || l_amount_utilized);
5685: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5686: OZF_Utility_PVT.debug_message('----------------------------------------------');
5687: END IF;
5680:
5681: IF OZF_DEBUG_HIGH_ON THEN
5682: OZF_Utility_PVT.debug_message('-------------After using Accruals ------------');
5683: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5684: OZF_Utility_PVT.debug_message('l_amount_utilized = ' || l_amount_utilized);
5685: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5686: OZF_Utility_PVT.debug_message('----------------------------------------------');
5687: END IF;
5688:
5681: IF OZF_DEBUG_HIGH_ON THEN
5682: OZF_Utility_PVT.debug_message('-------------After using Accruals ------------');
5683: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5684: OZF_Utility_PVT.debug_message('l_amount_utilized = ' || l_amount_utilized);
5685: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5686: OZF_Utility_PVT.debug_message('----------------------------------------------');
5687: END IF;
5688:
5689: -- Processing utilization amount logic goes here
5682: OZF_Utility_PVT.debug_message('-------------After using Accruals ------------');
5683: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5684: OZF_Utility_PVT.debug_message('l_amount_utilized = ' || l_amount_utilized);
5685: OZF_Utility_PVT.debug_message('l_amount = ' || l_amount);
5686: OZF_Utility_PVT.debug_message('----------------------------------------------');
5687: END IF;
5688:
5689: -- Processing utilization amount logic goes here
5690: -- We are taking l_amount_utilized for Processing of l_line_tbl(l_counter).XXXX.
5725: l_total_amount_utilized := l_total_amount_utilized + l_amount_utilized;
5726:
5727: ELSE
5728: IF OZF_DEBUG_HIGH_ON THEN
5729: OZF_Utility_PVT.debug_message('Performance requirements not met.');
5730: END IF;
5731: IF p_claim_rec.created_from = 'AUTOPAY' THEN
5732: FND_FILE.PUT_LINE(FND_FILE.LOG, 'Performance requirements not met.');
5733: END IF;
5755:
5756: END LOOP; -- Ending loop of batch
5757:
5758: IF OZF_DEBUG_HIGH_ON THEN
5759: OZF_Utility_PVT.debug_message('-------------After Ending batch loop ------------');
5760: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5761: OZF_Utility_PVT.debug_message('l_batch_settlement_flag = ' || l_batch_settlement_flag);
5762: OZF_Utility_PVT.debug_message('l_total_amount_utilized = ' || l_total_amount_utilized);
5763: OZF_Utility_PVT.debug_message('-------------------------------------------------');
5756: END LOOP; -- Ending loop of batch
5757:
5758: IF OZF_DEBUG_HIGH_ON THEN
5759: OZF_Utility_PVT.debug_message('-------------After Ending batch loop ------------');
5760: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5761: OZF_Utility_PVT.debug_message('l_batch_settlement_flag = ' || l_batch_settlement_flag);
5762: OZF_Utility_PVT.debug_message('l_total_amount_utilized = ' || l_total_amount_utilized);
5763: OZF_Utility_PVT.debug_message('-------------------------------------------------');
5764: END IF;
5757:
5758: IF OZF_DEBUG_HIGH_ON THEN
5759: OZF_Utility_PVT.debug_message('-------------After Ending batch loop ------------');
5760: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5761: OZF_Utility_PVT.debug_message('l_batch_settlement_flag = ' || l_batch_settlement_flag);
5762: OZF_Utility_PVT.debug_message('l_total_amount_utilized = ' || l_total_amount_utilized);
5763: OZF_Utility_PVT.debug_message('-------------------------------------------------');
5764: END IF;
5765:
5758: IF OZF_DEBUG_HIGH_ON THEN
5759: OZF_Utility_PVT.debug_message('-------------After Ending batch loop ------------');
5760: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5761: OZF_Utility_PVT.debug_message('l_batch_settlement_flag = ' || l_batch_settlement_flag);
5762: OZF_Utility_PVT.debug_message('l_total_amount_utilized = ' || l_total_amount_utilized);
5763: OZF_Utility_PVT.debug_message('-------------------------------------------------');
5764: END IF;
5765:
5766: -- If flag = f then dispute the batch and batch lines
5759: OZF_Utility_PVT.debug_message('-------------After Ending batch loop ------------');
5760: OZF_Utility_PVT.debug_message('l_batch_product_amount = ' || l_batch_product_amount);
5761: OZF_Utility_PVT.debug_message('l_batch_settlement_flag = ' || l_batch_settlement_flag);
5762: OZF_Utility_PVT.debug_message('l_total_amount_utilized = ' || l_total_amount_utilized);
5763: OZF_Utility_PVT.debug_message('-------------------------------------------------');
5764: END IF;
5765:
5766: -- If flag = f then dispute the batch and batch lines
5767: IF l_batch_settlement_flag = 'F' THEN
5786: END IF;
5787:
5788: -- create claim in OPEN status, ignoring the status passed in
5789: l_claim_rec.status_code := 'OPEN';
5790: l_claim_rec.user_status_id := to_number(ozf_utility_pvt.get_default_user_status(
5791: p_status_type => 'OZF_CLAIM_STATUS',
5792: p_status_code => l_claim_rec.status_code));
5793:
5794: l_claim_rec.source_object_class := NULL;
5809: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
5810: END IF;
5811:
5812: IF OZF_DEBUG_HIGH_ON THEN
5813: OZF_Utility_PVT.debug_message('Claim created id: ' || l_claim_id);
5814: END IF;
5815:
5816: FOR i IN l_line_tbl.FIRST..l_line_tbl.LAST LOOP
5817: IF l_line_tbl.exists(i) IS NOT NULL THEN
5837: RAISE FND_API.g_exc_error;
5838: END IF;
5839:
5840: IF OZF_DEBUG_HIGH_ON THEN
5841: OZF_Utility_PVT.debug_message('Claim lines created for claim_id=' || l_claim_id);
5842: END IF;
5843:
5844: OPEN csr_claim_line(l_claim_id);
5845: LOOP
5886: p_data => x_msg_data
5887: );
5888:
5889: IF OZF_DEBUG_HIGH_ON THEN
5890: OZF_Utility_PVT.debug_message(l_full_name ||': end');
5891: END IF;
5892:
5893: EXCEPTION
5894: WHEN FND_API.g_exc_error THEN
5977: --------------------- initialize -----------------------
5978: SAVEPOINT Pay_Claim_For_Accruals;
5979:
5980: IF OZF_DEBUG_HIGH_ON THEN
5981: OZF_Utility_PVT.debug_message(l_full_name||': start');
5982: END IF;
5983:
5984: IF FND_API.to_boolean(p_init_msg_list) THEN
5985: FND_MSG_PUB.initialize;
6058: END IF;
6059: END IF;
6060:
6061: IF OZF_DEBUG_HIGH_ON THEN
6062: OZF_Utility_PVT.debug_message('Payment method is '||l_claim_rec.payment_method);
6063: OZF_Utility_PVT.debug_message('Autopay Flag is '||l_cust_trade_profile.autopay_flag);
6064: OZF_Utility_PVT.debug_message('Close Claim Flag is '||l_close_claim_flag);
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6059: END IF;
6060:
6061: IF OZF_DEBUG_HIGH_ON THEN
6062: OZF_Utility_PVT.debug_message('Payment method is '||l_claim_rec.payment_method);
6063: OZF_Utility_PVT.debug_message('Autopay Flag is '||l_cust_trade_profile.autopay_flag);
6064: OZF_Utility_PVT.debug_message('Close Claim Flag is '||l_close_claim_flag);
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6060:
6061: IF OZF_DEBUG_HIGH_ON THEN
6062: OZF_Utility_PVT.debug_message('Payment method is '||l_claim_rec.payment_method);
6063: OZF_Utility_PVT.debug_message('Autopay Flag is '||l_cust_trade_profile.autopay_flag);
6064: OZF_Utility_PVT.debug_message('Close Claim Flag is '||l_close_claim_flag);
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6068: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE: '||OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE);
6061: IF OZF_DEBUG_HIGH_ON THEN
6062: OZF_Utility_PVT.debug_message('Payment method is '||l_claim_rec.payment_method);
6063: OZF_Utility_PVT.debug_message('Autopay Flag is '||l_cust_trade_profile.autopay_flag);
6064: OZF_Utility_PVT.debug_message('Close Claim Flag is '||l_close_claim_flag);
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6068: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE: '||OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE);
6069: OZF_Utility_PVT.debug_message('l_accrual_flag: '||l_accrual_flag);
6062: OZF_Utility_PVT.debug_message('Payment method is '||l_claim_rec.payment_method);
6063: OZF_Utility_PVT.debug_message('Autopay Flag is '||l_cust_trade_profile.autopay_flag);
6064: OZF_Utility_PVT.debug_message('Close Claim Flag is '||l_close_claim_flag);
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6068: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE: '||OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE);
6069: OZF_Utility_PVT.debug_message('l_accrual_flag: '||l_accrual_flag);
6070: OZF_Utility_PVT.debug_message('Invokes Create_Claim_For_Accruals ');
6063: OZF_Utility_PVT.debug_message('Autopay Flag is '||l_cust_trade_profile.autopay_flag);
6064: OZF_Utility_PVT.debug_message('Close Claim Flag is '||l_close_claim_flag);
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6068: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE: '||OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE);
6069: OZF_Utility_PVT.debug_message('l_accrual_flag: '||l_accrual_flag);
6070: OZF_Utility_PVT.debug_message('Invokes Create_Claim_For_Accruals ');
6071: END IF;
6064: OZF_Utility_PVT.debug_message('Close Claim Flag is '||l_close_claim_flag);
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6068: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE: '||OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE);
6069: OZF_Utility_PVT.debug_message('l_accrual_flag: '||l_accrual_flag);
6070: OZF_Utility_PVT.debug_message('Invokes Create_Claim_For_Accruals ');
6071: END IF;
6072:
6065: OZF_Utility_PVT.debug_message('l_claim_rec.source_object_class: '||l_claim_rec.source_object_class);
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6068: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE: '||OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE);
6069: OZF_Utility_PVT.debug_message('l_accrual_flag: '||l_accrual_flag);
6070: OZF_Utility_PVT.debug_message('Invokes Create_Claim_For_Accruals ');
6071: END IF;
6072:
6073: --Bug# 8632964 fixed by anuj & muthsubr (+)
6066: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS: '||OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS);
6067: OZF_Utility_PVT.debug_message('l_claim_rec.batch_type: '||l_claim_rec.batch_type);
6068: OZF_Utility_PVT.debug_message('OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE: '||OZF_RESALE_COMMON_PVT.G_BATCH_REF_TYPE);
6069: OZF_Utility_PVT.debug_message('l_accrual_flag: '||l_accrual_flag);
6070: OZF_Utility_PVT.debug_message('Invokes Create_Claim_For_Accruals ');
6071: END IF;
6072:
6073: --Bug# 8632964 fixed by anuj & muthsubr (+)
6074: IF (l_claim_rec.source_object_class = OZF_RESALE_COMMON_PVT.G_BATCH_OBJECT_CLASS AND
6114: END IF;
6115: --Bug# 8632964 fixed by anuj & muthsubr (-)
6116:
6117: IF OZF_DEBUG_HIGH_ON THEN
6118: OZF_Utility_PVT.debug_message('l_claim_id: '||l_claim_id);
6119: END IF;
6120:
6121: IF l_claim_id IS NOT NULL AND l_claim_id <> -1 AND l_close_claim_flag = 'T' THEN --ninarasi fix for bug 12942827 12-Sep-2011
6122: Settle_Claim(
6146: p_data => x_msg_data
6147: );
6148:
6149: IF OZF_DEBUG_HIGH_ON THEN
6150: OZF_Utility_PVT.debug_message(l_full_name ||': end');
6151: END IF;
6152:
6153: EXCEPTION
6154: WHEN FND_API.g_exc_error THEN
6285: --------------------- initialize -----------------------
6286: SAVEPOINT Asso_Accruals_To_Claim;
6287:
6288: IF OZF_DEBUG_HIGH_ON THEN
6289: OZF_Utility_PVT.debug_message(l_full_name||': start');
6290: END IF;
6291:
6292: IF FND_API.to_boolean(p_init_msg_list) THEN
6293: FND_MSG_PUB.initialize;
6338: --Set UNIVERSAL currency from profile.
6339: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
6340:
6341: IF OZF_DEBUG_HIGH_ON THEN
6342: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
6343: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
6344: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
6345: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
6346: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
6339: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
6340:
6341: IF OZF_DEBUG_HIGH_ON THEN
6342: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
6343: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
6344: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
6345: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
6346: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
6347: END IF;
6340:
6341: IF OZF_DEBUG_HIGH_ON THEN
6342: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
6343: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
6344: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
6345: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
6346: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
6347: END IF;
6348:
6341: IF OZF_DEBUG_HIGH_ON THEN
6342: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
6343: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
6344: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
6345: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
6346: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
6347: END IF;
6348:
6349:
6342: OZF_Utility_PVT.debug_message('l_currency_rec.universal_currency_code :' || l_currency_rec.universal_currency_code);
6343: OZF_Utility_PVT.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
6344: OZF_Utility_PVT.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
6345: OZF_Utility_PVT.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
6346: OZF_Utility_PVT.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
6347: END IF;
6348:
6349:
6350: -- default cust_account_id if not given in parameters
6361: l_total_amount := l_funds_util_flt.total_amount;
6362: END IF;
6363:
6364: IF OZF_DEBUG_HIGH_ON THEN
6365: OZF_Utility_PVT.debug_message(l_funds_util_flt.utilization_id||': Before dynamic');
6366: END IF;
6367:
6368: Get_Utiz_Sql_Stmt(
6369: p_api_version => 1.0
6557: p_data => x_msg_data
6558: );
6559:
6560: IF OZF_DEBUG_HIGH_ON THEN
6561: OZF_Utility_PVT.debug_message(l_full_name ||': end');
6562: END IF;
6563:
6564: EXCEPTION
6565: WHEN FND_API.g_exc_error THEN
6671: --------------------- initialize -----------------------
6672: SAVEPOINT Asso_Accruals_To_Claim_Line;
6673:
6674: IF OZF_DEBUG_HIGH_ON THEN
6675: OZF_Utility_PVT.debug_message(l_full_name||': start');
6676: END IF;
6677:
6678: IF FND_API.to_boolean(p_init_msg_list) THEN
6679: FND_MSG_PUB.initialize;
6784: p_data => x_msg_data
6785: );
6786:
6787: IF OZF_DEBUG_HIGH_ON THEN
6788: OZF_Utility_PVT.debug_message(l_full_name ||': end');
6789: END IF;
6790:
6791: EXCEPTION
6792: WHEN FND_API.g_exc_error THEN
6973: --------------------- initialize -----------------------
6974: SAVEPOINT Create_Claim_Per_SPR;
6975:
6976: IF OZF_DEBUG_HIGH_ON THEN
6977: OZF_Utility_PVT.debug_message(l_full_name||': start');
6978: END IF;
6979:
6980: IF FND_API.to_boolean(p_init_msg_list) THEN
6981: FND_MSG_PUB.initialize;
7000: , l_partner_claim_num;
7001: CLOSE csr_resale_batch;
7002:
7003: IF OZF_DEBUG_HIGH_ON THEN
7004: OZF_Utility_PVT.debug_message('Process batch for customer id '||l_cust_account_id);
7005: END IF;
7006:
7007: l_close_claim_flag := 'T';
7008:
7044: , l_agreement_number;
7045: EXIT WHEN csr_batch_request%NOTFOUND;
7046:
7047: IF OZF_DEBUG_HIGH_ON THEN
7048: OZF_Utility_PVT.debug_message('request id:'||l_request_header_id);
7049: END IF;
7050:
7051:
7052: --POS batch Profile change.added logic to create claim line only if the auto claim profile is set /offer type is scan data
7084: --Added for bug 7030415, get exchange_rate type
7085: OPEN c_get_conversion_type;
7086: FETCH c_get_conversion_type INTO l_exchange_rate_type;
7087: CLOSE c_get_conversion_type;
7088: OZF_UTILITY_PVT.Convert_Currency(
7089: p_from_currency => l_line_curr_code
7090: ,p_to_currency => l_claim_curr_code
7091: ,p_conv_type => l_exchange_rate_type
7092: ,p_conv_date => SYSDATE
7174: l_claim_rec.vendor_id := l_vendor_id;
7175: l_claim_rec.vendor_site_id := l_vendor_site_id;
7176: l_claim_rec.status_code := 'OPEN';
7177: l_claim_rec.user_status_id := to_number(
7178: ozf_utility_pvt.get_default_user_status(
7179: p_status_type => 'OZF_CLAIM_STATUS',
7180: p_status_code => l_claim_rec.status_code));
7181: -- save batch's partner claim number as customer reference
7182: l_claim_rec.customer_ref_number := l_partner_claim_num;
7194: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7195: END IF;
7196:
7197: IF OZF_DEBUG_HIGH_ON THEN
7198: OZF_Utility_PVT.debug_message('Created claim id:'||l_claim_id);
7199: END IF;
7200:
7201: FOR i IN l_line_tbl.FIRST..l_line_tbl.LAST LOOP
7202: IF l_line_tbl.exists(i) IS NOT NULL THEN
7220: RAISE FND_API.g_exc_error;
7221: END IF;
7222:
7223: IF OZF_DEBUG_HIGH_ON THEN
7224: OZF_Utility_PVT.debug_message('Claim lines created for claim_id=' || l_claim_id);
7225: END IF;
7226:
7227: OPEN csr_claim_line(l_claim_id);
7228: LOOP
7274: p_count => x_msg_count,
7275: p_data => x_msg_data);
7276:
7277: IF OZF_DEBUG_HIGH_ON THEN
7278: OZF_Utility_PVT.debug_message(l_full_name ||': end');
7279: END IF;
7280:
7281: EXCEPTION
7282: WHEN FND_API.g_exc_error THEN
7463: --------------------- initialize -----------------------
7464: SAVEPOINT Create_Claim_Per_Batch;
7465:
7466: IF OZF_DEBUG_HIGH_ON THEN
7467: OZF_Utility_PVT.debug_message(l_full_name||': start');
7468: END IF;
7469:
7470: IF FND_API.to_boolean(p_init_msg_list) THEN
7471: FND_MSG_PUB.initialize;
7490: , l_partner_claim_num;
7491: CLOSE csr_resale_batch;
7492:
7493: IF OZF_DEBUG_HIGH_ON THEN
7494: OZF_Utility_PVT.debug_message('Process batch for customer id '||l_cust_account_id);
7495: END IF;
7496:
7497: l_close_claim_flag := 'T';
7498:
7565: --Added for bug 7030415, get exchange_rate type
7566: OPEN c_get_conversion_type;
7567: FETCH c_get_conversion_type INTO l_exchange_rate_type;
7568: CLOSE c_get_conversion_type;
7569: OZF_UTILITY_PVT.Convert_Currency(
7570: p_from_currency => l_line_curr_code
7571: ,p_to_currency => l_claim_curr_code
7572: ,p_conv_type => l_exchange_rate_type
7573: ,p_conv_date => SYSDATE
7658: l_claim_rec.vendor_id := l_vendor_id;
7659: l_claim_rec.vendor_site_id := l_vendor_site_id;
7660: l_claim_rec.status_code := 'OPEN';
7661: l_claim_rec.user_status_id := to_number(
7662: ozf_utility_pvt.get_default_user_status(
7663: p_status_type => 'OZF_CLAIM_STATUS',
7664: p_status_code => l_claim_rec.status_code));
7665: -- save batch's partner claim number as customer reference
7666: l_claim_rec.customer_ref_number := l_partner_claim_num;
7678: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
7679: END IF;
7680:
7681: IF OZF_DEBUG_HIGH_ON THEN
7682: OZF_Utility_PVT.debug_message('Created claim id:'||l_claim_id);
7683: END IF;
7684:
7685: FOR i IN l_line_tbl.FIRST..l_line_tbl.LAST LOOP
7686: IF l_line_tbl.exists(i) IS NOT NULL THEN
7704: RAISE FND_API.g_exc_error;
7705: END IF;
7706:
7707: IF OZF_DEBUG_HIGH_ON THEN
7708: OZF_Utility_PVT.debug_message('Claim lines created for claim_id=' || l_claim_id);
7709: END IF;
7710:
7711: OPEN csr_claim_line(l_claim_id);
7712: LOOP
7753: p_count => x_msg_count,
7754: p_data => x_msg_data);
7755:
7756: IF OZF_DEBUG_HIGH_ON THEN
7757: OZF_Utility_PVT.debug_message(l_full_name ||': end');
7758: END IF;
7759:
7760: EXCEPTION
7761: WHEN FND_API.g_exc_error THEN
7827: --------------------- initialize -----------------------
7828: SAVEPOINT Initiate_Batch_Payment;
7829:
7830: IF OZF_DEBUG_HIGH_ON THEN
7831: OZF_Utility_PVT.debug_message(l_full_name||': start');
7832: END IF;
7833:
7834: IF FND_API.to_boolean(p_init_msg_list) THEN
7835: FND_MSG_PUB.initialize;
7896: p_data => x_msg_data
7897: );
7898:
7899: IF OZF_DEBUG_HIGH_ON THEN
7900: OZF_Utility_PVT.debug_message(l_full_name ||': end');
7901: END IF;
7902:
7903: EXCEPTION
7904: WHEN FND_API.g_exc_error THEN
8022:
8023: BEGIN
8024: ----------------------- initialize --------------------
8025: IF OZF_DEBUG_HIGH_ON THEN
8026: OZF_Utility_PVT.debug_message(l_full_name||': start');
8027: END IF;
8028:
8029: IF FND_API.to_boolean(p_init_msg_list) THEN
8030: FND_MSG_PUB.initialize;
8178: --nepanda : fix for bug # 9508390 - issue # 3
8179: l_over_paid_amount := p_over_paid_amount; --p_funds_util_flt.total_amount - l_total_amt_remaining;
8180:
8181: IF OZF_DEBUG_HIGH_ON THEN
8182: OZF_Utility_PVT.debug_message('l_over_paid_amount :' || l_over_paid_amount);
8183: END IF;
8184:
8185: IF l_over_paid_amount > l_threshold_amount THEN
8186: IF l_un_earned_pay_thold_flag IS NULL OR l_un_earned_pay_thold_flag <> 'T' THEN
8195: END IF;
8196: END IF;
8197:
8198: IF OZF_DEBUG_HIGH_ON THEN
8199: OZF_Utility_PVT.debug_message('l_un_earned_pay_allow_to = '||l_un_earned_pay_allow_to);
8200: OZF_Utility_PVT.debug_message('l_un_earned_pay_thold_type = '||l_un_earned_pay_thold_type);
8201: OZF_Utility_PVT.debug_message('l_over_paid_amount = '||l_over_paid_amount);
8202: OZF_Utility_PVT.debug_message('l_threshold_amount = '||l_threshold_amount);
8203: END IF;
8196: END IF;
8197:
8198: IF OZF_DEBUG_HIGH_ON THEN
8199: OZF_Utility_PVT.debug_message('l_un_earned_pay_allow_to = '||l_un_earned_pay_allow_to);
8200: OZF_Utility_PVT.debug_message('l_un_earned_pay_thold_type = '||l_un_earned_pay_thold_type);
8201: OZF_Utility_PVT.debug_message('l_over_paid_amount = '||l_over_paid_amount);
8202: OZF_Utility_PVT.debug_message('l_threshold_amount = '||l_threshold_amount);
8203: END IF;
8204:
8197:
8198: IF OZF_DEBUG_HIGH_ON THEN
8199: OZF_Utility_PVT.debug_message('l_un_earned_pay_allow_to = '||l_un_earned_pay_allow_to);
8200: OZF_Utility_PVT.debug_message('l_un_earned_pay_thold_type = '||l_un_earned_pay_thold_type);
8201: OZF_Utility_PVT.debug_message('l_over_paid_amount = '||l_over_paid_amount);
8202: OZF_Utility_PVT.debug_message('l_threshold_amount = '||l_threshold_amount);
8203: END IF;
8204:
8205: IF OZF_DEBUG_HIGH_ON THEN
8198: IF OZF_DEBUG_HIGH_ON THEN
8199: OZF_Utility_PVT.debug_message('l_un_earned_pay_allow_to = '||l_un_earned_pay_allow_to);
8200: OZF_Utility_PVT.debug_message('l_un_earned_pay_thold_type = '||l_un_earned_pay_thold_type);
8201: OZF_Utility_PVT.debug_message('l_over_paid_amount = '||l_over_paid_amount);
8202: OZF_Utility_PVT.debug_message('l_threshold_amount = '||l_threshold_amount);
8203: END IF;
8204:
8205: IF OZF_DEBUG_HIGH_ON THEN
8206: OZF_Utility_PVT.debug_message(l_full_name||': end');
8202: OZF_Utility_PVT.debug_message('l_threshold_amount = '||l_threshold_amount);
8203: END IF;
8204:
8205: IF OZF_DEBUG_HIGH_ON THEN
8206: OZF_Utility_PVT.debug_message(l_full_name||': end');
8207: END IF;
8208: END Validate_Over_Utilization;
8209:
8210: ---------------------------------------------------------------------
8320: BEGIN
8321:
8322:
8323: IF OZF_DEBUG_HIGH_ON THEN
8324: OZF_Utility_PVT.debug_message(l_full_name||': start');
8325: END IF;
8326:
8327: SAVEPOINT Create_Pay_Over_Adjustments;
8328:
8368:
8369: --Fix for Bug 8583847
8370: IF SIGN(px_line_util_tbl(i).amount) = SIGN(NVL (l_new_line_amount,0)) THEN
8371: l_prorate_adj_amt := px_line_util_tbl(i).amount * (l_new_line_amount / p_tot_accrual_amt);
8372: l_prorate_adj_amt := OZF_UTILITY_PVT.CurrRound(l_prorate_adj_amt, p_currency_rec.association_currency_code);
8373:
8374:
8375: OPEN csr_funds_util_info(px_line_util_tbl(i).utilization_id);
8376: FETCH csr_funds_util_info INTO l_util_product_id
8378: , l_util_fund_id;
8379: CLOSE csr_funds_util_info;
8380:
8381: IF OZF_DEBUG_HIGH_ON THEN
8382: OZF_Utility_PVT.debug_message('px_line_util_tbl(i).amount = '||px_line_util_tbl(i).amount);
8383: OZF_Utility_PVT.debug_message('p_pay_over_amount = '||p_pay_over_amount);
8384: OZF_Utility_PVT.debug_message('p_tot_accrual_amt = '||p_tot_accrual_amt);
8385: OZF_Utility_PVT.debug_message('l_prorate_adj_amt = '||l_prorate_adj_amt);
8386: OZF_Utility_PVT.debug_message('l_util_product_id = '||l_util_product_id);
8379: CLOSE csr_funds_util_info;
8380:
8381: IF OZF_DEBUG_HIGH_ON THEN
8382: OZF_Utility_PVT.debug_message('px_line_util_tbl(i).amount = '||px_line_util_tbl(i).amount);
8383: OZF_Utility_PVT.debug_message('p_pay_over_amount = '||p_pay_over_amount);
8384: OZF_Utility_PVT.debug_message('p_tot_accrual_amt = '||p_tot_accrual_amt);
8385: OZF_Utility_PVT.debug_message('l_prorate_adj_amt = '||l_prorate_adj_amt);
8386: OZF_Utility_PVT.debug_message('l_util_product_id = '||l_util_product_id);
8387: OZF_Utility_PVT.debug_message('l_util_product_level_type = '||l_util_product_level_type);
8380:
8381: IF OZF_DEBUG_HIGH_ON THEN
8382: OZF_Utility_PVT.debug_message('px_line_util_tbl(i).amount = '||px_line_util_tbl(i).amount);
8383: OZF_Utility_PVT.debug_message('p_pay_over_amount = '||p_pay_over_amount);
8384: OZF_Utility_PVT.debug_message('p_tot_accrual_amt = '||p_tot_accrual_amt);
8385: OZF_Utility_PVT.debug_message('l_prorate_adj_amt = '||l_prorate_adj_amt);
8386: OZF_Utility_PVT.debug_message('l_util_product_id = '||l_util_product_id);
8387: OZF_Utility_PVT.debug_message('l_util_product_level_type = '||l_util_product_level_type);
8388: OZF_Utility_PVT.debug_message('l_util_fund_id = '||l_util_fund_id);
8381: IF OZF_DEBUG_HIGH_ON THEN
8382: OZF_Utility_PVT.debug_message('px_line_util_tbl(i).amount = '||px_line_util_tbl(i).amount);
8383: OZF_Utility_PVT.debug_message('p_pay_over_amount = '||p_pay_over_amount);
8384: OZF_Utility_PVT.debug_message('p_tot_accrual_amt = '||p_tot_accrual_amt);
8385: OZF_Utility_PVT.debug_message('l_prorate_adj_amt = '||l_prorate_adj_amt);
8386: OZF_Utility_PVT.debug_message('l_util_product_id = '||l_util_product_id);
8387: OZF_Utility_PVT.debug_message('l_util_product_level_type = '||l_util_product_level_type);
8388: OZF_Utility_PVT.debug_message('l_util_fund_id = '||l_util_fund_id);
8389: END IF;
8382: OZF_Utility_PVT.debug_message('px_line_util_tbl(i).amount = '||px_line_util_tbl(i).amount);
8383: OZF_Utility_PVT.debug_message('p_pay_over_amount = '||p_pay_over_amount);
8384: OZF_Utility_PVT.debug_message('p_tot_accrual_amt = '||p_tot_accrual_amt);
8385: OZF_Utility_PVT.debug_message('l_prorate_adj_amt = '||l_prorate_adj_amt);
8386: OZF_Utility_PVT.debug_message('l_util_product_id = '||l_util_product_id);
8387: OZF_Utility_PVT.debug_message('l_util_product_level_type = '||l_util_product_level_type);
8388: OZF_Utility_PVT.debug_message('l_util_fund_id = '||l_util_fund_id);
8389: END IF;
8390:
8383: OZF_Utility_PVT.debug_message('p_pay_over_amount = '||p_pay_over_amount);
8384: OZF_Utility_PVT.debug_message('p_tot_accrual_amt = '||p_tot_accrual_amt);
8385: OZF_Utility_PVT.debug_message('l_prorate_adj_amt = '||l_prorate_adj_amt);
8386: OZF_Utility_PVT.debug_message('l_util_product_id = '||l_util_product_id);
8387: OZF_Utility_PVT.debug_message('l_util_product_level_type = '||l_util_product_level_type);
8388: OZF_Utility_PVT.debug_message('l_util_fund_id = '||l_util_fund_id);
8389: END IF;
8390:
8391: Create_Fund_Adjustment ( p_offer_id => p_funds_util_flt.activity_id
8384: OZF_Utility_PVT.debug_message('p_tot_accrual_amt = '||p_tot_accrual_amt);
8385: OZF_Utility_PVT.debug_message('l_prorate_adj_amt = '||l_prorate_adj_amt);
8386: OZF_Utility_PVT.debug_message('l_util_product_id = '||l_util_product_id);
8387: OZF_Utility_PVT.debug_message('l_util_product_level_type = '||l_util_product_level_type);
8388: OZF_Utility_PVT.debug_message('l_util_fund_id = '||l_util_fund_id);
8389: END IF;
8390:
8391: Create_Fund_Adjustment ( p_offer_id => p_funds_util_flt.activity_id
8392: , p_cust_account_id => p_funds_util_flt.cust_account_id
8416:
8417: l_tot_prorate_adj_amt := NVL(l_tot_prorate_adj_amt,0) + l_prorate_adj_amt;
8418:
8419: IF OZF_DEBUG_HIGH_ON THEN
8420: OZF_Utility_PVT.debug_message('Prorate Partial Pay Over Earnings Adjustments ...');
8421: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8422: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8423: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8424: OZF_Utility_PVT.debug_message('l_tot_prorate_adj_amt = '||l_tot_prorate_adj_amt);
8417: l_tot_prorate_adj_amt := NVL(l_tot_prorate_adj_amt,0) + l_prorate_adj_amt;
8418:
8419: IF OZF_DEBUG_HIGH_ON THEN
8420: OZF_Utility_PVT.debug_message('Prorate Partial Pay Over Earnings Adjustments ...');
8421: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8422: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8423: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8424: OZF_Utility_PVT.debug_message('l_tot_prorate_adj_amt = '||l_tot_prorate_adj_amt);
8425: END IF;
8418:
8419: IF OZF_DEBUG_HIGH_ON THEN
8420: OZF_Utility_PVT.debug_message('Prorate Partial Pay Over Earnings Adjustments ...');
8421: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8422: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8423: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8424: OZF_Utility_PVT.debug_message('l_tot_prorate_adj_amt = '||l_tot_prorate_adj_amt);
8425: END IF;
8426:
8419: IF OZF_DEBUG_HIGH_ON THEN
8420: OZF_Utility_PVT.debug_message('Prorate Partial Pay Over Earnings Adjustments ...');
8421: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8422: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8423: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8424: OZF_Utility_PVT.debug_message('l_tot_prorate_adj_amt = '||l_tot_prorate_adj_amt);
8425: END IF;
8426:
8427: px_line_util_tbl(j).amount := OZF_UTILITY_PVT.CurrRound(px_line_util_tbl(j).amount, p_currency_rec.association_currency_code);
8420: OZF_Utility_PVT.debug_message('Prorate Partial Pay Over Earnings Adjustments ...');
8421: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8422: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8423: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8424: OZF_Utility_PVT.debug_message('l_tot_prorate_adj_amt = '||l_tot_prorate_adj_amt);
8425: END IF;
8426:
8427: px_line_util_tbl(j).amount := OZF_UTILITY_PVT.CurrRound(px_line_util_tbl(j).amount, p_currency_rec.association_currency_code);
8428: px_line_util_tbl(j).utilization_id := l_adj_util_id;
8423: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8424: OZF_Utility_PVT.debug_message('l_tot_prorate_adj_amt = '||l_tot_prorate_adj_amt);
8425: END IF;
8426:
8427: px_line_util_tbl(j).amount := OZF_UTILITY_PVT.CurrRound(px_line_util_tbl(j).amount, p_currency_rec.association_currency_code);
8428: px_line_util_tbl(j).utilization_id := l_adj_util_id;
8429: px_line_util_tbl(j).claim_line_id := p_funds_util_flt.claim_line_id;
8430: px_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8431:
8458: --l_tot_accrual_amt := NVL(l_tot_accrual_amt,0) + l_accrued_amt(i);
8459:
8460: --Fix for Bug 8583847
8461: l_prorate_adj_amt := l_accrued_amt(i) * (l_new_line_amount / l_tot_accrual_amt);
8462: l_prorate_adj_amt := OZF_UTILITY_PVT.CurrRound(l_prorate_adj_amt, p_currency_rec.association_currency_code);
8463:
8464: l_tot_prorate_adj_amt := NVL(l_tot_prorate_adj_amt,0) + l_prorate_adj_amt ;
8465:
8466: Create_Fund_Adjustment ( p_offer_id => p_funds_util_flt.activity_id
8489: px_line_util_tbl(j).amount := px_line_util_tbl(j).amount + (l_new_line_amount - l_tot_prorate_adj_amt);
8490:
8491: END IF;
8492:
8493: px_line_util_tbl(j).amount := OZF_UTILITY_PVT.CurrRound(px_line_util_tbl(j).amount, p_currency_rec.association_currency_code);
8494: px_line_util_tbl(j).utilization_id := l_adj_util_id;
8495: px_line_util_tbl(j).claim_line_id := p_funds_util_flt.claim_line_id;
8496: px_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8497:
8495: px_line_util_tbl(j).claim_line_id := p_funds_util_flt.claim_line_id;
8496: px_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8497:
8498: IF OZF_DEBUG_HIGH_ON THEN
8499: OZF_Utility_PVT.debug_message('Prorate Total Pay Over Earnings Adjustments ...');
8500: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8501: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8502: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8503: END IF;
8496: px_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8497:
8498: IF OZF_DEBUG_HIGH_ON THEN
8499: OZF_Utility_PVT.debug_message('Prorate Total Pay Over Earnings Adjustments ...');
8500: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8501: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8502: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8503: END IF;
8504: j := j + 1;
8497:
8498: IF OZF_DEBUG_HIGH_ON THEN
8499: OZF_Utility_PVT.debug_message('Prorate Total Pay Over Earnings Adjustments ...');
8500: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8501: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8502: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8503: END IF;
8504: j := j + 1;
8505: END LOOP;
8498: IF OZF_DEBUG_HIGH_ON THEN
8499: OZF_Utility_PVT.debug_message('Prorate Total Pay Over Earnings Adjustments ...');
8500: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8501: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8502: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8503: END IF;
8504: j := j + 1;
8505: END LOOP;
8506: END IF;
8541: l_tot_amt_rem := l_tot_amt_rem + px_line_util_tbl(j).amount;
8542: END IF;
8543: END IF;
8544:
8545: px_line_util_tbl(j).amount := OZF_UTILITY_PVT.CurrRound(px_line_util_tbl(j).amount, p_currency_rec.association_currency_code);
8546: px_line_util_tbl(j).utilization_id := l_adj_util_id;
8547: px_line_util_tbl(j).claim_line_id := p_funds_util_flt.claim_line_id;
8548: px_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8549:
8547: px_line_util_tbl(j).claim_line_id := p_funds_util_flt.claim_line_id;
8548: px_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8549:
8550: IF OZF_DEBUG_HIGH_ON THEN
8551: OZF_Utility_PVT.debug_message('Non-Prorate Pay Over Earnings Adjustments ...');
8552: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8553: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8554: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8555: END IF;
8548: px_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8549:
8550: IF OZF_DEBUG_HIGH_ON THEN
8551: OZF_Utility_PVT.debug_message('Non-Prorate Pay Over Earnings Adjustments ...');
8552: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8553: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8554: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8555: END IF;
8556: j := j + 1;
8549:
8550: IF OZF_DEBUG_HIGH_ON THEN
8551: OZF_Utility_PVT.debug_message('Non-Prorate Pay Over Earnings Adjustments ...');
8552: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8553: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8554: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8555: END IF;
8556: j := j + 1;
8557: END LOOP;
8550: IF OZF_DEBUG_HIGH_ON THEN
8551: OZF_Utility_PVT.debug_message('Non-Prorate Pay Over Earnings Adjustments ...');
8552: OZF_Utility_PVT.debug_message('Utilization_Id = '||px_line_util_tbl(j).utilization_id);
8553: OZF_Utility_PVT.debug_message('Claim_Line_Id = '||px_line_util_tbl(j).claim_line_id);
8554: OZF_Utility_PVT.debug_message('Adjustment Amount = '||px_line_util_tbl(j).amount);
8555: END IF;
8556: j := j + 1;
8557: END LOOP;
8558: END IF; --p_prorate_earnings_flag
8722: AND line.batch_curr_claim_amount <> 0;
8723: BEGIN
8724:
8725: IF OZF_DEBUG_HIGH_ON THEN
8726: OZF_Utility_PVT.debug_message(l_full_name||': start');
8727: END IF;
8728:
8729: -- Fix for Bug 8583847
8730: l_line_rem_amount := p_cre_util_amount;
8759: IF (l_currency_rec.transaction_currency_code = l_currency_rec.claim_currency_code) THEN
8760: x_line_util_tbl(j).amount := l_batch_curr_claim_amt;
8761: ELSE
8762: IF l_currency_rec.claim_currency_code <> l_currency_rec.functional_currency_code THEN
8763: OZF_UTILITY_PVT.Convert_Currency (
8764: p_from_currency => l_currency_rec.claim_currency_code
8765: , p_to_currency => l_currency_rec.functional_currency_code
8766: , p_conv_type => l_fu_exc_rate_type
8767: , p_conv_rate => l_fu_exchange_rate
8777: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
8778: RAISE FND_API.g_exc_unexpected_error;
8779: END IF;
8780:
8781: x_line_util_tbl(j).amount := OZF_UTILITY_PVT.CurrRound( x_line_util_tbl(j).amount, l_currency_rec.functional_currency_code);
8782:
8783: ELSE
8784: x_line_util_tbl(j).amount := l_batch_curr_claim_amt;
8785: END IF;
8799: LOOP
8800: FETCH csr_sd_accruals INTO l_util_id,l_fu_amt_rem,l_fu_currency_code;
8801: EXIT WHEN csr_sd_accruals%NOTFOUND;
8802: x_line_util_tbl(j).utilization_id := l_util_id;
8803: x_line_util_tbl(j).amount := OZF_UTILITY_PVT.CurrRound(l_fu_amt_rem, l_currency_rec.association_currency_code);
8804: x_line_util_tbl(j).claim_line_id := p_funds_util_flt.claim_line_id;
8805: x_line_util_tbl(j).activity_product_id := p_funds_util_flt.activity_product_id;
8806: x_line_util_tbl(j).uom_code := l_util_uom_code;
8807: x_line_util_tbl(j).update_from_tbl_flag := FND_API.g_true;
8927: created for this amount.
8928: */
8929:
8930: IF OZF_DEBUG_HIGH_ON THEN
8931: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.COUNT = '||l_funds_rem_tbl.COUNT);
8932: OZF_Utility_PVT.debug_message('p_cre_util_amount = '||p_cre_util_amount);
8933: OZF_Utility_PVT.debug_message('l_total_amt_rem = '||l_total_amt_rem);
8934: OZF_Utility_PVT.debug_message('p_prorate_earnings_flag = '||p_prorate_earnings_flag);
8935: END IF;
8928: */
8929:
8930: IF OZF_DEBUG_HIGH_ON THEN
8931: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.COUNT = '||l_funds_rem_tbl.COUNT);
8932: OZF_Utility_PVT.debug_message('p_cre_util_amount = '||p_cre_util_amount);
8933: OZF_Utility_PVT.debug_message('l_total_amt_rem = '||l_total_amt_rem);
8934: OZF_Utility_PVT.debug_message('p_prorate_earnings_flag = '||p_prorate_earnings_flag);
8935: END IF;
8936:
8929:
8930: IF OZF_DEBUG_HIGH_ON THEN
8931: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.COUNT = '||l_funds_rem_tbl.COUNT);
8932: OZF_Utility_PVT.debug_message('p_cre_util_amount = '||p_cre_util_amount);
8933: OZF_Utility_PVT.debug_message('l_total_amt_rem = '||l_total_amt_rem);
8934: OZF_Utility_PVT.debug_message('p_prorate_earnings_flag = '||p_prorate_earnings_flag);
8935: END IF;
8936:
8937: -- Bugfix 6042226
8930: IF OZF_DEBUG_HIGH_ON THEN
8931: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.COUNT = '||l_funds_rem_tbl.COUNT);
8932: OZF_Utility_PVT.debug_message('p_cre_util_amount = '||p_cre_util_amount);
8933: OZF_Utility_PVT.debug_message('l_total_amt_rem = '||l_total_amt_rem);
8934: OZF_Utility_PVT.debug_message('p_prorate_earnings_flag = '||p_prorate_earnings_flag);
8935: END IF;
8936:
8937: -- Bugfix 6042226
8938: IF l_funds_rem_tbl.COUNT > 0 THEN
8947: IF i = l_funds_rem_tbl.LAST THEN
8948: -- Modified the logic for multiple lines - kpatro
8949:
8950: l_prorate_amount := l_funds_rem_tbl(i).amount_remaining * (p_cre_util_amount / l_total_amt_rem);
8951: l_prorate_amount := OZF_UTILITY_PVT.CurrRound(l_prorate_amount,l_currency_rec.association_currency_code);
8952:
8953: -- modified the condition to <> to account for either less or greater condition
8954:
8955: IF (l_total_prorate_amount + l_prorate_amount) <> p_cre_util_amount THEN
8957: END IF;
8958: x_line_util_tbl(i).amount := l_prorate_amount;
8959: ELSE
8960: l_prorate_amount := l_funds_rem_tbl(i).amount_remaining * (p_cre_util_amount / l_total_amt_rem);
8961: x_line_util_tbl(i).amount := OZF_UTILITY_PVT.CurrRound(l_prorate_amount, l_currency_rec.association_currency_code);
8962: END IF;
8963:
8964: l_total_prorate_amount := l_total_prorate_amount + x_line_util_tbl(i).amount;
8965:
8978: FOR i IN l_funds_rem_tbl.FIRST..l_funds_rem_tbl.LAST
8979: LOOP
8980: l_fu_amt_rem := l_funds_rem_tbl(i).amount_remaining;
8981: IF OZF_DEBUG_HIGH_ON THEN
8982: OZF_Utility_PVT.debug_message('NN : l_fu_amt_rem = ' || l_fu_amt_rem);
8983: END IF;
8984: IF ((SIGN(p_cre_util_amount) = -1 AND SIGN(l_total_amt_rem) = -1) AND
8985: (p_cre_util_amount > l_total_amt_rem)) OR
8986: ((SIGN(p_cre_util_amount) = 1 AND SIGN(l_total_amt_rem) = 1) AND
8988: THEN
8989: IF l_line_rem_amount >= l_fu_amt_rem THEN
8990: x_line_util_tbl(i).amount := l_fu_amt_rem;
8991: IF OZF_DEBUG_HIGH_ON THEN
8992: OZF_Utility_PVT.debug_message('NN : Inside IF l_fu_amt_rem = ' || l_fu_amt_rem);
8993: END IF;
8994: ELSE
8995: x_line_util_tbl(i).amount := l_line_rem_amount;
8996: IF OZF_DEBUG_HIGH_ON THEN
8993: END IF;
8994: ELSE
8995: x_line_util_tbl(i).amount := l_line_rem_amount;
8996: IF OZF_DEBUG_HIGH_ON THEN
8997: OZF_Utility_PVT.debug_message('NN : Inside ELSE l_line_rem_amount = ' || l_line_rem_amount);
8998: END IF;
8999: END IF;
9000: ELSE
9001: -- Bugfix 5404951
9020: IF l_line_rem_amount >= 0 then
9021: IF l_line_rem_amount >= l_fu_amt_rem THEN
9022: x_line_util_tbl(i).amount := l_fu_amt_rem;
9023: IF OZF_DEBUG_HIGH_ON THEN
9024: OZF_Utility_PVT.debug_message('NN : Inside IF new change x_line_util_tbl(i).amount= ' || x_line_util_tbl(i).amount);
9025: END IF;
9026: ELSE
9027: x_line_util_tbl(i).amount := l_line_rem_amount;
9028: l_exit_nonprorate := TRUE; --changed 13550004
9026: ELSE
9027: x_line_util_tbl(i).amount := l_line_rem_amount;
9028: l_exit_nonprorate := TRUE; --changed 13550004
9029: IF OZF_DEBUG_HIGH_ON THEN
9030: OZF_Utility_PVT.debug_message('NN : Inside IF111 new change x_line_util_tbl(i).amount= ' || x_line_util_tbl(i).amount);
9031: END IF;
9032: END IF;
9033: ELSE
9034: IF l_line_rem_amount < l_fu_amt_rem THEN
9033: ELSE
9034: IF l_line_rem_amount < l_fu_amt_rem THEN
9035: x_line_util_tbl(i).amount := l_fu_amt_rem;
9036: IF OZF_DEBUG_HIGH_ON THEN
9037: OZF_Utility_PVT.debug_message('NN : Inside ELSE new change x_line_util_tbl(i).amount= ' || x_line_util_tbl(i).amount);
9038: END IF;
9039: ELSE
9040: x_line_util_tbl(i).amount := l_line_rem_amount;
9041: l_exit_nonprorate := TRUE; --changed 13550004
9039: ELSE
9040: x_line_util_tbl(i).amount := l_line_rem_amount;
9041: l_exit_nonprorate := TRUE; --changed 13550004
9042: IF OZF_DEBUG_HIGH_ON THEN
9043: OZF_Utility_PVT.debug_message('NN : Inside ELSE111 new change x_line_util_tbl(i).amount= ' || x_line_util_tbl(i).amount);
9044: END IF;
9045: END IF;
9046: END IF;
9047:
9060: x_line_util_tbl(i).update_from_tbl_flag := FND_API.g_true;
9061:
9062: l_line_rem_amount := l_line_rem_amount - l_fu_amt_rem;
9063: IF OZF_DEBUG_HIGH_ON THEN
9064: OZF_Utility_PVT.debug_message('NN : l_line_rem_amount after= ' || l_line_rem_amount);
9065: END IF;
9066: IF l_line_rem_amount = 0 OR l_exit_nonprorate = TRUE THEN --changed 13550004
9067: EXIT;
9068: END IF;
9078: IF OZF_DEBUG_HIGH_ON THEN
9079: IF x_line_util_tbl.COUNT > 0 THEN
9080: FOR i IN x_line_util_tbl.FIRST..x_line_util_tbl.LAST
9081: LOOP
9082: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').utilization_id = '||x_line_util_tbl(i).utilization_id);
9083: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').claim_line_id = '||x_line_util_tbl(i).claim_line_id);
9084: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').activity_product_id = '||x_line_util_tbl(i).activity_product_id);
9085: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').uom_code = '||x_line_util_tbl(i).uom_code);
9086: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').amount = '||x_line_util_tbl(i).amount);
9079: IF x_line_util_tbl.COUNT > 0 THEN
9080: FOR i IN x_line_util_tbl.FIRST..x_line_util_tbl.LAST
9081: LOOP
9082: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').utilization_id = '||x_line_util_tbl(i).utilization_id);
9083: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').claim_line_id = '||x_line_util_tbl(i).claim_line_id);
9084: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').activity_product_id = '||x_line_util_tbl(i).activity_product_id);
9085: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').uom_code = '||x_line_util_tbl(i).uom_code);
9086: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').amount = '||x_line_util_tbl(i).amount);
9087: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').quantity = '||x_line_util_tbl(i).quantity);
9080: FOR i IN x_line_util_tbl.FIRST..x_line_util_tbl.LAST
9081: LOOP
9082: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').utilization_id = '||x_line_util_tbl(i).utilization_id);
9083: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').claim_line_id = '||x_line_util_tbl(i).claim_line_id);
9084: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').activity_product_id = '||x_line_util_tbl(i).activity_product_id);
9085: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').uom_code = '||x_line_util_tbl(i).uom_code);
9086: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').amount = '||x_line_util_tbl(i).amount);
9087: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').quantity = '||x_line_util_tbl(i).quantity);
9088: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').scan_unit = '||x_line_util_tbl(i).scan_unit);
9081: LOOP
9082: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').utilization_id = '||x_line_util_tbl(i).utilization_id);
9083: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').claim_line_id = '||x_line_util_tbl(i).claim_line_id);
9084: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').activity_product_id = '||x_line_util_tbl(i).activity_product_id);
9085: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').uom_code = '||x_line_util_tbl(i).uom_code);
9086: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').amount = '||x_line_util_tbl(i).amount);
9087: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').quantity = '||x_line_util_tbl(i).quantity);
9088: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').scan_unit = '||x_line_util_tbl(i).scan_unit);
9089: END LOOP;
9082: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').utilization_id = '||x_line_util_tbl(i).utilization_id);
9083: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').claim_line_id = '||x_line_util_tbl(i).claim_line_id);
9084: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').activity_product_id = '||x_line_util_tbl(i).activity_product_id);
9085: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').uom_code = '||x_line_util_tbl(i).uom_code);
9086: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').amount = '||x_line_util_tbl(i).amount);
9087: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').quantity = '||x_line_util_tbl(i).quantity);
9088: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').scan_unit = '||x_line_util_tbl(i).scan_unit);
9089: END LOOP;
9090: END IF;
9083: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').claim_line_id = '||x_line_util_tbl(i).claim_line_id);
9084: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').activity_product_id = '||x_line_util_tbl(i).activity_product_id);
9085: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').uom_code = '||x_line_util_tbl(i).uom_code);
9086: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').amount = '||x_line_util_tbl(i).amount);
9087: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').quantity = '||x_line_util_tbl(i).quantity);
9088: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').scan_unit = '||x_line_util_tbl(i).scan_unit);
9089: END LOOP;
9090: END IF;
9091: END IF;
9084: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').activity_product_id = '||x_line_util_tbl(i).activity_product_id);
9085: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').uom_code = '||x_line_util_tbl(i).uom_code);
9086: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').amount = '||x_line_util_tbl(i).amount);
9087: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').quantity = '||x_line_util_tbl(i).quantity);
9088: OZF_Utility_PVT.debug_message('x_line_util_tbl('||i||').scan_unit = '||x_line_util_tbl(i).scan_unit);
9089: END LOOP;
9090: END IF;
9091: END IF;
9092:
9096: x_new_total_units := l_new_total_units;
9097:
9098:
9099: IF OZF_DEBUG_HIGH_ON THEN
9100: OZF_Utility_PVT.debug_message(l_full_name||': end');
9101: OZF_Utility_PVT.debug_message('x_line_amount :' || x_line_amount);
9102: END IF;
9103:
9104: x_funds_rem_tbl := l_funds_rem_tbl;
9097:
9098:
9099: IF OZF_DEBUG_HIGH_ON THEN
9100: OZF_Utility_PVT.debug_message(l_full_name||': end');
9101: OZF_Utility_PVT.debug_message('x_line_amount :' || x_line_amount);
9102: END IF;
9103:
9104: x_funds_rem_tbl := l_funds_rem_tbl;
9105:
9195:
9196: BEGIN
9197:
9198: IF OZF_DEBUG_HIGH_ON THEN
9199: OZF_Utility_PVT.debug_message(l_full_name||': start');
9200: END IF;
9201:
9202: SAVEPOINT Get_Scan_Data_Details;
9203:
9215: , l_product_id;
9216: CLOSE csr_offer_profile;
9217:
9218: IF OZF_DEBUG_HIGH_ON THEN
9219: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9220: OZF_Utility_PVT.debug_message('l_offer_quantity = '||l_offer_quantity);
9221: OZF_Utility_PVT.debug_message('l_product_id = '||l_product_id);
9222: END IF;
9223: --Get offer details for which accruals need to associated with claim.
9216: CLOSE csr_offer_profile;
9217:
9218: IF OZF_DEBUG_HIGH_ON THEN
9219: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9220: OZF_Utility_PVT.debug_message('l_offer_quantity = '||l_offer_quantity);
9221: OZF_Utility_PVT.debug_message('l_product_id = '||l_product_id);
9222: END IF;
9223: --Get offer details for which accruals need to associated with claim.
9224: OPEN csr_offer_status(px_funds_util_flt.activity_id);
9217:
9218: IF OZF_DEBUG_HIGH_ON THEN
9219: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9220: OZF_Utility_PVT.debug_message('l_offer_quantity = '||l_offer_quantity);
9221: OZF_Utility_PVT.debug_message('l_product_id = '||l_product_id);
9222: END IF;
9223: --Get offer details for which accruals need to associated with claim.
9224: OPEN csr_offer_status(px_funds_util_flt.activity_id);
9225: FETCH csr_offer_status INTO l_offer_status,px_currency_rec.transaction_currency_code;
9234: --Assign Coupon Count
9235: l_asso_total_units := px_funds_util_flt.total_units;
9236:
9237: IF OZF_DEBUG_HIGH_ON THEN
9238: OZF_Utility_PVT.debug_message('px_funds_util_flt.quantity = '||px_funds_util_flt.quantity);
9239: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_units = '||px_funds_util_flt.total_units);
9240: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_amount = '||px_funds_util_flt.total_amount);
9241: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9242: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9235: l_asso_total_units := px_funds_util_flt.total_units;
9236:
9237: IF OZF_DEBUG_HIGH_ON THEN
9238: OZF_Utility_PVT.debug_message('px_funds_util_flt.quantity = '||px_funds_util_flt.quantity);
9239: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_units = '||px_funds_util_flt.total_units);
9240: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_amount = '||px_funds_util_flt.total_amount);
9241: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9242: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9243: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9236:
9237: IF OZF_DEBUG_HIGH_ON THEN
9238: OZF_Utility_PVT.debug_message('px_funds_util_flt.quantity = '||px_funds_util_flt.quantity);
9239: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_units = '||px_funds_util_flt.total_units);
9240: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_amount = '||px_funds_util_flt.total_amount);
9241: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9242: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9243: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9244: OZF_Utility_PVT.debug_message('G_SCAN_VALUE = '||G_SCAN_VALUE);
9237: IF OZF_DEBUG_HIGH_ON THEN
9238: OZF_Utility_PVT.debug_message('px_funds_util_flt.quantity = '||px_funds_util_flt.quantity);
9239: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_units = '||px_funds_util_flt.total_units);
9240: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_amount = '||px_funds_util_flt.total_amount);
9241: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9242: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9243: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9244: OZF_Utility_PVT.debug_message('G_SCAN_VALUE = '||G_SCAN_VALUE);
9245: END IF;
9238: OZF_Utility_PVT.debug_message('px_funds_util_flt.quantity = '||px_funds_util_flt.quantity);
9239: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_units = '||px_funds_util_flt.total_units);
9240: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_amount = '||px_funds_util_flt.total_amount);
9241: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9242: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9243: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9244: OZF_Utility_PVT.debug_message('G_SCAN_VALUE = '||G_SCAN_VALUE);
9245: END IF;
9246:
9239: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_units = '||px_funds_util_flt.total_units);
9240: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_amount = '||px_funds_util_flt.total_amount);
9241: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9242: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9243: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9244: OZF_Utility_PVT.debug_message('G_SCAN_VALUE = '||G_SCAN_VALUE);
9245: END IF;
9246:
9247: /*SCAN DATA Quantity Calculation:
9240: OZF_Utility_PVT.debug_message('px_funds_util_flt.total_amount = '||px_funds_util_flt.total_amount);
9241: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9242: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9243: OZF_Utility_PVT.debug_message('l_offer_uom_code = '||l_offer_uom_code);
9244: OZF_Utility_PVT.debug_message('G_SCAN_VALUE = '||G_SCAN_VALUE);
9245: END IF;
9246:
9247: /*SCAN DATA Quantity Calculation:
9248: If there is mismatch between UOM supplied to program unit and derived from offer, then convert
9347: END IF;
9348: END IF;
9349:
9350: IF OZF_DEBUG_HIGH_ON THEN
9351: OZF_Utility_PVT.debug_message('l_asso_total_quantity = '||l_asso_total_quantity);
9352: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9353: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9354: END IF;
9355:
9348: END IF;
9349:
9350: IF OZF_DEBUG_HIGH_ON THEN
9351: OZF_Utility_PVT.debug_message('l_asso_total_quantity = '||l_asso_total_quantity);
9352: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9353: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9354: END IF;
9355:
9356: px_funds_util_flt.total_units := l_asso_total_units;
9349:
9350: IF OZF_DEBUG_HIGH_ON THEN
9351: OZF_Utility_PVT.debug_message('l_asso_total_quantity = '||l_asso_total_quantity);
9352: OZF_Utility_PVT.debug_message('l_asso_total_units = '||l_asso_total_units);
9353: OZF_Utility_PVT.debug_message('l_asso_uom_code = '||l_asso_uom_code);
9354: END IF;
9355:
9356: px_funds_util_flt.total_units := l_asso_total_units;
9357: px_funds_util_flt.quantity := l_asso_total_quantity;
9358: px_funds_util_flt.uom_code := l_asso_uom_code;
9359: x_offer_quantity := l_offer_quantity;
9360:
9361: IF OZF_DEBUG_HIGH_ON THEN
9362: OZF_Utility_PVT.debug_message(l_full_name||': end');
9363: END IF;
9364:
9365: EXCEPTION
9366: WHEN FND_API.g_exc_error THEN
9446:
9447: BEGIN
9448:
9449: IF OZF_DEBUG_HIGH_ON THEN
9450: OZF_Utility_PVT.debug_message(l_full_name||': start');
9451: END IF;
9452:
9453: SAVEPOINT Get_Pay_Over_Amount;
9454:
9463: , l_acctd_amount_remaining;
9464: CLOSE c_util_dtls;
9465:
9466: IF OZF_DEBUG_HIGH_ON THEN
9467: OZF_Utility_PVT.debug_message('l_plan_currency_code = ' ||l_plan_currency_code);
9468: OZF_Utility_PVT.debug_message('l_plan_curr_amount_rem = ' ||l_plan_curr_amount_rem);
9469: OZF_Utility_PVT.debug_message('l_plan_curr_amount = ' ||l_plan_curr_amount);
9470: OZF_Utility_PVT.debug_message('l_acctd_amount_remaining = ' ||l_acctd_amount_remaining);
9471: END IF;*/
9464: CLOSE c_util_dtls;
9465:
9466: IF OZF_DEBUG_HIGH_ON THEN
9467: OZF_Utility_PVT.debug_message('l_plan_currency_code = ' ||l_plan_currency_code);
9468: OZF_Utility_PVT.debug_message('l_plan_curr_amount_rem = ' ||l_plan_curr_amount_rem);
9469: OZF_Utility_PVT.debug_message('l_plan_curr_amount = ' ||l_plan_curr_amount);
9470: OZF_Utility_PVT.debug_message('l_acctd_amount_remaining = ' ||l_acctd_amount_remaining);
9471: END IF;*/
9472:
9465:
9466: IF OZF_DEBUG_HIGH_ON THEN
9467: OZF_Utility_PVT.debug_message('l_plan_currency_code = ' ||l_plan_currency_code);
9468: OZF_Utility_PVT.debug_message('l_plan_curr_amount_rem = ' ||l_plan_curr_amount_rem);
9469: OZF_Utility_PVT.debug_message('l_plan_curr_amount = ' ||l_plan_curr_amount);
9470: OZF_Utility_PVT.debug_message('l_acctd_amount_remaining = ' ||l_acctd_amount_remaining);
9471: END IF;*/
9472:
9473: IF p_currency_rec.association_currency_code = p_currency_rec.transaction_currency_code THEN
9466: IF OZF_DEBUG_HIGH_ON THEN
9467: OZF_Utility_PVT.debug_message('l_plan_currency_code = ' ||l_plan_currency_code);
9468: OZF_Utility_PVT.debug_message('l_plan_curr_amount_rem = ' ||l_plan_curr_amount_rem);
9469: OZF_Utility_PVT.debug_message('l_plan_curr_amount = ' ||l_plan_curr_amount);
9470: OZF_Utility_PVT.debug_message('l_acctd_amount_remaining = ' ||l_acctd_amount_remaining);
9471: END IF;*/
9472:
9473: IF p_currency_rec.association_currency_code = p_currency_rec.transaction_currency_code THEN
9474: l_total_amt_rem := l_total_amt_rem + NVL(p_util(i).plan_curr_amount_remaining,0);
9503: x_pay_over_amount := 0; --kdass
9504: END IF;
9505:
9506: IF OZF_DEBUG_HIGH_ON THEN
9507: OZF_Utility_PVT.debug_message('l_exec_curr_amount_rem = ' || l_exec_curr_amount_rem);
9508: OZF_Utility_PVT.debug_message('l_total_amt_rem = ' || l_total_amt_rem);
9509: OZF_Utility_PVT.debug_message('p_claim_amt = ' || p_claim_amt);
9510: OZF_Utility_PVT.debug_message('x_pay_over_amount = ' || x_pay_over_amount);
9511: IF x_pay_over_flag THEN
9504: END IF;
9505:
9506: IF OZF_DEBUG_HIGH_ON THEN
9507: OZF_Utility_PVT.debug_message('l_exec_curr_amount_rem = ' || l_exec_curr_amount_rem);
9508: OZF_Utility_PVT.debug_message('l_total_amt_rem = ' || l_total_amt_rem);
9509: OZF_Utility_PVT.debug_message('p_claim_amt = ' || p_claim_amt);
9510: OZF_Utility_PVT.debug_message('x_pay_over_amount = ' || x_pay_over_amount);
9511: IF x_pay_over_flag THEN
9512: OZF_Utility_PVT.debug_message('x_pay_over_flag = TRUE');
9505:
9506: IF OZF_DEBUG_HIGH_ON THEN
9507: OZF_Utility_PVT.debug_message('l_exec_curr_amount_rem = ' || l_exec_curr_amount_rem);
9508: OZF_Utility_PVT.debug_message('l_total_amt_rem = ' || l_total_amt_rem);
9509: OZF_Utility_PVT.debug_message('p_claim_amt = ' || p_claim_amt);
9510: OZF_Utility_PVT.debug_message('x_pay_over_amount = ' || x_pay_over_amount);
9511: IF x_pay_over_flag THEN
9512: OZF_Utility_PVT.debug_message('x_pay_over_flag = TRUE');
9513: ELSE
9506: IF OZF_DEBUG_HIGH_ON THEN
9507: OZF_Utility_PVT.debug_message('l_exec_curr_amount_rem = ' || l_exec_curr_amount_rem);
9508: OZF_Utility_PVT.debug_message('l_total_amt_rem = ' || l_total_amt_rem);
9509: OZF_Utility_PVT.debug_message('p_claim_amt = ' || p_claim_amt);
9510: OZF_Utility_PVT.debug_message('x_pay_over_amount = ' || x_pay_over_amount);
9511: IF x_pay_over_flag THEN
9512: OZF_Utility_PVT.debug_message('x_pay_over_flag = TRUE');
9513: ELSE
9514: OZF_Utility_PVT.debug_message('x_pay_over_flag = FALSE');
9508: OZF_Utility_PVT.debug_message('l_total_amt_rem = ' || l_total_amt_rem);
9509: OZF_Utility_PVT.debug_message('p_claim_amt = ' || p_claim_amt);
9510: OZF_Utility_PVT.debug_message('x_pay_over_amount = ' || x_pay_over_amount);
9511: IF x_pay_over_flag THEN
9512: OZF_Utility_PVT.debug_message('x_pay_over_flag = TRUE');
9513: ELSE
9514: OZF_Utility_PVT.debug_message('x_pay_over_flag = FALSE');
9515: END IF;
9516: END IF;
9510: OZF_Utility_PVT.debug_message('x_pay_over_amount = ' || x_pay_over_amount);
9511: IF x_pay_over_flag THEN
9512: OZF_Utility_PVT.debug_message('x_pay_over_flag = TRUE');
9513: ELSE
9514: OZF_Utility_PVT.debug_message('x_pay_over_flag = FALSE');
9515: END IF;
9516: END IF;
9517:
9518: IF OZF_DEBUG_HIGH_ON THEN
9515: END IF;
9516: END IF;
9517:
9518: IF OZF_DEBUG_HIGH_ON THEN
9519: OZF_Utility_PVT.debug_message(l_full_name||': end');
9520: END IF;
9521:
9522: EXCEPTION
9523: WHEN FND_API.g_exc_error THEN
9662: --Set to handle rounding issue at Update_Fund_Utils
9663: G_ENTERED_AMOUNT := l_funds_util_flt.total_amount;
9664:
9665: IF OZF_DEBUG_HIGH_ON THEN
9666: OZF_Utility_PVT.debug_message(l_full_name||': start');
9667: END IF;
9668:
9669: IF FND_API.to_boolean(p_init_msg_list) THEN
9670: FND_MSG_PUB.initialize;
9773: IF l_funds_util_flt.utiz_currency_code IS NOT NULL THEN
9774: l_currency_rec.transaction_currency_code := l_funds_util_flt.utiz_currency_code;
9775: END IF;
9776: IF OZF_DEBUG_HIGH_ON THEN
9777: ozf_utility_pvt.debug_message('l_funds_util_flt.utiz_currency_code = '||l_funds_util_flt.utiz_currency_code);
9778: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9779: END IF;
9780: END IF;
9781:
9774: l_currency_rec.transaction_currency_code := l_funds_util_flt.utiz_currency_code;
9775: END IF;
9776: IF OZF_DEBUG_HIGH_ON THEN
9777: ozf_utility_pvt.debug_message('l_funds_util_flt.utiz_currency_code = '||l_funds_util_flt.utiz_currency_code);
9778: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9779: END IF;
9780: END IF;
9781:
9782: --Get claim details of claim for which association is taking place.
9803:
9804: --Set UNIVERSAL currency from profile.
9805: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
9806: IF OZF_DEBUG_HIGH_ON THEN
9807: ozf_utility_pvt.debug_message('Year Name = '||l_funds_util_flt.year_name);
9808: ozf_utility_pvt.debug_message('Activity Type Passed from UI = '||l_funds_util_flt.activity_type);
9809: ozf_utility_pvt.debug_message('l_claim_status = '||l_claim_status);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9804: --Set UNIVERSAL currency from profile.
9805: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
9806: IF OZF_DEBUG_HIGH_ON THEN
9807: ozf_utility_pvt.debug_message('Year Name = '||l_funds_util_flt.year_name);
9808: ozf_utility_pvt.debug_message('Activity Type Passed from UI = '||l_funds_util_flt.activity_type);
9809: ozf_utility_pvt.debug_message('l_claim_status = '||l_claim_status);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9805: l_currency_rec.universal_currency_code := FND_PROFILE.VALUE('OZF_TP_COMMON_CURRENCY');
9806: IF OZF_DEBUG_HIGH_ON THEN
9807: ozf_utility_pvt.debug_message('Year Name = '||l_funds_util_flt.year_name);
9808: ozf_utility_pvt.debug_message('Activity Type Passed from UI = '||l_funds_util_flt.activity_type);
9809: ozf_utility_pvt.debug_message('l_claim_status = '||l_claim_status);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9806: IF OZF_DEBUG_HIGH_ON THEN
9807: ozf_utility_pvt.debug_message('Year Name = '||l_funds_util_flt.year_name);
9808: ozf_utility_pvt.debug_message('Activity Type Passed from UI = '||l_funds_util_flt.activity_type);
9809: ozf_utility_pvt.debug_message('l_claim_status = '||l_claim_status);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9807: ozf_utility_pvt.debug_message('Year Name = '||l_funds_util_flt.year_name);
9808: ozf_utility_pvt.debug_message('Activity Type Passed from UI = '||l_funds_util_flt.activity_type);
9809: ozf_utility_pvt.debug_message('l_claim_status = '||l_claim_status);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9808: ozf_utility_pvt.debug_message('Activity Type Passed from UI = '||l_funds_util_flt.activity_type);
9809: ozf_utility_pvt.debug_message('l_claim_status = '||l_claim_status);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9809: ozf_utility_pvt.debug_message('l_claim_status = '||l_claim_status);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9810: ozf_utility_pvt.debug_message('l_claim_date = '||l_claim_date);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9811: ozf_utility_pvt.debug_message('l_claim_exc_type = '||l_claim_exc_type);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9812: ozf_utility_pvt.debug_message('l_claim_exc_date = '||l_claim_exc_date);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9813: ozf_utility_pvt.debug_message('l_claim_exc_rate = '||l_claim_exc_rate);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9821: ozf_utility_pvt.debug_message('l_org_id = '||l_org_id);
9814: ozf_utility_pvt.debug_message('l_source_object_id = '||l_source_object_id);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9821: ozf_utility_pvt.debug_message('l_org_id = '||l_org_id);
9822: ozf_utility_pvt.debug_message('Passed Association Amount = '||l_funds_util_flt.total_amount);
9815: ozf_utility_pvt.debug_message('l_source_object_class = '||l_source_object_class);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9821: ozf_utility_pvt.debug_message('l_org_id = '||l_org_id);
9822: ozf_utility_pvt.debug_message('Passed Association Amount = '||l_funds_util_flt.total_amount);
9823: ozf_utility_pvt.debug_message('Existing Association Amount = '||l_funds_util_flt.old_total_amount);
9816: ozf_utility_pvt.debug_message('l_request_header_id = '||l_request_header_id);
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9821: ozf_utility_pvt.debug_message('l_org_id = '||l_org_id);
9822: ozf_utility_pvt.debug_message('Passed Association Amount = '||l_funds_util_flt.total_amount);
9823: ozf_utility_pvt.debug_message('Existing Association Amount = '||l_funds_util_flt.old_total_amount);
9824: END IF;
9817: ozf_utility_pvt.debug_message('l_batch_line_id = '||l_batch_line_id);
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9821: ozf_utility_pvt.debug_message('l_org_id = '||l_org_id);
9822: ozf_utility_pvt.debug_message('Passed Association Amount = '||l_funds_util_flt.total_amount);
9823: ozf_utility_pvt.debug_message('Existing Association Amount = '||l_funds_util_flt.old_total_amount);
9824: END IF;
9825:
9818: ozf_utility_pvt.debug_message('l_batch_type = '||l_batch_type);
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9821: ozf_utility_pvt.debug_message('l_org_id = '||l_org_id);
9822: ozf_utility_pvt.debug_message('Passed Association Amount = '||l_funds_util_flt.total_amount);
9823: ozf_utility_pvt.debug_message('Existing Association Amount = '||l_funds_util_flt.old_total_amount);
9824: END IF;
9825:
9826: --Raise error, if claim is not OPEN status and associate earnings is happening.
9819: ozf_utility_pvt.debug_message('l_created_from = '||l_created_from);
9820: ozf_utility_pvt.debug_message('p_summary_view = '||p_summary_view);
9821: ozf_utility_pvt.debug_message('l_org_id = '||l_org_id);
9822: ozf_utility_pvt.debug_message('Passed Association Amount = '||l_funds_util_flt.total_amount);
9823: ozf_utility_pvt.debug_message('Existing Association Amount = '||l_funds_util_flt.old_total_amount);
9824: END IF;
9825:
9826: --Raise error, if claim is not OPEN status and associate earnings is happening.
9827: IF l_claim_status <> 'OPEN' THEN
9833: END IF;
9834:
9835:
9836: IF OZF_DEBUG_HIGH_ON THEN
9837: ozf_utility_pvt.debug_message('l_prorate_earnings_flag = '||l_prorate_earnings_flag);
9838: ozf_utility_pvt.debug_message('l_funds_util_flt.offer_type = '||l_funds_util_flt.offer_type);
9839: ozf_utility_pvt.debug_message('l_funds_util_flt.old_total_amount = '||l_funds_util_flt.old_total_amount);
9840: END IF;
9841:
9834:
9835:
9836: IF OZF_DEBUG_HIGH_ON THEN
9837: ozf_utility_pvt.debug_message('l_prorate_earnings_flag = '||l_prorate_earnings_flag);
9838: ozf_utility_pvt.debug_message('l_funds_util_flt.offer_type = '||l_funds_util_flt.offer_type);
9839: ozf_utility_pvt.debug_message('l_funds_util_flt.old_total_amount = '||l_funds_util_flt.old_total_amount);
9840: END IF;
9841:
9842: l_original_total_amount :=l_funds_util_flt.total_amount;
9835:
9836: IF OZF_DEBUG_HIGH_ON THEN
9837: ozf_utility_pvt.debug_message('l_prorate_earnings_flag = '||l_prorate_earnings_flag);
9838: ozf_utility_pvt.debug_message('l_funds_util_flt.offer_type = '||l_funds_util_flt.offer_type);
9839: ozf_utility_pvt.debug_message('l_funds_util_flt.old_total_amount = '||l_funds_util_flt.old_total_amount);
9840: END IF;
9841:
9842: l_original_total_amount :=l_funds_util_flt.total_amount;
9843:
9841:
9842: l_original_total_amount :=l_funds_util_flt.total_amount;
9843:
9844: IF OZF_DEBUG_HIGH_ON THEN
9845: ozf_utility_pvt.debug_message('l_funds_util_flt.total_units = '||l_funds_util_flt.total_units);
9846: ozf_utility_pvt.debug_message('l_funds_util_flt.quantity = '||l_funds_util_flt.quantity );
9847: ozf_utility_pvt.debug_message('l_funds_util_flt.total_amount = '||l_funds_util_flt.total_amount);
9848: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9849: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
9842: l_original_total_amount :=l_funds_util_flt.total_amount;
9843:
9844: IF OZF_DEBUG_HIGH_ON THEN
9845: ozf_utility_pvt.debug_message('l_funds_util_flt.total_units = '||l_funds_util_flt.total_units);
9846: ozf_utility_pvt.debug_message('l_funds_util_flt.quantity = '||l_funds_util_flt.quantity );
9847: ozf_utility_pvt.debug_message('l_funds_util_flt.total_amount = '||l_funds_util_flt.total_amount);
9848: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9849: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
9850: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
9843:
9844: IF OZF_DEBUG_HIGH_ON THEN
9845: ozf_utility_pvt.debug_message('l_funds_util_flt.total_units = '||l_funds_util_flt.total_units);
9846: ozf_utility_pvt.debug_message('l_funds_util_flt.quantity = '||l_funds_util_flt.quantity );
9847: ozf_utility_pvt.debug_message('l_funds_util_flt.total_amount = '||l_funds_util_flt.total_amount);
9848: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9849: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
9850: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
9851: END IF;
9844: IF OZF_DEBUG_HIGH_ON THEN
9845: ozf_utility_pvt.debug_message('l_funds_util_flt.total_units = '||l_funds_util_flt.total_units);
9846: ozf_utility_pvt.debug_message('l_funds_util_flt.quantity = '||l_funds_util_flt.quantity );
9847: ozf_utility_pvt.debug_message('l_funds_util_flt.total_amount = '||l_funds_util_flt.total_amount);
9848: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9849: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
9850: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
9851: END IF;
9852:
9845: ozf_utility_pvt.debug_message('l_funds_util_flt.total_units = '||l_funds_util_flt.total_units);
9846: ozf_utility_pvt.debug_message('l_funds_util_flt.quantity = '||l_funds_util_flt.quantity );
9847: ozf_utility_pvt.debug_message('l_funds_util_flt.total_amount = '||l_funds_util_flt.total_amount);
9848: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9849: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
9850: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
9851: END IF;
9852:
9853: --Association can be done in either TRANSACTIONAL currency or FUNCTIONAL currency. We will set GLOBAL variable
9846: ozf_utility_pvt.debug_message('l_funds_util_flt.quantity = '||l_funds_util_flt.quantity );
9847: ozf_utility_pvt.debug_message('l_funds_util_flt.total_amount = '||l_funds_util_flt.total_amount);
9848: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code = '||l_currency_rec.transaction_currency_code);
9849: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code = '||l_currency_rec.claim_currency_code);
9850: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code = '||l_currency_rec.functional_currency_code);
9851: END IF;
9852:
9853: --Association can be done in either TRANSACTIONAL currency or FUNCTIONAL currency. We will set GLOBAL variable
9854: --G_ASSO_CURRENCY accordingly, so that entire association will be in single known currency and we need NOT to
9862: IF l_funds_util_flt.total_amount IS NOT NULL AND l_funds_util_flt.total_amount <> 0 THEN
9863: l_currency_rec.association_currency_code := l_currency_rec.functional_currency_code;
9864:
9865: IF l_currency_rec.claim_currency_code <> l_currency_rec.functional_currency_code THEN
9866: OZF_UTILITY_PVT.Convert_Currency ( p_from_currency => l_currency_rec.claim_currency_code
9867: , p_to_currency => l_currency_rec.functional_currency_code
9868: , p_conv_type => l_claim_exc_type
9869: , p_conv_rate => l_claim_exc_rate
9870: , p_conv_date => l_claim_exc_date
9881: END IF;
9882: --ninarasi fix for bug 14089950
9883: --do not round the amount for scandata because it is units and quantity gets recalculated again in Populate_Line_Util_Tbl
9884: IF l_asso_amount IS NOT NULL AND l_funds_util_flt.offer_type <> 'SCAN_DATA' THEN
9885: l_asso_amount := OZF_UTILITY_PVT.CurrRound(l_asso_amount, l_currency_rec.association_currency_code);
9886: END IF;
9887: ELSE
9888: l_asso_amount := l_funds_util_flt.total_amount;
9889: END IF;
9892: END IF;
9893:
9894: IF l_funds_util_flt.old_total_amount IS NOT NULL AND l_funds_util_flt.old_total_amount <> 0 THEN
9895: IF l_currency_rec.claim_currency_code <> l_currency_rec.association_currency_code THEN
9896: OZF_UTILITY_PVT.Convert_Currency ( p_from_currency => l_currency_rec.claim_currency_code
9897: , p_to_currency => l_currency_rec.functional_currency_code
9898: , p_conv_type => l_claim_exc_type
9899: , p_conv_rate => l_claim_exc_rate
9900: , p_conv_date => l_claim_exc_date
9909: ELSIF l_return_status = FND_API.g_ret_sts_unexp_error THEN
9910: RAISE FND_API.g_exc_error;
9911: END IF;
9912: IF l_exists_asso_amount IS NOT NULL THEN
9913: l_exists_asso_amount := OZF_UTILITY_PVT.CurrRound(l_exists_asso_amount, l_currency_rec.association_currency_code);
9914: END IF;
9915: ELSE
9916: l_exists_asso_amount := l_funds_util_flt.old_total_amount;
9917: END IF;
9922: l_net_asso_amount := NVL(ABS(l_asso_amount), 0) - NVL(ABS(l_exists_asso_amount),0);
9923: END IF;
9924:
9925: IF l_net_asso_amount IS NOT NULL THEN
9926: l_net_asso_amount := OZF_UTILITY_PVT.CurrRound(l_net_asso_amount, l_currency_rec.association_currency_code);
9927: END IF;
9928:
9929: IF OZF_DEBUG_HIGH_ON THEN
9930: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
9926: l_net_asso_amount := OZF_UTILITY_PVT.CurrRound(l_net_asso_amount, l_currency_rec.association_currency_code);
9927: END IF;
9928:
9929: IF OZF_DEBUG_HIGH_ON THEN
9930: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
9931: ozf_utility_pvt.debug_message('l_asso_amount = '||l_asso_amount);
9932: ozf_utility_pvt.debug_message('l_exists_asso_amount = '||l_exists_asso_amount);
9933: ozf_utility_pvt.debug_message('l_net_asso_amount = '||l_net_asso_amount);
9934: END IF;
9927: END IF;
9928:
9929: IF OZF_DEBUG_HIGH_ON THEN
9930: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
9931: ozf_utility_pvt.debug_message('l_asso_amount = '||l_asso_amount);
9932: ozf_utility_pvt.debug_message('l_exists_asso_amount = '||l_exists_asso_amount);
9933: ozf_utility_pvt.debug_message('l_net_asso_amount = '||l_net_asso_amount);
9934: END IF;
9935:
9928:
9929: IF OZF_DEBUG_HIGH_ON THEN
9930: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
9931: ozf_utility_pvt.debug_message('l_asso_amount = '||l_asso_amount);
9932: ozf_utility_pvt.debug_message('l_exists_asso_amount = '||l_exists_asso_amount);
9933: ozf_utility_pvt.debug_message('l_net_asso_amount = '||l_net_asso_amount);
9934: END IF;
9935:
9936: /* Prorate Condition:
9929: IF OZF_DEBUG_HIGH_ON THEN
9930: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code = '||l_currency_rec.association_currency_code);
9931: ozf_utility_pvt.debug_message('l_asso_amount = '||l_asso_amount);
9932: ozf_utility_pvt.debug_message('l_exists_asso_amount = '||l_exists_asso_amount);
9933: ozf_utility_pvt.debug_message('l_net_asso_amount = '||l_net_asso_amount);
9934: END IF;
9935:
9936: /* Prorate Condition:
9937: If prorate flag is set, then identify all the qualified utilizations for current association
9982: END IF;
9983: l_create_util := FALSE;
9984: ELSE
9985: l_cre_util_amount := NVL(l_asso_amount, 0) - NVL(l_exists_asso_amount ,0);
9986: l_cre_util_amount := OZF_UTILITY_PVT.CurrRound(l_cre_util_amount, l_currency_rec.association_currency_code);
9987: END IF;
9988: END IF;
9989:
9990: IF OZF_DEBUG_HIGH_ON THEN
9987: END IF;
9988: END IF;
9989:
9990: IF OZF_DEBUG_HIGH_ON THEN
9991: ozf_utility_pvt.debug_message('l_cre_util_amount = '||l_cre_util_amount);
9992: IF l_create_util THEN
9993: ozf_utility_pvt.debug_message('l_create_util = TRUE');
9994: ELSE
9995: ozf_utility_pvt.debug_message('l_create_util = FALSE');
9989:
9990: IF OZF_DEBUG_HIGH_ON THEN
9991: ozf_utility_pvt.debug_message('l_cre_util_amount = '||l_cre_util_amount);
9992: IF l_create_util THEN
9993: ozf_utility_pvt.debug_message('l_create_util = TRUE');
9994: ELSE
9995: ozf_utility_pvt.debug_message('l_create_util = FALSE');
9996: END IF;
9997: END IF;
9991: ozf_utility_pvt.debug_message('l_cre_util_amount = '||l_cre_util_amount);
9992: IF l_create_util THEN
9993: ozf_utility_pvt.debug_message('l_create_util = TRUE');
9994: ELSE
9995: ozf_utility_pvt.debug_message('l_create_util = FALSE');
9996: END IF;
9997: END IF;
9998:
9999: /* Associate Earnings:
10069: END IF;
10070:
10071: IF OZF_DEBUG_HIGH_ON THEN
10072: IF l_pay_over_flag THEN
10073: OZF_Utility_PVT.debug_message('l_pay_over_flag = TRUE');
10074: ELSE
10075: OZF_Utility_PVT.debug_message('l_pay_over_flag = FALSE');
10076: END IF;
10077: OZF_Utility_PVT.debug_message('l_claim_amt = '||l_claim_amt);
10071: IF OZF_DEBUG_HIGH_ON THEN
10072: IF l_pay_over_flag THEN
10073: OZF_Utility_PVT.debug_message('l_pay_over_flag = TRUE');
10074: ELSE
10075: OZF_Utility_PVT.debug_message('l_pay_over_flag = FALSE');
10076: END IF;
10077: OZF_Utility_PVT.debug_message('l_claim_amt = '||l_claim_amt);
10078: OZF_Utility_PVT.debug_message('l_cre_util_amount = '||l_cre_util_amount);
10079: OZF_Utility_PVT.debug_message('l_pay_over_amount = '||l_pay_over_amount);
10073: OZF_Utility_PVT.debug_message('l_pay_over_flag = TRUE');
10074: ELSE
10075: OZF_Utility_PVT.debug_message('l_pay_over_flag = FALSE');
10076: END IF;
10077: OZF_Utility_PVT.debug_message('l_claim_amt = '||l_claim_amt);
10078: OZF_Utility_PVT.debug_message('l_cre_util_amount = '||l_cre_util_amount);
10079: OZF_Utility_PVT.debug_message('l_pay_over_amount = '||l_pay_over_amount);
10080: OZF_Utility_PVT.debug_message('l_tot_accrual_amt = '|| NVL(l_tot_accrual_amt,0));
10081: OZF_Utility_PVT.debug_message('l_new_line_amount = '|| NVL(l_new_line_amount,0));
10074: ELSE
10075: OZF_Utility_PVT.debug_message('l_pay_over_flag = FALSE');
10076: END IF;
10077: OZF_Utility_PVT.debug_message('l_claim_amt = '||l_claim_amt);
10078: OZF_Utility_PVT.debug_message('l_cre_util_amount = '||l_cre_util_amount);
10079: OZF_Utility_PVT.debug_message('l_pay_over_amount = '||l_pay_over_amount);
10080: OZF_Utility_PVT.debug_message('l_tot_accrual_amt = '|| NVL(l_tot_accrual_amt,0));
10081: OZF_Utility_PVT.debug_message('l_new_line_amount = '|| NVL(l_new_line_amount,0));
10082: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.count = '|| l_funds_rem_tbl.count);
10075: OZF_Utility_PVT.debug_message('l_pay_over_flag = FALSE');
10076: END IF;
10077: OZF_Utility_PVT.debug_message('l_claim_amt = '||l_claim_amt);
10078: OZF_Utility_PVT.debug_message('l_cre_util_amount = '||l_cre_util_amount);
10079: OZF_Utility_PVT.debug_message('l_pay_over_amount = '||l_pay_over_amount);
10080: OZF_Utility_PVT.debug_message('l_tot_accrual_amt = '|| NVL(l_tot_accrual_amt,0));
10081: OZF_Utility_PVT.debug_message('l_new_line_amount = '|| NVL(l_new_line_amount,0));
10082: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.count = '|| l_funds_rem_tbl.count);
10083: END IF;
10076: END IF;
10077: OZF_Utility_PVT.debug_message('l_claim_amt = '||l_claim_amt);
10078: OZF_Utility_PVT.debug_message('l_cre_util_amount = '||l_cre_util_amount);
10079: OZF_Utility_PVT.debug_message('l_pay_over_amount = '||l_pay_over_amount);
10080: OZF_Utility_PVT.debug_message('l_tot_accrual_amt = '|| NVL(l_tot_accrual_amt,0));
10081: OZF_Utility_PVT.debug_message('l_new_line_amount = '|| NVL(l_new_line_amount,0));
10082: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.count = '|| l_funds_rem_tbl.count);
10083: END IF;
10084:
10077: OZF_Utility_PVT.debug_message('l_claim_amt = '||l_claim_amt);
10078: OZF_Utility_PVT.debug_message('l_cre_util_amount = '||l_cre_util_amount);
10079: OZF_Utility_PVT.debug_message('l_pay_over_amount = '||l_pay_over_amount);
10080: OZF_Utility_PVT.debug_message('l_tot_accrual_amt = '|| NVL(l_tot_accrual_amt,0));
10081: OZF_Utility_PVT.debug_message('l_new_line_amount = '|| NVL(l_new_line_amount,0));
10082: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.count = '|| l_funds_rem_tbl.count);
10083: END IF;
10084:
10085: IF (l_pay_over_flag OR (p_summary_view <> 'ACTIVITY' AND (l_cre_util_amount > 0 and l_cre_util_amount > l_tot_accrual_amt)) OR (p_summary_view <> 'ACTIVITY' AND NVL(l_tot_accrual_amt,0) = 0)) THEN --ninarasi fix for bug 14611756
10078: OZF_Utility_PVT.debug_message('l_cre_util_amount = '||l_cre_util_amount);
10079: OZF_Utility_PVT.debug_message('l_pay_over_amount = '||l_pay_over_amount);
10080: OZF_Utility_PVT.debug_message('l_tot_accrual_amt = '|| NVL(l_tot_accrual_amt,0));
10081: OZF_Utility_PVT.debug_message('l_new_line_amount = '|| NVL(l_new_line_amount,0));
10082: OZF_Utility_PVT.debug_message('l_funds_rem_tbl.count = '|| l_funds_rem_tbl.count);
10083: END IF;
10084:
10085: IF (l_pay_over_flag OR (p_summary_view <> 'ACTIVITY' AND (l_cre_util_amount > 0 and l_cre_util_amount > l_tot_accrual_amt)) OR (p_summary_view <> 'ACTIVITY' AND NVL(l_tot_accrual_amt,0) = 0)) THEN --ninarasi fix for bug 14611756
10086: Validate_Over_Utilization(
10178: p_data => x_msg_data
10179: );
10180:
10181: IF OZF_DEBUG_HIGH_ON THEN
10182: OZF_Utility_PVT.debug_message(l_full_name ||': end');
10183: END IF;
10184:
10185: EXCEPTION
10186: WHEN FND_API.g_exc_error THEN
10462: --------------------- initialize -----------------------
10463: SAVEPOINT Delete_Group_Line_Util;
10464:
10465: IF OZF_DEBUG_HIGH_ON THEN
10466: OZF_Utility_PVT.debug_message(l_full_name||': start');
10467: END IF;
10468:
10469: IF FND_API.to_boolean(p_init_msg_list) THEN
10470: FND_MSG_PUB.initialize;
10510: l_currency_rec.association_currency_code := l_currency_rec.functional_currency_code;
10511: END IF;
10512:
10513: IF OZF_DEBUG_HIGH_ON THEN
10514: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
10515: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
10516: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
10517: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
10518: END IF;
10511: END IF;
10512:
10513: IF OZF_DEBUG_HIGH_ON THEN
10514: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
10515: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
10516: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
10517: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
10518: END IF;
10519: -- Modified for FXGL ER
10512:
10513: IF OZF_DEBUG_HIGH_ON THEN
10514: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
10515: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
10516: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
10517: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
10518: END IF;
10519: -- Modified for FXGL ER
10520: -- deletion also to take place in amount and not acctd_amount
10513: IF OZF_DEBUG_HIGH_ON THEN
10514: ozf_utility_pvt.debug_message('l_currency_rec.claim_currency_code :' || l_currency_rec.claim_currency_code);
10515: ozf_utility_pvt.debug_message('l_currency_rec.transaction_currency_code :' || l_currency_rec.transaction_currency_code);
10516: ozf_utility_pvt.debug_message('l_currency_rec.association_currency_code :' || l_currency_rec.association_currency_code);
10517: ozf_utility_pvt.debug_message('l_currency_rec.functional_currency_code :' || l_currency_rec.functional_currency_code);
10518: END IF;
10519: -- Modified for FXGL ER
10520: -- deletion also to take place in amount and not acctd_amount
10521:
10520: -- deletion also to take place in amount and not acctd_amount
10521:
10522: --------------------- start -----------------------
10523: l_del_total_amount := NVL(l_funds_util_flt.old_total_amount, 0) - NVL(l_funds_util_flt.total_amount ,0);
10524: l_del_total_amount := OZF_UTILITY_PVT.CurrRound(l_del_total_amount, l_currency_rec.claim_currency_code);
10525: l_del_total_units := NVL(l_funds_util_flt.old_total_units, 0) - NVL(l_funds_util_flt.total_units, 0);
10526:
10527: ------------ reduce the over-utilization first ---------
10528: IF p_funds_util_flt.offer_type = 'SCAN_DATA' THEN
10657: FETCH csr_utiz_amount INTO l_utiz_amount;
10658: CLOSE csr_utiz_amount;
10659:
10660: IF OZF_DEBUG_LOW_ON THEN
10661: OZF_Utility_PVT.debug_message('l_lu_line_util_id. : '||l_lu_line_util_id);
10662: OZF_Utility_PVT.debug_message('l_lu_utilization_id. : '||l_lu_utilization_id);
10663: OZF_Utility_PVT.debug_message('l_lu_amt. : '||l_lu_amt);
10664: OZF_Utility_PVT.debug_message('l_utiz_amount. : '||l_utiz_amount);
10665: OZF_Utility_PVT.debug_message('l_del_total_amount. : '||l_del_total_amount);
10658: CLOSE csr_utiz_amount;
10659:
10660: IF OZF_DEBUG_LOW_ON THEN
10661: OZF_Utility_PVT.debug_message('l_lu_line_util_id. : '||l_lu_line_util_id);
10662: OZF_Utility_PVT.debug_message('l_lu_utilization_id. : '||l_lu_utilization_id);
10663: OZF_Utility_PVT.debug_message('l_lu_amt. : '||l_lu_amt);
10664: OZF_Utility_PVT.debug_message('l_utiz_amount. : '||l_utiz_amount);
10665: OZF_Utility_PVT.debug_message('l_del_total_amount. : '||l_del_total_amount);
10666: END IF;
10659:
10660: IF OZF_DEBUG_LOW_ON THEN
10661: OZF_Utility_PVT.debug_message('l_lu_line_util_id. : '||l_lu_line_util_id);
10662: OZF_Utility_PVT.debug_message('l_lu_utilization_id. : '||l_lu_utilization_id);
10663: OZF_Utility_PVT.debug_message('l_lu_amt. : '||l_lu_amt);
10664: OZF_Utility_PVT.debug_message('l_utiz_amount. : '||l_utiz_amount);
10665: OZF_Utility_PVT.debug_message('l_del_total_amount. : '||l_del_total_amount);
10666: END IF;
10667:
10660: IF OZF_DEBUG_LOW_ON THEN
10661: OZF_Utility_PVT.debug_message('l_lu_line_util_id. : '||l_lu_line_util_id);
10662: OZF_Utility_PVT.debug_message('l_lu_utilization_id. : '||l_lu_utilization_id);
10663: OZF_Utility_PVT.debug_message('l_lu_amt. : '||l_lu_amt);
10664: OZF_Utility_PVT.debug_message('l_utiz_amount. : '||l_utiz_amount);
10665: OZF_Utility_PVT.debug_message('l_del_total_amount. : '||l_del_total_amount);
10666: END IF;
10667:
10668: IF p_funds_util_flt.total_amount IS NULL THEN
10661: OZF_Utility_PVT.debug_message('l_lu_line_util_id. : '||l_lu_line_util_id);
10662: OZF_Utility_PVT.debug_message('l_lu_utilization_id. : '||l_lu_utilization_id);
10663: OZF_Utility_PVT.debug_message('l_lu_amt. : '||l_lu_amt);
10664: OZF_Utility_PVT.debug_message('l_utiz_amount. : '||l_utiz_amount);
10665: OZF_Utility_PVT.debug_message('l_del_total_amount. : '||l_del_total_amount);
10666: END IF;
10667:
10668: IF p_funds_util_flt.total_amount IS NULL THEN
10669: l_line_util_tbl(l_counter).claim_line_util_id := l_lu_line_util_id;
10727: END IF;
10728:
10729: LOOP
10730: IF l_line_util_tbl(i).claim_line_util_id IS NOT NULL THEN
10731: ozf_utility_pvt.debug_message('kd: calling Del_Line_Util_By_Group');
10732: Del_Line_Util_By_Group(
10733: x_return_status => l_return_status
10734: ,x_msg_count => x_msg_count
10735: ,x_msg_data => x_msg_data
10845: p_data => x_msg_data
10846: );
10847:
10848: IF OZF_DEBUG_HIGH_ON THEN
10849: OZF_Utility_PVT.debug_message(l_full_name ||': end');
10850: END IF;
10851:
10852: EXCEPTION
10853: WHEN FND_API.g_exc_error THEN
10962: ----------------------- initialize --------------------
10963: SAVEPOINT Update_Dummy_Utilizations;
10964:
10965: IF OZF_DEBUG_HIGH_ON THEN
10966: OZF_Utility_PVT.debug_message(l_full_name||': start');
10967: END IF;
10968:
10969: IF FND_API.to_boolean(p_init_msg_list) THEN
10970: FND_MSG_PUB.initialize;
11085: p_data => x_msg_data
11086: );
11087:
11088: IF OZF_DEBUG_HIGH_ON THEN
11089: OZF_Utility_PVT.debug_message(l_full_name ||': end');
11090: END IF;
11091:
11092: EXCEPTION
11093: WHEN FND_API.g_exc_error THEN
11216: ----------------------- initialize --------------------
11217: SAVEPOINT Adjust_Fund_Utilization;
11218:
11219: IF OZF_DEBUG_HIGH_ON THEN
11220: OZF_Utility_PVT.debug_message(l_full_name||': start');
11221: END IF;
11222:
11223: IF FND_API.to_boolean(p_init_msg_list) THEN
11224: FND_MSG_PUB.initialize;
11351: p_data => x_msg_data
11352: );
11353:
11354: IF OZF_DEBUG_HIGH_ON THEN
11355: OZF_Utility_PVT.debug_message(l_full_name ||': end');
11356: END IF;
11357:
11358: EXCEPTION
11359: WHEN FND_API.g_exc_error THEN
11434: CLOSE csr_funds_util_details;
11435:
11436:
11437: IF p_line_util_rec.exchange_rate <> l_fu_exc_rate AND l_fu_exc_rate IS NOT NULL THEN
11438: OZF_UTILITY_PVT.Convert_Currency(
11439: p_from_currency => p_currency_rec.transaction_currency_code
11440: ,p_to_currency => p_currency_rec.functional_currency_code
11441: ,p_conv_type => l_fu_exc_type
11442: ,p_conv_date => l_fu_exc_date
12168: --------------------- initialize -----------------------
12169: SAVEPOINT Initiate_SD_Payment;
12170:
12171: IF OZF_DEBUG_HIGH_ON THEN
12172: OZF_Utility_PVT.debug_message(l_full_name||': start');
12173: OZF_Utility_PVT.debug_message('p_ship_debit_id : '||p_ship_debit_id);
12174: OZF_Utility_PVT.debug_message('p_ship_debit_type : '||p_ship_debit_type);
12175: END IF;
12176:
12169: SAVEPOINT Initiate_SD_Payment;
12170:
12171: IF OZF_DEBUG_HIGH_ON THEN
12172: OZF_Utility_PVT.debug_message(l_full_name||': start');
12173: OZF_Utility_PVT.debug_message('p_ship_debit_id : '||p_ship_debit_id);
12174: OZF_Utility_PVT.debug_message('p_ship_debit_type : '||p_ship_debit_type);
12175: END IF;
12176:
12177: IF FND_API.to_boolean(p_init_msg_list) THEN
12170:
12171: IF OZF_DEBUG_HIGH_ON THEN
12172: OZF_Utility_PVT.debug_message(l_full_name||': start');
12173: OZF_Utility_PVT.debug_message('p_ship_debit_id : '||p_ship_debit_id);
12174: OZF_Utility_PVT.debug_message('p_ship_debit_type : '||p_ship_debit_type);
12175: END IF;
12176:
12177: IF FND_API.to_boolean(p_init_msg_list) THEN
12178: FND_MSG_PUB.initialize;
12216:
12217: --For supplied request, get customer account/bill to site combinations of
12218: --qualified accruals
12219: IF OZF_DEBUG_HIGH_ON THEN
12220: OZF_Utility_PVT.debug_message('bill_to_site_id duplicate check verification on following cust_account_id/bill_to_site_id');
12221: END IF;
12222:
12223: OPEN csr_request_header(p_ship_debit_id);
12224: LOOP
12227:
12228: EXIT WHEN csr_request_header%NOTFOUND;
12229:
12230: IF OZF_DEBUG_HIGH_ON THEN
12231: OZF_Utility_PVT.debug_message('cust_account_id : '||l_cust_util_tbl(l_counter).cust_account_id);
12232: OZF_Utility_PVT.debug_message('bill_to_site_id : '||l_cust_util_tbl(l_counter).bill_to_site_id);
12233: END IF;
12234:
12235: l_counter := l_counter + 1;
12228: EXIT WHEN csr_request_header%NOTFOUND;
12229:
12230: IF OZF_DEBUG_HIGH_ON THEN
12231: OZF_Utility_PVT.debug_message('cust_account_id : '||l_cust_util_tbl(l_counter).cust_account_id);
12232: OZF_Utility_PVT.debug_message('bill_to_site_id : '||l_cust_util_tbl(l_counter).bill_to_site_id);
12233: END IF;
12234:
12235: l_counter := l_counter + 1;
12236: END LOOP;
12256: --claim number defined in batch header. If claim number doesn't exists, system
12257: --will use default claim number generation mechanism.
12258:
12259: IF OZF_DEBUG_HIGH_ON THEN
12260: OZF_Utility_PVT.debug_message('bill_to_site_id duplicate check verification on following cust_account_id/bill_to_site_id');
12261: END IF;
12262:
12263: OPEN csr_batch_header(p_ship_debit_id);
12264: LOOP
12267: , l_cust_util_tbl(l_counter).claim_number;
12268: EXIT WHEN csr_batch_header%NOTFOUND;
12269:
12270: IF OZF_DEBUG_HIGH_ON THEN
12271: OZF_Utility_PVT.debug_message('cust_account_id : '||l_cust_util_tbl(l_counter).cust_account_id);
12272: OZF_Utility_PVT.debug_message('bill_to_site_id : '||l_cust_util_tbl(l_counter).bill_to_site_id);
12273: OZF_Utility_PVT.debug_message('claim_number : '||l_cust_util_tbl(l_counter).claim_number);
12274: END IF;
12275:
12268: EXIT WHEN csr_batch_header%NOTFOUND;
12269:
12270: IF OZF_DEBUG_HIGH_ON THEN
12271: OZF_Utility_PVT.debug_message('cust_account_id : '||l_cust_util_tbl(l_counter).cust_account_id);
12272: OZF_Utility_PVT.debug_message('bill_to_site_id : '||l_cust_util_tbl(l_counter).bill_to_site_id);
12273: OZF_Utility_PVT.debug_message('claim_number : '||l_cust_util_tbl(l_counter).claim_number);
12274: END IF;
12275:
12276: l_counter := l_counter + 1;
12269:
12270: IF OZF_DEBUG_HIGH_ON THEN
12271: OZF_Utility_PVT.debug_message('cust_account_id : '||l_cust_util_tbl(l_counter).cust_account_id);
12272: OZF_Utility_PVT.debug_message('bill_to_site_id : '||l_cust_util_tbl(l_counter).bill_to_site_id);
12273: OZF_Utility_PVT.debug_message('claim_number : '||l_cust_util_tbl(l_counter).claim_number);
12274: END IF;
12275:
12276: l_counter := l_counter + 1;
12277: END LOOP;
12293: FETCH csr_neg_batch_flag INTO l_sup_neg_batch;
12294: CLOSE csr_neg_batch_flag;
12295:
12296: IF OZF_DEBUG_HIGH_ON THEN
12297: OZF_Utility_PVT.debug_message('-ve batch flag : '||l_sup_neg_batch);
12298: END IF;
12299:
12300: OZF_Utility_PVT.debug_message('Org Id : OZF_CLAIM_ACCRUAL_PVT - '||MO_GLOBAL.GET_CURRENT_ORG_ID());
12301: OZF_Utility_PVT.debug_message('User Id : OZF_CLAIM_ACCRUAL_PVT - '||fnd_global.user_id);
12296: IF OZF_DEBUG_HIGH_ON THEN
12297: OZF_Utility_PVT.debug_message('-ve batch flag : '||l_sup_neg_batch);
12298: END IF;
12299:
12300: OZF_Utility_PVT.debug_message('Org Id : OZF_CLAIM_ACCRUAL_PVT - '||MO_GLOBAL.GET_CURRENT_ORG_ID());
12301: OZF_Utility_PVT.debug_message('User Id : OZF_CLAIM_ACCRUAL_PVT - '||fnd_global.user_id);
12302:
12303: IF OZF_DEBUG_HIGH_ON THEN
12304: OZF_Utility_PVT.debug_message('l_payment_method : '||l_payment_method);
12297: OZF_Utility_PVT.debug_message('-ve batch flag : '||l_sup_neg_batch);
12298: END IF;
12299:
12300: OZF_Utility_PVT.debug_message('Org Id : OZF_CLAIM_ACCRUAL_PVT - '||MO_GLOBAL.GET_CURRENT_ORG_ID());
12301: OZF_Utility_PVT.debug_message('User Id : OZF_CLAIM_ACCRUAL_PVT - '||fnd_global.user_id);
12302:
12303: IF OZF_DEBUG_HIGH_ON THEN
12304: OZF_Utility_PVT.debug_message('l_payment_method : '||l_payment_method);
12305: OZF_Utility_PVT.debug_message('l_source_object_class : '||l_source_object_class);
12300: OZF_Utility_PVT.debug_message('Org Id : OZF_CLAIM_ACCRUAL_PVT - '||MO_GLOBAL.GET_CURRENT_ORG_ID());
12301: OZF_Utility_PVT.debug_message('User Id : OZF_CLAIM_ACCRUAL_PVT - '||fnd_global.user_id);
12302:
12303: IF OZF_DEBUG_HIGH_ON THEN
12304: OZF_Utility_PVT.debug_message('l_payment_method : '||l_payment_method);
12305: OZF_Utility_PVT.debug_message('l_source_object_class : '||l_source_object_class);
12306: OZF_Utility_PVT.debug_message('l_batch_id : '||l_batch_id);
12307: OZF_Utility_PVT.debug_message('l_batch_type : '||l_batch_type);
12308: OZF_Utility_PVT.debug_message('l_claim_currency_code : '||l_claim_currency_code);
12301: OZF_Utility_PVT.debug_message('User Id : OZF_CLAIM_ACCRUAL_PVT - '||fnd_global.user_id);
12302:
12303: IF OZF_DEBUG_HIGH_ON THEN
12304: OZF_Utility_PVT.debug_message('l_payment_method : '||l_payment_method);
12305: OZF_Utility_PVT.debug_message('l_source_object_class : '||l_source_object_class);
12306: OZF_Utility_PVT.debug_message('l_batch_id : '||l_batch_id);
12307: OZF_Utility_PVT.debug_message('l_batch_type : '||l_batch_type);
12308: OZF_Utility_PVT.debug_message('l_claim_currency_code : '||l_claim_currency_code);
12309: END IF;
12302:
12303: IF OZF_DEBUG_HIGH_ON THEN
12304: OZF_Utility_PVT.debug_message('l_payment_method : '||l_payment_method);
12305: OZF_Utility_PVT.debug_message('l_source_object_class : '||l_source_object_class);
12306: OZF_Utility_PVT.debug_message('l_batch_id : '||l_batch_id);
12307: OZF_Utility_PVT.debug_message('l_batch_type : '||l_batch_type);
12308: OZF_Utility_PVT.debug_message('l_claim_currency_code : '||l_claim_currency_code);
12309: END IF;
12310:
12303: IF OZF_DEBUG_HIGH_ON THEN
12304: OZF_Utility_PVT.debug_message('l_payment_method : '||l_payment_method);
12305: OZF_Utility_PVT.debug_message('l_source_object_class : '||l_source_object_class);
12306: OZF_Utility_PVT.debug_message('l_batch_id : '||l_batch_id);
12307: OZF_Utility_PVT.debug_message('l_batch_type : '||l_batch_type);
12308: OZF_Utility_PVT.debug_message('l_claim_currency_code : '||l_claim_currency_code);
12309: END IF;
12310:
12311: l_counter := 1;
12304: OZF_Utility_PVT.debug_message('l_payment_method : '||l_payment_method);
12305: OZF_Utility_PVT.debug_message('l_source_object_class : '||l_source_object_class);
12306: OZF_Utility_PVT.debug_message('l_batch_id : '||l_batch_id);
12307: OZF_Utility_PVT.debug_message('l_batch_type : '||l_batch_type);
12308: OZF_Utility_PVT.debug_message('l_claim_currency_code : '||l_claim_currency_code);
12309: END IF;
12310:
12311: l_counter := 1;
12312:
12336: END IF;
12337:
12338: --Create claims for cust_account_id and bill_to_site_id
12339: IF OZF_DEBUG_HIGH_ON THEN
12340: OZF_Utility_PVT.debug_message('bill_to_site_id duplicate check passed: Creating claims for each cust_account_id/bill_to_site_id');
12341: END IF;
12342:
12343: IF l_cust_util_tbl.COUNT > 0 THEN
12344: FOR i IN l_cust_util_tbl.FIRST..l_cust_util_tbl.LAST
12347: l_bill_to_site_id := l_cust_util_tbl(i).bill_to_site_id;
12348: l_claim_number := l_cust_util_tbl(i).claim_number;
12349:
12350: IF OZF_DEBUG_HIGH_ON THEN
12351: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_cust_account_id);
12352: OZF_Utility_PVT.debug_message('l_bill_to_site_id : '||l_bill_to_site_id);
12353: OZF_Utility_PVT.debug_message('l_claim_number : '||l_claim_number);
12354: END IF;
12355:
12348: l_claim_number := l_cust_util_tbl(i).claim_number;
12349:
12350: IF OZF_DEBUG_HIGH_ON THEN
12351: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_cust_account_id);
12352: OZF_Utility_PVT.debug_message('l_bill_to_site_id : '||l_bill_to_site_id);
12353: OZF_Utility_PVT.debug_message('l_claim_number : '||l_claim_number);
12354: END IF;
12355:
12356: IF p_ship_debit_type = 'INTERNAL' THEN
12349:
12350: IF OZF_DEBUG_HIGH_ON THEN
12351: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_cust_account_id);
12352: OZF_Utility_PVT.debug_message('l_bill_to_site_id : '||l_bill_to_site_id);
12353: OZF_Utility_PVT.debug_message('l_claim_number : '||l_claim_number);
12354: END IF;
12355:
12356: IF p_ship_debit_type = 'INTERNAL' THEN
12357: --Get all accurals which are qualifying for supplied request and
12413: END IF;
12414: END IF;
12415:
12416: IF OZF_DEBUG_HIGH_ON THEN
12417: OZF_Utility_PVT.debug_message(' l_cust_account_id : '||l_cust_account_id);
12418: OZF_Utility_PVT.debug_message(' l_activity_type : '||l_activity_type);
12419: OZF_Utility_PVT.debug_message(' l_activity_id : '||l_activity_id);
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12414: END IF;
12415:
12416: IF OZF_DEBUG_HIGH_ON THEN
12417: OZF_Utility_PVT.debug_message(' l_cust_account_id : '||l_cust_account_id);
12418: OZF_Utility_PVT.debug_message(' l_activity_type : '||l_activity_type);
12419: OZF_Utility_PVT.debug_message(' l_activity_id : '||l_activity_id);
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12422: OZF_Utility_PVT.debug_message(' l_product_id : '||l_product_id);
12415:
12416: IF OZF_DEBUG_HIGH_ON THEN
12417: OZF_Utility_PVT.debug_message(' l_cust_account_id : '||l_cust_account_id);
12418: OZF_Utility_PVT.debug_message(' l_activity_type : '||l_activity_type);
12419: OZF_Utility_PVT.debug_message(' l_activity_id : '||l_activity_id);
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12422: OZF_Utility_PVT.debug_message(' l_product_id : '||l_product_id);
12423: OZF_Utility_PVT.debug_message(' l_amount : '||l_amount);
12416: IF OZF_DEBUG_HIGH_ON THEN
12417: OZF_Utility_PVT.debug_message(' l_cust_account_id : '||l_cust_account_id);
12418: OZF_Utility_PVT.debug_message(' l_activity_type : '||l_activity_type);
12419: OZF_Utility_PVT.debug_message(' l_activity_id : '||l_activity_id);
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12422: OZF_Utility_PVT.debug_message(' l_product_id : '||l_product_id);
12423: OZF_Utility_PVT.debug_message(' l_amount : '||l_amount);
12424: OZF_Utility_PVT.debug_message(' l_batch_line_id : '||l_batch_line_id);
12417: OZF_Utility_PVT.debug_message(' l_cust_account_id : '||l_cust_account_id);
12418: OZF_Utility_PVT.debug_message(' l_activity_type : '||l_activity_type);
12419: OZF_Utility_PVT.debug_message(' l_activity_id : '||l_activity_id);
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12422: OZF_Utility_PVT.debug_message(' l_product_id : '||l_product_id);
12423: OZF_Utility_PVT.debug_message(' l_amount : '||l_amount);
12424: OZF_Utility_PVT.debug_message(' l_batch_line_id : '||l_batch_line_id);
12425: END IF;
12418: OZF_Utility_PVT.debug_message(' l_activity_type : '||l_activity_type);
12419: OZF_Utility_PVT.debug_message(' l_activity_id : '||l_activity_id);
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12422: OZF_Utility_PVT.debug_message(' l_product_id : '||l_product_id);
12423: OZF_Utility_PVT.debug_message(' l_amount : '||l_amount);
12424: OZF_Utility_PVT.debug_message(' l_batch_line_id : '||l_batch_line_id);
12425: END IF;
12426:
12419: OZF_Utility_PVT.debug_message(' l_activity_id : '||l_activity_id);
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12422: OZF_Utility_PVT.debug_message(' l_product_id : '||l_product_id);
12423: OZF_Utility_PVT.debug_message(' l_amount : '||l_amount);
12424: OZF_Utility_PVT.debug_message(' l_batch_line_id : '||l_batch_line_id);
12425: END IF;
12426:
12427: --If claim currency and accrual(offer) currency is not same, then convert
12420: OZF_Utility_PVT.debug_message(' l_bill_to_site_id : '||l_bill_to_site_id);
12421: OZF_Utility_PVT.debug_message(' l_product_level_type : '||l_product_level_type);
12422: OZF_Utility_PVT.debug_message(' l_product_id : '||l_product_id);
12423: OZF_Utility_PVT.debug_message(' l_amount : '||l_amount);
12424: OZF_Utility_PVT.debug_message(' l_batch_line_id : '||l_batch_line_id);
12425: END IF;
12426:
12427: --If claim currency and accrual(offer) currency is not same, then convert
12428: --offer accounted amount from functional currency to claim currency.
12439: CLOSE csr_function_currency;
12440:
12441:
12442: IF OZF_DEBUG_HIGH_ON THEN
12443: OZF_Utility_PVT.debug_message('Starts Currency Conversion for INTERNAL Claims ');
12444: OZF_Utility_PVT.debug_message(' l_trans_currency_code : '|| l_trans_currency_code);
12445: OZF_Utility_PVT.debug_message(' l_claim_currency_code : '|| l_claim_currency_code);
12446: OZF_Utility_PVT.debug_message(' l_func_currency_code : '|| l_func_currency_code);
12447: END IF;
12440:
12441:
12442: IF OZF_DEBUG_HIGH_ON THEN
12443: OZF_Utility_PVT.debug_message('Starts Currency Conversion for INTERNAL Claims ');
12444: OZF_Utility_PVT.debug_message(' l_trans_currency_code : '|| l_trans_currency_code);
12445: OZF_Utility_PVT.debug_message(' l_claim_currency_code : '|| l_claim_currency_code);
12446: OZF_Utility_PVT.debug_message(' l_func_currency_code : '|| l_func_currency_code);
12447: END IF;
12448:
12441:
12442: IF OZF_DEBUG_HIGH_ON THEN
12443: OZF_Utility_PVT.debug_message('Starts Currency Conversion for INTERNAL Claims ');
12444: OZF_Utility_PVT.debug_message(' l_trans_currency_code : '|| l_trans_currency_code);
12445: OZF_Utility_PVT.debug_message(' l_claim_currency_code : '|| l_claim_currency_code);
12446: OZF_Utility_PVT.debug_message(' l_func_currency_code : '|| l_func_currency_code);
12447: END IF;
12448:
12449: IF (l_trans_currency_code <> l_claim_currency_code) THEN
12442: IF OZF_DEBUG_HIGH_ON THEN
12443: OZF_Utility_PVT.debug_message('Starts Currency Conversion for INTERNAL Claims ');
12444: OZF_Utility_PVT.debug_message(' l_trans_currency_code : '|| l_trans_currency_code);
12445: OZF_Utility_PVT.debug_message(' l_claim_currency_code : '|| l_claim_currency_code);
12446: OZF_Utility_PVT.debug_message(' l_func_currency_code : '|| l_func_currency_code);
12447: END IF;
12448:
12449: IF (l_trans_currency_code <> l_claim_currency_code) THEN
12450: IF (l_claim_currency_code = l_func_currency_code) THEN
12449: IF (l_trans_currency_code <> l_claim_currency_code) THEN
12450: IF (l_claim_currency_code = l_func_currency_code) THEN
12451: l_amount := l_acctd_amount;
12452: ELSE
12453: OZF_UTILITY_PVT.Convert_Currency(
12454: p_from_currency => l_func_currency_code
12455: ,p_to_currency => l_claim_currency_code
12456: ,p_conv_type => l_exchange_rate_type
12457: ,p_conv_date => SYSDATE
12471: END IF;
12472: /*
12473: IF l_trans_currency_code <> l_claim_currency_code THEN
12474: l_amount_offr_curr := l_amount;
12475: OZF_UTILITY_PVT.Convert_Currency(
12476: p_from_currency => l_trans_currency_code
12477: ,p_to_currency => l_claim_currency_code
12478: ,p_conv_date => SYSDATE --SD MC
12479: ,p_from_amount => l_amount_offr_curr
12590: l_claim_rec.vendor_id := l_vendor_id;
12591: l_claim_rec.vendor_site_id := l_vendor_site_id;
12592: l_claim_rec.org_id := l_sd_org_id;
12593: l_claim_rec.user_status_id := to_number(
12594: ozf_utility_pvt.get_default_user_status(
12595: p_status_type => 'OZF_CLAIM_STATUS',
12596: p_status_code => l_claim_rec.status_code));
12597:
12598: IF OZF_DEBUG_HIGH_ON THEN
12595: p_status_type => 'OZF_CLAIM_STATUS',
12596: p_status_code => l_claim_rec.status_code));
12597:
12598: IF OZF_DEBUG_HIGH_ON THEN
12599: OZF_Utility_PVT.debug_message('Claim header information:');
12600: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_claim_rec.cust_account_id);
12601: OZF_Utility_PVT.debug_message('claim_class : '||l_claim_rec.claim_class);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12596: p_status_code => l_claim_rec.status_code));
12597:
12598: IF OZF_DEBUG_HIGH_ON THEN
12599: OZF_Utility_PVT.debug_message('Claim header information:');
12600: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_claim_rec.cust_account_id);
12601: OZF_Utility_PVT.debug_message('claim_class : '||l_claim_rec.claim_class);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12597:
12598: IF OZF_DEBUG_HIGH_ON THEN
12599: OZF_Utility_PVT.debug_message('Claim header information:');
12600: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_claim_rec.cust_account_id);
12601: OZF_Utility_PVT.debug_message('claim_class : '||l_claim_rec.claim_class);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12598: IF OZF_DEBUG_HIGH_ON THEN
12599: OZF_Utility_PVT.debug_message('Claim header information:');
12600: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_claim_rec.cust_account_id);
12601: OZF_Utility_PVT.debug_message('claim_class : '||l_claim_rec.claim_class);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12599: OZF_Utility_PVT.debug_message('Claim header information:');
12600: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_claim_rec.cust_account_id);
12601: OZF_Utility_PVT.debug_message('claim_class : '||l_claim_rec.claim_class);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12600: OZF_Utility_PVT.debug_message('l_cust_account_id : '||l_claim_rec.cust_account_id);
12601: OZF_Utility_PVT.debug_message('claim_class : '||l_claim_rec.claim_class);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12601: OZF_Utility_PVT.debug_message('claim_class : '||l_claim_rec.claim_class);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12602: OZF_Utility_PVT.debug_message('source_object_class : '||l_claim_rec.source_object_class);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12603: OZF_Utility_PVT.debug_message('source_object_number : '||l_claim_rec.source_object_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12604: OZF_Utility_PVT.debug_message('batch_id : '||l_claim_rec.batch_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12605: OZF_Utility_PVT.debug_message('batch_type : '||l_claim_rec.batch_type);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12613: OZF_Utility_PVT.debug_message('vendor_site_id : '||l_claim_rec.vendor_site_id);
12606: OZF_Utility_PVT.debug_message('currency_code : '||l_claim_rec.currency_code);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12613: OZF_Utility_PVT.debug_message('vendor_site_id : '||l_claim_rec.vendor_site_id);
12614: OZF_Utility_PVT.debug_message('org_id : '||l_claim_rec.org_id);
12607: OZF_Utility_PVT.debug_message('amount : '||l_claim_rec.amount);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12613: OZF_Utility_PVT.debug_message('vendor_site_id : '||l_claim_rec.vendor_site_id);
12614: OZF_Utility_PVT.debug_message('org_id : '||l_claim_rec.org_id);
12615: OZF_Utility_PVT.debug_message('user_status_id : '||l_claim_rec.user_status_id);
12608: OZF_Utility_PVT.debug_message('payment_method : '||l_claim_rec.payment_method);
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12613: OZF_Utility_PVT.debug_message('vendor_site_id : '||l_claim_rec.vendor_site_id);
12614: OZF_Utility_PVT.debug_message('org_id : '||l_claim_rec.org_id);
12615: OZF_Utility_PVT.debug_message('user_status_id : '||l_claim_rec.user_status_id);
12616: END IF;
12609: OZF_Utility_PVT.debug_message('cust_billto_acct_site_id : '||l_claim_rec.cust_billto_acct_site_id);
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12613: OZF_Utility_PVT.debug_message('vendor_site_id : '||l_claim_rec.vendor_site_id);
12614: OZF_Utility_PVT.debug_message('org_id : '||l_claim_rec.org_id);
12615: OZF_Utility_PVT.debug_message('user_status_id : '||l_claim_rec.user_status_id);
12616: END IF;
12617:
12610: OZF_Utility_PVT.debug_message('status_code : '||l_claim_rec.status_code);
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12613: OZF_Utility_PVT.debug_message('vendor_site_id : '||l_claim_rec.vendor_site_id);
12614: OZF_Utility_PVT.debug_message('org_id : '||l_claim_rec.org_id);
12615: OZF_Utility_PVT.debug_message('user_status_id : '||l_claim_rec.user_status_id);
12616: END IF;
12617:
12618:
12611: OZF_Utility_PVT.debug_message('claim_number : '||l_claim_rec.claim_number);
12612: OZF_Utility_PVT.debug_message('vendor_id : '||l_claim_rec.vendor_id);
12613: OZF_Utility_PVT.debug_message('vendor_site_id : '||l_claim_rec.vendor_site_id);
12614: OZF_Utility_PVT.debug_message('org_id : '||l_claim_rec.org_id);
12615: OZF_Utility_PVT.debug_message('user_status_id : '||l_claim_rec.user_status_id);
12616: END IF;
12617:
12618:
12619: --For INTERNAL negative claims, claim class need to be changed.
12682: x_claim_id := l_claim_id;
12683: END IF;
12684:
12685: IF OZF_DEBUG_HIGH_ON THEN
12686: OZF_Utility_PVT.debug_message('Created claim id:'||l_claim_id);
12687: END IF;
12688:
12689: FOR i IN l_line_tbl.FIRST..l_line_tbl.LAST
12690: LOOP
12712: RAISE FND_API.g_exc_error;
12713: END IF;
12714:
12715: IF OZF_DEBUG_HIGH_ON THEN
12716: OZF_Utility_PVT.debug_message('Claim lines created for claim_id=' || l_claim_id);
12717: END IF;
12718:
12719: OPEN csr_claim_lines(l_claim_id);
12720: LOOP
12796: l_access_rec.act_access_to_object_id := l_claim_id;
12797: l_access_rec.arc_act_access_to_object := 'CLAM';
12798:
12799: IF OZF_DEBUG_HIGH_ON THEN
12800: OZF_Utility_PVT.debug_message('Claim access information:');
12801: OZF_Utility_PVT.debug_message('user_or_role_id : '||l_access_rec.user_or_role_id);
12802: OZF_Utility_PVT.debug_message('arc_user_or_role_type : '||l_access_rec.arc_user_or_role_type);
12803: OZF_Utility_PVT.debug_message('act_access_to_object_id : '||l_access_rec.act_access_to_object_id);
12804: OZF_Utility_PVT.debug_message('arc_act_access_to_object : '||l_access_rec.arc_act_access_to_object);
12797: l_access_rec.arc_act_access_to_object := 'CLAM';
12798:
12799: IF OZF_DEBUG_HIGH_ON THEN
12800: OZF_Utility_PVT.debug_message('Claim access information:');
12801: OZF_Utility_PVT.debug_message('user_or_role_id : '||l_access_rec.user_or_role_id);
12802: OZF_Utility_PVT.debug_message('arc_user_or_role_type : '||l_access_rec.arc_user_or_role_type);
12803: OZF_Utility_PVT.debug_message('act_access_to_object_id : '||l_access_rec.act_access_to_object_id);
12804: OZF_Utility_PVT.debug_message('arc_act_access_to_object : '||l_access_rec.arc_act_access_to_object);
12805: END IF;
12798:
12799: IF OZF_DEBUG_HIGH_ON THEN
12800: OZF_Utility_PVT.debug_message('Claim access information:');
12801: OZF_Utility_PVT.debug_message('user_or_role_id : '||l_access_rec.user_or_role_id);
12802: OZF_Utility_PVT.debug_message('arc_user_or_role_type : '||l_access_rec.arc_user_or_role_type);
12803: OZF_Utility_PVT.debug_message('act_access_to_object_id : '||l_access_rec.act_access_to_object_id);
12804: OZF_Utility_PVT.debug_message('arc_act_access_to_object : '||l_access_rec.arc_act_access_to_object);
12805: END IF;
12806:
12799: IF OZF_DEBUG_HIGH_ON THEN
12800: OZF_Utility_PVT.debug_message('Claim access information:');
12801: OZF_Utility_PVT.debug_message('user_or_role_id : '||l_access_rec.user_or_role_id);
12802: OZF_Utility_PVT.debug_message('arc_user_or_role_type : '||l_access_rec.arc_user_or_role_type);
12803: OZF_Utility_PVT.debug_message('act_access_to_object_id : '||l_access_rec.act_access_to_object_id);
12804: OZF_Utility_PVT.debug_message('arc_act_access_to_object : '||l_access_rec.arc_act_access_to_object);
12805: END IF;
12806:
12807: ams_access_pvt.create_access ( p_api_version => l_api_version
12800: OZF_Utility_PVT.debug_message('Claim access information:');
12801: OZF_Utility_PVT.debug_message('user_or_role_id : '||l_access_rec.user_or_role_id);
12802: OZF_Utility_PVT.debug_message('arc_user_or_role_type : '||l_access_rec.arc_user_or_role_type);
12803: OZF_Utility_PVT.debug_message('act_access_to_object_id : '||l_access_rec.act_access_to_object_id);
12804: OZF_Utility_PVT.debug_message('arc_act_access_to_object : '||l_access_rec.arc_act_access_to_object);
12805: END IF;
12806:
12807: ams_access_pvt.create_access ( p_api_version => l_api_version
12808: , p_init_msg_list => fnd_api.g_false
12841: p_data => x_msg_data
12842: );
12843:
12844: IF OZF_DEBUG_HIGH_ON THEN
12845: OZF_Utility_PVT.debug_message(l_full_name ||': end');
12846: END IF;
12847:
12848: EXCEPTION
12849: WHEN FND_API.g_exc_error THEN
12944: --------------------- initialize -----------------------
12945: SAVEPOINT Accruals_Association;
12946:
12947: IF OZF_DEBUG_HIGH_ON THEN
12948: OZF_Utility_PVT.debug_message(l_full_name||': start');
12949: END IF;
12950:
12951: IF FND_API.to_boolean(p_init_msg_list) THEN
12952: FND_MSG_PUB.initialize;
12984: END LOOP;
12985: CLOSE claim_line_id_csr;
12986:
12987: IF(l_claim_line_tbl.COUNT > 0 ) THEN
12988: OZF_Utility_PVT.debug_message('Deleting the Non promotional Lines');
12989: OZF_Claim_Line_PVT.Delete_Claim_Line_Tbl(
12990: p_api_version => l_api_version
12991: ,p_init_msg_list => FND_API.g_false
12992: ,p_commit => FND_API.g_false
13090: p_data => x_msg_data
13091: );
13092:
13093: IF OZF_DEBUG_HIGH_ON THEN
13094: OZF_Utility_PVT.debug_message(l_full_name ||': end');
13095: END IF;
13096:
13097: EXCEPTION
13098: WHEN FND_API.g_exc_error THEN