DBA Data[Home] [Help]

APPS.XTR_ACCOUNT_BAL_MAINT_P dependencies on XTR_BANK_BALANCES

Line 253: from XTR_BANK_BALANCES a

249: --
250: cursor PREV_DETAILS is
251: select a.BALANCE_DATE,a.BALANCE_CFLOW,a.ACCUM_INT_CFWD,a.INTEREST_RATE,a.accrual_interest,
252: a.rounding_type, day_count_type
253: from XTR_BANK_BALANCES a
254: where a.ACCOUNT_NUMBER = acct_no
255: and a.COMPANY_CODE = new_company
256: and a.BALANCE_DATE = (select max(b.BALANCE_DATE)
257: from XTR_BANK_BALANCES b

Line 257: from XTR_BANK_BALANCES b

253: from XTR_BANK_BALANCES a
254: where a.ACCOUNT_NUMBER = acct_no
255: and a.COMPANY_CODE = new_company
256: and a.BALANCE_DATE = (select max(b.BALANCE_DATE)
257: from XTR_BANK_BALANCES b
258: where b.ACCOUNT_NUMBER = acct_no
259: and b.COMPANY_CODE = new_company);
260: --
261: cursor CHK_EXISTING_DATE is

Line 263: from XTR_BANK_BALANCES

259: and b.COMPANY_CODE = new_company);
260: --
261: cursor CHK_EXISTING_DATE is
262: select 'x'
263: from XTR_BANK_BALANCES
264: where ACCOUNT_NUMBER = acct_no
265: and COMPANY_CODE = new_company
266: and BALANCE_DATE = new_date;
267: --

Line 270: from XTR_BANK_BALANCES

266: and BALANCE_DATE = new_date;
267: --
268: cursor GET_LIM_CODE_BAL is
269: select LIMIT_CODE
270: from XTR_BANK_BALANCES
271: where ACCOUNT_NUMBER = acct_no
272: and COMPANY_CODE = new_company
273: and BALANCE_DATE < new_date
274: and ((new_bal >= 0 and BALANCE_CFLOW >= 0)

Line 294: FROM xtr_bank_balances a

290: where PARTY_CODE = l_comp;
291: -- Added for Interest Override
292: CURSOR oldest_date IS
293: SELECT MIN(a.balance_date)
294: FROM xtr_bank_balances a
295: WHERE a.account_number = acct_no
296: AND a.COMPANY_CODE = new_company;
297:
298: CURSOR PRV_PRV_DETAILS IS

Line 300: FROM xtr_bank_balances a

296: AND a.COMPANY_CODE = new_company;
297:
298: CURSOR PRV_PRV_DETAILS IS
299: SELECT a.day_count_type
300: FROM xtr_bank_balances a
301: WHERE a.account_number = acct_no
302: AND a.COMPANY_CODE = new_company
303: AND a.balance_date = (select max(b.BALANCE_DATE)
304: from XTR_BANK_BALANCES b

Line 304: from XTR_BANK_BALANCES b

300: FROM xtr_bank_balances a
301: WHERE a.account_number = acct_no
302: AND a.COMPANY_CODE = new_company
303: AND a.balance_date = (select max(b.BALANCE_DATE)
304: from XTR_BANK_BALANCES b
305: where b.ACCOUNT_NUMBER = acct_no
306: and b.COMPANY_CODE = new_company
307: AND b.balance_date < l_prv_date);
308: --

Line 407: insert into XTR_BANK_BALANCES

403: fetch CHK_EXISTING_DATE INTO l_dummy;
404: if CHK_EXISTING_DATE%NOTFOUND then
405: close CHK_EXISTING_DATE;
406: -- the uploaded date is the latest date then ok to insert
407: insert into XTR_BANK_BALANCES
408: (company_code,account_number,balance_date,no_of_days,
409: statement_balance,balance_adjustment,balance_cflow,
410: accum_int_bfwd,interest,interest_rate,interest_settled,
411: interest_settled_hce,accum_int_cfwd,limit_code,

Line 583: from XTR_BANK_BALANCES a

579: nvl(sum(a.BALANCE_CFLOW),0),
580: nvl(sum(a.ACCUM_INT_CFWD),0),
581: nvl(sum(a.INTEREST_RATE),0),
582: nvl(sum(a.ACCRUAL_INTEREST),0)
583: from XTR_BANK_BALANCES a
584: --where ACCOUNT_NUMBER = l_setoff||'-'||l_bank_code
585: where a.ACCOUNT_NUMBER = l_account_number
586: and a.company_code = l_party_code
587: and a.BALANCE_DATE = (select max(b.BALANCE_DATE)

Line 588: from XTR_BANK_BALANCES b

584: --where ACCOUNT_NUMBER = l_setoff||'-'||l_bank_code
585: where a.ACCOUNT_NUMBER = l_account_number
586: and a.company_code = l_party_code
587: and a.BALANCE_DATE = (select max(b.BALANCE_DATE)
588: from XTR_BANK_BALANCES b
589: where b.ACCOUNT_NUMBER = l_account_number
590: and b.company_code = l_party_code
591: and b.BALANCE_DATE < l_calc_date)
592: group by a.BALANCE_DATE,a.ACCOUNT_NUMBER;

Line 625: FROM xtr_bank_balances a

621:
622: -- Added for Interest Override
623: CURSOR oldest_date IS
624: SELECT MIN(a.balance_date)
625: FROM xtr_bank_balances a
626: WHERE a.account_number = l_account_number
627: AND a.company_code = l_party_code;
628: /*WHERE a.account_number = l_setoff||'-'||l_bank_code
629: AND a.company_code = l_setoff_company;*/

Line 633: FROM xtr_bank_balances a

629: AND a.company_code = l_setoff_company;*/
630:
631: CURSOR PRV_DETAILS IS
632: SELECT a.rounding_type, a.day_count_type
633: FROM xtr_bank_balances a
634: WHERE a.account_number = l_account_number
635: AND a.COMPANY_CODE = l_party_code
636: /*WHERE a.account_number = l_setoff||'-'||l_bank_code
637: AND a.COMPANY_CODE = l_setoff_company*/

Line 639: from XTR_BANK_BALANCES b

635: AND a.COMPANY_CODE = l_party_code
636: /*WHERE a.account_number = l_setoff||'-'||l_bank_code
637: AND a.COMPANY_CODE = l_setoff_company*/
638: AND a.balance_date = (select max(b.BALANCE_DATE)
639: from XTR_BANK_BALANCES b
640: where b.ACCOUNT_NUMBER = l_account_number
641: and b.COMPANY_CODE = l_party_code
642: /*where b.ACCOUNT_NUMBER = l_setoff||'-'||l_bank_code
643: and b.COMPANY_CODE = l_setoff_company*/

Line 648: FROM xtr_bank_balances a

644: AND b.balance_date < l_calc_date);
645:
646: CURSOR PRV_PRV_DETAILS IS
647: SELECT a.day_count_type
648: FROM xtr_bank_balances a
649: WHERE a.account_number = l_account_number
650: AND a.COMPANY_CODE = l_party_code
651: /*WHERE a.account_number = l_setoff||'-'||l_bank_code
652: AND a.COMPANY_CODE = l_setoff_company*/

Line 654: from XTR_BANK_BALANCES b

650: AND a.COMPANY_CODE = l_party_code
651: /*WHERE a.account_number = l_setoff||'-'||l_bank_code
652: AND a.COMPANY_CODE = l_setoff_company*/
653: AND a.balance_date = (select max(b.BALANCE_DATE)
654: from XTR_BANK_BALANCES b
655: where b.ACCOUNT_NUMBER = l_account_number
656: and b.COMPANY_CODE = l_party_code
657: /*where b.ACCOUNT_NUMBER = l_setoff||'-'||l_bank_code
658: and b.COMPANY_CODE = l_setoff_company*/

Line 707: delete XTR_BANK_BALANCES

703: FETCH SEL_SETOFF_ACCT
704: INTO l_account_id;
705: EXIT WHEN SEL_SETOFF_ACCT%NOTFOUND;
706:
707: delete XTR_BANK_BALANCES
708: --where ACCOUNT_NUMBER = l_setoff||'-'||l_bank_code
709: where ACCOUNT_NUMBER = l_account_number
710: and company_code = l_party_code
711: and BALANCE_DATE >= p_calc_date

Line 815: update XTR_BANK_BALANCES

811: l_rate := nvl(l_rate,0);
812:
813: -- AW 6/15 Bug 906228
814: -- Update row with interest settled, if not found then insert a new row.
815: update XTR_BANK_BALANCES
816: set NO_OF_DAYS = l_no_days,
817: STATEMENT_BALANCE = l_this_bal,
818: BALANCE_ADJUSTMENT = l_this_adj,
819: BALANCE_CFLOW = l_this_cflw,

Line 835: insert into XTR_BANK_BALANCES

831: and ACCOUNT_NUMBER = l_setoff||'-'||l_bank_code*/
832: and BALANCE_DATE = l_calc_date;
833: if SQL%NOTFOUND then
834: -- Existing code
835: insert into XTR_BANK_BALANCES
836: (COMPANY_CODE,ACCOUNT_NUMBER,BALANCE_DATE,NO_OF_DAYS,
837: STATEMENT_BALANCE,BALANCE_ADJUSTMENT,BALANCE_CFLOW,
838: ACCUM_INT_BFWD,INTEREST,INTEREST_RATE,INTEREST_SETTLED,
839: INTEREST_SETTLED_HCE,ACCUM_INT_CFWD,created_on, created_by,accrual_interest,

Line 936: from XTR_BANK_BALANCES

932: NVL(STATEMENT_BALANCE,0)+NVL(BALANCE_ADJUSTMENT,0) BAL,
933: INTEREST_SETTLED,
934: nvl( BALANCE_CFLOW,0), -- Added nvl for R12 project Bug 4546183
935: LIMIT_CODE
936: from XTR_BANK_BALANCES
937: where BALANCE_DATE >= P_RECALC_DATE
938: and ACCOUNT_NUMBER = P_ACCOUNT_NUMBER
939: and COMPANY_CODE = P_PARTY_CODE
940: order by BALANCE_DATE asc;

Line 960: from XTR_BANK_BALANCES a

956: --
957: cursor PREV_DETAILS is
958: select a.BALANCE_DATE,NVL(a.STATEMENT_BALANCE,0)+NVL(a.BALANCE_ADJUSTMENT,0) INT_BAL,a.ACCUM_INT_CFWD,a.INTEREST_RATE,A.ACCRUAL_INTEREST,
959: a.rounding_type, a.day_count_type -- Added for Interest Override
960: from XTR_BANK_BALANCES a
961: where a.ACCOUNT_NUMBER = P_ACCOUNT_NUMBER
962: and COMPANY_CODE = P_PARTY_CODE
963: and a.BALANCE_DATE = (select max(b.BALANCE_DATE)
964: from XTR_BANK_BALANCES b

Line 964: from XTR_BANK_BALANCES b

960: from XTR_BANK_BALANCES a
961: where a.ACCOUNT_NUMBER = P_ACCOUNT_NUMBER
962: and COMPANY_CODE = P_PARTY_CODE
963: and a.BALANCE_DATE = (select max(b.BALANCE_DATE)
964: from XTR_BANK_BALANCES b
965: where b.ACCOUNT_NUMBER = P_ACCOUNT_NUMBER
966: and b.COMPANY_CODE = P_PARTY_CODE
967: and b.BALANCE_DATE < l_calc_date);
968: -- Added for Interest Override

Line 971: FROM xtr_bank_balances a

967: and b.BALANCE_DATE < l_calc_date);
968: -- Added for Interest Override
969: CURSOR oldest_date IS
970: SELECT MIN(a.balance_date)
971: FROM xtr_bank_balances a
972: WHERE a.account_number = p_account_number
973: AND a.company_code = p_party_code;
974:
975: CURSOR PRV_PRV_DETAILS IS

Line 977: FROM xtr_bank_balances a

973: AND a.company_code = p_party_code;
974:
975: CURSOR PRV_PRV_DETAILS IS
976: SELECT a.day_count_type
977: FROM xtr_bank_balances a
978: WHERE a.account_number = p_account_number
979: AND a.COMPANY_CODE = p_party_code
980: AND a.balance_date = (select max(b.BALANCE_DATE)
981: from XTR_BANK_BALANCES b

Line 981: from XTR_BANK_BALANCES b

977: FROM xtr_bank_balances a
978: WHERE a.account_number = p_account_number
979: AND a.COMPANY_CODE = p_party_code
980: AND a.balance_date = (select max(b.BALANCE_DATE)
981: from XTR_BANK_BALANCES b
982: where b.ACCOUNT_NUMBER = p_account_number
983: and b.COMPANY_CODE = p_party_code
984: AND b.balance_date < l_prv_date);
985: CURSOR CASHPOOL_DETAILS IS

Line 1139: update XTR_BANK_BALANCES

1135: l_int_cf := l_original_amount;
1136: --
1137: l_accrual_int :=nvl(l_prv_accrual_int,0) + nvl(l_interest,0);
1138:
1139: update XTR_BANK_BALANCES
1140: set NO_OF_DAYS = l_no_days
1141: ,ACCUM_INT_BFWD = l_int_bf
1142: ,INTEREST = nvl(l_interest,0)
1143: ,ACCUM_INT_CFWD = l_int_cf