DBA Data[Home] [Help]

APPS.ARP_PROCESS_WRITEOFF dependencies on AR_CASH_RECEIPTS

Line 235: p_receipt_currency_code IN ar_cash_receipts.currency_code%type,

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

Line 244: p_receipt_number IN ar_cash_receipts.receipt_number%type,

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

Line 258: l_receipt_date_from ar_cash_receipts.receipt_date%type;

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

Line 259: l_receipt_date_to ar_cash_receipts.receipt_date%type;

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

Line 262: l_receipt_method_id ar_cash_receipts.receipt_method_id%type;

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

Line 269: l_apply_date ar_cash_receipts.receipt_date%type;

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

Line 270: l_gl_date ar_cash_receipts.receipt_date%type;

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

Line 271: l_receipt_currency_code ar_cash_receipts.currency_code%type;

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

Line 272: l_receipt_number ar_cash_receipts.receipt_number%type;

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

Line 287: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;

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

Line 293: l_functional_currency ar_cash_receipts.currency_code%TYPE;

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

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

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

Line 304: c_receipt_date_from ar_cash_receipts.receipt_date%type,

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

Line 305: c_receipt_date_to ar_cash_receipts.receipt_date%type,

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

Line 308: c_receipt_method_id ar_cash_receipts.receipt_method_id%type,

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

Line 310: c_customer_id ar_cash_receipts.pay_from_customer%type,

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

Line 311: c_receipt_number ar_cash_receipts.receipt_number%type,

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

Line 312: c_apply_date ar_cash_receipts.receipt_date%type,

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

Line 313: c_gl_date ar_cash_receipts.receipt_date%type,

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

Line 328: ar_cash_receipts acr,

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

Line 677: p_currency_code IN ar_cash_receipts.currency_code%TYPE,

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

Line 680: p_exchange_rate IN ar_cash_receipts.exchange_rate%TYPE

676: FUNCTION unapplied_amount(p_cash_receipt_id IN NUMBER,
677: p_currency_code IN ar_cash_receipts.currency_code%TYPE,
678: p_user_id IN ar_approval_user_limits.user_id%TYPE,
679: p_request_id IN NUMBER DEFAULT NULL, /*5444407*/
680: p_exchange_rate IN ar_cash_receipts.exchange_rate%TYPE
681: default NULL,
682: p_amount_from IN NUMBER default null,
683: p_amount_to IN NUMBER default null)
684: RETURN number IS

Line 691: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;

687: l_written_off_amount ar_receivable_applications.amount_applied%TYPE;
688: l_tot_write_off_amount ar_receivable_applications.amount_applied%TYPE;
689: l_max_wrt_off_amount ar_receivable_applications.amount_applied%TYPE;
690: l_tot_writeoff_amt_func ar_receivable_applications.amount_applied%TYPE;
691: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;
692:
693: l_amount_to NUMBER;
694: l_amount_from NUMBER;
695: l_functional_currency ar_cash_receipts.currency_code%TYPE;

Line 695: l_functional_currency ar_cash_receipts.currency_code%TYPE;

691: l_exchange_rate ar_cash_receipts.exchange_rate%TYPE;
692:
693: l_amount_to NUMBER;
694: l_amount_from NUMBER;
695: l_functional_currency ar_cash_receipts.currency_code%TYPE;
696:
697: BEGIN
698: arp_util.debug('arp_process_writeoff.unapplied_amount()+');
699: l_functional_currency := arp_global.functional_currency;

Line 758: FROM ar_cash_receipts

754: /*5444407*/
755: IF p_exchange_rate is null then
756: SELECT nvl(exchange_rate,1)
757: INTO l_exchange_rate
758: FROM ar_cash_receipts
759: WHERE cash_receipt_id = p_cash_receipt_id;
760: END IF;
761:
762: l_tot_writeoff_amt_func := arpcurr.functional_amount(