DBA Data[Home] [Help]

APPS.OKL_LEASE_QUOTE_FEE_PVT SQL Statements

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

Line: 14

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

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

    SELECT expected_start_date
    INTO   l_k_effective_from
    FROM   okl_lease_quotes_b
    WHERE  id = l_fee_rec.parent_object_id;
Line: 173

    SELECT expected_start_date,
           ADD_MONTHS(expected_start_date, term)-1
    INTO   l_quote_start_date,
           l_quote_end_date
    FROM   okl_lease_quotes_b
    WHERE  id = p_fee_rec.parent_object_id;
Line: 303

      SELECT
      	 id
        ,object_version_number
        ,source_line_type
		,source_line_id
		,related_line_type
		,related_line_id
		,amount
        ,short_description
        ,description
        ,comments
      FROM okl_line_relationships_v
      WHERE related_line_id = p_fee_id;
Line: 368

      SELECT
         id
        ,attribute_category
        ,attribute1
        ,attribute2
        ,attribute3
        ,attribute4
        ,attribute5
        ,attribute6
        ,attribute7
        ,attribute8
        ,attribute9
        ,attribute10
        ,attribute11
        ,attribute12
        ,attribute13
        ,attribute14
        ,attribute15
        ,object_version_number
        ,parent_object_id
        ,parent_object_code
        ,stream_type_id
        ,fee_type
        ,rate_card_id
        ,rate_template_id
        ,effective_from
        ,effective_to
        ,supplier_id
        ,rollover_quote_id
        ,initial_direct_cost
        ,fee_amount
		,structured_pricing
		,target_arrears
		,lease_rate_factor
		,target_frequency
		,target_amount
        ,short_description
        ,description
        ,comments
        ,payment_type_id
      INTO
         x_fee_rec.id
        ,x_fee_rec.attribute_category
        ,x_fee_rec.attribute1
        ,x_fee_rec.attribute2
        ,x_fee_rec.attribute3
        ,x_fee_rec.attribute4
        ,x_fee_rec.attribute5
        ,x_fee_rec.attribute6
        ,x_fee_rec.attribute7
        ,x_fee_rec.attribute8
        ,x_fee_rec.attribute9
        ,x_fee_rec.attribute10
        ,x_fee_rec.attribute11
        ,x_fee_rec.attribute12
        ,x_fee_rec.attribute13
        ,x_fee_rec.attribute14
        ,x_fee_rec.attribute15
        ,x_fee_rec.object_version_number
        ,x_fee_rec.parent_object_id
        ,x_fee_rec.parent_object_code
        ,x_fee_rec.stream_type_id
        ,x_fee_rec.fee_type
        ,x_fee_rec.rate_card_id
        ,x_fee_rec.rate_template_id
        ,x_fee_rec.effective_from
        ,x_fee_rec.effective_to
        ,x_fee_rec.supplier_id
        ,x_fee_rec.rollover_quote_id
        ,x_fee_rec.initial_direct_cost
        ,x_fee_rec.fee_amount
		,x_fee_rec.structured_pricing
		,x_fee_rec.target_arrears
		,x_fee_rec.lease_rate_factor
		,x_fee_rec.target_frequency
		,x_fee_rec.target_amount
        ,x_fee_rec.short_description
        ,x_fee_rec.description
        ,x_fee_rec.comments
        ,x_fee_rec.payment_type_id
      FROM okl_fees_v
      WHERE id = p_fee_id;
Line: 581

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

    SELECT PRICING_METHOD
    INTO lv_pricing_method
    FROM OKL_LEASE_QUOTES_B
    WHERE ID = p_quote_id;
Line: 614

      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_quote_id;
Line: 622

      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_quote_id;
Line: 640

        SELECT NVL(OEC, 0)
        INTO   l_asset_oec
        FROM   okl_assets_b
        WHERE  id = l_link_asset_tbl(i).source_line_id;
Line: 668

          SELECT NVL(OEC, 0)
          INTO   l_asset_oec
          FROM   okl_assets_b
          WHERE  id = l_link_asset_tbl(i).source_line_id;
Line: 769

  PROCEDURE get_deleted_assoc_assets (p_fee_id                  IN  NUMBER,
                                      p_fee_type                IN  VARCHAR2,
                                      p_assoc_asset_tbl         IN  line_relation_tbl_type,
                                      x_deleted_assoc_asset_tbl OUT NOCOPY assoc_asset_tbl_type,
                                      x_return_status           OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'get_deleted_assoc_assets';
Line: 779

    SELECT id
    FROM   okl_line_relationships_b
    WHERE  related_line_type = p_fee_type
    AND    related_line_id = p_fee_id;
Line: 785

    l_delete_flag          VARCHAR2(1);
Line: 791

        l_delete_flag := 'Y';
Line: 795

              l_delete_flag := 'N';
Line: 800

        IF l_delete_flag = 'Y' THEN
          l_assoc_asset_tbl(i).id := l_db_assoc_assets.id;
Line: 812

    x_deleted_assoc_asset_tbl := l_assoc_asset_tbl;
Line: 835

  END get_deleted_assoc_assets;
Line: 873

    okl_lre_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_lrev_tbl      => l_assoc_assets_tbl
     ,x_lrev_tbl      => lx_assoc_assets_tbl
     );
Line: 915

  PROCEDURE update_line_associations (
     p_fee_id                  IN  NUMBER
    ,p_fee_type                IN  VARCHAR2
    ,p_assoc_assets_tbl        IN  line_relation_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_line_associations';
Line: 927

    l_assoc_update_tbl          assoc_asset_tbl_type;
Line: 931

    l_deleted_assoc_assets_tbl  assoc_asset_tbl_type;
Line: 937

    get_deleted_assoc_assets (
      p_fee_id                  => p_fee_id
     ,p_fee_type                => p_fee_type
     ,p_assoc_asset_tbl         => l_line_relation_tbl
     ,x_deleted_assoc_asset_tbl => l_deleted_assoc_assets_tbl
     ,x_return_status           => x_return_status
     );
Line: 951

    IF l_deleted_assoc_assets_tbl.COUNT > 0 THEN
      okl_lre_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_lrev_tbl      => l_deleted_assoc_assets_tbl );
Line: 972

          IF UPPER(l_line_relation_tbl(i).record_mode) = 'UPDATE' THEN

            l_assoc_update_tbl(i).id                    := l_line_relation_tbl(i).id;
Line: 975

            l_assoc_update_tbl(i).object_version_number := l_line_relation_tbl(i).object_version_number;
Line: 976

            l_assoc_update_tbl(i).related_line_id       := l_line_relation_tbl(i).related_line_id;
Line: 977

            l_assoc_update_tbl(i).related_line_type     := l_line_relation_tbl(i).related_line_type;
Line: 978

            l_assoc_update_tbl(i).source_line_type      := l_line_relation_tbl(i).source_line_type;
Line: 979

            l_assoc_update_tbl(i).source_line_id        := l_line_relation_tbl(i).source_line_id;
Line: 980

            l_assoc_update_tbl(i).amount                := l_line_relation_tbl(i).amount;
Line: 998

    IF l_assoc_update_tbl.COUNT > 0 THEN

      okl_lre_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_lrev_tbl      => l_assoc_update_tbl
       ,x_lrev_tbl      => lx_assoc_assets_tbl
       );
Line: 1020

      okl_lre_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_lrev_tbl      => l_assoc_create_tbl
       ,x_lrev_tbl      => lx_assoc_assets_tbl
       );
Line: 1060

  END update_line_associations;
Line: 1081

    okl_fee_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_feev_rec       => p_fee_rec
     ,x_feev_rec       => l_fee_rec
     );
Line: 1125

  PROCEDURE update_header (
    p_fee_rec                 IN  okl_fee_pvt.feev_rec_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_header';
Line: 1139

    okl_fee_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_feev_rec       => p_fee_rec
     ,x_feev_rec       => l_fee_rec
     );
Line: 1175

  END update_header;
Line: 1245

  PROCEDURE update_payment (
     p_fee_id                  IN  NUMBER
    ,p_payment_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
    ,p_payment_level_tbl       IN  okl_lease_quote_cashflow_pvt.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_payment';
Line: 1265

    okl_lease_quote_cashflow_pvt.update_cashflow (
      p_api_version          => G_API_VERSION
     ,p_init_msg_list        => G_FALSE
     ,p_transaction_control  => G_FALSE
     ,p_cashflow_header_rec  => l_payment_header_rec
     ,p_cashflow_level_tbl   => l_payment_level_tbl
     ,x_return_status        => x_return_status
     ,x_msg_count            => x_msg_count
     ,x_msg_data             => x_msg_data
     );
Line: 1302

  END update_payment;
Line: 1372

  PROCEDURE update_expense (
     p_fee_id                  IN  NUMBER
    ,p_expense_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
    ,p_expense_level_tbl       IN  okl_lease_quote_cashflow_pvt.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_expense';
Line: 1392

    okl_lease_quote_cashflow_pvt.update_cashflow (
      p_api_version          => G_API_VERSION
     ,p_init_msg_list        => G_FALSE
     ,p_transaction_control  => G_FALSE
     ,p_cashflow_header_rec  => l_expense_header_rec
     ,p_cashflow_level_tbl   => l_expense_level_tbl
     ,x_return_status        => x_return_status
     ,x_msg_count            => x_msg_count
     ,x_msg_data             => x_msg_data
     );
Line: 1429

  END update_expense;
Line: 1620

   SELECT parent_object_id,parent_object_code INTO l_p_id,l_p_code
   FROM okl_lease_quotes_b where ID = l_fee_rec.parent_object_id;
Line: 1740

  PROCEDURE update_fee (
    p_api_version             IN  NUMBER
   ,p_init_msg_list           IN  VARCHAR2
   ,p_transaction_control     IN  VARCHAR2
   ,p_fee_rec                 IN  fee_rec_type
   ,p_sync_fee_header	  	  IN  VARCHAR2 DEFAULT 'Y'
   ,p_sync_line_relations	  IN  VARCHAR2 DEFAULT 'N'
   ,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_fee';
Line: 1793

	  -- Update Fee Header
      update_header (
        p_fee_rec       => l_fee_rec
       ,x_return_status => x_return_status
       ,x_msg_count     => x_msg_count
       ,x_msg_data      => x_msg_data );
Line: 1848

          okl_lre_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_lrev_tbl      => l_line_relation_tbl
        	 ,x_lrev_tbl      => lx_line_relation_tbl);
Line: 1867

   SELECT parent_object_id,parent_object_code INTO l_p_id,l_p_code
   FROM okl_lease_quotes_b where ID = l_fee_rec.parent_object_id;
Line: 1926

  END update_fee ;
Line: 1931

  PROCEDURE update_fee (
    p_api_version             IN  NUMBER
   ,p_init_msg_list           IN  VARCHAR2
   ,p_transaction_control     IN  VARCHAR2
   ,p_fee_rec                 IN  fee_rec_type
   ,p_assoc_asset_tbl         IN  line_relation_tbl_type
   ,p_payment_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
   ,p_payment_level_tbl       IN  okl_lease_quote_cashflow_pvt.cashflow_level_tbl_type
   ,p_expense_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
   ,p_expense_level_tbl       IN  okl_lease_quote_cashflow_pvt.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_fee';
Line: 2036

    update_header (
      p_fee_rec       => l_fee_rec
     ,x_return_status => l_return_status
     ,x_msg_count     => x_msg_count
     ,x_msg_data      => x_msg_data );
Line: 2051

    update_line_associations (
      p_fee_id             => l_fee_id
     ,p_fee_type           => l_fee_type
     ,p_assoc_assets_tbl   => l_line_relation_tbl
     ,x_return_status      => l_return_status
     ,x_msg_count          => x_msg_count
     ,x_msg_data           => x_msg_data
     );
Line: 2078

      update_payment (
        p_fee_id              => l_fee_id
       ,p_payment_header_rec  => p_payment_header_rec
       ,p_payment_level_tbl   => p_payment_level_tbl
       ,x_return_status       => l_return_status
       ,x_msg_count           => x_msg_count
       ,x_msg_data            => x_msg_data
       );
Line: 2097

      update_expense (
        p_fee_id              => l_fee_id
       ,p_expense_header_rec  => l_expense_hdr_rec
       ,p_expense_level_tbl   => l_expense_level_tbl
       ,x_return_status       => l_return_status
       ,x_msg_count           => x_msg_count
       ,x_msg_data            => x_msg_data
       );
Line: 2115

   SELECT parent_object_id,parent_object_code INTO l_p_id,l_p_code
   FROM okl_lease_quotes_b where ID = l_fee_rec.parent_object_id;
Line: 2174

  END update_fee;
Line: 2189

      SELECT
         attribute_category
        ,attribute1
        ,attribute2
        ,attribute3
        ,attribute4
        ,attribute5
        ,attribute6
        ,attribute7
        ,attribute8
        ,attribute9
        ,attribute10
        ,attribute11
        ,attribute12
        ,attribute13
        ,attribute14
        ,attribute15
        ,source_line_type
        ,source_line_id
        ,related_line_type
        ,related_line_id
        ,amount
        ,short_description
        ,description
        ,comments
      from okl_line_relationships_v
      where source_line_type = 'ASSET'
  	  and related_line_id = p_source_fee_id;
Line: 2289

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

    SELECT PARENT_OBJECT_ID
    INTO ln_target_quote_id
    FROM OKL_FEES_B
    WHERE ID = p_target_fee_id;
Line: 2322

      okl_lre_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_lrev_tbl      => l_lrship_tbl
       ,x_lrev_tbl      => lx_lrship_tbl );
Line: 2526

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

    SELECT quote.expected_start_date,
           quote.product_id,
           quote.end_of_term_option_id
    INTO ld_src_start_date, ln_src_pdt_id, ln_src_eot_id
    FROM
           okl_fees_b fee,
           okl_lease_quotes_b quote
    WHERE
       	 fee.id = p_source_fee_id
     AND fee.parent_object_id = quote.id
     AND fee.parent_object_code = 'LEASEQUOTE';
Line: 2682

  PROCEDURE delete_fee (
    p_api_version             IN  NUMBER
   ,p_init_msg_list           IN  VARCHAR2
   ,p_transaction_control     IN  VARCHAR2
   ,p_fee_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_fee';
Line: 2703

      SELECT id
      FROM   okl_line_relationships_b
      WHERE  related_line_type = p_fee_type
      AND    related_line_id = p_fee_id;
Line: 2718

    SELECT fee_type INTO l_fee_type FROM okl_fees_b WHERE id = p_fee_id;
Line: 2728

      okl_lre_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_lrev_tbl      => l_assoc_asset_tbl
       );
Line: 2745

    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_FEE'
     ,p_source_object_id     => p_fee_id
     ,x_return_status        => x_return_status
     ,x_msg_count            => x_msg_count
     ,x_msg_data             => x_msg_data
    );
Line: 2764

    okl_fee_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_feev_rec      => l_fee_rec
     );
Line: 2780

	SELECT qte.parent_object_id,qte.parent_object_code
    INTO l_p_id,l_p_code
    FROM okl_lease_quotes_b qte,
        okl_fees_b fee
    WHERE fee.parent_object_id = qte.id
    AND   fee.parent_object_code= 'LEASEQUOTE'
    AND   fee.ID = p_fee_id;
Line: 2843

  END delete_fee;