DBA Data[Home] [Help]

APPS.AR_BFB_UTILS_PVT dependencies on STANDARD

Line 214: arp_standard.debug('ar_bfb_utils_pvt.get_bill_level(+)');

210:
211: BEGIN
212:
213: IF PG_DEBUG in ('Y', 'C') THEN
214: arp_standard.debug('ar_bfb_utils_pvt.get_bill_level(+)');
215: END IF;
216:
217: IF ( p_cust_account_id < -2147483647 or p_cust_account_id > 2147483647 ) then
218: arp_standard.debug('Customer Account Id is outside the sequence range.');

Line 218: arp_standard.debug('Customer Account Id is outside the sequence range.');

214: arp_standard.debug('ar_bfb_utils_pvt.get_bill_level(+)');
215: END IF;
216:
217: IF ( p_cust_account_id < -2147483647 or p_cust_account_id > 2147483647 ) then
218: arp_standard.debug('Customer Account Id is outside the sequence range.');
219:
220: begin
221: select decode(cp.cons_bill_level,'ACCOUNT','A','SITE','S','N')
222: into bfb_level

Line 245: arp_standard.debug('ar_bfb_utils_pvt.get_bill_level(-)');

241:
242: temp_bill_level_table(p_cust_account_id) := bfb_level;
243: END IF;
244: IF PG_DEBUG in ('Y', 'C') THEN
245: arp_standard.debug('ar_bfb_utils_pvt.get_bill_level(-)');
246: END IF;
247: return temp_bill_level_table(p_cust_account_id);
248:
249: EXCEPTION

Line 259: arp_standard.debug('EXCEPTION OTHERS in ar_bfb_utils_pvt.get_bill_level :'||SQLERRM);

255: ELSE
256: return 'N';
257: END IF;
258: WHEN OTHERS THEN
259: arp_standard.debug('EXCEPTION OTHERS in ar_bfb_utils_pvt.get_bill_level :'||SQLERRM);
260: RAISE;
261: END get_bill_level;
262:
263: function get_billing_cycle (p_payment_term_id in NUMBER) RETURN NUMBER IS

Line 268: arp_standard.debug('get_billing_cycle(+)');

264:
265: bill_cycle_id NUMBER;
266: BEGIN
267: IF PG_DEBUG in ('Y', 'C') THEN
268: arp_standard.debug('get_billing_cycle(+)');
269: END IF;
270: IF (temp_billing_cycle_id_tab.EXISTS(p_payment_term_id) = FALSE) THEN
271: select billing_cycle_id
272: into bill_cycle_id

Line 280: arp_standard.debug('get_billing_cycle(-)');

276: temp_billing_cycle_id_tab(p_payment_term_id) := bill_cycle_id;
277: END IF;
278:
279: IF PG_DEBUG in ('Y', 'C') THEN
280: arp_standard.debug('get_billing_cycle(-)');
281: END IF;
282: return temp_billing_cycle_id_tab(p_payment_term_id);
283: EXCEPTION
284: WHEN NO_DATA_FOUND THEN

Line 285: arp_standard.debug('NO_DATA_FOUND EXCEPTION in get_billing_cycle');

281: END IF;
282: return temp_billing_cycle_id_tab(p_payment_term_id);
283: EXCEPTION
284: WHEN NO_DATA_FOUND THEN
285: arp_standard.debug('NO_DATA_FOUND EXCEPTION in get_billing_cycle');
286: return 0;
287: WHEN OTHERS THEN
288: arp_standard.debug('EXCEPTION OTHERS in get_billing_cycle');
289: return 0;

Line 288: arp_standard.debug('EXCEPTION OTHERS in get_billing_cycle');

284: WHEN NO_DATA_FOUND THEN
285: arp_standard.debug('NO_DATA_FOUND EXCEPTION in get_billing_cycle');
286: return 0;
287: WHEN OTHERS THEN
288: arp_standard.debug('EXCEPTION OTHERS in get_billing_cycle');
289: return 0;
290: END get_billing_cycle;
291:
292: function get_cycle_type (p_bill_cycle_id IN NUMBER) RETURN VARCHAR2 IS

Line 337: NULL, nvl(sp.standard_terms,

333:
334: select nvl(su.payment_term_id,
335: decode(spt.billing_cycle_id,
336: -- if cycle is NULL
337: NULL, nvl(sp.standard_terms,
338: decode(apt.billing_cycle_id,
339: -- if cycle is NULL
340: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94) ,
341: -- if cycle is NOT NULL

Line 340: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94) ,

336: -- if cycle is NULL
337: NULL, nvl(sp.standard_terms,
338: decode(apt.billing_cycle_id,
339: -- if cycle is NULL
340: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94) ,
341: -- if cycle is NOT NULL
342: -92)),
343: -- if cycle is NOT NULL
344: decode(ap.cons_bill_level,

Line 346: 'ACCOUNT', nvl(ap.standard_terms, -93),

342: -92)),
343: -- if cycle is NOT NULL
344: decode(ap.cons_bill_level,
345: -- if bill level = Account
346: 'ACCOUNT', nvl(ap.standard_terms, -93),
347: -- if bill level = Site
348: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95)
349: -- if bill level is not set
350: , -91)))

Line 348: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95)

344: decode(ap.cons_bill_level,
345: -- if bill level = Account
346: 'ACCOUNT', nvl(ap.standard_terms, -93),
347: -- if bill level = Site
348: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95)
349: -- if bill level is not set
350: , -91)))
351: into l_default_term
352: from ra_cust_trx_types tt,

Line 357: ( select /*+ leading(su2) */ cp.override_terms,cp.standard_terms,cp.cust_account_id,

353: hz_customer_profiles ap,
354: hz_cust_site_uses su,
355: ra_terms_b apt,
356: ra_terms_b spt,
357: ( select /*+ leading(su2) */ cp.override_terms,cp.standard_terms,cp.cust_account_id,
358: su2.site_use_id profile_bill_to_site_use_id
359: from hz_customer_profiles cp,
360: hz_cust_site_uses su1,
361: hz_cust_site_uses su2

Line 378: and ap.standard_terms = apt.term_id (+)

374: and p_bill_to_customer = ap.cust_account_id
375: and ap.site_use_id is null
376: and p_bill_to_customer = sp.cust_account_id (+)
377: and su.site_use_id = sp.profile_bill_to_site_use_id (+)
378: and ap.standard_terms = apt.term_id (+)
379: and sysdate between nvl(apt.start_date_active, sysdate) and
380: nvl(apt.end_date_active, sysdate)
381: and sp.standard_terms = spt.term_id (+)
382: and sysdate between nvl(spt.start_date_active, sysdate) and

Line 381: and sp.standard_terms = spt.term_id (+)

377: and su.site_use_id = sp.profile_bill_to_site_use_id (+)
378: and ap.standard_terms = apt.term_id (+)
379: and sysdate between nvl(apt.start_date_active, sysdate) and
380: nvl(apt.end_date_active, sysdate)
381: and sp.standard_terms = spt.term_id (+)
382: and sysdate between nvl(spt.start_date_active, sysdate) and
383: nvl(spt.end_date_active, sysdate);
384:
385: return l_default_term;

Line 406: NULL, nvl(sp.standard_terms,

402: NULL, decode(decode(ap.cons_bill_level,'SITE',sp.override_terms,ap.override_terms),
403: 'Y', trx.term_id,
404: nvl(su.payment_term_id,
405: decode(spt.billing_cycle_id,
406: NULL, nvl(sp.standard_terms,
407: decode(apt.billing_cycle_id,
408: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94),
409: -92)),
410: decode(ap.cons_bill_level,

Line 408: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94),

404: nvl(su.payment_term_id,
405: decode(spt.billing_cycle_id,
406: NULL, nvl(sp.standard_terms,
407: decode(apt.billing_cycle_id,
408: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94),
409: -92)),
410: decode(ap.cons_bill_level,
411: 'ACCOUNT', nvl(ap.standard_terms, -93),
412: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95),

Line 411: 'ACCOUNT', nvl(ap.standard_terms, -93),

407: decode(apt.billing_cycle_id,
408: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94),
409: -92)),
410: decode(ap.cons_bill_level,
411: 'ACCOUNT', nvl(ap.standard_terms, -93),
412: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95),
413: -91)))),
414: nvl(su.payment_term_id,
415: decode(spt.billing_cycle_id,

Line 412: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95),

408: NULL, nvl(nvl(ap.standard_terms, tt.default_term) , -94),
409: -92)),
410: decode(ap.cons_bill_level,
411: 'ACCOUNT', nvl(ap.standard_terms, -93),
412: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95),
413: -91)))),
414: nvl(su.payment_term_id,
415: decode(spt.billing_cycle_id,
416: NULL, DECODE(APT.BILLING_CYCLE_ID,

Line 417: NULL, nvl(sp.standard_terms, nvl(nvl(ap.standard_terms, tt.default_term), -94)),

413: -91)))),
414: nvl(su.payment_term_id,
415: decode(spt.billing_cycle_id,
416: NULL, DECODE(APT.BILLING_CYCLE_ID,
417: NULL, nvl(sp.standard_terms, nvl(nvl(ap.standard_terms, tt.default_term), -94)),
418: DECODE(AP.CONS_BILL_LEVEL,
419: 'ACCOUNT', NVL(AP.STANDARD_TERMS, -93),
420: 'SITE', NVL(AP.STANDARD_TERMS, -93),
421: -91)),

Line 419: 'ACCOUNT', NVL(AP.STANDARD_TERMS, -93),

415: decode(spt.billing_cycle_id,
416: NULL, DECODE(APT.BILLING_CYCLE_ID,
417: NULL, nvl(sp.standard_terms, nvl(nvl(ap.standard_terms, tt.default_term), -94)),
418: DECODE(AP.CONS_BILL_LEVEL,
419: 'ACCOUNT', NVL(AP.STANDARD_TERMS, -93),
420: 'SITE', NVL(AP.STANDARD_TERMS, -93),
421: -91)),
422: decode(ap.cons_bill_level,
423: 'ACCOUNT', nvl(ap.standard_terms, -93),

Line 420: 'SITE', NVL(AP.STANDARD_TERMS, -93),

416: NULL, DECODE(APT.BILLING_CYCLE_ID,
417: NULL, nvl(sp.standard_terms, nvl(nvl(ap.standard_terms, tt.default_term), -94)),
418: DECODE(AP.CONS_BILL_LEVEL,
419: 'ACCOUNT', NVL(AP.STANDARD_TERMS, -93),
420: 'SITE', NVL(AP.STANDARD_TERMS, -93),
421: -91)),
422: decode(ap.cons_bill_level,
423: 'ACCOUNT', nvl(ap.standard_terms, -93),
424: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95)

Line 423: 'ACCOUNT', nvl(ap.standard_terms, -93),

419: 'ACCOUNT', NVL(AP.STANDARD_TERMS, -93),
420: 'SITE', NVL(AP.STANDARD_TERMS, -93),
421: -91)),
422: decode(ap.cons_bill_level,
423: 'ACCOUNT', nvl(ap.standard_terms, -93),
424: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95)
425: , -91)))) new_term_id, trx.customer_trx_id
426: from ra_customer_trx trx,
427: ra_cust_trx_types tt,

Line 424: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95)

420: 'SITE', NVL(AP.STANDARD_TERMS, -93),
421: -91)),
422: decode(ap.cons_bill_level,
423: 'ACCOUNT', nvl(ap.standard_terms, -93),
424: 'SITE', nvl(nvl(sp.standard_terms, ap.standard_terms), -95)
425: , -91)))) new_term_id, trx.customer_trx_id
426: from ra_customer_trx trx,
427: ra_cust_trx_types tt,
428: hz_customer_profiles ap,

Line 435: ( select /*+ leading(su2) */ cp.override_terms,cp.standard_terms,cp.cust_account_id,

431: ra_terms_b apt,
432: ra_terms_b spt,
433: ra_terms_b ttt,
434: ra_terms_b invt,
435: ( select /*+ leading(su2) */ cp.override_terms,cp.standard_terms,cp.cust_account_id,
436: su2.site_use_id profile_bill_to_site_use_id
437: from hz_customer_profiles cp,
438: hz_cust_site_uses su1,
439: hz_cust_site_uses su2

Line 462: and ap.standard_terms = apt.term_id (+)

458: and ap.site_use_id is null
459: and NVL(ap.cons_inv_flag, 'N') = 'Y' -- 7575555
460: and trx.bill_to_customer_id = sp.cust_account_id (+)
461: and trx.bill_to_site_use_id = sp.profile_bill_to_site_use_id (+)
462: and ap.standard_terms = apt.term_id (+)
463: and trx.trx_date between nvl(apt.start_date_active, trx.trx_date) and
464: nvl(apt.end_date_active, trx.trx_date)
465: and sp.standard_terms = spt.term_id (+)
466: and trx.trx_date between nvl(spt.start_date_active, trx.trx_date) and

Line 465: and sp.standard_terms = spt.term_id (+)

461: and trx.bill_to_site_use_id = sp.profile_bill_to_site_use_id (+)
462: and ap.standard_terms = apt.term_id (+)
463: and trx.trx_date between nvl(apt.start_date_active, trx.trx_date) and
464: nvl(apt.end_date_active, trx.trx_date)
465: and sp.standard_terms = spt.term_id (+)
466: and trx.trx_date between nvl(spt.start_date_active, trx.trx_date) and
467: nvl(spt.end_date_active, trx.trx_date);
468:
469: t_trx_id l_trx_id_type;

Line 485: arp_standard.debug('ar_bfb_utils_pvt.validate_and_default_term()+');

481: l_msg_95 fnd_new_messages.message_text%type;
482: l_msg_96 fnd_new_messages.message_text%type;
483: BEGIN
484: IF PG_DEBUG in ('Y', 'C') THEN
485: arp_standard.debug('ar_bfb_utils_pvt.validate_and_default_term()+');
486: arp_standard.debug(' request_id = ' || p_request_id);
487: END IF;
488:
489: /* Fetch rows (transactions) for processing */

Line 486: arp_standard.debug(' request_id = ' || p_request_id);

482: l_msg_96 fnd_new_messages.message_text%type;
483: BEGIN
484: IF PG_DEBUG in ('Y', 'C') THEN
485: arp_standard.debug('ar_bfb_utils_pvt.validate_and_default_term()+');
486: arp_standard.debug(' request_id = ' || p_request_id);
487: END IF;
488:
489: /* Fetch rows (transactions) for processing */
490: /* 7575555 - we now only fetch records where the account-level cons_inv_flag = Y.

Line 506: arp_standard.debug(' rows selected = ' || l_rows_selected);

502: IF l_rows_selected > 0
503: THEN
504: /* Process what we've got */
505: IF PG_DEBUG in ('Y', 'C') THEN
506: arp_standard.debug(' rows selected = ' || l_rows_selected);
507: END IF;
508:
509: /* Bulk update of transaction terms
510: NOTE: This excludes those in error or null */

Line 559: arp_standard.debug(' NO ROWS TO PROCESS');

555: END IF;
556: ELSE
557: /* Nothing to process */
558: IF PG_DEBUG in ('Y', 'C') THEN
559: arp_standard.debug(' NO ROWS TO PROCESS');
560: END IF;
561: END IF;
562:
563: p_error_count := l_rows_rejected;

Line 566: arp_standard.debug(' rows processed = ' || l_rows_updated);

562:
563: p_error_count := l_rows_rejected;
564:
565: IF PG_DEBUG in ('Y', 'C') THEN
566: arp_standard.debug(' rows processed = ' || l_rows_updated);
567: arp_standard.debug(' rows rejected = ' || p_error_count);
568: arp_standard.debug('ar_bfb_utils_pvt.validate_and_default_term()-');
569: END IF;
570:

Line 567: arp_standard.debug(' rows rejected = ' || p_error_count);

563: p_error_count := l_rows_rejected;
564:
565: IF PG_DEBUG in ('Y', 'C') THEN
566: arp_standard.debug(' rows processed = ' || l_rows_updated);
567: arp_standard.debug(' rows rejected = ' || p_error_count);
568: arp_standard.debug('ar_bfb_utils_pvt.validate_and_default_term()-');
569: END IF;
570:
571:

Line 568: arp_standard.debug('ar_bfb_utils_pvt.validate_and_default_term()-');

564:
565: IF PG_DEBUG in ('Y', 'C') THEN
566: arp_standard.debug(' rows processed = ' || l_rows_updated);
567: arp_standard.debug(' rows rejected = ' || p_error_count);
568: arp_standard.debug('ar_bfb_utils_pvt.validate_and_default_term()-');
569: END IF;
570:
571:
572: END validate_and_default_term;