DBA Data[Home] [Help]

APPS.ARP_PROCESS_WRITEOFF dependencies on AR_CASH_RECEIPTS

Line 238: p_receipt_currency_code IN ar_cash_receipts.currency_code%type,

234: *=======================================================================*/
235: PROCEDURE create_receipt_writeoff (
236: errbuf IN OUT NOCOPY VARCHAR2,
237: retcode IN OUT NOCOPY VARCHAR2,
238: p_receipt_currency_code IN ar_cash_receipts.currency_code%type,
239: p_unapp_amount IN VARCHAR2,
240: p_unapp_amount_percent IN VARCHAR2,
241: p_receipt_date_from IN VARCHAR2,
242: p_receipt_date_to IN VARCHAR2,

Line 247: p_receipt_number IN ar_cash_receipts.receipt_number%type,

243: p_receipt_gl_date_from IN VARCHAR2,
244: p_receipt_gl_date_to IN VARCHAR2,
245: p_receipt_method_id IN VARCHAR2,
246: p_customer_number IN VARCHAR2,
247: p_receipt_number IN ar_cash_receipts.receipt_number%type,
248: p_receivable_trx_id IN VARCHAR2,
249: p_apply_date IN VARCHAR2,
250: p_gl_date IN VARCHAR2,
251: p_comments IN ar_receivable_applications.comments%type

Line 261: l_receipt_date_from ar_cash_receipts.receipt_date%type;

257: l_return_status VARCHAR2(1);
258:
259: l_unapp_amount ar_receivable_applications.amount_applied%type;
260: l_unapp_amount_percent NUMBER;
261: l_receipt_date_from ar_cash_receipts.receipt_date%type;
262: l_receipt_date_to ar_cash_receipts.receipt_date%type;
263: l_receipt_gl_date_from ar_receivable_applications.gl_date%type;
264: l_receipt_gl_date_to ar_receivable_applications.gl_date%type;
265: l_receipt_method_id ar_cash_receipts.receipt_method_id%type;

Line 262: l_receipt_date_to ar_cash_receipts.receipt_date%type;

258:
259: l_unapp_amount ar_receivable_applications.amount_applied%type;
260: l_unapp_amount_percent NUMBER;
261: l_receipt_date_from ar_cash_receipts.receipt_date%type;
262: l_receipt_date_to ar_cash_receipts.receipt_date%type;
263: l_receipt_gl_date_from ar_receivable_applications.gl_date%type;
264: l_receipt_gl_date_to ar_receivable_applications.gl_date%type;
265: l_receipt_method_id ar_cash_receipts.receipt_method_id%type;
266:

Line 265: l_receipt_method_id ar_cash_receipts.receipt_method_id%type;

261: l_receipt_date_from ar_cash_receipts.receipt_date%type;
262: l_receipt_date_to ar_cash_receipts.receipt_date%type;
263: l_receipt_gl_date_from ar_receivable_applications.gl_date%type;
264: l_receipt_gl_date_to ar_receivable_applications.gl_date%type;
265: l_receipt_method_id ar_cash_receipts.receipt_method_id%type;
266:
267: -- Bug 1981698 Changed the definition for l_customer_number.
268:
269: l_customer_number hz_cust_accounts.account_number%type;

Line 272: l_apply_date ar_cash_receipts.receipt_date%type;

268:
269: l_customer_number hz_cust_accounts.account_number%type;
270: l_customer_id hz_cust_accounts.cust_account_id%type;
271: l_receivable_trx_id ar_receivable_applications.receivables_trx_id%type;
272: l_apply_date ar_cash_receipts.receipt_date%type;
273: l_gl_date ar_cash_receipts.receipt_date%type;
274: l_receipt_currency_code ar_cash_receipts.currency_code%type;
275: l_receipt_number ar_cash_receipts.receipt_number%type;
276: l_comments ar_receivable_applications.comments%type;

Line 273: l_gl_date ar_cash_receipts.receipt_date%type;

269: l_customer_number hz_cust_accounts.account_number%type;
270: l_customer_id hz_cust_accounts.cust_account_id%type;
271: l_receivable_trx_id ar_receivable_applications.receivables_trx_id%type;
272: l_apply_date ar_cash_receipts.receipt_date%type;
273: l_gl_date ar_cash_receipts.receipt_date%type;
274: l_receipt_currency_code ar_cash_receipts.currency_code%type;
275: l_receipt_number ar_cash_receipts.receipt_number%type;
276: l_comments ar_receivable_applications.comments%type;
277: l_user_id NUMBER;

Line 274: l_receipt_currency_code ar_cash_receipts.currency_code%type;

270: l_customer_id hz_cust_accounts.cust_account_id%type;
271: l_receivable_trx_id ar_receivable_applications.receivables_trx_id%type;
272: l_apply_date ar_cash_receipts.receipt_date%type;
273: l_gl_date ar_cash_receipts.receipt_date%type;
274: l_receipt_currency_code ar_cash_receipts.currency_code%type;
275: l_receipt_number ar_cash_receipts.receipt_number%type;
276: l_comments ar_receivable_applications.comments%type;
277: l_user_id NUMBER;
278: l_application_ref_type ar_receivable_applications.application_ref_type%TYPE;

Line 275: l_receipt_number ar_cash_receipts.receipt_number%type;

271: l_receivable_trx_id ar_receivable_applications.receivables_trx_id%type;
272: l_apply_date ar_cash_receipts.receipt_date%type;
273: l_gl_date ar_cash_receipts.receipt_date%type;
274: l_receipt_currency_code ar_cash_receipts.currency_code%type;
275: l_receipt_number ar_cash_receipts.receipt_number%type;
276: l_comments ar_receivable_applications.comments%type;
277: l_user_id NUMBER;
278: l_application_ref_type ar_receivable_applications.application_ref_type%TYPE;
279: l_application_ref_id ar_receivable_applications.application_ref_id%TYPE;

Line 290: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;

286: l_tot_write_off_amount ar_receivable_applications.amount_applied%TYPE;
287: l_min_wrt_off_amount ar_receivable_applications.amount_applied%TYPE;
288: l_max_wrt_off_amount ar_receivable_applications.amount_applied%TYPE;
289: l_tot_writeoff_amt_func ar_receivable_applications.amount_applied%TYPE;
290: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;
291: l_actual_writeoff_amount NUMBER := 0;
292: l_rcpt_percent_amount NUMBER;
293:
294: l_amount_to NUMBER;

Line 296: l_functional_currency ar_cash_receipts.currency_code%TYPE;

292: l_rcpt_percent_amount NUMBER;
293:
294: l_amount_to NUMBER;
295: l_amount_from NUMBER;
296: l_functional_currency ar_cash_receipts.currency_code%TYPE;
297: l_request_id NUMBER;
298: l_number_of_records_writtenoff NUMBER := 0;
299:
300: /*5444407*/

Line 306: CURSOR writeoff_cur(c_receipt_currency_code ar_cash_receipts.currency_code%type,

302: i NUMBER;
303: l_cnt NUMBER;
304:
305: --Declare Cursor
306: CURSOR writeoff_cur(c_receipt_currency_code ar_cash_receipts.currency_code%type,
307: c_receipt_date_from ar_cash_receipts.receipt_date%type,
308: c_receipt_date_to ar_cash_receipts.receipt_date%type,
309: c_receipt_gl_date_from ar_receivable_applications.gl_date%type,
310: c_receipt_gl_date_to ar_receivable_applications.gl_date%type,

Line 307: c_receipt_date_from ar_cash_receipts.receipt_date%type,

303: l_cnt NUMBER;
304:
305: --Declare Cursor
306: CURSOR writeoff_cur(c_receipt_currency_code ar_cash_receipts.currency_code%type,
307: c_receipt_date_from ar_cash_receipts.receipt_date%type,
308: c_receipt_date_to ar_cash_receipts.receipt_date%type,
309: c_receipt_gl_date_from ar_receivable_applications.gl_date%type,
310: c_receipt_gl_date_to ar_receivable_applications.gl_date%type,
311: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,

Line 308: c_receipt_date_to ar_cash_receipts.receipt_date%type,

304:
305: --Declare Cursor
306: CURSOR writeoff_cur(c_receipt_currency_code ar_cash_receipts.currency_code%type,
307: c_receipt_date_from ar_cash_receipts.receipt_date%type,
308: c_receipt_date_to ar_cash_receipts.receipt_date%type,
309: c_receipt_gl_date_from ar_receivable_applications.gl_date%type,
310: c_receipt_gl_date_to ar_receivable_applications.gl_date%type,
311: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,
312: --Bug 1981698 Changed c_customer_number to c_customer_id.

Line 311: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,

307: c_receipt_date_from ar_cash_receipts.receipt_date%type,
308: c_receipt_date_to ar_cash_receipts.receipt_date%type,
309: c_receipt_gl_date_from ar_receivable_applications.gl_date%type,
310: c_receipt_gl_date_to ar_receivable_applications.gl_date%type,
311: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,
312: --Bug 1981698 Changed c_customer_number to c_customer_id.
313: c_customer_id ar_cash_receipts.pay_from_customer%type,
314: c_receipt_number ar_cash_receipts.receipt_number%type,
315: c_apply_date ar_cash_receipts.receipt_date%type,

Line 313: c_customer_id ar_cash_receipts.pay_from_customer%type,

309: c_receipt_gl_date_from ar_receivable_applications.gl_date%type,
310: c_receipt_gl_date_to ar_receivable_applications.gl_date%type,
311: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,
312: --Bug 1981698 Changed c_customer_number to c_customer_id.
313: c_customer_id ar_cash_receipts.pay_from_customer%type,
314: c_receipt_number ar_cash_receipts.receipt_number%type,
315: c_apply_date ar_cash_receipts.receipt_date%type,
316: c_gl_date ar_cash_receipts.receipt_date%type,
317: c_user_id ar_receivable_applications.created_by%Type

Line 314: c_receipt_number ar_cash_receipts.receipt_number%type,

310: c_receipt_gl_date_to ar_receivable_applications.gl_date%type,
311: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,
312: --Bug 1981698 Changed c_customer_number to c_customer_id.
313: c_customer_id ar_cash_receipts.pay_from_customer%type,
314: c_receipt_number ar_cash_receipts.receipt_number%type,
315: c_apply_date ar_cash_receipts.receipt_date%type,
316: c_gl_date ar_cash_receipts.receipt_date%type,
317: c_user_id ar_receivable_applications.created_by%Type
318: ) IS

Line 315: c_apply_date ar_cash_receipts.receipt_date%type,

311: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,
312: --Bug 1981698 Changed c_customer_number to c_customer_id.
313: c_customer_id ar_cash_receipts.pay_from_customer%type,
314: c_receipt_number ar_cash_receipts.receipt_number%type,
315: c_apply_date ar_cash_receipts.receipt_date%type,
316: c_gl_date ar_cash_receipts.receipt_date%type,
317: c_user_id ar_receivable_applications.created_by%Type
318: ) IS
319:

Line 316: c_gl_date ar_cash_receipts.receipt_date%type,

312: --Bug 1981698 Changed c_customer_number to c_customer_id.
313: c_customer_id ar_cash_receipts.pay_from_customer%type,
314: c_receipt_number ar_cash_receipts.receipt_number%type,
315: c_apply_date ar_cash_receipts.receipt_date%type,
316: c_gl_date ar_cash_receipts.receipt_date%type,
317: c_user_id ar_receivable_applications.created_by%Type
318: ) IS
319:
320: /*5444407*/

Line 331: ar_cash_receipts acr,

327: DECODE(app.created_by,c_user_id,
328: NVL(app.amount_applied_from,app.amount_applied),0),0),0)) written_off_amount,
329: crh.batch_id batch_id,acr.org_id
330: FROM ar_payment_schedules ps,
331: ar_cash_receipts acr,
332: ar_cash_receipt_history crh,
333: ar_receivable_applications app
334: WHERE ps.invoice_currency_code = c_receipt_currency_code
335: AND acr.cash_receipt_id = ps.cash_receipt_id

Line 682: p_currency_code IN ar_cash_receipts.currency_code%TYPE,

678: | how much the user has already written off
679: | on the receipt.
680: +===========================================================================*/
681: FUNCTION unapplied_amount(p_cash_receipt_id IN NUMBER,
682: p_currency_code IN ar_cash_receipts.currency_code%TYPE,
683: p_user_id IN ar_approval_user_limits.user_id%TYPE,
684: p_request_id IN NUMBER DEFAULT NULL, /*5444407*/
685: p_exchange_rate IN ar_cash_receipts.exchange_rate%TYPE
686: default NULL,

Line 685: p_exchange_rate IN ar_cash_receipts.exchange_rate%TYPE

681: FUNCTION unapplied_amount(p_cash_receipt_id IN NUMBER,
682: p_currency_code IN ar_cash_receipts.currency_code%TYPE,
683: p_user_id IN ar_approval_user_limits.user_id%TYPE,
684: p_request_id IN NUMBER DEFAULT NULL, /*5444407*/
685: p_exchange_rate IN ar_cash_receipts.exchange_rate%TYPE
686: default NULL,
687: p_amount_from IN NUMBER default null,
688: p_amount_to IN NUMBER default null)
689: RETURN number IS

Line 696: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;

692: l_written_off_amount ar_receivable_applications.amount_applied%TYPE;
693: l_tot_write_off_amount ar_receivable_applications.amount_applied%TYPE;
694: l_max_wrt_off_amount ar_receivable_applications.amount_applied%TYPE;
695: l_tot_writeoff_amt_func ar_receivable_applications.amount_applied%TYPE;
696: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;
697:
698: l_amount_to NUMBER;
699: l_amount_from NUMBER;
700: l_functional_currency ar_cash_receipts.currency_code%TYPE;

Line 700: l_functional_currency ar_cash_receipts.currency_code%TYPE;

696: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;
697:
698: l_amount_to NUMBER;
699: l_amount_from NUMBER;
700: l_functional_currency ar_cash_receipts.currency_code%TYPE;
701:
702: BEGIN
703: arp_util.debug('arp_process_writeoff.unapplied_amount()+');
704: l_functional_currency := arp_global.functional_currency;

Line 763: FROM ar_cash_receipts

759: /*5444407*/
760: IF p_exchange_rate is null then
761: SELECT nvl(exchange_rate,1)
762: INTO l_exchange_rate
763: FROM ar_cash_receipts
764: WHERE cash_receipt_id = p_cash_receipt_id;
765: END IF;
766:
767: l_tot_writeoff_amt_func := arpcurr.functional_amount(