DBA Data[Home] [Help]

APPS.ARP_BF_BILL dependencies on AR_BFB_UTILS_PVT

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

481: ' TO ' || to_char(P_bill_date) || '. ';
482: new_bill_date := P_bill_date;
483:
484: -- need to recalculate due_date
485: new_due_date := ar_bfb_utils_pvt.get_due_date(new_bill_date, new_term_id);
486:
487: END IF;
488:
489: END IF;

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

802: IF FND_GLOBAL.CONC_REQUEST_ID is null THEN
803: -- only do pre-validation for cases where call is not made from conc program
804:
805: IF P_term_id IS NOT NULL THEN
806: IF ar_bfb_utils_pvt.get_billing_cycle(P_term_id) <> P_billing_cycle_id THEN
807: write_debug_and_log('P_billing_cycle_id and P_term_id are not compatible');
808: l_param_err := 'Y';
809: ELSE
810: write_debug_and_log('P_billing_cycle_id passed initial validation.');

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

863: write_debug_and_log(' ');
864: write_debug_and_log('Loop c_terms');
865: write_debug_and_log('...term_id : ' || to_char(L_terms.term_id));
866:
867: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) = 'EVENT' THEN
868: -- for EXTERNAL cycles, billing date should be provided
869: IF P_billing_date IS NOT NULL THEN
870: write_debug_and_log( 'EXCEPTION: generate, P_billing_date is null.' );
871: APP_EXCEPTION.raise_exception;

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

928: c_site_select :=
929: 'SELECT /*+ ORDERED */ ' ||
930: 'acct_site.cust_account_id customer_id, ' ||
931: 'site_uses.site_use_id site_id, ' ||
932: 'ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id) bill_level, ' ||
933: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
934: ' ''A'', CP.override_terms, ' ||
935: ' ''S'', SP.override_terms) override_terms, ' ||
936: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||

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

929: 'SELECT /*+ ORDERED */ ' ||
930: 'acct_site.cust_account_id customer_id, ' ||
931: 'site_uses.site_use_id site_id, ' ||
932: 'ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id) bill_level, ' ||
933: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
934: ' ''A'', CP.override_terms, ' ||
935: ' ''S'', SP.override_terms) override_terms, ' ||
936: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
937: ' ''A'', CP.cons_inv_type, ' ||

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

932: 'ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id) bill_level, ' ||
933: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
934: ' ''A'', CP.override_terms, ' ||
935: ' ''S'', SP.override_terms) override_terms, ' ||
936: 'decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
937: ' ''A'', CP.cons_inv_type, ' ||
938: ' ''S'', SP.cons_inv_type) cons_inv_type ';
939:
940: -- define generic FROM clause

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

952: 'AND site_uses.site_use_code = ''BILL_TO'' ' ||
953: 'AND CP.cust_account_id = acct_site.cust_account_id ' ||
954: 'AND CP.site_use_id IS NULL ' ||
955: 'AND SP.site_use_id(+) = site_uses.site_use_id ' ||
956: 'AND ar_bfb_utils_pvt.is_payment_term_bfb(nvl(SP.standard_terms, CP.standard_terms)) = ''Y'' ' ||
957: 'AND :term_id = ' ||
958: ' decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
959: ' ''A'', CP.standard_terms, ' ||
960: ' ''S'', SP.standard_terms) ' ||

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

954: 'AND CP.site_use_id IS NULL ' ||
955: 'AND SP.site_use_id(+) = site_uses.site_use_id ' ||
956: 'AND ar_bfb_utils_pvt.is_payment_term_bfb(nvl(SP.standard_terms, CP.standard_terms)) = ''Y'' ' ||
957: 'AND :term_id = ' ||
958: ' decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
959: ' ''A'', CP.standard_terms, ' ||
960: ' ''S'', SP.standard_terms) ' ||
961: 'AND decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
962: ' ''A'', CP.cons_inv_flag, ' ||

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

957: 'AND :term_id = ' ||
958: ' decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
959: ' ''A'', CP.standard_terms, ' ||
960: ' ''S'', SP.standard_terms) ' ||
961: 'AND decode(ar_bfb_utils_pvt.get_bill_level(acct_site.cust_account_id), ' ||
962: ' ''A'', CP.cons_inv_flag, ' ||
963: ' ''S'', SP.cons_inv_flag) = ''Y'' ' ||
964: 'AND NOT EXISTS ' ||
965: ' (SELECT NULL ' ||

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

1242:
1243: --all sites under this ACCOUNT LEVEl bill will have same
1244: --same billing_date, so we will calc the billing_date right here.
1245:
1246: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1247: THEN -- calculate next logical billing date
1248: IF l_billing_date is null THEN
1249: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1250: (P_billing_cycle_id,

Line 1249: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1245:
1246: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1247: THEN -- calculate next logical billing date
1248: IF l_billing_date is null THEN
1249: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1250: (P_billing_cycle_id,
1251: trunc(sysdate),
1252: nvl(l_last_bill_date,l_cycle_start_date));
1253:

Line 1255: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1251: trunc(sysdate),
1252: nvl(l_last_bill_date,l_cycle_start_date));
1253:
1254: ELSE
1255: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1256: (P_billing_cycle_id,
1257: l_billing_date,
1258: nvl(l_last_bill_date,l_cycle_start_date));
1259:

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

1266: ELSE
1267: -- SITE LEVEL : use one cons_billing_number per site
1268: l_cons_billno := to_char(l_consinv_id);
1269:
1270: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1271: THEN -- calculate next logical billing date
1272: IF l_billing_date is null THEN
1273: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1274: (P_billing_cycle_id,

Line 1273: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1269:
1270: IF ar_bfb_utils_pvt.get_cycle_type(P_billing_cycle_id) <> 'EVENT'
1271: THEN -- calculate next logical billing date
1272: IF l_billing_date is null THEN
1273: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1274: (P_billing_cycle_id,
1275: trunc(sysdate),
1276: nvl(l_last_bill_date,l_cycle_start_date));
1277:

Line 1279: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date

1275: trunc(sysdate),
1276: nvl(l_last_bill_date,l_cycle_start_date));
1277:
1278: ELSE
1279: l_billing_date := ar_bfb_utils_pvt.get_bill_process_date
1280: (P_billing_cycle_id,
1281: l_billing_date,
1282: nvl(l_last_bill_date,l_cycle_start_date));
1283:

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

1288: write_debug_and_log('........billing_date :'||l_billing_date);
1289:
1290: /** calculate due date **/
1291:
1292: l_due_date := ar_bfb_utils_pvt.get_due_date(l_billing_date, L_terms.term_id);
1293: write_debug_and_log('......l_due_date : '||TO_CHAR(l_due_date));
1294:
1295:
1296: /* get remit_to_address */

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

1405: -- perform additional validation
1406:
1407: IF L_sites.override_terms = 'Y' THEN
1408:
1409: IF ar_bfb_utils_pvt.is_payment_term_bfb(L_inv_trx.term_id) = 'N' THEN
1410: -- trx does not have BFB term, bypass it
1411: l_bypass_trx := TRUE;
1412: ELSE
1413: