[Home] [Help]
589: END IF;
590:
591: IF (l_processed_flag(i) = 'Y' AND l_reported_month(i) like '%CURRENT%') then
592: BEGIN
593: UPDATE fv_refunds_voids_all
594: SET processed_flag = 'Y',
595: period_reported = p_gl_period,
596: last_updated_by = g_user_id,
597: last_update_date = g_sysdate,
603: EXCEPTION
604: WHEN OTHERS THEN
605: p_error_code := g_FAILURE;
606: p_error_desc := SQLERRM;
607: l_location := l_module_name||'update_fv_refunds_voids_all';
608: fv_utility.log_mesg(fnd_log.level_unexpected, l_location,l_location) ;
609: fv_utility.log_mesg(fnd_log.level_unexpected, l_location,p_error_desc) ;
610: END;
611: END IF;
2813: c_fund_code VARCHAR2
2814: ) IS
2815: SELECT obligation_date,
2816: refund_amount
2817: FROM fv_refunds_voids_all
2818: WHERE cash_receipt_id = c_cash_receipt_id
2819: AND type = 'AP_REFUND'
2820: AND fund_value = c_fund_code;
2821:
4326: END IF;
4327: BEGIN /* Refund Checks */
4328: SELECT obligation_date
4329: INTO l_obligation_date
4330: FROM fv_refunds_voids_all
4331: WHERE set_of_books_id = sob
4332: AND org_id = g_org_id
4333: AND TYPE = 'PAYABLE_REFUND'
4334: AND invoice_id = l_reference_2
5271: -- ==============================================================================================
5272: -- This procedure populate all the Refunds information from AP to FV table.
5273: -- This procedure is called from FMS224 Populate Payables Refunds Process.
5274: -- And this process takes mainly two parameters GL Period Low and GL period high
5275: -- And this process submit the Report which lists all the imported data from AP to FV table (FV_REFUNDS_VOIDS_all)
5276: -- with con request Id as the parameter
5277: -- Logic :
5278: -- This process takes all the posted Refunds (ie, Payment Type Flag = 'R' (Refund) and
5279: -- Posted Flag = Y (Accounted) and Entry exist in GL_JE_LINES (Posted in GL),
5364: RAISE;
5365: END;
5366:
5367: -- Populate the the data from AP tables to FV table
5368: INSERT INTO FV_REFUNDS_VOIDS_ALL
5369: ( refunds_voids_id,
5370: TYPE ,
5371: invoice_id,
5372: processed_flag,
5477: AND reversal_inv_pmt_id IS NULL
5478: AND ap_checks_pkg.get_posting_status(apc.check_id) IN ('Y','P')
5479: AND TRUNC(apc.check_date) BETWEEN TRUNC(l_gl_start_date) AND TRUNC(l_gl_end_date)
5480: AND NOT EXISTS
5481: ( SELECT 1 FROM fv_refunds_voids_all
5482: WHERE invoice_payment_id = apip.invoice_payment_id)
5483: AND EXISTS (SELECT 1
5484: FROM gl_je_lines gljl,
5485: gl_je_headers gljh,
5547: IF ( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5548: FV_UTILITY.DEBUG_MESG(FND_LOG.LEVEL_STATEMENT, l_module_name,
5549: 'Deleting all the Data from FV table inserted by the current process') ;
5550: END IF;
5551: DELETE FROM fv_refunds_voids_all
5552: WHERE TYPE = 'PAYABLE_REFUND' AND conc_request_id = l_conc_request_id;
5553: COMMIT;
5554: IF ( FND_LOG.LEVEL_STATEMENT >= FND_LOG.G_CURRENT_RUNTIME_LEVEL) THEN
5555: FV_UTILITY.DEBUG_MESG(FND_LOG.LEVEL_STATEMENT, l_module_name,