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: 785

    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: 807

    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: 829

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

  	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: 1082

  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: 1151

	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: 1167

	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: 1183

	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: 1193

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

  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: 1285

  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: 1307

  	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: 1361

      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: 1463

  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: 1472

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

    l_delete_flag          VARCHAR2(1);
Line: 1485

      l_delete_flag := 'Y';
Line: 1490

            l_delete_flag := 'N';
Line: 1495

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

    x_deleted_addon_tbl := l_addon_tbl;
Line: 1527

  END get_deleted_addons;
Line: 1540

  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: 1656

  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: 1666

      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: 1676

      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: 1687

    l_delete_flag          VARCHAR2(1);
Line: 1697

        l_delete_flag := 'Y';
Line: 1702

              l_delete_flag := 'N';
Line: 1707

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

          l_delete_flag := 'Y';
Line: 1725

                l_delete_flag := 'N';
Line: 1730

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

    x_deleted_adjust_tbl := l_asset_adj_tbl;
Line: 1763

  END get_deleted_adjusted_assets;
Line: 1781

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

        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: 1818

        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: 1873

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

      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: 2003

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

            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: 2101

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

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

      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: 2279

    /*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: 2366

  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: 2380

    l_deleted_adjust_tbl   asset_adj_tbl_type;
Line: 2430

      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: 2442

      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: 2507

          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: 2537

        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: 2600

          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: 2614

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

    /*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: 2717

  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: 2736

      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: 2746

      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: 2786

      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: 2805

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

   /*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: 2914

    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: 2923

    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: 2931

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

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

      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: 3173

      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: 3229

      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: 3369

      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: 3382

      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: 3449

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

        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: 3509

        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: 3634

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

    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: 3714

    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: 3861

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

    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: 3928

    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: 3967

   /*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: 4031

  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: 4057

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

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

      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: 4101

    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: 4120

    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: 4135

   /*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: 4197

  END delete_asset;
Line: 4202

  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: 4222

    l_deleted_addon_tbl    component_tbl_type;
Line: 4238

    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: 4318

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

      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: 4344

      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: 4393

    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: 4425

            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: 4437

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

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

            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: 4485

        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: 4519

   /*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: 4579

  END update_asset;
Line: 4614

    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: 4634

    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: 4672

    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: 4729

      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: 4833

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