DBA Data[Home] [Help]

APPS.OKL_SUBSIDY_POOL_RPT_PVT SQL Statements

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

Line: 302

  SELECT budget_type_code,
         budget_amount,
         decision_status_code,
         effective_from_date
  FROM   okl_subsidy_pool_budgets_b
  WHERE  subsidy_pool_id = cp_pool_id
  AND    TRUNC(effective_from_date) <= NVL(TRUNC(cp_to_date),TRUNC(effective_from_date));
Line: 473

  SELECT trx_type_code,
--STRAT: 02-NOV-05  cklee    - Fixed bug#4705629                          |
         trx_amount,
         trx_currency_code,
--         subsidy_pool_amount,
--END  : 02-NOV-05  cklee    - Fixed bug#4705629                          |
         source_trx_date,
         trx_date
  FROM  okl_trx_subsidy_pools
  WHERE subsidy_pool_id = cp_pool_id
  AND   TRUNC(source_trx_date) <= NVL(TRUNC(cp_to_date), TRUNC(source_trx_date));
Line: 644

SELECT id,
       subsidy_pool_name,
       pool_type_code,
       currency_code,
       currency_conversion_type,
       reporting_pool_limit,
       effective_from_date
FROM   okl_subsidy_pools_b
WHERE  id = cp_pool_id
AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 701

  SELECT id ,
         currency_code,
         currency_conversion_type
  FROM okl_subsidy_pools_b pool
  WHERE pool_type_code = 'BUDGET'
  CONNECT BY PRIOR id = subsidy_pool_id
  START WITH id = cp_pool_id;
Line: 962

SELECT id,
       subsidy_pool_name,
       pool_type_code,
       currency_code,
       currency_conversion_type,
       reporting_pool_limit,
       effective_from_date
FROM   okl_subsidy_pools_b
WHERE  subsidy_pool_id = cp_pool_id
AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end))
ORDER BY subsidy_pool_name;
Line: 1021

  SELECT id ,
         currency_code,
         currency_conversion_type
  FROM okl_subsidy_pools_b pool
  WHERE pool_type_code = 'BUDGET'
  CONNECT BY PRIOR id = subsidy_pool_id
  START WITH id = cp_pool_id;
Line: 1540

  SELECT id ,
         currency_code
  FROM okl_subsidy_pools_v pool
  WHERE pool_type_code = 'BUDGET'
  CONNECT BY PRIOR id = subsidy_pool_id
  START WITH id = cp_pool_id;
Line: 1793

   SELECT flk1.meaning trx_reason,
--START:14-DEC-05  cklee    - Fixed bug#4884558                          |
--          khr.contract_number,
        (case
           when pool.source_type_code = 'LEASE_CONTRACT' then
             (select khr.contract_number
              from okc_k_headers_b khr
              where khr.id = pool.source_object_id)
--START:|           26-JAN-05  cklee    - Fixed bug#5002229                          |
--           when pool.source_type_code in ('SALES_QUOTE', 'LEASE_APPLICATION') then
           when pool.source_type_code = 'SALES_QUOTE' then
--END|           26-JAN-05  cklee    - Fixed bug#5002229                          |
             (select sq.reference_number
              from okl_lease_quotes_b sq
              where sq.id = pool.source_object_id)
--START:|           26-JAN-05  cklee    - Fixed bug#5002229                          |
           when pool.source_type_code = 'LEASE_APPLICATION' then
--END|           26-JAN-05  cklee    - Fixed bug#5002229                          |
             (select lap.reference_number
              from okl_lease_applications_b lap,
                   okl_lease_quotes_b lsq
              where lsq.parent_object_id = lap.id
              and lsq.parent_object_code = 'LEASEAPP'
              and lsq.id = pool.source_object_id)
--END|           26-JAN-05  cklee    - Fixed bug#5002229                          |
         end) contract_number,
--END:14-DEC-05  cklee    - Fixed bug#4884558                          |
          dnz_asset_number,
          vend.vendor_name Vendor,
          sub.name subsidy_name,
          trx_type_code,
          source_trx_date,
          trx_currency_code,
          trx_amount,
          subsidy_pool_currency_code,
          pool.conversion_rate,
          subsidy_pool_amount,
          trx_date,
-- abindal start bug# 4873705 --
          hru.name operating_unit
-- abindal end bug# 4873705 --
   FROM okl_trx_subsidy_pools pool,
        fnd_lookups flk1,
        po_vendors vend,
        okl_subsidies_b sub,
-- abindal start bug# 4873705 --
        hr_organization_units hru
-- abindal end bug# 4873705 --
--START:14-DEC-05  cklee    - Fixed bug#4884558                          |
--,       okc_k_headers_b khr
--END:14-DEC-05  cklee    - Fixed bug#4884558                          |
   WHERE  flk1.lookup_type = 'OKL_SUB_POOL_TRX_REASON_TYPE'
   AND    flk1.lookup_code = pool.trx_reason_code
   AND vend.vendor_id = pool.vendor_id
   AND sub.id = pool.subsidy_id
--   AND TRUNC(source_trx_date) >= NVL(TRUNC(cp_from_date),TRUNC(source_trx_date))
--   AND TRUNC(source_trx_date) <= NVL(TRUNC(cp_to_date), TRUNC(source_trx_date))
   AND pool.subsidy_pool_id IN ( SELECT id
                                 FROM okl_subsidy_pools_b
                                 WHERE pool_type_code = 'BUDGET'
                                 CONNECT BY PRIOR id = subsidy_pool_id
                                 START WITH id = cp_pool_id
                                )
--START:14-DEC-05  cklee    - Fixed bug#4884558                          |
--   AND khr.id = pool.source_object_id
--END:14-DEC-05  cklee    - Fixed bug#4884558                          |
-- abindal start bug# 4873705 --
AND sub.org_id = hru.organization_id
-- abindal end bug# 4873705 --
--START:           09-Mar-05  cklee    - Fixed bug#4659748                          |
--ORDER BY source_trx_date;
Line: 2318

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date,
          decision_status_code
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND   CASE WHEN NVL(total_budgets,0) = 0 THEN 0
              ELSE ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets END <= cp_percent
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 2344

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date,
          decision_status_code
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND   NVL(total_budgets - NVL(total_subsidy_amount,0),0) <= cp_remaining
   AND   currency_code = cp_currency
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 2370

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND   TRUNC(effective_to_date) >= TRUNC(SYSDATE)
   AND   TRUNC(effective_to_date) <= TRUNC(cp_date)
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 2395

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date,
          trunc(effective_to_date) - trunc(sysdate) remaining_days
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND trunc(effective_to_date) - trunc(sysdate) between 0 and cp_days
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 2871

  SELECT id ,
         currency_code,
         currency_conversion_type
  FROM okl_subsidy_pools_b pool
  WHERE pool_type_code = 'BUDGET'
  CONNECT BY PRIOR id = subsidy_pool_id
  START WITH id = cp_pool_id;
Line: 3081

  SELECT nvl(parent.id,chld.id) parent_id,
  nvl(parent.subsidy_pool_name,chld.subsidy_pool_name) parent_subsidy_pool_name,
  LEVEL,
  decode(parent.id,NULL,parent.id,chld.id) chld_id,
  decode(parent.subsidy_pool_name,NULL,parent.subsidy_pool_name,chld.subsidy_pool_name) chld_subsidy_pool_name
  FROM okl_subsidy_pools_b parent,
  okl_subsidy_pools_b chld
  WHERE chld.pool_type_code IN('BUDGET', 'REPORTING')
   AND parent.id(+) = chld.subsidy_pool_id
  CONNECT BY PRIOR chld.id = chld.subsidy_pool_id START WITH chld.id = cp_pool_id
  AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = chld.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end))
  ORDER BY LEVEL,
  parent.subsidy_pool_name;
Line: 3103

 SELECT id,
       subsidy_pool_name,
       pool_type_code,
       currency_code,
       currency_conversion_type,
       reporting_pool_limit,
       effective_from_date
  FROM   okl_subsidy_pools_b
 WHERE  id = cp_pool_id;
Line: 3244

   INSERT INTO
          OKL_G_REPORTS_GT (VALUE1_TEXT,
		VALUE2_TEXT,
		VALUE3_TEXT,
		VALUE4_TEXT,
		VALUE5_TEXT,
		VALUE6_TEXT,
		VALUE7_TEXT,
		VALUE8_TEXT,
		VALUE9_TEXT,
		VALUE10_TEXT,
		VALUE11_TEXT,
		VALUE12_TEXT,
		VALUE13_TEXT,
		VALUE14_TEXT)
          VALUES
          (l_pool_rec.subsidy_pool_name,
          l_pool_rec.pool_type_code,
          l_pool_rec.currency_code,
          x_pool_dtl_rec.reporting_limit,
          x_pool_dtl_rec.total_budget,
          x_pool_dtl_rec.remaining_balance,
          x_pool_dtl_rec.error_message,
          l_chld_pool_rec.subsidy_pool_name,
          l_chld_pool_rec.pool_type_code,
          l_chld_pool_rec.currency_code,
          x_chld_pool_dtl_rec.reporting_limit,
          x_chld_pool_dtl_rec.total_budget,
          x_chld_pool_dtl_rec.remaining_balance,
	  x_chld_pool_dtl_rec.error_message
          );
Line: 3320

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date,
          decision_status_code
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND   CASE WHEN NVL(total_budgets,0) = 0 THEN 0
              ELSE ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets END <= cp_percent
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 3346

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date,
          decision_status_code
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND   NVL(total_budgets - NVL(total_subsidy_amount,0),0) <= cp_remaining
   AND   currency_code = cp_currency
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 3372

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND   TRUNC(effective_to_date) >= TRUNC(SYSDATE)
   AND   TRUNC(effective_to_date) <= TRUNC(cp_date)
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 3397

   SELECT id,
          subsidy_pool_name,
          currency_code,
          total_budgets,
          NVL(total_budgets - NVL(total_subsidy_amount,0),0) remaining_balance,
          case when NVL(total_budgets,0) = 0 then 0
               else ((total_budgets - NVL(total_subsidy_amount,0)) * 100) /total_budgets end percent_remaining,
          effective_to_date,
          trunc(effective_to_date) - trunc(sysdate) remaining_days
   FROM okl_subsidy_pools_b
   WHERE pool_type_code = 'BUDGET'
   AND   decision_status_code = 'ACTIVE'
   AND trunc(effective_to_date) - trunc(sysdate) between 0 and cp_days
   AND ( 1 = (case when nvl(fnd_profile.value('OKLSUBPOOLGLOBALACCESS'),'N') = 'Y' then 1
           else
           (case when exists (select 'x'
                              from okl_subsidies_v
                              where subsidy_pool_id = okl_subsidy_pools_b.id
                              and org_id <> mo_global.get_current_org_id()) then 0
             else 1  end)
             end));
Line: 3473

     INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT)
          VALUES
          ('ERROR',
	  fnd_message.get
	  );
Line: 3484

     INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT)
          VALUES
          ('ERROR',
	  fnd_message.get
	  );
Line: 3495

     INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT)
          VALUES
          ('ERROR',
	  fnd_message.get
	  );
Line: 3515

     INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT)
          VALUES
          ('ERROR',
	  fnd_message.get
	  );
Line: 3529

          INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT,
		VALUE3_TEXT,
		VALUE4_TEXT,
		VALUE5_TEXT,
		VALUE6_TEXT,
		VALUE1_DATE)
          VALUES
          ('PERCENT',
          each_row.subsidy_pool_name,
          each_row.currency_code,
          okl_accounting_util.format_amount(each_row.total_budgets,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.remaining_balance,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.percent_remaining,each_row.currency_code),
          each_row.effective_to_date
          );
Line: 3583

          INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT,
		VALUE3_TEXT,
		VALUE4_TEXT,
		VALUE5_TEXT,
		VALUE6_TEXT,
		VALUE1_DATE)
          VALUES
          ('REMAINING',
          each_row.subsidy_pool_name,
          each_row.currency_code,
          okl_accounting_util.format_amount(each_row.total_budgets,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.remaining_balance,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.percent_remaining,each_row.currency_code),
          each_row.effective_to_date
          );
Line: 3638

          INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		   VALUE2_TEXT,
		   VALUE3_TEXT,
		   VALUE4_TEXT,
		   VALUE5_TEXT,
		   VALUE6_TEXT,
		   VALUE1_DATE)
          VALUES
          ('DATE',
          each_row.subsidy_pool_name,
          each_row.currency_code,
          okl_accounting_util.format_amount(each_row.total_budgets,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.remaining_balance,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.percent_remaining,each_row.currency_code),
          each_row.effective_to_date
          );
Line: 3675

          INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		  VALUE2_TEXT,
		  VALUE3_TEXT,
		  VALUE4_TEXT,
		  VALUE5_TEXT,
		  VALUE6_TEXT,
		  VALUE1_DATE,
		  VALUE1_NUM)
          VALUES
          ('DAYS',
          each_row.subsidy_pool_name,
          each_row.currency_code,
          okl_accounting_util.format_amount(each_row.total_budgets,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.remaining_balance,each_row.currency_code),
          okl_accounting_util.format_amount(each_row.percent_remaining,each_row.currency_code),
          each_row.effective_to_date,
          each_row.remaining_days
          );
Line: 3764

  SELECT id ,
         currency_code
  FROM okl_subsidy_pools_v pool
  WHERE pool_type_code = 'BUDGET'
  CONNECT BY PRIOR id = subsidy_pool_id
  START WITH id = cp_pool_id;
Line: 3866

      INSERT INTO
        OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT,
		VALUE3_TEXT,
		VALUE4_TEXT,
		VALUE5_TEXT,
		VALUE6_TEXT,
		VALUE7_TEXT,
		VALUE8_TEXT)
      VALUES
          ('POOL_SUMMRY',
          p_pool_rec.subsidy_pool_name,
          p_pool_rec.pool_type_code,
          p_pool_rec.currency_code,
          okl_accounting_util.format_amount(l_budget,p_pool_rec.currency_code),
          okl_accounting_util.format_amount(0,p_pool_rec.currency_code), -- Pool Limit
          okl_accounting_util.format_amount(l_trx_amt,p_pool_rec.currency_code),
          okl_accounting_util.format_amount(l_remaining_balance,p_pool_rec.currency_code)
          );
Line: 3911

      INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		    VALUE2_TEXT,
		    VALUE3_TEXT,
		    VALUE4_TEXT,
		    VALUE5_TEXT,
		    VALUE6_TEXT,
		    VALUE7_TEXT,
		    VALUE8_TEXT)
       VALUES
          ('POOL_SUMMRY',
          p_pool_rec.subsidy_pool_name,
          p_pool_rec.pool_type_code,
          p_pool_rec.currency_code,
          okl_accounting_util.format_amount(0,p_pool_rec.currency_code), -- Pool Budget
          okl_accounting_util.format_amount(p_pool_rec.reporting_pool_limit,p_pool_rec.currency_code),
          okl_accounting_util.format_amount(l_trx_amt,p_pool_rec.currency_code),
          okl_accounting_util.format_amount(0,p_pool_rec.currency_code) -- Pool Balance
	      );
Line: 3985

   SELECT flk1.meaning trx_reason,
        (case
           when pool.source_type_code = 'LEASE_CONTRACT' then
             (select khr.contract_number
              from okc_k_headers_b khr
              where khr.id = pool.source_object_id)
           when pool.source_type_code = 'SALES_QUOTE' then
             (select sq.reference_number
              from okl_lease_quotes_b sq
              where sq.id = pool.source_object_id)
           when pool.source_type_code = 'LEASE_APPLICATION' then
             (select lap.reference_number
              from okl_lease_applications_b lap,
                   okl_lease_quotes_b lsq
              where lsq.parent_object_id = lap.id
              and lsq.parent_object_code = 'LEASEAPP'
              and lsq.id = pool.source_object_id)
         end) contract_number,
         dnz_asset_number,
          vend.vendor_name Vendor,
          sub.name subsidy_name,
          trx_type_code,
          source_trx_date,
          trx_currency_code,
          trx_amount,
          subsidy_pool_currency_code,
          pool.conversion_rate,
          subsidy_pool_amount,
          trx_date,
          hru.name operating_unit
   FROM okl_trx_subsidy_pools pool,
        fnd_lookups flk1,
        po_vendors vend,
        okl_subsidies_b sub,
        hr_organization_units hru
  WHERE  flk1.lookup_type = 'OKL_SUB_POOL_TRX_REASON_TYPE'
   AND    flk1.lookup_code = pool.trx_reason_code
   AND vend.vendor_id = pool.vendor_id
   AND sub.id = pool.subsidy_id
   AND pool.subsidy_pool_id IN ( SELECT id
                                 FROM okl_subsidy_pools_b
                                 WHERE pool_type_code = 'BUDGET'
                                 CONNECT BY PRIOR id = subsidy_pool_id
                                 START WITH id = cp_pool_id
                                )
  AND sub.org_id = hru.organization_id
  ORDER BY trx_date asc;
Line: 4097

          INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		VALUE2_TEXT,
		VALUE3_TEXT,
		VALUE4_TEXT,
		VALUE5_TEXT,
		VALUE6_TEXT,
		VALUE1_DATE,
		VALUE7_TEXT,
		VALUE1_NUM,
		VALUE8_TEXT,
		VALUE2_NUM,
		VALUE9_TEXT,
		VALUE10_TEXT)
          VALUES
          ('TRANS_SUMMRY',
          each_row.trx_reason,
          each_row.contract_number,
          each_row.dnz_asset_number,
          each_row.Vendor,
          each_row.subsidy_name,
          each_row.source_trx_date,
          okl_accounting_util.format_amount(l_trx_amount,each_row.trx_currency_code)
                   ||' '||each_row.trx_currency_code,
          each_row.conversion_rate,
          okl_accounting_util.format_amount(l_sub_pool_amount,each_row.subsidy_pool_currency_code)
                   ||' '|| each_row.subsidy_pool_currency_code,
          l_sub_pool_amount,
          each_row.operating_unit,
          each_row.subsidy_pool_currency_code
          );
Line: 4172

          INSERT INTO
          OKL_G_REPORTS_GT(VALUE1_TEXT,
		  VALUE2_TEXT,
		  VALUE3_TEXT,
		  VALUE4_TEXT,
		  VALUE5_TEXT,
		  VALUE6_TEXT,
		  VALUE1_DATE,
		  VALUE7_TEXT,
		  VALUE1_NUM,
		  VALUE8_TEXT,
		  VALUE2_NUM,
		  VALUE9_TEXT,
		  VALUE10_TEXT)
          VALUES
          ('TRANS_SUMMRY',
          each_row.trx_reason,
          each_row.contract_number,
          each_row.dnz_asset_number,
          each_row.Vendor,
          each_row.subsidy_name,
          each_row.source_trx_date,
          okl_accounting_util.format_amount(l_trx_amount,each_row.trx_currency_code)
                   ||' '||each_row.trx_currency_code,
          l_conv_rate,
          okl_accounting_util.format_amount(l_sub_pool_amount,p_pool_currency)
                   ||' '|| p_pool_currency,
          l_sub_pool_amount,
          each_row.operating_unit,
          each_row.subsidy_pool_currency_code
          );