My Oracle Support Banner

Cursor Get_qte_csr Record should also Include Quote_effective_from_date (Doc ID 2818667.1)

Last updated on NOVEMBER 04, 2021

Applies to:

Oracle Lease and Finance Management - Version 12.2.9 and later
Information in this document applies to any platform.

Goal

One observation on the Patch-fix, Patch 33385670:R12.OKL.C, while performance issue is resolved, by changing the cursor from Quote-Line to Quote-Header Call. However, Net-Gain-Loss function not getting Quote-Effective-From-Date, when quote-line updates are processed. This get_qte_csr record should also include quote_effective_from_date, so that Neg-gain-loss call will process some formula calculations that are based on quote-effective-from-date such as line_accumulated_depreciation.

Please correct the cursor to include quote_effective_from_date.

Details are below:

-----------------------------------------------
---- This Calls Get_Net_Gain_Loss ---
-----------------------------------------------
PROCEDURE recalculate_quote(
  x_return_status OUT NOCOPY VARCHAR2,
  p_tqlv_rec IN tqlv_rec_type)
  IS
--Bug 33337501
/*
  -- Cursor to get the quote and quote line details
  CURSOR get_qte_dtls_csr (p_line_id IN NUMBER) IS
  SELECT qte.id,
  qte.qst_code,
  qte.qtp_code,
  qte.quote_number,
  qte.khr_id,
  qte.partial_yn,
  qte.early_termination_yn,
  tql.qlt_code
  FROM okl_trx_quotes_b qte,
  okl_txl_quote_lines_b tql
  WHERE tql.id = p_line_id
  AND tql.qte_id = qte.id;
*/
  -- Cursor to get the quote details
  CURSOR get_qte_csr (p_qte_id IN NUMBER) IS
  SELECT qte.id,
  qte.qst_code,
  qte.qtp_code,
  qte.quote_number,
  qte.khr_id,
  qte.partial_yn,
  qte.early_termination_yn
  FROM okl_trx_quotes_b qte
  WHERE qte.id = p_qte_id;
--Bug 33337501

------------------------------------------------------------------------------------------------------
--- This is called by Above and need quote_effective_from_date value from p_quote_rec) -----
-------------------------------------------------------------------------------------------------------
OKL_AM_CREATE_QUOTE_PVT.Get_Net_Gain_Loss(
p_quote_rec IN quot_rec_type,
p_chr_id IN NUMBER,
x_return_status OUT NOCOPY VARCHAR2,
x_net_gain_loss OUT NOCOPY NUMBER)

contd.....

  --+++++++++ rmunjulu 3797384 Future Dated Term Qte -- Start ++++++++++++++++

  -- set the operands for formula engine with quote_effective_from date
  l_params(2).name := 'quote_effective_from_date';
  l_params(2).value := to_char(p_quote_rec.date_effective_from, 'MM/DD/YYYY'); -- rmunjulu EDAT 29-Dec-04 did to_char to convert to right format

  -- set the operands for formula engine with quote_id
  l_params(3).name := 'quote_id';
  l_params(3).value := to_char(p_quote_rec.id);

  --+++++++++ rmunjulu 3797384 Future Dated Term Qte -- End ++++++++++++++++
  IF (is_debug_statement_on) THEN
  OKL_DEBUG_PUB.LOG_DEBUG(G_LEVEL_STATEMENT,L_MODULE_NAME,
  'Before call to OKL_AM_UTIL_PVT.get_formula_value :'||l_return_status);
  END IF;
  -- Get the formula value for the formula for Net Gain/Loss Formula
  OKL_AM_UTIL_PVT.get_formula_value (
p_formula_name => l_formula_name,
p_chr_id => l_rule_khr_id,
p_cle_id => NULL,
   p_additional_parameters => l_params,
x_formula_value => x_net_gain_loss,
x_return_status => l_return_status);
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.