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
        ,fee_purpose_code -- Bug#9708535
      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
        ,x_fee_rec.fee_purpose_code -- Bug#9708535
      FROM okl_fees_v
      WHERE id = p_fee_id;
Line: 583

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

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

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

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

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

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

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

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

    l_delete_flag          VARCHAR2(1);
Line: 793

        l_delete_flag := 'Y';
Line: 797

              l_delete_flag := 'N';
Line: 802

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

    x_deleted_assoc_asset_tbl := l_assoc_asset_tbl;
Line: 837

  END get_deleted_assoc_assets;
Line: 879

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

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

    l_assoc_update_tbl          assoc_asset_tbl_type;
Line: 937

    l_deleted_assoc_assets_tbl  assoc_asset_tbl_type;
Line: 943

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

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

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

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

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

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

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

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

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

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

            l_assoc_update_tbl(i).origination_income    := l_line_relation_tbl(i).origination_income;
Line: 1010

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

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

  END update_line_associations;
Line: 1093

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

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

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

  END update_header;
Line: 1257

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

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

  END update_payment;
Line: 1384

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

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

  END update_expense;
Line: 1632

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

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

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

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

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

  END update_fee ;
Line: 1943

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

    select fee_purpose_code
    FROM okl_fees_b
    where id = cp_id;
Line: 2068

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

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

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

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

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

  END update_fee;
Line: 2221

      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
        --added following field by jjuneja
	,origination_income
      from okl_line_relationships_v
      where source_line_type = 'ASSET'
  	  and related_line_id = p_source_fee_id;
Line: 2326

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

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

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

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

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

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

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

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

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

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

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

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

  END delete_fee;