DBA Data[Home] [Help]

APPS.ARP_BF_BILL dependencies on AR_BFB_UTILS_PVT

Line 464: new_due_date := ar_bfb_utils_pvt.get_due_date(new_bill_date, new_term_id);

460: ' TO ' || to_char(P_bill_date) || '. ';
461: new_bill_date := P_bill_date;
462:
463: -- need to recalculate due_date
464: new_due_date := ar_bfb_utils_pvt.get_due_date(new_bill_date, new_term_id);
465:
466: END IF;
467:
468: END IF;

Line 788: IF ar_bfb_utils_pvt.get_billing_cycle(P_term_id) <> P_billing_cycle_id THEN

784: IF FND_GLOBAL.CONC_REQUEST_ID is null THEN
785: -- only do pre-validation for cases where call is not made from conc program
786:
787: IF P_term_id IS NOT NULL THEN
788: IF ar_bfb_utils_pvt.get_billing_cycle(P_term_id) <> P_billing_cycle_id THEN
789: write_debug_and_log('P_billing_cycle_id and P_term_id are not compatible');
790: l_param_err := 'Y';
791: ELSE
792: write_debug_and_log('P_billing_cycle_id passed initial validation.');

Line 849: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) = 'EVENT' THEN

845: write_debug_and_log(' ');
846: write_debug_and_log('Loop c_terms');
847: write_debug_and_log('...term_id : ' || to_char(L_terms.term_id));
848:
849: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) = 'EVENT' THEN
850: -- for EXTERNAL cycles, billing date should be provided
851: IF P_billing_date IS NOT NULL THEN
852: write_debug_and_log( 'EXCEPTION: generate, P_billing_date is null.' );
853: APP_EXCEPTION.raise_exception;

Line 914: 'ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id) bill_level, ' ||

910: c_site_select :=
911: 'SELECT /*+ ORDERED */ ' ||
912: 'acct_site.cust_account_id customer_id, ' ||
913: 'site_uses.site_use_id site_id, ' ||
914: 'ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id) bill_level, ' ||
915: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
916: ' ''A'', CP.override_terms, ' ||
917: ' ''S'', SP.override_terms) override_terms, ' ||
918: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||

Line 915: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||

911: 'SELECT /*+ ORDERED */ ' ||
912: 'acct_site.cust_account_id customer_id, ' ||
913: 'site_uses.site_use_id site_id, ' ||
914: 'ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id) bill_level, ' ||
915: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
916: ' ''A'', CP.override_terms, ' ||
917: ' ''S'', SP.override_terms) override_terms, ' ||
918: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
919: ' ''A'', CP.cons_inv_type, ' ||

Line 918: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||

914: 'ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id) bill_level, ' ||
915: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
916: ' ''A'', CP.override_terms, ' ||
917: ' ''S'', SP.override_terms) override_terms, ' ||
918: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
919: ' ''A'', CP.cons_inv_type, ' ||
920: ' ''S'', SP.cons_inv_type) cons_inv_type ';
921:
922: -- define generic FROM clause

Line 938: 'AND ar_bfb_utils_pvt.is_payment_term_bfb(nvl(SP.standard_terms, CP.standard_terms)) = ''Y'' ' ||

934: 'AND site_uses.site_use_code = ''BILL_TO'' ' ||
935: 'AND CP.cust_account_id = acct_site.cust_account_id ' ||
936: 'AND CP.site_use_id IS NULL ' ||
937: 'AND SP.site_use_id(+) = site_uses.site_use_id ' ||
938: 'AND ar_bfb_utils_pvt.is_payment_term_bfb(nvl(SP.standard_terms, CP.standard_terms)) = ''Y'' ' ||
939: 'AND :term_id = ' ||
940: ' decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
941: ' ''A'', CP.standard_terms, ' ||
942: ' ''S'', SP.standard_terms) ' ||

Line 940: ' decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||

936: 'AND CP.site_use_id IS NULL ' ||
937: 'AND SP.site_use_id(+) = site_uses.site_use_id ' ||
938: 'AND ar_bfb_utils_pvt.is_payment_term_bfb(nvl(SP.standard_terms, CP.standard_terms)) = ''Y'' ' ||
939: 'AND :term_id = ' ||
940: ' decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
941: ' ''A'', CP.standard_terms, ' ||
942: ' ''S'', SP.standard_terms) ' ||
943: 'AND decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
944: ' ''A'', CP.cons_inv_flag, ' ||

Line 943: 'AND decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||

939: 'AND :term_id = ' ||
940: ' decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
941: ' ''A'', CP.standard_terms, ' ||
942: ' ''S'', SP.standard_terms) ' ||
943: 'AND decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
944: ' ''A'', CP.cons_inv_flag, ' ||
945: ' ''S'', SP.cons_inv_flag) = ''Y'' ' ||
946: 'AND NOT EXISTS ' ||
947: ' (SELECT NULL ' ||

Line 1233: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'

1229:
1230: --all sites under this ACCOUNT LEVEl bill will have same
1231: --same billing_date, so we will calc the billing_date right here.
1232:
1233: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1234: THEN -- calculate next logical billing date
1235: IF l_billing_date is null THEN
1236: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1237: (P_billing_cycle_id,

Line 1236: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1232:
1233: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1234: THEN -- calculate next logical billing date
1235: IF l_billing_date is null THEN
1236: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1237: (P_billing_cycle_id,
1238: trunc(sysdate),
1239: nvl(l_last_bill_date,l_cycle_start_date));
1240:

Line 1242: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1238: trunc(sysdate),
1239: nvl(l_last_bill_date,l_cycle_start_date));
1240:
1241: ELSE
1242: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1243: (P_billing_cycle_id,
1244: l_billing_date,
1245: nvl(l_last_bill_date,l_cycle_start_date));
1246:

Line 1257: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'

1253: ELSE
1254: -- SITE LEVEL : use one cons_billing_number per site
1255: l_cons_billno := to_char(l_consinv_id);
1256:
1257: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1258: THEN -- calculate next logical billing date
1259: IF l_billing_date is null THEN
1260: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1261: (P_billing_cycle_id,

Line 1260: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1256:
1257: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1258: THEN -- calculate next logical billing date
1259: IF l_billing_date is null THEN
1260: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1261: (P_billing_cycle_id,
1262: trunc(sysdate),
1263: nvl(l_last_bill_date,l_cycle_start_date));
1264:

Line 1266: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1262: trunc(sysdate),
1263: nvl(l_last_bill_date,l_cycle_start_date));
1264:
1265: ELSE
1266: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1267: (P_billing_cycle_id,
1268: l_billing_date,
1269: nvl(l_last_bill_date,l_cycle_start_date));
1270:

Line 1284: l_due_date := ar_bfb_utils_pvt.get_due_date(l_billing_date, L_terms.term_id);

1280: else
1281:
1282: /** calculate due date **/
1283:
1284: l_due_date := ar_bfb_utils_pvt.get_due_date(l_billing_date, L_terms.term_id);
1285: write_debug_and_log('......l_due_date : '||TO_CHAR(l_due_date));
1286:
1287:
1288: /* get remit_to_address */

Line 1419: -- AND ar_bfb_utils_pvt.is_payment_term_bfb(ct.term_id) = 'Y' -- commented on 08mar2012

1415: AND ra.apply_date <= l_billing_date
1416: GROUP BY ra.APPLIED_CUSTOMER_TRX_ID
1417: HAVING SUM(nvl(ra.amount_applied_from, ra.amount_applied)) <> 0)
1418: AND ct.customer_trx_id = ps.customer_trx_id
1419: -- AND ar_bfb_utils_pvt.is_payment_term_bfb(ct.term_id) = 'Y' -- commented on 08mar2012
1420: AND nvl(PS.exclude_from_cons_bill_flag, 'N') <> 'Y'
1421: ---Added below condition to verify if associated INV is there in prior BFB
1422: AND EXISTS (SELECT '*'
1423: FROM ar_cons_inv c,

Line 1453: IF ar_bfb_utils_pvt.is_payment_term_bfb(L_inv_trx.term_id) = 'N' THEN

1449: -- perform additional validation
1450:
1451: IF L_sites.override_terms = 'Y' THEN
1452:
1453: IF ar_bfb_utils_pvt.is_payment_term_bfb(L_inv_trx.term_id) = 'N' THEN
1454: -- trx does not have BFB term, bypass it
1455: l_bypass_trx := TRUE;
1456: ELSE
1457:

Line 1809: AND (Decode(ps_inv.class ,'CM','Y',ar_bfb_utils_pvt.is_payment_term_bfb(inv_trx.term_id)) <> 'Y' /* Bug 13485325 */

1805: AND RA.status = 'APP'
1806: AND ra.application_type = 'CASH'
1807: AND ra.apply_date <= l_billing_date
1808: AND ps_inv.customer_trx_id = inv_trx.customer_trx_id
1809: AND (Decode(ps_inv.class ,'CM','Y',ar_bfb_utils_pvt.is_payment_term_bfb(inv_trx.term_id)) <> 'Y' /* Bug 13485325 */
1810: OR nvl(ps_inv.exclude_from_cons_bill_flag, 'N') = 'Y'))) <> 0);
1811:
1812: /* ACTIVITY 3 : RECEIPT REVERSAL
1813: Reverse FULL receipt amount for receipt reversals of

Line 2270: AND (ar_bfb_utils_pvt.is_payment_term_bfb(inv_trx.term_id) <> 'Y'

2266: AND RA.status = 'APP'
2267: AND ra.application_type = 'CASH'
2268: AND ra.apply_date <= l_billing_date
2269: AND ps_inv.customer_trx_id = inv_trx.customer_trx_id
2270: AND (ar_bfb_utils_pvt.is_payment_term_bfb(inv_trx.term_id) <> 'Y'
2271: OR nvl(ps_inv.exclude_from_cons_bill_flag, 'N') = 'Y'))) <> 0);
2272:
2273: /* ACTIVITY 11 : RECEIPT REVERSAL
2274: Reverse FULL receipt amount for receipt reversals of