DBA Data[Home] [Help]

APPS.XTR_REPLICATE_BANK_BALANCES SQL Statements

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

Line: 29

    SELECT company_code,account_number,balance_date,statement_balance
            ,balance_adjustment,balance_cflow,ce_bank_account_balance_id
    FROM XTR_BANK_BALANCES
    WHERE CE_BANK_ACCOUNT_BALANCE_ID = p_balance_rec.ce_bank_account_balance_id;
Line: 36

    l_balance_date_updated BOOLEAN;
Line: 41

        l_balance_date_updated := FALSE;
Line: 56

                l_balance_date_updated := TRUE;
Line: 65

       IF(NOT l_balance_date_updated) THEN -- Balance date is not updated
        IF (p_action_flag in ('I','U') )THEN
            VALIDATE_BANK_BALANCE(
                            p_balance_rec.company_code,
                            p_balance_rec.account_number,
                            p_balance_rec.balance_date,
                            p_balance_rec.ce_bank_account_balance_id,
                            p_balance_rec.statement_balance+p_balance_rec.balance_adjustment,
                            p_balance_rec.balance_cflow,
                            p_action_flag,
                            x_return_status );
Line: 92

                IF    p_action_flag = 'I'    THEN /* Insertion of a record */

                     INSERT_BANK_BALANCE ( p_balance_rec, x_return_status);
Line: 98

                     UPDATE_BANK_BALANCE ( p_balance_rec, x_return_status);
Line: 102

                     DELETE_BANK_BALANCE( l_balance_rec, x_return_status);
Line: 116

             UPDATE_BANK_ACCOUNT (  p_balance_rec.company_code,
                                    p_balance_rec.account_number,
                                    p_balance_rec.balance_date ,
                                    p_action_flag ,
                                    x_return_status );
Line: 129

             UPDATE_BANK_ACCOUNT (  l_balance_rec.company_code,
                                    l_balance_rec.account_number,
                                    l_balance_rec.balance_date ,
                                    'D' ,
                                    x_return_status );
Line: 139

    ELSIF(l_balance_date_updated) THEN

            VALIDATE_BANK_BALANCE(
                            p_balance_rec.company_code,
                            p_balance_rec.account_number,
                            p_balance_rec.balance_date,
                            p_balance_rec.ce_bank_account_balance_id,
                            p_balance_rec.statement_balance+p_balance_rec.balance_adjustment,
                            p_balance_rec.balance_cflow,
                            'D',
                            x_return_status );
Line: 151

                DELETE_BANK_BALANCE( p_balance_rec, x_return_status);
Line: 154

             UPDATE_BANK_ACCOUNT (  p_balance_rec.company_code,
                                    p_balance_rec.account_number,
                                    p_balance_rec.balance_date ,
                                    'D' ,
                                    x_return_status );
Line: 173

                INSERT_BANK_BALANCE( p_balance_rec, x_return_status);
Line: 176

             UPDATE_BANK_ACCOUNT (  p_balance_rec.company_code,
                                    p_balance_rec.account_number,
                                    p_balance_rec.balance_date ,
                                    'I',
                                    x_return_status );
Line: 228

           select bank_account_id from ce_bank_acct_uses_all
           where bank_account_id = (select bank_account_id from
                                    ce_bank_acct_balances
                                    where bank_acct_balance_id =
                                    p_ce_bank_account_balance_id)
           and xtr_use_enable_flag = 'Y';
Line: 237

           select sub.cashpool_id, sub.account_id
           from  ce_bank_acct_uses_all acct
	       , ce_Cashpool_sub_accts sub
	   where acct.bank_account_id = sub.account_id
           and acct.xtr_use_enable_flag = 'Y'
	   and sub.type = 'CONC'
           and cashpool_id = (select subacct.cashpool_id
	                      from ce_cashpool_sub_accts  subacct
                                   , ce_cashpools pool
   			      where account_id = l_bank_account_id
                              and subacct.cashpool_id = pool.cashpool_id
		              and pool.type = 'NOTIONAL' );
Line: 315

PROCEDURE INSERT_BANK_BALANCE
     ( p_balance_rec IN xtr_bank_balances%ROWTYPE,
       x_return_status   	 IN	OUT NOCOPY  	VARCHAR2
     )
IS

l_prv_date  XTR_BANK_BALANCES.balance_date%TYPE;
Line: 362

   SELECT a.BALANCE_DATE,NVL(a.STATEMENT_BALANCE,0)+NVL(a.BALANCE_ADJUSTMENT,0),a.ACCUM_INT_CFWD,
          a.INTEREST_RATE,a.accrual_interest,
          a.rounding_type, day_count_type
   FROM XTR_BANK_BALANCES a
   WHERE a.ACCOUNT_NUMBER = p_balance_rec.account_number
   AND   a.COMPANY_CODE = p_balance_rec.company_code
   AND   a.BALANCE_DATE = (SELECT max(b.BALANCE_DATE)
                           FROM XTR_BANK_BALANCES b
                           WHERE b.ACCOUNT_NUMBER = p_balance_rec.account_number
			               AND   b.COMPANY_CODE   = p_balance_rec.company_code);
Line: 376

  SELECT CURRENCY,PORTFOLIO_CODE,BANK_CODE,nvl(YEAR_CALC_TYPE,'ACTUAL/ACTUAL') year_calc_type,rounding_type, day_count_type,ce_bank_account_id
  FROM XTR_BANK_ACCOUNTS
  WHERE ACCOUNT_NUMBER = p_balance_rec.account_number
  AND   PARTY_CODE     = p_balance_rec.company_code;
Line: 384

  SELECT ROUNDING_FACTOR,YEAR_BASIS,HCE_RATE
  FROM  XTR_MASTER_CURRENCIES_V
  WHERE CURRENCY = l_ccy;
Line: 392

  select investment_limit_code, funding_limit_code
  from ce_bank_acct_uses_all
  where bank_account_id in ( select bank_account_id from
               ce_bank_acct_balances
              where bank_acct_balance_id = p_balance_rec.ce_bank_account_balance_id
              );
Line: 402

    SELECT MIN(a.balance_date)
    FROM   xtr_bank_balances a
    WHERE a.account_number = p_balance_rec.account_number
    AND a.COMPANY_CODE = p_balance_rec.company_code;
Line: 409

    SELECT a.day_count_type
    FROM xtr_bank_balances a
    WHERE  a.account_number = p_balance_rec.account_number
    AND a.COMPANY_CODE = p_balance_rec.company_code
    AND a.balance_date = (SELECT max(b.BALANCE_DATE)
                           FROM XTR_BANK_BALANCES b
                           WHERE b.ACCOUNT_NUMBER = p_balance_rec.account_number
			               AND   b.COMPANY_CODE   = p_balance_rec.company_code
			               AND   b.balance_date < l_prv_date);
Line: 533

        INSERT INTO XTR_BANK_BALANCES
        ( company_code
         ,account_number
         ,balance_date
         ,no_of_days
         ,statement_balance
         ,balance_adjustment
         ,balance_cflow
         ,accum_int_bfwd
         ,interest
         ,interest_rate
         ,interest_settled
         ,interest_settled_hce
         ,accum_int_cfwd
         ,limit_code
         ,created_on
         ,created_by
         ,accrual_interest
         ,rounding_type
         ,day_count_type
         ,original_amount
         ,one_day_float
         ,two_day_float
         ,ce_bank_account_balance_id)
          VALUES
        ( p_balance_rec.company_code
         ,p_balance_rec.account_number
         ,p_balance_rec.balance_date
         ,l_no_days
         ,p_balance_rec.statement_balance
         ,p_balance_rec.balance_adjustment
         ,p_balance_rec.balance_cflow
         ,l_int_bf
         ,nvl(l_interest,0)
         ,l_new_rate
         ,0
         ,0
         ,l_int_cf
         ,decode(sign(nvl(p_balance_rec.statement_balance,0)), -1,l_fund_limit_code,l_invest_limit_code)
         ,sysdate
         ,fnd_global.user_id
         ,l_accrual_int
         ,l_rounding_type
         ,l_day_count_type
         ,l_original_amount
         ,p_balance_rec.one_day_float
         ,p_balance_rec.two_day_float
         ,p_balance_rec.ce_bank_account_balance_id);
Line: 595

END INSERT_BANK_BALANCE ;
Line: 600

PROCEDURE UPDATE_BANK_BALANCE
     ( p_balance_rec IN xtr_bank_balances%ROWTYPE,
       x_return_status   	IN	OUT NOCOPY  	VARCHAR2
       )
IS

CURSOR c_chk_lock IS
SELECT ce_bank_account_balance_id
FROM  xtr_bank_balances
WHERE  company_code = p_balance_rec.company_code
       AND  account_number = p_balance_rec.account_number
       AND  ce_bank_account_balance_id = p_balance_rec.ce_bank_account_balance_id
FOR UPDATE NOWAIT;
Line: 627

      UPDATE xtr_bank_balances SET
              statement_balance = nvl(p_balance_rec.statement_balance,0)
             ,balance_cflow = nvl(p_balance_rec.balance_cflow,0)
             ,one_day_float = nvl(p_balance_rec.one_day_float,0)
             ,two_day_float = nvl(p_balance_rec.two_day_float,0)
             ,balance_adjustment = p_balance_rec.balance_adjustment
             ,balance_date = p_balance_rec.balance_date
             ,updated_by = fnd_global.user_id
             ,updated_on = sysdate
       WHERE  company_code = p_balance_rec.company_code
       AND  account_number = p_balance_rec.account_number
       AND  ce_bank_account_balance_id = p_balance_rec.ce_bank_account_balance_id;
Line: 656

END UPDATE_BANK_BALANCE;
Line: 660

PROCEDURE DELETE_BANK_BALANCE
     ( p_balance_rec IN xtr_bank_balances%ROWTYPE,
       x_return_status   	  IN OUT NOCOPY  	VARCHAR2
       )
IS

l_cross_ref  xtr_party_info.cross_ref_to_other_party%TYPE;
Line: 673

   SELECT CROSS_REF_TO_OTHER_PARTY
   FROM   XTR_PARTIES_V
   WHERE  PARTY_CODE = p_balance_rec.company_code;
Line: 680

  SELECT CURRENCY
  FROM  XTR_BANK_ACCOUNTS
  WHERE PARTY_CODE = P_BALANCE_REC.COMPANY_CODE
  AND ACCOUNT_NUMBER = P_BALANCE_REC.ACCOUNT_NUMBER;
Line: 688

   SELECT 'Y'
   FROM xtr_deal_date_amounts
   WHERE DEAL_TYPE   = 'CA'
   AND  AMOUNT_TYPE  = 'INTSET'
   AND  ACCOUNT_NO   = p_balance_rec.account_number
   AND  CURRENCY     = l_ccy
   AND  COMPANY_CODE = nvl(l_cross_ref,p_balance_rec.company_code)
   AND  AMOUNT_DATE  = p_balance_rec.balance_date;
Line: 699

   SELECT ce_bank_account_balance_id
   FROM  xtr_bank_balances
   WHERE  company_code = p_balance_rec.company_code
   AND  account_number = p_balance_rec.account_number
   AND  ce_bank_account_balance_id = p_balance_rec.ce_bank_account_balance_id
   FOR UPDATE NOWAIT;
Line: 708

   SELECT ce_bank_account_balance_id
   FROM  xtr_bank_balances
   WHERE  company_code = p_balance_rec.company_code
   AND  account_number = p_balance_rec.account_number
   AND  ce_bank_account_balance_id = p_balance_rec.ce_bank_account_balance_id
   FOR UPDATE NOWAIT;
Line: 729

            DELETE FROM XTR_BANK_BALANCES
            WHERE company_code = p_balance_rec.company_code
            AND account_number = p_balance_rec.account_number
            AND balance_date = p_balance_rec.balance_date
            AND ce_bank_account_balance_id = p_balance_rec.ce_bank_account_balance_id;
Line: 756

                 DELETE FROM XTR_DEAL_DATE_AMOUNTS_V
                      WHERE DEAL_TYPE   = 'CA'
                      AND  AMOUNT_TYPE  = 'INTSET'
                      AND  ACCOUNT_NO   = p_balance_rec.account_number
                      AND  CURRENCY     = l_ccy
                      AND  COMPANY_CODE = nvl(l_cross_ref,p_balance_rec.company_code)
                      AND  AMOUNT_DATE  = p_balance_rec.balance_date;
Line: 792

END DELETE_BANK_BALANCE;
Line: 823

   SELECT PORTFOLIO_CODE, CURRENCY , BANK_CODE, PRICING_MODEL,
	  ce_bank_account_id		/* Bug 5346243 */
   FROM  xtr_bank_accounts
   WHERE ACCOUNT_NUMBER = p_account_number
   AND   PARTY_CODE     = p_company_code;
Line: 832

  SELECT 1
   FROM  XTR_BANK_BALANCES_V A,
         XTR_BANK_ACCOUNTS_V B
   WHERE A.BALANCE_DATE   = p_balance_date
   AND   A.ACCOUNT_NUMBER = B.ACCOUNT_NUMBER
   AND   A.COMPANY_CODE   = B.PARTY_CODE
   AND   B.CURRENCY       = l_currency
   AND   B.ACCOUNT_NUMBER = p_account_number
   AND   B.BANK_CODE      = l_bank_code
   AND   B.PARTY_CODE     = p_company_code;
Line: 845

   select 1
   from   xtr_price_models_v
   where  deal_type = 'CA'
   and    code = l_pricing_model
   and    authorized = 'Y';
Line: 854

Select interest_schedule_id
From   ce_bank_accounts
Where  bank_account_id = l_ce_bank_account_id ;
Line: 988

               IF nvl(l_return_error, 'XXX') = 'XTR_ACCT_DELETE' THEN
                      x_return_status := FND_API.G_RET_STS_ERROR;
Line: 990

                       LOG_ERR_MSG ( 'XTR_ACCT_DELETE');
Line: 1033

    SELECT company_code,account_number,balance_date,statement_balance
            ,balance_adjustment,balance_cflow,ce_bank_account_balance_id
    FROM XTR_BANK_BALANCES
    WHERE CE_BANK_ACCOUNT_BALANCE_ID = p_ce_bank_account_balance_id;
Line: 1039

    l_balance_date_updated BOOLEAN;
Line: 1045

        l_balance_date_updated := FALSE;
Line: 1060

                l_balance_date_updated := TRUE;
Line: 1066

        IF(NOT l_balance_date_updated) THEN -- Balance date is not updated
          IF (p_action_flag in ('I','U') )THEN
            VALIDATE_BANK_BALANCE(
                            p_company_code,
                            p_account_number,
                            p_balance_date,
                            p_ce_bank_account_balance_id,
                            p_interest_calc_balance,
                            p_available_balance,
                            p_action_flag,
                            x_return_status );
Line: 1090

    ELSIF(l_balance_date_updated) THEN

              VALIDATE_BANK_BALANCE(
                            p_company_code,
                            p_account_number,
                            p_balance_date,
                            p_ce_bank_account_balance_id,
                            p_interest_calc_balance,
                            p_available_balance,
                            'D',
                            x_return_status );
Line: 1158

   SELECT max(period_to)
   FROM
          xtr_bank_balances bb, xtr_bank_accounts ba,
          xtr_deal_date_amounts dd, xtr_accrls_amort aa
   WHERE bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency
   AND 	 bb.company_code   = dd.company_code
   AND   bb.account_number = dd.account_no
   AND   ba.currency       = dd.currency
   AND   dd.deal_number    = aa.deal_no;
Line: 1175

   SELECT max(period_end)
   FROM
          xtr_batches b, xtr_batch_events e
   WHERE  b.company_code = p_company_code
   AND   b.batch_id     = e.batch_id
   AND   e.event_code   = 'ACCRUAL'
   AND   b.period_end   >=p_balance_date;
Line: 1186

   SELECT BALANCE_ADJUSTMENT + STATEMENT_BALANCE
   FROM
         xtr_bank_balances bb
   WHERE
	     bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND   ce_bank_account_balance_id = p_ce_bank_account_balance_id;
Line: 1266

l_reval_delete_date DATE;
Line: 1273

   SELECT max(period_end)
   FROM
         xtr_batches b,xtr_batch_events e
   WHERE
         b.company_code = p_company_code
   AND   b.batch_id     = e.batch_id
   AND   e.event_code   = 'REVAL'
   AND   b.period_end  >= p_balance_date;
Line: 1283

CURSOR c_deal_delete IS
   SELECT max(bb.balance_date)
   FROM
         xtr_bank_balances bb,xtr_bank_accounts ba
   WHERE
	 bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency
   AND   bb.first_batch_id IS NOT NULL;
Line: 1298

   SELECT max(period_to)
   FROM
         xtr_bank_balances bb,xtr_bank_accounts ba,
         xtr_revaluation_details rd
   WHERE
	     bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency
   AND   bb.account_number = rd.account_no
   AND   rd.deal_type      = 'CA';
Line: 1313

   SELECT BALANCE_CFLOW
   FROM
         xtr_bank_balances bb
   WHERE
	     bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND   ce_bank_account_balance_id = p_ce_bank_account_balance_id;
Line: 1345

       OPEN  c_deal_delete ;
Line: 1346

       FETCH c_deal_delete  INTO l_reval_delete_date;
Line: 1347

       CLOSE c_deal_delete ;
Line: 1349

       IF l_reval_delete_date IS NOT NULL AND l_reval_delete_date >= p_BALANCE_DATE
           AND p_val_type = 'E'THEN
	       l_error :='XTR_ACCT_DELETE';
Line: 1385

PROCEDURE UPDATE_BANK_ACCOUNT
     ( p_company_code IN xtr_bank_balances.company_code%TYPE,
       p_account_number IN xtr_bank_balances.account_number%TYPE,
       p_balance_date IN xtr_bank_balances.balance_date%TYPE,
       p_action_flag IN VARCHAR2,
       x_return_status   OUT NOCOPY  	VARCHAR2
       )
IS

l_ccy   xtr_bank_accounts.currency%TYPE;
Line: 1404

   SELECT CROSS_REF_TO_OTHER_PARTY
   FROM   XTR_PARTIES_V
   WHERE  PARTY_CODE = p_company_code;
Line: 1410

  SELECT CURRENCY,PORTFOLIO_CODE,BANK_CODE
  FROM XTR_BANK_ACCOUNTS
  WHERE ACCOUNT_NUMBER = p_account_number
  AND   PARTY_CODE     = p_company_code;
Line: 1417

  SELECT 'Y'
  FROM   XTR_DEAL_DATE_AMOUNTS_V
  WHERE  ACCOUNT_NO   = p_account_number
  AND    COMPANY_CODE = nvl(l_cross_ref,p_company_code)
  AND    CURRENCY     = l_ccy
  AND    AMOUNT_DATE  = p_balance_date
  AND    AMOUNT_TYPE  = 'BAL';
Line: 1429

  SELECT max(BALANCE_DATE)
  FROM   XTR_BANK_BALANCES_V
  WHERE  ACCOUNT_NUMBER = p_account_number
  AND    COMPANY_CODE   = p_company_code
  AND    BALANCE_DATE   < p_balance_date;
Line: 1438

 SELECT ACCUM_INT_CFWD
 FROM XTR_BANK_BALANCES
 WHERE ACCOUNT_NUMBER = P_ACCOUNT_NUMBER
 AND COMPANY_CODE = P_COMPANY_CODE
 AND BALANCE_DATE = (SELECT MAX(BALANCE_DATE) FROM
                    XTR_BANK_BALANCES
                    WHERE ACCOUNT_NUMBER = P_ACCOUNT_NUMBER
                    AND COMPANY_CODE = P_COMPANY_CODE);
Line: 1469

          XTR_ACCOUNT_BAL_MAINT_P.UPDATE_BANK_ACCTS(
                  p_account_number,
			      l_ccy,
				  l_bank_code,
				  l_portfolio_code,
				  l_cross_ref,
				  p_company_code,
				  p_balance_date,
				  l_accum_int_cfwd,
				  l_dummy_num
			      );
Line: 1492

       XTR_ACCOUNT_BAL_MAINT_P.UPDATE_BANK_ACCTS(
                  p_account_number,
			      l_ccy,
				  l_bank_code,
				  l_portfolio_code,
				  l_cross_ref,
				  p_company_code,
				  nvl(l_bal_date, p_balance_date),
				  l_accum_int_cfwd,
				  l_dummy_num
			      );
Line: 1506

       XTR_ACCOUNT_BAL_MAINT_P.UPDATE_BANK_ACCTS(
                  p_account_number,
			      l_ccy,
				  l_bank_code,
				  l_portfolio_code,
				  l_cross_ref,
				  p_company_code,
				  p_balance_date,
				  l_accum_int_cfwd,
				  l_dummy_num
			      );
Line: 1520

END UPDATE_BANK_ACCOUNT;
Line: 1528

  insertion/updation/deletion

*/

FUNCTION CHK_ROUNDING_CHANGE ( p_company_code IN xtr_bank_balances.company_code%TYPE,
                               p_account_number IN xtr_bank_balances.account_number%TYPE,
                               p_balance_date IN xtr_bank_balances.balance_date%TYPE)
                               RETURN BOOLEAN IS

 CURSOR c_chk_bal IS
  SELECT count(balance_date)
  FROM XTR_BANK_BALANCES  a
  WHERE a.ACCOUNT_NUMBER = p_account_number
  AND a.COMPANY_CODE = p_company_code;
Line: 1545

  SELECT COUNT(DISTINCT ROUNDING_TYPE||'-'||DAY_COUNT_TYPE)
  FROM XTR_BANK_BALANCES  a
  WHERE a.ACCOUNT_NUMBER = p_account_number
  AND a.COMPANY_CODE = p_company_code
  AND a.BALANCE_DATE >=  (SELECT max(balance_date)
			FROM xtr_bank_balances b
			WHERE b.account_number = p_account_number
			AND b.company_code = p_company_code
			AND b.balance_date < p_balance_date);
Line: 1582

 * date page is rendered to enable/disable the balance date and delete button

This will be also called by the validate_bank_balance procedure at the time of
deletion of the record
*/

FUNCTION CHK_INTEREST_SETTLED
        (  p_ce_bank_account_id IN xtr_bank_accounts.ce_bank_account_id%TYPE
           , p_balance_date IN xtr_bank_balances.balance_date%TYPE
        )return VARCHAR2 is

l_return VARCHAR2(2);
Line: 1601

    SELECT party_code, account_number,currency
    FROM XTR_BANK_ACCOUNTS
    WHERE ce_bank_account_id = p_ce_bank_account_id;
Line: 1606

  select 'Y'
    from XTR_DEAL_DATE_AMOUNTS_V
   where DEAL_TYPE    = 'CA'
     and AMOUNT_TYPE  = 'INTSET'
     and ACCOUNT_NO   = l_account_number
     and CURRENCY     = l_currency
     and COMPANY_CODE = l_company_code
     and AMOUNT_DATE  = p_balance_date
     and (Batch_Id IS NOT NULL or nvl(SETTLE, 'N') = 'Y');
Line: 1656

l_reval_delete_date DATE;
Line: 1660

   SELECT max(period_to)
   FROM
         xtr_bank_balances bb,xtr_bank_accounts ba,
         xtr_revaluation_details rd
   WHERE
	     bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency
   AND   bb.account_number = rd.account_no
   AND   rd.deal_type      = 'CA';
Line: 1674

CURSOR c_deal_delete IS
   SELECT max(bb.balance_date)
   FROM
         xtr_bank_balances bb,xtr_bank_accounts ba
   WHERE
	 bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency
   AND   bb.first_batch_id IS NOT NULL;
Line: 1692

      OPEN  c_deal_delete ;
Line: 1693

      FETCH c_deal_delete  INTO l_reval_delete_date;
Line: 1694

      CLOSE c_deal_delete ;
Line: 1698

          OR ( l_reval_delete_date IS NOT NULL AND l_reval_delete_date >= p_BALANCE_DATE) THEN
           RETURN(FALSE);
Line: 1721

   SELECT max(period_to)
   FROM
          xtr_bank_balances bb, xtr_bank_accounts ba,
          xtr_deal_date_amounts dd, xtr_accrls_amort aa
   WHERE bb.company_code   = p_company_code
   AND   bb.account_number = p_account_number
   AND 	 bb.company_code   = ba.party_code
   AND   bb.account_number = ba.account_number
   AND   ba.currency       = p_currency
   AND 	 bb.company_code   = dd.company_code
   AND   bb.account_number = dd.account_no
   AND   ba.currency       = dd.currency
   AND   dd.deal_number    = aa.deal_no;
Line: 1760

    SELECT party_code, account_number,currency
    FROM XTR_BANK_ACCOUNTS
    WHERE ce_bank_account_id = p_ce_bank_account_id;
Line: 1790

    SELECT party_code, account_number,currency
    FROM XTR_BANK_ACCOUNTS
    WHERE ce_bank_account_id = p_ce_bank_account_id;
Line: 1849

        ELSIF  p_error_code = 'XTR_ACCT_DELETE' THEN
               FND_MESSAGE.Set_Name ('XTR', 'XTR_ACCT_DELETE');
Line: 1904

/* This procedure updates the rounding_type and the day_count_type in the
xtr_bank_balances IF THE same has been updated IN THE xtr_bank_accounts TABLE

This will be called FORM xtr_replicate_bank_accounts API WHEN THE rounding TYPE/
day_count_type has been updated IN THE interest schedules page OR THE
schedule has been changed BY THE USER */


PROCEDURE UPDATE_ROUNDING_DAYCOUNT
                   (p_ce_bank_account_id xtr_bank_accounts.ce_bank_account_id%TYPE
                    ,p_rounding_type  xtr_bank_accounts.rounding_type%TYPE
                    ,p_day_count_type xtr_bank_accounts.day_count_type%TYPE
                    ,x_return_status  OUT NOCOPY 	VARCHAR2
                    )

IS

l_old_rounding_type  xtr_bank_accounts.rounding_type%TYPE;
Line: 1935

  SELECT rounding_type, day_count_type, party_code, account_number
  FROM XTR_BANK_ACCOUNTS
  WHERE ce_bank_account_id = p_ce_bank_account_id;
Line: 1942

  SELECT max(balance_date), min(balance_date)
  FROM XTR_BANK_BALANCES
  WHERE company_code = l_party_code
  AND account_number = l_account_number;
Line: 1949

SELECT day_count_type
FROM  xtr_bank_balances
WHERE  company_code = l_party_code
       AND  account_number = l_account_number
FOR UPDATE NOWAIT;
Line: 1986

                          UPDATE xtr_bank_balances
                          SET rounding_type = p_rounding_type,
                    	  day_count_type = p_day_count_type
                          WHERE company_code =l_party_code
                          AND account_number = l_account_number;
Line: 1992

                          UPDATE_BANK_ACCOUNT(l_party_code,
                                    l_account_number,
                                    l_oldest_date,
                                    'U' ,
                                    x_return_status );
Line: 2002

                          UPDATE xtr_bank_balances
                          SET rounding_type = p_rounding_type,
                     	  day_count_type = p_day_count_type
                          WHERE company_code =l_party_code
                          AND account_number = l_account_number
                          AND balance_date = l_latest_date;
Line: 2035

END UPDATE_ROUNDING_DAYCOUNT;
Line: 2051

    select 'Y'
    from xtr_bank_balances
    where account_number = p_ACCOUNT_NUMBER
    and nvl(interest_settled,0) <> 0;
Line: 2058

     select 'Y'
     from xtr_batches b, xtr_batch_events e
     where b.company_code = p_PARTY_CODE
     and b.batch_id = e.batch_id
     and e.event_code = 'ACCRUAL'
     and b.period_end > p_oldest_date;
Line: 2067

      select 'Y'
      from xtr_batches b, xtr_batch_events e
      where b.company_code =p_PARTY_CODE
      and b.batch_id = e.batch_id
      and e.event_code = 'JRNLGN'
      and b.period_end > p_oldest_date;
Line: 2121

   select accum_int_cfwd
     from xtr_bank_balances
    where account_number = p_ACCOUNT_NUMBER
      and company_code = p_PARTY_CODE
      and balance_date = (select max(balance_date)
                            from xtr_bank_balances
                            where account_number = p_Account_Number
                            and company_code = p_PARTY_CODE);
Line: 2160

    SELECT party_code,account_number,currency
    FROM XTR_BANK_ACCOUNTS
    WHERE ce_bank_account_id = p_ce_bank_account_id;