DBA Data[Home] [Help]

APPS.CE_BANK_ACCT_BALANCE_REPORT dependencies on CE_BANK_ACCT_BALANCES

Line 20: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb

16: return number
17: is
18: cursor cursor_bank_currency_code is
19: select distinct ba.CURRENCY_CODE
20: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb
21: where ba.BANK_BRANCH_ID = bh.BRANCH_PARTY_ID
22: and ba.BANK_ACCOUNT_ID = bb.BANK_ACCOUNT_ID
23: and bb.BALANCE_DATE = l_date
24: and bh.BRANCH_PARTY_ID = nvl(p_branch_party_id, bh.BRANCH_PARTY_ID)

Line 82: from ce_bank_acct_balances bb

78: if p_balance_type = 'LegerBalance' then
79:
80: select min(abs(BALANCE_DATE - p_date))
81: into v_date_offset
82: from ce_bank_acct_balances bb
83: where bb.BANK_ACCOUNT_ID = p_bank_account_id
84: and bb.LEDGER_BALANCE is not null;
85:
86: if v_date_offset is not null then

Line 89: from ce_bank_acct_balances bb

85:
86: if v_date_offset is not null then
87: select min(balance_date)
88: into v_date
89: from ce_bank_acct_balances bb
90: where bb.BANK_ACCOUNT_ID = p_bank_account_id
91: and abs(BALANCE_DATE - p_date) = v_date_offset
92: and bb.LEDGER_BALANCE is not null;
93:

Line 96: from ce_bank_acct_balances

92: and bb.LEDGER_BALANCE is not null;
93:
94: select LEDGER_BALANCE
95: into v_balance
96: from ce_bank_acct_balances
97: where BANK_ACCOUNT_ID = p_bank_account_id
98: and BALANCE_DATE = v_date;
99:
100: end if;

Line 108: from ce_bank_acct_balances bb

104: if p_balance_type = 'AvailableBalance' then
105:
106: select min(abs(BALANCE_DATE - p_date))
107: into v_date_offset
108: from ce_bank_acct_balances bb
109: where bb.BANK_ACCOUNT_ID = p_bank_account_id
110: and bb.AVAILABLE_BALANCE is not null;
111:
112: if v_date_offset is not null then

Line 115: from ce_bank_acct_balances bb

111:
112: if v_date_offset is not null then
113: select min(balance_date)
114: into v_date
115: from ce_bank_acct_balances bb
116: where bb.BANK_ACCOUNT_ID = p_bank_account_id
117: and abs(BALANCE_DATE - p_date) = v_date_offset
118: and bb.AVAILABLE_BALANCE is not null;
119:

Line 122: from ce_bank_acct_balances

118: and bb.AVAILABLE_BALANCE is not null;
119:
120: select AVAILABLE_BALANCE
121: into v_balance
122: from ce_bank_acct_balances
123: where BANK_ACCOUNT_ID = p_bank_account_id
124: and BALANCE_DATE = v_date;
125:
126: --fnd_file.put_line(fnd_file.log, 'v balance ' || v_balance);

Line 136: from ce_bank_acct_balances bb

132: if p_balance_type = 'IntCalBalance' then
133:
134: select min(abs(BALANCE_DATE - p_date))
135: into v_date_offset
136: from ce_bank_acct_balances bb
137: where bb.BANK_ACCOUNT_ID = p_bank_account_id
138: and bb.VALUE_DATED_BALANCE is not null;
139:
140: if v_date_offset is not null then

Line 143: from ce_bank_acct_balances bb

139:
140: if v_date_offset is not null then
141: select min(balance_date)
142: into v_date
143: from ce_bank_acct_balances bb
144: where bb.BANK_ACCOUNT_ID = p_bank_account_id
145: and abs(BALANCE_DATE - p_date) = v_date_offset
146: and bb.VALUE_DATED_BALANCE is not null;
147:

Line 150: from ce_bank_acct_balances

146: and bb.VALUE_DATED_BALANCE is not null;
147:
148: select VALUE_DATED_BALANCE
149: into v_balance
150: from ce_bank_acct_balances
151: where BANK_ACCOUNT_ID = p_bank_account_id
152: and BALANCE_DATE = v_date;
153:
154: end if;

Line 162: from ce_bank_acct_balances bb

158: if p_balance_type = 'OneDayFloat' then
159:
160: select min(abs(BALANCE_DATE - p_date))
161: into v_date_offset
162: from ce_bank_acct_balances bb
163: where bb.BANK_ACCOUNT_ID = p_bank_account_id
164: and bb.ONE_DAY_FLOAT is not null;
165:
166: if v_date_offset is not null then

Line 169: from ce_bank_acct_balances bb

165:
166: if v_date_offset is not null then
167: select min(balance_date)
168: into v_date
169: from ce_bank_acct_balances bb
170: where bb.BANK_ACCOUNT_ID = p_bank_account_id
171: and abs(BALANCE_DATE - p_date) = v_date_offset
172: and bb.ONE_DAY_FLOAT is not null;
173:

Line 176: from ce_bank_acct_balances

172: and bb.ONE_DAY_FLOAT is not null;
173:
174: select ONE_DAY_FLOAT
175: into v_balance
176: from ce_bank_acct_balances
177: where BANK_ACCOUNT_ID = p_bank_account_id
178: and BALANCE_DATE = v_date;
179:
180: end if;

Line 188: from ce_bank_acct_balances bb

184: if p_balance_type = 'TwoDayFloat' then
185:
186: select min(abs(BALANCE_DATE - p_date))
187: into v_date_offset
188: from ce_bank_acct_balances bb
189: where bb.BANK_ACCOUNT_ID = p_bank_account_id
190: and bb.TWO_DAY_FLOAT is not null;
191:
192: if v_date_offset is not null then

Line 195: from ce_bank_acct_balances bb

191:
192: if v_date_offset is not null then
193: select min(balance_date)
194: into v_date
195: from ce_bank_acct_balances bb
196: where bb.BANK_ACCOUNT_ID = p_bank_account_id
197: and abs(BALANCE_DATE - p_date) = v_date_offset
198: and bb.TWO_DAY_FLOAT is not null;
199:

Line 202: from ce_bank_acct_balances

198: and bb.TWO_DAY_FLOAT is not null;
199:
200: select TWO_DAY_FLOAT
201: into v_balance
202: from ce_bank_acct_balances
203: where BANK_ACCOUNT_ID = p_bank_account_id
204: and BALANCE_DATE = v_date;
205:
206: end if;

Line 214: from ce_bank_acct_balances bb

210: if p_balance_type = 'AvgLegerMTD' then
211:
212: select min(abs(BALANCE_DATE - p_date))
213: into v_date_offset
214: from ce_bank_acct_balances bb
215: where bb.BANK_ACCOUNT_ID = p_bank_account_id
216: and bb.AVERAGE_CLOSE_LEDGER_MTD is not null;
217:
218: if v_date_offset is not null then

Line 221: from ce_bank_acct_balances bb

217:
218: if v_date_offset is not null then
219: select min(balance_date)
220: into v_date
221: from ce_bank_acct_balances bb
222: where bb.BANK_ACCOUNT_ID = p_bank_account_id
223: and abs(BALANCE_DATE - p_date) = v_date_offset
224: and bb.AVERAGE_CLOSE_LEDGER_MTD is not null;
225:

Line 228: from ce_bank_acct_balances

224: and bb.AVERAGE_CLOSE_LEDGER_MTD is not null;
225:
226: select AVERAGE_CLOSE_LEDGER_MTD
227: into v_balance
228: from ce_bank_acct_balances
229: where BANK_ACCOUNT_ID = p_bank_account_id
230: and BALANCE_DATE = v_date;
231:
232: end if;

Line 240: from ce_bank_acct_balances bb

236: if p_balance_type = 'AvgLegerYTD' then
237:
238: select min(abs(BALANCE_DATE - p_date))
239: into v_date_offset
240: from ce_bank_acct_balances bb
241: where bb.BANK_ACCOUNT_ID = p_bank_account_id
242: and bb.AVERAGE_CLOSE_LEDGER_YTD is not null;
243:
244: if v_date_offset is not null then

Line 247: from ce_bank_acct_balances bb

243:
244: if v_date_offset is not null then
245: select min(balance_date)
246: into v_date
247: from ce_bank_acct_balances bb
248: where bb.BANK_ACCOUNT_ID = p_bank_account_id
249: and abs(BALANCE_DATE - p_date) = v_date_offset
250: and bb.AVERAGE_CLOSE_LEDGER_YTD is not null;
251:

Line 254: from ce_bank_acct_balances

250: and bb.AVERAGE_CLOSE_LEDGER_YTD is not null;
251:
252: select AVERAGE_CLOSE_LEDGER_YTD
253: into v_balance
254: from ce_bank_acct_balances
255: where BANK_ACCOUNT_ID = p_bank_account_id
256: and BALANCE_DATE = v_date;
257:
258: end if;

Line 266: from ce_bank_acct_balances bb

262: if p_balance_type = 'AvgAvailableMTD' then
263:
264: select min(abs(BALANCE_DATE - p_date))
265: into v_date_offset
266: from ce_bank_acct_balances bb
267: where bb.BANK_ACCOUNT_ID = p_bank_account_id
268: and bb.AVERAGE_CLOSE_AVAILABLE_MTD is not null;
269:
270: if v_date_offset is not null then

Line 273: from ce_bank_acct_balances bb

269:
270: if v_date_offset is not null then
271: select min(balance_date)
272: into v_date
273: from ce_bank_acct_balances bb
274: where bb.BANK_ACCOUNT_ID = p_bank_account_id
275: and abs(BALANCE_DATE - p_date) = v_date_offset
276: and bb.AVERAGE_CLOSE_AVAILABLE_MTD is not null;
277:

Line 280: from ce_bank_acct_balances

276: and bb.AVERAGE_CLOSE_AVAILABLE_MTD is not null;
277:
278: select AVERAGE_CLOSE_AVAILABLE_MTD
279: into v_balance
280: from ce_bank_acct_balances
281: where BANK_ACCOUNT_ID = p_bank_account_id
282: and BALANCE_DATE = v_date;
283:
284: end if;

Line 292: from ce_bank_acct_balances bb

288: if p_balance_type = 'AvgAvailableYTD' then
289:
290: select min(abs(BALANCE_DATE - p_date))
291: into v_date_offset
292: from ce_bank_acct_balances bb
293: where bb.BANK_ACCOUNT_ID = p_bank_account_id
294: and bb.AVERAGE_CLOSE_AVAILABLE_YTD is not null;
295:
296: if v_date_offset is not null then

Line 299: from ce_bank_acct_balances bb

295:
296: if v_date_offset is not null then
297: select min(balance_date)
298: into v_date
299: from ce_bank_acct_balances bb
300: where bb.BANK_ACCOUNT_ID = p_bank_account_id
301: and abs(BALANCE_DATE - p_date) = v_date_offset
302: and bb.AVERAGE_CLOSE_AVAILABLE_YTD is not null;
303:

Line 306: from ce_bank_acct_balances

302: and bb.AVERAGE_CLOSE_AVAILABLE_YTD is not null;
303:
304: select AVERAGE_CLOSE_AVAILABLE_YTD
305: into v_balance
306: from ce_bank_acct_balances
307: where BANK_ACCOUNT_ID = p_bank_account_id
308: and BALANCE_DATE = v_date;
309:
310: end if;

Line 415: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb

411: v_AvgAvailableYTDTotal number;
412:
413: cursor cursor_bank_currency_code is
414: select distinct ba.CURRENCY_CODE
415: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb
416: where ba.BANK_BRANCH_ID = bh.BRANCH_PARTY_ID
417: and ba.BANK_ACCOUNT_ID = bb.BANK_ACCOUNT_ID
418: and bb.BALANCE_DATE = l_date
419: and bh.BRANCH_PARTY_ID = nvl(p_branch_party_id, bh.BRANCH_PARTY_ID)

Line 426: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb

422: and ba.ACCOUNT_OWNER_ORG_ID = nvl(p_legal_entity_id, ba.ACCOUNT_OWNER_ORG_ID);
423:
424: cursor cursor_bank_account_id (currency varchar2) is
425: select ba.bank_account_id
426: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb
427: where ba.BANK_BRANCH_ID = bh.BRANCH_PARTY_ID
428: and ba.BANK_ACCOUNT_ID = bb.BANK_ACCOUNT_ID
429: and bb.BALANCE_DATE = l_date
430: and bh.BRANCH_PARTY_ID = nvl(p_branch_party_id, bh.BRANCH_PARTY_ID)

Line 551: from ce_bank_acct_balances bb

547: -- get the xml segment containing only the current account id info
548:
549: select bb.LEDGER_BALANCE, bb.AVAILABLE_BALANCE, bb.VALUE_DATED_BALANCE, bb.ONE_DAY_FLOAT, bb.TWO_DAY_FLOAT, bb.AVERAGE_CLOSE_LEDGER_MTD, bb.AVERAGE_CLOSE_LEDGER_YTD, bb.AVERAGE_CLOSE_AVAILABLE_MTD, bb.AVERAGE_CLOSE_AVAILABLE_YTD
550: into v_LegerBalanceAC, v_AvailableBalanceAC, v_IntCalBalanceAC, v_OneDayFloatAC, v_TwoDayFloatAC, v_AvgLegerMTDAC, v_AvgLegerYTDAC, v_AvgAvailableMTDAC, v_AvgAvailableYTDAC
551: from ce_bank_acct_balances bb
552: where bb.BALANCE_DATE = l_date
553: and bb.BANK_ACCOUNT_ID = v_bank_account_id;
554:
555: -- reset all dates to today

Line 885: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb

881: xmlelement("AvgAvailableYTDAC", xmlattributes(v_AvgAvailableYTD_Date as "BalanceDate", decode(v_AvgAvailableYTD_Date - l_date, 0, '', '*') as "Flag"), CE_BANKACCT_BA_REPORT_UTIL.get_balance(v_AvgAvailableYTDAC, ba.CURRENCY_CODE)),
882: xmlelement("AvgAvailableYTDRC", CE_BANKACCT_BA_REPORT_UTIL.get_balance(v_AvgAvailableYTDRC, p_reporting_currency))
883: )
884: into v_xml_seg1
885: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb
886: where ba.BANK_BRANCH_ID = bh.BRANCH_PARTY_ID
887: and ba.BANK_ACCOUNT_ID = bb.BANK_ACCOUNT_ID
888: and bb.BALANCE_DATE = l_date
889: and ba.BANK_ACCOUNT_ID = v_bank_account_id;

Line 1115: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb

1111: CE_BANKACCT_BA_REPORT_UTIL.get_balance(bb.AVERAGE_CLOSE_AVAILABLE_YTD, ba.CURRENCY_CODE) as "AvgCloseAvailableYTDAC",
1112: CE_BANKACCT_BA_REPORT_UTIL.get_reporting_balance(bb.AVERAGE_CLOSE_AVAILABLE_YTD, ba.CURRENCY_CODE, p_reporting_currency, p_exchange_rate_date,p_exchange_rate_type) as "AvgCloseAvailableYTDRC"
1113: ))))
1114: into l_xml
1115: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb
1116: where ba.BANK_BRANCH_ID = bh.BRANCH_PARTY_ID
1117: and ba.BANK_ACCOUNT_ID = bb.BANK_ACCOUNT_ID
1118: and bb.BALANCE_DATE between nvl(to_date(p_from_date, 'YYYY/MM/DD HH24:MI:SS'),bb.BALANCE_DATE) and nvl(to_date(p_to_date, 'YYYY/MM/DD HH24:MI:SS'),bb.BALANCE_DATE)
1119: and bh.BRANCH_PARTY_ID = nvl(p_branch_party_id, bh.BRANCH_PARTY_ID)

Line 1285: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb, ce_projected_balances pb

1281: l_balance_type_meaning as "ActualBalanceType",
1282: CE_BANKACCT_BA_REPORT_UTIL.get_balance(pb.PROJECTED_BALANCE,ba.CURRENCY_CODE) as "ProjectedBalance"
1283: ))))
1284: into l_xml
1285: from ce_bank_accounts ba, ce_bank_branches_v bh, ce_bank_acct_balances bb, ce_projected_balances pb
1286: where ba.BANK_BRANCH_ID = bh.BRANCH_PARTY_ID
1287: and ba.BANK_ACCOUNT_ID = bb.BANK_ACCOUNT_ID
1288: and bb.BALANCE_DATE between nvl(to_date(p_from_date, 'YYYY/MM/DD HH24:MI:SS'),bb.BALANCE_DATE) and nvl(to_date(p_to_date, 'YYYY/MM/DD HH24:MI:SS'),bb.BALANCE_DATE)
1289: and bh.BRANCH_PARTY_ID = nvl(p_branch_party_id, bh.BRANCH_PARTY_ID)