DBA Data[Home] [Help]

APPS.XTR_REVAL_PROCESS_P dependencies on XTR_BANK_BALANCES

Line 1256: update XTR_BANK_BALANCES

1252: rec.effective_date := rec.revldate;
1253: r_rd.effective_days := rec.period_end - rec.period_start;
1254: r_rd.amount_type := 'CCYUNRL';
1255: xtr_revl_unreal_log(rec, 0, 0, 0, 0, null, r_rd, retcode);
1256: update XTR_BANK_BALANCES
1257: set first_batch_id = rec.batch_id
1258: where company_code = rec.company_code
1259: and account_number = rec.account_no
1260: and balance_date <= rec.revldate;

Line 2853: /* in xtr_bank_balances for deal type CA */

2849: --------------------------------------------------------
2850: /*******************************************************************/
2851: /* This procedure pass one account no for each company and calculate */
2852: /* (un)realized currency G/L and average exchange rate for the row */
2853: /* in xtr_bank_balances for deal type CA */
2854: /*******************************************************************/
2855: PROCEDURE xtr_revl_ca_curr_gl(
2856: rec IN OUT NOCOPY xtr_revl_rec,
2857: retcode OUT NOCOPY NUMBER) IS

Line 2901: FROM xtr_bank_balances a,

2897: Cursor C_PAIR_BALANCE is
2898: SELECT a.balance_date, nvl(a.balance_cflow,0), a.first_batch_id,
2899: a.interest_rate,
2900: b.balance_date, nvl(b.balance_cflow,0), b.interest_rate
2901: FROM xtr_bank_balances a,
2902: xtr_bank_balances b
2903: Where a.company_code = rec.company_code
2904: and a.company_code = b.company_code
2905: and a.account_number = rec.account_no

Line 2902: xtr_bank_balances b

2898: SELECT a.balance_date, nvl(a.balance_cflow,0), a.first_batch_id,
2899: a.interest_rate,
2900: b.balance_date, nvl(b.balance_cflow,0), b.interest_rate
2901: FROM xtr_bank_balances a,
2902: xtr_bank_balances b
2903: Where a.company_code = rec.company_code
2904: and a.company_code = b.company_code
2905: and a.account_number = rec.account_no
2906: and a.account_number = b.account_number

Line 2911: FROM xtr_bank_balances c

2907: and a.balance_date < b.balance_date
2908: and b.balance_date <= rec.revldate
2909: and a.balance_date =
2910: (SELECT max(c.balance_date)
2911: FROM xtr_bank_balances c
2912: where c.company_code = a.company_code
2913: AND c.account_number = a.account_number
2914: AND c.balance_date < b.balance_date)
2915: and a.last_batch_id is null

Line 2924: From XTR_BANK_BALANCES

2920: -- select last eligible row of the account to calculate UCGL
2921: ------------------------------------------------------------
2922: Cursor C_LAST_BALANCE is
2923: Select balance_date, nvl(balance_cflow,0), first_batch_id, interest_rate
2924: From XTR_BANK_BALANCES
2925: Where company_code = rec.company_code
2926: and account_number = rec.account_no
2927: and balance_date =
2928: (select max(effective_date)

Line 2941: FROM xtr_bank_balances

2937: -- Select the last balance's average exchange rate
2938: --------------------------------------------------
2939: CURSOR c_last_ca_avg_rate IS
2940: SELECT average_exchange_rate
2941: FROM xtr_bank_balances
2942: WHERE company_code = rec.company_code
2943: AND account_number = rec.account_no
2944: AND first_batch_id = l_pre_batch_id
2945: ORDER BY balance_date desc;

Line 3156: -- Update the first record of the pair in XTR_BANK_BALANCES table

3152: l_avg_rate := l_avg_rate0;
3153: end if;
3154:
3155: ----------------------------------------------------------------------
3156: -- Update the first record of the pair in XTR_BANK_BALANCES table
3157: ----------------------------------------------------------------------
3158: update XTR_BANK_BALANCES
3159: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3160: last_batch_id = nvl(last_batch_id, l_last_batch_id),

Line 3158: update XTR_BANK_BALANCES

3154:
3155: ----------------------------------------------------------------------
3156: -- Update the first record of the pair in XTR_BANK_BALANCES table
3157: ----------------------------------------------------------------------
3158: update XTR_BANK_BALANCES
3159: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3160: last_batch_id = nvl(last_batch_id, l_last_batch_id),
3161: exchange_rate = nvl(exchange_rate, l_ex_rate0),
3162: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate0)

Line 3168: -- Update the second record of the pair in XTR_BANK_BALANCES table

3164: and account_number = rec.account_no
3165: and balance_date = l_bal_date0;
3166:
3167: ----------------------------------------------------------------------
3168: -- Update the second record of the pair in XTR_BANK_BALANCES table
3169: ----------------------------------------------------------------------
3170: update XTR_BANK_BALANCES
3171: set average_exchange_rate = l_avg_rate
3172: where company_code = rec.company_code

Line 3170: update XTR_BANK_BALANCES

3166:
3167: ----------------------------------------------------------------------
3168: -- Update the second record of the pair in XTR_BANK_BALANCES table
3169: ----------------------------------------------------------------------
3170: update XTR_BANK_BALANCES
3171: set average_exchange_rate = l_avg_rate
3172: where company_code = rec.company_code
3173: and account_number = rec.account_no
3174: and balance_date = l_bal_date1;

Line 3256: -- Update the last row into XTR_BANK_BALANCES table

3252: xtr_risk_debug_pkg.dlog('l_unrel_cur_gl', l_unrel_cur_gl);
3253: xtr_risk_debug_pkg.dpop('CA_LAST_UNREL');
3254:
3255: ----------------------------------------------------------------------
3256: -- Update the last row into XTR_BANK_BALANCES table
3257: ----------------------------------------------------------------------
3258: update XTR_BANK_BALANCES
3259: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3260: exchange_rate = nvl(exchange_rate, l_ex_rate0),

Line 3258: update XTR_BANK_BALANCES

3254:
3255: ----------------------------------------------------------------------
3256: -- Update the last row into XTR_BANK_BALANCES table
3257: ----------------------------------------------------------------------
3258: update XTR_BANK_BALANCES
3259: set first_batch_id = nvl(first_batch_id, l_first_batch_id),
3260: exchange_rate = nvl(exchange_rate, l_ex_rate0),
3261: average_exchange_rate = nvl(average_exchange_rate, l_avg_rate0)
3262: where company_code = rec.company_code

Line 4352: from XTR_BANK_BALANCES_V

4348: elsif rec.deal_type = 'CA' then
4349: -- CA's FV is for reference only. We don't take it to calculate G/L.
4350: select STATEMENT_BALANCE
4351: into init_fv
4352: from XTR_BANK_BALANCES_V
4353: where company_code = rec.company_code
4354: and account_number = rec.account_no
4355: and BALANCE_DATE <= rec.revldate;
4356: end if;

Line 10315: /* first_batch_id is stored in xtr_bank_balances and xtr_intergroup */

10311: /********************************************************************/
10312: /* This procedure determine whether the deal is reval at first time. */
10313: /* If it's the first time, return TRUE, else return FALSE */
10314: /* NOTE: this procedure is not working for CA and IG because the */
10315: /* first_batch_id is stored in xtr_bank_balances and xtr_intergroup */
10316: /* table. Since these two deals do not call procedure. So no worry */
10317: /* We may enhance later */
10318: /*********************************************************************/
10319: PROCEDURE xtr_first_reval(