DBA Data[Home] [Help]

APPS.OKL_LEASE_QUOTE_ASSET_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 27

 	           SELECT costadj.id
 	           FROM   okl_cost_adjustments_b costadj,
 	                  okl_assets_b asset
 	           WHERE costadj.adjustment_source_type = 'TRADEIN'
 	           AND  costadj.parent_object_id = asset.id
 	           AND  costadj.parent_object_code = 'ASSET'
 	           AND  asset.parent_object_id = p_quote_id
 	           AND  asset.parent_object_code = 'LEASEQUOTE';
Line: 67

 	       l_rowid_tbl.delete;
Line: 73

 	             UPDATE OKL_COST_ADJUSTMENTS_TL
 	             SET
 	             description = p_description
 	             WHERE ID = l_rowid_tbl(indx)
 	                 and  userenv('LANG') in (LANGUAGE, SOURCE_LANG);
Line: 122

      SELECT qte.id, qte.expected_start_date, qte.parent_object_code
      FROM okl_assets_b ast,
           okl_lease_quotes_b qte
     WHERE qte.id = ast.parent_object_id
     AND   ast.id= p_quote_id;
Line: 133

     IF(p_event_mode ='delete') THEN
        IF(l_adj_assets_rec.adjustment_source_type='DOWN_PAYMENT') THEN
           OKL_LEASE_QUOTE_CASHFLOW_PVT.delete_cashflows (
                                 p_api_version   => G_API_VERSION
                                ,p_init_msg_list => G_FALSE
                                ,p_transaction_control => 'T'
                                ,p_source_object_code  => 'QUOTED_ASSET_DOWN_PAYMENT'
                                ,p_source_object_id    => l_adj_assets_rec.parent_object_id
                                ,x_return_status       => x_return_status
                                ,x_msg_count           => x_msg_count
                                ,x_msg_data            => x_msg_data);
Line: 161

       l_cf_hdr_rec.parent_object_code := 'QUOTED_ASSET_DOWN_PAYMENT';-- mandatory (see 'insert_rows' procedure for possible values)
Line: 193

     ELSIF(p_event_mode ='update') THEN
      IF(l_adj_assets_rec.adjustment_source_type='DOWN_PAYMENT') THEN
       OKL_LEASE_QUOTE_CASHFLOW_PVT.delete_cashflows (
                             p_api_version   => G_API_VERSION
                            ,p_init_msg_list => G_FALSE
                            ,p_transaction_control => 'T'
                            ,p_source_object_code  => 'QUOTED_ASSET_DOWN_PAYMENT'
                            ,p_source_object_id    => l_adj_assets_rec.parent_object_id
                            ,x_return_status       => x_return_status
                            ,x_msg_count           => x_msg_count
                            ,x_msg_data            => x_msg_data);
Line: 222

           l_cf_hdr_rec.parent_object_code := 'QUOTED_ASSET_DOWN_PAYMENT';-- mandatory (see 'insert_rows' procedure for possible values)
Line: 286

    select pricing_method
    into lv_source_pricing_type
    from okl_lease_quotes_b
    where id = p_source_quote_id;
Line: 291

    select pricing_method
    into lv_target_pricing_type
    from okl_lease_quotes_b
    where id = p_target_quote_id;
Line: 329

       SELECT PARENT_OBJECT_ID
       FROM OKL_ASSETS_B
       WHERE ID = p_asset_id
       AND PARENT_OBJECT_CODE='LEASEQUOTE';
Line: 335

      SELECT parent_object_code
      FROM   okl_lease_quotes_b
      WHERE  id = p_quote_id;
Line: 357

      SELECT currency_code
      INTO   l_currency_code
      FROM   okl_lease_opportunities_b lop,
             okl_lease_quotes_b lsq
      WHERE  lsq.parent_object_code = lv_parent_object_code
      AND    lsq.parent_object_id = lop.id
      AND    lsq.id = l_quote_id;
Line: 365

      SELECT currency_code
      INTO   l_currency_code
      FROM   okl_lease_applications_b lap,
             okl_lease_quotes_b lsq
      WHERE  lsq.parent_object_code = lv_parent_object_code
      AND    lsq.parent_object_id = lap.id
      AND    lsq.id = l_quote_id;
Line: 616

    SELECT quote.expected_start_date,
         assetcomp.INV_ITEM_ID,
         leaseopp.inv_org_id,
         leaseopp.currency_code,
         leaseopp.ORG_ID,
         leaseopp.CUST_ACCT_ID,
         quote.product_id,
         leaseopp.SALES_REP_ID
    FROM
      okl_assets_b asset,
      okl_asset_components_b assetcomp,
      okl_lease_quotes_b quote,
      okl_lease_opportunities_b leaseopp
    WHERE
      asset.id = p_asset_id
    AND asset.id = assetcomp.asset_id
    AND assetcomp.PRIMARY_COMPONENT = 'YES'
    AND asset.parent_object_id = quote.id
    AND asset.parent_object_code = 'LEASEQUOTE'
    AND quote.parent_object_id = leaseopp.id;
Line: 638

    SELECT quote.expected_start_date,
         assetcomp.INV_ITEM_ID,
         leaseapp.inv_org_id,
         leaseapp.currency_code,
         leaseapp.ORG_ID,
         leaseapp.CUST_ACCT_ID,
         quote.product_id,
         leaseapp.SALES_REP_ID
    FROM
      okl_assets_b asset,
      okl_asset_components_b assetcomp,
      okl_lease_quotes_b quote,
      okl_lease_applications_b leaseapp
    WHERE
      asset.id = p_asset_id
    AND asset.id = assetcomp.asset_id
    AND assetcomp.PRIMARY_COMPONENT = 'YES'
    AND asset.parent_object_id = quote.id
    AND asset.parent_object_code = 'LEASEQUOTE'
    AND quote.parent_object_id = leaseapp.id;
Line: 660

   	SELECT asset_number
   	FROM okl_assets_b
   	WHERE id = p_asset_id;
Line: 669

  	SELECT lsq.parent_object_code
  	INTO lv_parent_code
  	FROM okl_assets_b ast, okl_lease_quotes_b lsq
  	where ast.parent_object_id = lsq.id
	and   ast.parent_object_code = 'LEASEQUOTE'
	and   ast.id = p_asset_id;
Line: 781

    SELECT quote.expected_start_date,
         assetcomp.INV_ITEM_ID,
         leaseopp.inv_org_id,
         leaseopp.currency_code,
         leaseopp.ORG_ID,
         leaseopp.CUST_ACCT_ID,
         quote.product_id,
         leaseopp.SALES_REP_ID
    FROM
      okl_assets_b asset,
      okl_asset_components_b assetcomp,
      okl_lease_quotes_b quote,
      okl_lease_opportunities_b leaseopp
    WHERE
      asset.id = p_asset_id
    AND asset.id = assetcomp.asset_id
    AND assetcomp.PRIMARY_COMPONENT = 'YES'
    AND asset.parent_object_id = quote.id
    AND asset.parent_object_code = 'LEASEQUOTE'
    AND quote.parent_object_id = leaseopp.id;
Line: 803

    SELECT quote.expected_start_date,
         assetcomp.INV_ITEM_ID,
         leaseapp.inv_org_id,
         leaseapp.currency_code,
         leaseapp.ORG_ID,
         leaseapp.CUST_ACCT_ID,
         quote.product_id,
         leaseapp.SALES_REP_ID
    FROM
      okl_assets_b asset,
      okl_asset_components_b assetcomp,
      okl_lease_quotes_b quote,
      okl_lease_applications_b leaseapp
    WHERE
      asset.id = p_asset_id
    AND asset.id = assetcomp.asset_id
    AND assetcomp.PRIMARY_COMPONENT = 'YES'
    AND asset.parent_object_id = quote.id
    AND asset.parent_object_code = 'LEASEQUOTE'
    AND quote.parent_object_id = leaseapp.id;
Line: 825

   	SELECT asset_number
   	FROM okl_assets_b
   	WHERE id = p_asset_id;
Line: 834

  	SELECT lsq.parent_object_code
  	INTO lv_parent_code
  	FROM okl_assets_b ast, okl_lease_quotes_b lsq
  	where ast.parent_object_id = lsq.id
	and   ast.parent_object_code = 'LEASEQUOTE'
	and   ast.id = p_asset_id;
Line: 1078

  SELECT
     EOT.EOT_TYPE_CODE
  FROM OKL_FE_EO_TERMS_ALL_B EOT,
       OKL_FE_EO_TERM_VERS EOT_VER,
       OKL_LEASE_QUOTES_B QTE
  WHERE
      EOT_VER.END_OF_TERM_VER_ID = QTE.END_OF_TERM_OPTION_ID
  AND EOT_VER.END_OF_TERM_ID = EOT.END_OF_TERM_ID
  AND QTE.ID = p_quote_id;
Line: 1147

	SELECT quote.expected_start_date,
	       leaseopp.inv_org_id,
	       leaseopp.currency_code,
	       leaseopp.ORG_ID,
	       leaseopp.CUST_ACCT_ID,
	       quote.product_id,
	       leaseopp.SALES_REP_ID
	FROM
		okl_lease_quotes_b quote,
		okl_lease_opportunities_b leaseopp
	WHERE
		quote.id = p_quote_id
	AND quote.parent_object_id = leaseopp.id
	AND quote.parent_object_code = 'LEASEOPP';
Line: 1163

	SELECT quote.expected_start_date,
	       leaseapp.inv_org_id,
	       leaseapp.currency_code,
	       leaseapp.ORG_ID,
	       leaseapp.CUST_ACCT_ID,
	       quote.product_id,
	       leaseapp.SALES_REP_ID
	FROM
		okl_lease_quotes_b quote,
		okl_lease_applications_b leaseapp
	WHERE
		quote.id = p_quote_id
	AND quote.parent_object_id = leaseapp.id
	AND quote.parent_object_code = 'LEASEAPP';
Line: 1179

	SELECT assetcomp.INV_ITEM_ID
	FROM okl_assets_b asset,
		 okl_asset_components_b assetcomp
	WHERE
		 asset.id = assetcomp.asset_id
	 AND assetcomp.PRIMARY_COMPONENT = 'YES'
	 AND asset.parent_object_id = p_quote_id
	 AND asset.parent_object_code = 'LEASEQUOTE';
Line: 1189

  	SELECT parent_object_code
  	INTO lv_parent_code
  	FROM okl_lease_quotes_b
  	where id = p_quote_id;
Line: 1259

  SELECT quote.expected_start_date,
         assetcomp.INV_ITEM_ID,
         leaseopp.inv_org_id,
         leaseopp.currency_code,
         leaseopp.ORG_ID,
         leaseopp.CUST_ACCT_ID,
         quote.product_id,
         leaseopp.SALES_REP_ID
  FROM
    okl_assets_b asset,
    okl_asset_components_b assetcomp,
    okl_lease_quotes_b quote,
    okl_lease_opportunities_b leaseopp
  WHERE
    asset.id = p_asset_id
  AND asset.id = assetcomp.asset_id
  AND assetcomp.PRIMARY_COMPONENT = 'YES'
  AND asset.parent_object_id = quote.id
  AND asset.parent_object_code = 'LEASEQUOTE'
  AND quote.parent_object_id = leaseopp.id;
Line: 1281

  SELECT quote.expected_start_date,
         assetcomp.INV_ITEM_ID,
         leaseapp.inv_org_id,
         leaseapp.currency_code,
         leaseapp.ORG_ID,
         leaseapp.CUST_ACCT_ID,
         quote.product_id,
         leaseapp.SALES_REP_ID
  FROM
    okl_assets_b asset,
    okl_asset_components_b assetcomp,
    okl_lease_quotes_b quote,
    okl_lease_applications_b leaseapp
  WHERE
    asset.id = p_asset_id
  AND asset.id = assetcomp.asset_id
  AND assetcomp.PRIMARY_COMPONENT = 'YES'
  AND asset.parent_object_id = quote.id
  AND asset.parent_object_code = 'LEASEQUOTE'
  AND quote.parent_object_id = leaseapp.id;
Line: 1303

  	SELECT lsq.parent_object_code
  	INTO lv_parent_code
  	FROM okl_assets_b ast, okl_lease_quotes_b lsq
  	where ast.parent_object_id = lsq.id
	and   ast.parent_object_code = 'LEASEQUOTE'
	and   ast.id = p_asset_id;
Line: 1357

      SELECT
         attribute_category
        ,attribute1
        ,attribute2
        ,attribute3
        ,attribute4
        ,attribute5
        ,attribute6
        ,attribute7
        ,attribute8
        ,attribute9
        ,attribute10
        ,attribute11
        ,attribute12
        ,attribute13
        ,attribute14
        ,attribute15
        ,parent_object_code
        ,parent_object_id
        ,adjustment_source_type
        ,adjustment_source_id
        ,basis
        ,value
        ,processing_type
        ,supplier_id
        ,default_subsidy_amount
        --Bug # 5142940 ssdeshpa start
        ,stream_type_id
        --Bug # 5142940 ssdeshpa start
        ,short_description
        ,description
        ,comments
      from okl_cost_adjustments_v
      where parent_object_code = 'ASSET'
      and adjustment_source_type in ('DOWN_PAYMENT', 'TRADEIN', 'SUBSIDY')
      and parent_object_id IN (select id
                     from okl_assets_b
                     where parent_object_id = p_source_quote_id
                     and parent_object_code = 'LEASEQUOTE');
Line: 1459

  PROCEDURE get_deleted_addons (p_asset_id            IN  NUMBER,
                                p_component_tbl       IN  asset_component_tbl_type,
                                x_deleted_addon_tbl   OUT NOCOPY component_tbl_type,
                                x_return_status       OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'get_deleted_addons';
Line: 1468

      SELECT id
      FROM   okl_asset_components_b
      WHERE  asset_id = p_asset_id
      AND    primary_component = 'NO';
Line: 1474

    l_delete_flag          VARCHAR2(1);
Line: 1481

      l_delete_flag := 'Y';
Line: 1486

            l_delete_flag := 'N';
Line: 1491

      IF l_delete_flag = 'Y' THEN
        l_addon_tbl(i).id := l_db_addon.id;
Line: 1498

    x_deleted_addon_tbl := l_addon_tbl;
Line: 1523

  END get_deleted_addons;
Line: 1536

  SELECT 'Y'
  FROM OKL_COST_ADJUSTMENTS_B
  WHERE PARENT_OBJECT_ID = p_asset_id
  AND PARENT_OBJECT_CODE = 'ASSET'
  AND ADJUSTMENT_SOURCE_TYPE = p_adj_type;
Line: 1652

  PROCEDURE get_deleted_adjusted_assets (p_adj_type            IN  VARCHAR2,
                                         p_quote_id            IN  NUMBER,
                                         p_adjustment_tbl      IN  asset_adjustment_tbl_type,
                                         x_deleted_adjust_tbl  OUT NOCOPY asset_adj_tbl_type,
                                         x_return_status       OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'get_deleted_adjusted_assets';
Line: 1662

      SELECT costadj.id, costadj.parent_object_id
      FROM   okl_cost_adjustments_b costadj,
             okl_assets_b asset
      WHERE  costadj.adjustment_source_type = p_adj_type
      AND  costadj.parent_object_id = asset.id
      AND  costadj.parent_object_code = 'ASSET'
      AND  asset.parent_object_id = p_quote_id
      AND  asset.parent_object_code = 'LEASEQUOTE';
Line: 1672

      SELECT costadj.id, costadj.parent_object_id
      FROM   okl_cost_adjustments_b costadj,
             okl_assets_b asset
      WHERE  costadj.adjustment_source_type = p_adj_type
      AND  costadj.adjustment_source_id = p_adj_source_id
      AND  costadj.parent_object_id = asset.id
      AND  costadj.parent_object_code = 'ASSET'
      AND  asset.parent_object_id = p_quote_id
      AND  asset.parent_object_code = 'LEASEQUOTE';
Line: 1683

    l_delete_flag          VARCHAR2(1);
Line: 1693

        l_delete_flag := 'Y';
Line: 1698

              l_delete_flag := 'N';
Line: 1703

        IF l_delete_flag = 'Y' THEN
          l_asset_adj_tbl(i).id := l_db_adj_assets.id;
Line: 1716

          l_delete_flag := 'Y';
Line: 1721

                l_delete_flag := 'N';
Line: 1726

          IF l_delete_flag = 'Y' THEN
            l_asset_adj_tbl(i).id := l_db_subs_assets.id;
Line: 1734

    x_deleted_adjust_tbl := l_asset_adj_tbl;
Line: 1759

  END get_deleted_adjusted_assets;
Line: 1777

      SELECT parent_object_code
      FROM   okl_lease_quotes_b
      WHERE  id = p_asset_rec.parent_object_id;
Line: 1806

        SELECT currency_code
        INTO   l_currency_code
        FROM   okl_lease_opportunities_b lop,
               okl_lease_quotes_b lsq
        WHERE  lsq.parent_object_code = lv_parent_object_code
        AND    lsq.parent_object_id = lop.id
        AND    lsq.id = p_asset_rec.parent_object_id;
Line: 1814

        SELECT currency_code
        INTO   l_currency_code
        FROM   okl_lease_applications_b lap,
               okl_lease_quotes_b lsq
        WHERE  lsq.parent_object_code = lv_parent_object_code
        AND    lsq.parent_object_id = lap.id
        AND    lsq.id = p_asset_rec.parent_object_id;
Line: 1869

    SELECT id
    FROM OKL_ASSETS_B
    WHERE ORIG_ASSET_ID = p_source_asset_id
    AND PARENT_OBJECT_ID = p_target_quote_id;
Line: 1906

      okl_cdj_pvt.insert_row (p_api_version   => G_API_VERSION
                             ,p_init_msg_list => G_FALSE
                             ,x_return_status => x_return_status
                             ,x_msg_count     => x_msg_count
                             ,x_msg_data      => x_msg_data
                             ,p_cdjv_tbl      => l_adjust_tbl
                             ,x_cdjv_tbl      => lx_adjust_tbl );
Line: 1999

          SELECT PRICING_METHOD
          INTO lv_pricing_method
          FROM OKL_LEASE_QUOTES_B
          WHERE ID = p_asset_rec.parent_object_id;
Line: 2016

            SELECT SUM(OEC_PERCENTAGE)
            INTO ln_sum_oec_percentage
            FROM OKL_ASSETS_B
            WHERE PARENT_OBJECT_ID = p_asset_rec.parent_object_id
            AND ID NOT IN (SELECT ID FROM OKL_ASSETS_B WHERE ID = p_asset_rec.id);
Line: 2097

 	     select PARENT_OBJECT_ID
 	     from okl_assets_b
 	     where id=p_asset_id
 	     and parent_object_code='LEASEQUOTE';
Line: 2150

	    SELECT asset_number
	    INTO lv_asset_number
	    FROM okl_assets_b
	    where id = x_asset_id;
Line: 2233

      okl_cdj_pvt.insert_row (p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => x_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_cdjv_tbl      => l_adj_assets_tbl
                           ,x_cdjv_tbl      => lx_adj_assets_tbl );
Line: 2275

    /*SELECT qte.parent_object_id,qte.parent_object_code
    INTO l_p_id,l_p_code
    FROM okl_assets_b ast,okl_lease_quotes_b qte
    WHERE qte.id = ast.parent_object_id
    AND   ast.id= l_asset_adj_tbl(1).parent_object_id;
Line: 2362

  PROCEDURE update_adjustment (p_api_version             IN  NUMBER,
                               p_init_msg_list           IN  VARCHAR2,
                               p_transaction_control     IN  VARCHAR2,
                               p_asset_adj_tbl           IN  asset_adjustment_tbl_type,
                               x_return_status           OUT NOCOPY VARCHAR2,
                               x_msg_count               OUT NOCOPY NUMBER,
                               x_msg_data                OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_adjustment';
Line: 2376

    l_deleted_adjust_tbl   asset_adj_tbl_type;
Line: 2426

      get_deleted_adjusted_assets (p_adj_type             => l_asset_adj_tbl(ln_index).adjustment_source_type,
                                   p_quote_id             => l_asset_adj_tbl(ln_index).quote_id,
                                   p_adjustment_tbl       => l_asset_adj_tbl,
                                   x_deleted_adjust_tbl   => l_deleted_adjust_tbl,
                                   x_return_status        => x_return_status );
Line: 2438

      IF l_deleted_adjust_tbl.COUNT > 0 THEN
        okl_cdj_pvt.delete_row (p_api_version   => G_API_VERSION
                               ,p_init_msg_list => G_FALSE
                               ,x_return_status => x_return_status
                               ,x_msg_count     => x_msg_count
                               ,x_msg_data      => x_msg_data
                               ,p_cdjv_tbl      => l_deleted_adjust_tbl );
Line: 2503

          okl_cdj_pvt.insert_row (p_api_version   => G_API_VERSION
                                 ,p_init_msg_list => G_FALSE
                                 ,x_return_status => x_return_status
                                 ,x_msg_count     => x_msg_count
                                 ,x_msg_data      => x_msg_data
                                 ,p_cdjv_rec      => l_adj_assets_tbl(i)
                                 ,x_cdjv_rec      => lx_adj_assets_tbl(i));
Line: 2533

        ELSIF l_asset_adj_tbl(i).record_mode = 'update' THEN

           --asawanka bug 5025239 fix starts
          IF (l_asset_adj_tbl(i).value IS NULL) THEN
            IF l_asset_adj_tbl(i).adjustment_source_type = 'SUBSIDY' THEN
              IF   l_asset_adj_tbl(i).default_subsidy_amount  IS NULL  THEN
                OKL_API.SET_MESSAGE (p_app_name     => G_APP_NAME,
                                 p_msg_name     => 'OKL_LINKASSET_NULL_FOUND');
Line: 2596

          okl_cdj_pvt.update_row (p_api_version   => G_API_VERSION
                                 ,p_init_msg_list => G_FALSE
                                 ,x_return_status => x_return_status
                                 ,x_msg_count     => x_msg_count
                                 ,x_msg_data      => x_msg_data
                                 ,p_cdjv_rec      => l_adj_assets_tbl(i)
                                 ,x_cdjv_rec      => lx_adj_assets_tbl(i));
Line: 2610

                               ,p_event_mode    => 'update'
                               ,x_msg_count     => x_msg_count
                               ,x_msg_data      => x_msg_data
                               ,x_return_status => x_return_status);
Line: 2646

    /*SELECT qte.parent_object_id,qte.parent_object_code
    INTO l_p_id,l_p_code
    FROM okl_assets_b ast,okl_lease_quotes_b qte
    WHERE qte.id = ast.parent_object_id
    AND   ast.id= l_asset_adj_tbl(1).parent_object_id;
Line: 2713

  PROCEDURE delete_adjustment (p_api_version             IN  NUMBER,
                               p_init_msg_list           IN  VARCHAR2,
                               p_transaction_control     IN  VARCHAR2,
                               p_adjustment_type         IN  VARCHAR2,
                               p_adjustment_id           IN  NUMBER,
                               p_quote_id                IN  NUMBER,
                               x_return_status           OUT NOCOPY VARCHAR2,
                               x_msg_count               OUT NOCOPY NUMBER,
                               x_msg_data                OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'delete_adjustment';
Line: 2732

      SELECT costadj.id, costadj.adjustment_source_id
      FROM   okl_cost_adjustments_b costadj,
             okl_assets_b asset
      WHERE  costadj.adjustment_source_type = p_adjustment_type
      AND  costadj.parent_object_id = asset.id
      AND  costadj.parent_object_code = 'ASSET'
      AND  asset.parent_object_id = p_quote_id
      AND  asset.parent_object_code = 'LEASEQUOTE';
Line: 2742

      SELECT costadj.id,costadj.adjustment_source_type,costadj.processing_type,costadj.stream_type_id
      FROM   okl_cost_adjustments_b costadj
      WHERE  costadj.adjustment_source_type = p_adjustment_type
      AND  costadj.parent_object_id = p_asset_id
      AND  costadj.parent_object_code = 'ASSET';
Line: 2782

      okl_cdj_pvt.delete_row (p_api_version   => G_API_VERSION
                             ,p_init_msg_list => G_FALSE
                             ,x_return_status => x_return_status
                             ,x_msg_count     => x_msg_count
                             ,x_msg_data      => x_msg_data
                             ,p_cdjv_tbl      => l_adj_assets_tbl);
Line: 2801

                                   ,p_event_mode    => 'delete'
                                   ,x_msg_count     => x_msg_count
                                   ,x_msg_data      => x_msg_data
                                   ,x_return_status => x_return_status);
Line: 2817

   /*SELECT parent_object_id,parent_object_code INTO l_p_id,l_p_code
   FROM okl_lease_quotes_b where ID = p_quote_id;
Line: 2910

    SELECT ID
    FROM   OKL_CASH_FLOW_OBJECTS
    WHERE SOURCE_ID = p_src_id
    AND   OTY_CODE = 'QUOTED_ASSET'
    AND SOURCE_TABLE='OKL_ASSETS_B';
Line: 2919

    SELECT CFLOW.ID, CFLOW.STY_ID, CFLOW.DUE_ARREARS_YN, CFLOW.CFT_CODE, STRMTYP.STREAM_TYPE_PURPOSE
    FROM   OKL_CASH_FLOWS CFLOW,
           OKL_STRMTYP_SOURCE_V STRMTYP
    WHERE CFO_ID = p_cfo_id
    AND CFLOW.STY_ID = STRMTYP.ID1;
Line: 2927

    SELECT AMOUNT, NUMBER_OF_PERIODS, FQY_CODE, STUB_DAYS, STUB_AMOUNT
    FROM   OKL_CASH_FLOW_LEVELS
    WHERE CAF_ID = p_caf_id;
Line: 2961

        SELECT parent_object_code
        INTO lv_parent_object_code
        FROM okl_lease_quotes_b
        where id = p_quote_id;
Line: 3055

      SELECT
         attribute_category
        ,attribute1
        ,attribute2
        ,attribute3
        ,attribute4
        ,attribute5
        ,attribute6
        ,attribute7
        ,attribute8
        ,attribute9
        ,attribute10
        ,attribute11
        ,attribute12
        ,attribute13
        ,attribute14
        ,attribute15
        ,object_version_number
        ,asset_number
        ,parent_object_id
        ,parent_object_code
        ,install_site_id
        ,rate_card_id
        ,rate_template_id
        ,oec
        ,end_of_term_value_default
        ,end_of_term_value
        ,oec_percentage
    	,structured_pricing
    	,target_arrears
    	,lease_rate_factor
    	,target_amount
    	,target_frequency
        ,short_description
        ,description
        ,comments
      INTO
         x_asset_rec.attribute_category
        ,x_asset_rec.attribute1
        ,x_asset_rec.attribute2
        ,x_asset_rec.attribute3
        ,x_asset_rec.attribute4
        ,x_asset_rec.attribute5
        ,x_asset_rec.attribute6
        ,x_asset_rec.attribute7
        ,x_asset_rec.attribute8
        ,x_asset_rec.attribute9
        ,x_asset_rec.attribute10
        ,x_asset_rec.attribute11
        ,x_asset_rec.attribute12
        ,x_asset_rec.attribute13
        ,x_asset_rec.attribute14
        ,x_asset_rec.attribute15
        ,x_asset_rec.object_version_number
        ,x_asset_rec.asset_number
        ,x_asset_rec.parent_object_id
        ,x_asset_rec.parent_object_code
        ,x_asset_rec.install_site_id
        ,x_asset_rec.rate_card_id
        ,x_asset_rec.rate_template_id
        ,x_asset_rec.oec
        ,x_asset_rec.end_of_term_value_default
        ,x_asset_rec.end_of_term_value
        ,x_asset_rec.oec_percentage
    	,x_asset_rec.structured_pricing
    	,x_asset_rec.target_arrears
    	,x_asset_rec.lease_rate_factor
    	,x_asset_rec.target_amount
    	,x_asset_rec.target_frequency
        ,x_asset_rec.short_description
        ,x_asset_rec.description
        ,x_asset_rec.comments
      FROM okl_assets_v
      WHERE id = p_asset_id;
Line: 3169

      SELECT
         rate_card_id
        ,rate_template_id
        ,structured_pricing
    	,target_arrears
	    ,lease_rate_factor
    	,target_amount
	    ,target_frequency
      INTO
         x_asset_rec.rate_card_id
        ,x_asset_rec.rate_template_id
    	,x_asset_rec.structured_pricing
    	,x_asset_rec.target_arrears
    	,x_asset_rec.lease_rate_factor
    	,x_asset_rec.target_amount
    	,x_asset_rec.target_frequency
      FROM okl_assets_v
      WHERE id = p_source_asset_id;
Line: 3225

      SELECT
         id
        ,attribute_category
        ,attribute1
        ,attribute2
        ,attribute3
        ,attribute4
        ,attribute5
        ,attribute6
        ,attribute7
        ,attribute8
        ,attribute9
        ,attribute10
        ,attribute11
        ,attribute12
        ,attribute13
        ,attribute14
        ,attribute15
        ,asset_id
        ,object_version_number
        ,inv_item_id
        ,supplier_id
        ,primary_component
        ,unit_cost
        ,number_of_units
        ,manufacturer_name
        ,year_manufactured
        ,model_number
        ,short_description
        ,description
        ,comments
      FROM okl_asset_components_v
      WHERE asset_id = p_asset_id;
Line: 3365

      SELECT quote.expected_start_date,
             quote.product_id,
             quote.pricing_method,
             quote.end_of_term_option_id
      INTO ld_src_start_date, ln_src_pdt_id, lv_src_pricing_type, ln_src_eot_id
      FROM
           okl_assets_b asset,
           okl_lease_quotes_b quote
      WHERE
         asset.id = p_source_asset_id
      AND asset.parent_object_id = quote.id
      AND asset.parent_object_code = 'LEASEQUOTE';
Line: 3378

      SELECT expected_start_date,
             product_id,
             pricing_method,
             parent_object_code,
             end_of_term_option_id
      INTO ld_tgt_start_date, ln_tgt_pdt_id, lv_tgt_pricing_type,l_parent_object_code, ln_tgt_eot_id
      FROM
           okl_lease_quotes_b
      WHERE
           id = p_target_quote_id;
Line: 3445

        SELECT okl_qua_ref_seq.nextval INTO l_asset_rec.asset_number FROM DUAL;
Line: 3459

        okl_ass_pvt.insert_row (
                            p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => x_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_assv_rec      => l_asset_rec
                           ,x_assv_rec      => lx_asset_rec );
Line: 3505

        okl_aso_pvt.insert_row (
                            p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => x_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_asov_tbl      => l_component_tbl
                           ,x_asov_tbl      => lx_component_tbl);
Line: 3630

    SELECT okl_qua_ref_seq.nextval INTO l_asset_rec.asset_number FROM DUAL;
Line: 3675

    okl_ass_pvt.insert_row (
                            p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_assv_rec      => l_asset_rec
                           ,x_assv_rec      => lx_asset_rec
                           );
Line: 3710

    okl_aso_pvt.insert_row (
                            p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_asov_tbl      => l_component_tbl
                           ,x_asov_tbl      => lx_component_tbl );
Line: 3857

    SELECT okl_qua_ref_seq.nextval INTO l_asset_rec.asset_number FROM DUAL;
Line: 3891

    okl_ass_pvt.insert_row (p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_assv_rec      => l_asset_rec
                           ,x_assv_rec      => lx_asset_rec );
Line: 3924

    okl_aso_pvt.insert_row (p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_asov_tbl      => l_component_tbl
                           ,x_asov_tbl      => lx_component_tbl );
Line: 3963

   /*SELECT parent_object_id,parent_object_code INTO l_p_id,l_p_code
   FROM okl_lease_quotes_b where ID = l_asset_rec.parent_object_id;
Line: 4027

  PROCEDURE delete_asset (p_api_version             IN  NUMBER,
                          p_init_msg_list           IN  VARCHAR2,
                          p_transaction_control     IN  VARCHAR2,
                          p_asset_id                IN  NUMBER,
                          x_return_status           OUT NOCOPY VARCHAR2,
                          x_msg_count               OUT NOCOPY NUMBER,
                          x_msg_data                OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'delete_asset';
Line: 4053

    SELECT ID
    FROM   OKL_ASSET_COMPONENTS_B
    WHERE  ASSET_ID = p_asset_id;
Line: 4059

    SELECT ID
    FROM   OKL_LINE_RELATIONSHIPS_B
    WHERE  SOURCE_LINE_ID = p_asset_id;
Line: 4081

      okl_aso_pvt.delete_row (
                              p_api_version   => G_API_VERSION
                             ,p_init_msg_list => G_FALSE
                             ,x_return_status => l_return_status
                             ,x_msg_count     => x_msg_count
                             ,x_msg_data      => x_msg_data
                             ,p_asov_tbl      => l_component_tbl);
Line: 4097

    okl_lease_quote_cashflow_pvt.delete_cashflows (
      p_api_version          => G_API_VERSION
     ,p_init_msg_list        => G_FALSE
     ,p_transaction_control  => G_FALSE
     ,p_source_object_code   => 'QUOTED_ASSET'
     ,p_source_object_id     => p_asset_id
     ,x_return_status        => l_return_status
     ,x_msg_count            => x_msg_count
     ,x_msg_data             => x_msg_data );
Line: 4116

    OKL_ASS_PVT.delete_row (
                            p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_assv_rec      => l_asset_rec);
Line: 4131

   /*SELECT qte.parent_object_id,qte.parent_object_code
   INTO l_p_id,l_p_code
   FROM okl_lease_quotes_b qte,
        okl_assets_b ast
   WHERE ast.parent_object_id = qte.id
   AND   ast.ID = l_asset_id;
Line: 4193

  END delete_asset;
Line: 4198

  PROCEDURE update_asset (p_api_version             IN  NUMBER,
                          p_init_msg_list           IN  VARCHAR2,
                          p_transaction_control     IN  VARCHAR2,
                          p_asset_rec               IN  asset_rec_type,
                          p_component_tbl           IN  asset_component_tbl_type,
                          p_cf_hdr_rec              IN  cashflow_hdr_rec_type,
                          p_cf_level_tbl            IN  cashflow_level_tbl_type,
                          x_return_status           OUT NOCOPY VARCHAR2,
                          x_msg_count               OUT NOCOPY NUMBER,
                          x_msg_data                OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_asset';
Line: 4218

    l_deleted_addon_tbl    component_tbl_type;
Line: 4234

    SELECT 'YES'
    FROM   OKL_CASH_FLOW_OBJECTS
    WHERE OTY_CODE = 'QUOTED_ASSET'
    AND   SOURCE_TABLE = 'OKL_ASSETS_B'
    AND   SOURCE_ID    = p_asset_id;
Line: 4314

            l_asset_comp_tbl(i).record_mode := 'update';
Line: 4329

      get_deleted_addons (p_asset_id          => l_asset_rec.id
                         ,p_component_tbl     => l_asset_comp_tbl
                         ,x_deleted_addon_tbl => l_deleted_addon_tbl
                         ,x_return_status     => l_return_status );
Line: 4340

      IF l_deleted_addon_tbl.COUNT > 0 THEN
        okl_aso_pvt.delete_row (p_api_version   => G_API_VERSION
                               ,p_init_msg_list => G_FALSE
                               ,x_return_status => l_return_status
                               ,x_msg_count     => x_msg_count
                               ,x_msg_data      => x_msg_data
                               ,p_asov_tbl      => l_deleted_addon_tbl );
Line: 4389

    okl_ass_pvt.update_row (p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_assv_rec      => l_asset_rec
                           ,x_assv_rec      => lx_asset_rec );
Line: 4421

            okl_aso_pvt.insert_row (  p_api_version   => G_API_VERSION
                                     ,p_init_msg_list => G_FALSE
                                     ,x_return_status => l_return_status
                                     ,x_msg_count     => x_msg_count
                                     ,x_msg_data      => x_msg_data
                                     ,p_asov_rec      => l_component_tbl(i)
                                     ,x_asov_rec      => lx_component_tbl(i));
Line: 4433

          ELSIF l_asset_comp_tbl(i).record_mode = 'update' THEN

            l_component_tbl(i).id := l_asset_comp_tbl(i).id;
Line: 4450

            okl_aso_pvt.update_row (  p_api_version   => G_API_VERSION
                                     ,p_init_msg_list => G_FALSE
                                     ,x_return_status => l_return_status
                                     ,x_msg_count     => x_msg_count
                                     ,x_msg_data      => x_msg_data
                                     ,p_asov_rec      => l_component_tbl(i)
                                     ,x_asov_rec      => lx_component_tbl(i));
Line: 4481

        OKL_LEASE_QUOTE_CASHFLOW_PVT.update_cashflow (
                            p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,p_transaction_control => 'T'
                           ,p_cashflow_header_rec => l_cf_hdr_rec
                           ,p_cashflow_level_tbl => l_cashflow_level_tbl
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data);
Line: 4515

   /*SELECT parent_object_id,parent_object_code INTO l_p_id,l_p_code
   FROM okl_lease_quotes_b where ID = l_asset_rec.parent_object_id;
Line: 4575

  END update_asset;
Line: 4610

    SELECT  LOP.SUPPLIER_ID  supplier_id
    FROM OKL_LEASE_OPPORTUNITIES_B LOP,
         OKL_LEASE_QUOTES_B QTE
    WHERE LOP.ID = QTE.parent_object_id
    AND  qte.id = p_qte_id;
Line: 4630

    okl_ass_pvt.insert_row (p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_assv_tbl      => l_asset_tbl
                           ,x_assv_tbl      => lx_asset_tbl );
Line: 4668

    okl_aso_pvt.insert_row (p_api_version   => G_API_VERSION
                           ,p_init_msg_list => G_FALSE
                           ,x_return_status => l_return_status
                           ,x_msg_count     => x_msg_count
                           ,x_msg_data      => x_msg_data
                           ,p_asov_tbl      => l_component_tbl
                           ,x_asov_tbl      => lx_component_tbl );
Line: 4725

      okl_cdj_pvt.insert_row (p_api_version   => G_API_VERSION
                             ,p_init_msg_list => G_FALSE
                             ,x_return_status => x_return_status
                             ,x_msg_count     => x_msg_count
                             ,x_msg_data      => x_msg_data
                             ,p_cdjv_tbl      => l_adj_assets_tbl
                             ,x_cdjv_tbl      => lx_adj_assets_tbl );
Line: 4829

    Select   PERCENT, MAXIMUM_FINANCED_AMOUNT, MAXIMUM_SUBSIDY_AMOUNT
    FROM     okl_subsidies_b
    WHERE id = p_subsidy_id;