DBA Data[Home] [Help]

APPS.ARP_ALLOCATION_PKG dependencies on RA_CUSTOMER_TRX_LINES

Line 44: g_br_cust_trx_line_id ra_customer_trx_lines.customer_trx_line_id%TYPE;

40: g_link_ctr NUMBER := 0;
41: g_bulk_fetch_rows NUMBER := 400;
42: g_override1 VARCHAR2(1);
43: g_override2 VARCHAR2(1);
44: g_br_cust_trx_line_id ra_customer_trx_lines.customer_trx_line_id%TYPE;
45: g_simul_app VARCHAR2(1);
46: g_ae_code_combination_id_app NUMBER;
47:
48: g_exec VARCHAR2(30);

Line 357: p_br_cust_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%TYPE default NULL,

353: p_cust_inv_rec IN ra_customer_trx%ROWTYPE,
354: p_adj_rec IN ar_adjustments%ROWTYPE,
355: p_ae_ctr IN OUT NOCOPY BINARY_INTEGER,
356: p_ae_line_tbl IN OUT NOCOPY ae_line_tbl_type,
357: p_br_cust_trx_line_id IN ra_customer_trx_lines.customer_trx_line_id%TYPE default NULL,
358: p_simul_app IN VARCHAR2 default NULL,
359: p_from_llca_call IN VARCHAR2 DEFAULT 'N',
360: p_gt_id IN NUMBER DEFAULT NULL,
361: -- this flag is introduced to indicate if the application need conversion

Line 857: from ra_customer_trx_lines

853: arp_standard.debug('Updating CM ard to stamp ref_prev_cust_trx_line_id');
854:
855: update ar_distributions ard
856: set ref_prev_cust_trx_line_id = (select previous_customer_trx_line_id
857: from ra_customer_trx_lines
858: where customer_trx_line_id = ard.ref_customer_trx_line_id)
859: where source_id = g_ae_doc_rec.source_id
860: and source_table = 'RA'
861: and ref_customer_trx_line_id in (select customer_trx_line_id

Line 862: from ra_customer_trx_lines ctl_cm,

858: where customer_trx_line_id = ard.ref_customer_trx_line_id)
859: where source_id = g_ae_doc_rec.source_id
860: and source_table = 'RA'
861: and ref_customer_trx_line_id in (select customer_trx_line_id
862: from ra_customer_trx_lines ctl_cm,
863: ar_receivable_applications ra
864: where ra.receivable_application_id = g_ae_doc_rec.source_id
865: and ra.customer_trx_id = ctl_cm.customer_trx_id
866: and ctl_cm.previous_customer_trx_line_id is not null);

Line 884: from ra_customer_trx_lines ctl_inv,

880: and rownum = 1)
881: where source_id = g_ae_doc_rec.source_id
882: and source_table = 'RA'
883: and ref_customer_trx_line_id in (select customer_trx_line_id
884: from ra_customer_trx_lines ctl_inv,
885: ar_receivable_applications ra
886: where ra.receivable_application_id = g_ae_doc_rec.source_id
887: and ra.applied_customer_trx_id = ctl_inv.customer_trx_id);
888: l_cnt := sql%rowcount;

Line 933: DELETE FROM ra_customer_trx_lines_gt;

929: END IF;
930:
931: arp_det_dist_pkg.g_appln_count := 0;
932:
933: DELETE FROM ra_customer_trx_lines_gt;
934: IF PG_DEBUG in ('Y', 'C') THEN
935: l_cnt := sql%rowcount;
936: arp_standard.debug('No of rows deleted from ra_customer_trx_lines_gt : '||l_cnt);
937: END IF;

Line 936: arp_standard.debug('No of rows deleted from ra_customer_trx_lines_gt : '||l_cnt);

932:
933: DELETE FROM ra_customer_trx_lines_gt;
934: IF PG_DEBUG in ('Y', 'C') THEN
935: l_cnt := sql%rowcount;
936: arp_standard.debug('No of rows deleted from ra_customer_trx_lines_gt : '||l_cnt);
937: END IF;
938:
939: DELETE FROM ra_ar_gt;
940: IF PG_DEBUG in ('Y', 'C') THEN

Line 1477: FROM ra_customer_trx_lines ctl,

1473: det.from_amount ae_from_pro_amt,
1474: det.from_acctd_amount ae_from_pro_acctd_amt,
1475: det.ccid ref_dist_ccid,
1476: det.ref_mf_dist_flag
1477: FROM ra_customer_trx_lines ctl,
1478: ra_cust_trx_line_gl_dist gld,
1479: ra_customer_trx_lines line,
1480: ar_line_app_detail_gt det
1481: where ctl.customer_trx_id = p_invoice_id

Line 1479: ra_customer_trx_lines line,

1475: det.ccid ref_dist_ccid,
1476: det.ref_mf_dist_flag
1477: FROM ra_customer_trx_lines ctl,
1478: ra_cust_trx_line_gl_dist gld,
1479: ra_customer_trx_lines line,
1480: ar_line_app_detail_gt det
1481: where ctl.customer_trx_id = p_invoice_id
1482: and ctl.line_type = 'TAX'
1483: and gld.customer_trx_line_id = ctl.customer_trx_line_id

Line 1493: from ra_customer_trx_lines ctl1

1489: AND det.ref_cust_trx_line_gl_dist_id = gld.cust_trx_line_gl_dist_id
1490: AND det.gt_id = g_id
1491: AND det.ledger_id = g_ae_sys_rec.set_of_books_id;
1492: /* and not exists (select 'x'
1493: from ra_customer_trx_lines ctl1
1494: where ctl1.customer_trx_id = p_invoice_id
1495: and ctl1.autorule_complete_flag = 'N') */
1496: /* nvl(tax.location_segment_id,tax.vat_tax_id),
1497: decode(tax.location_segment_id,

Line 1719: ra_customer_trx_lines ctl,

1715: det.from_acctd_amount ae_from_pro_acctd_amt,
1716: det.ccid ref_dist_ccid,
1717: det.ref_mf_dist_flag ref_mf_dist_flag
1718: FROM ar_line_app_detail_gt det,
1719: ra_customer_trx_lines ctl,
1720: ra_customer_trx_lines line,
1721: ( SELECT customer_trx_id,
1722: nvl(decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,location_segment_id),-9999) location_segment_id,
1723: nvl(decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,vat_tax_id),-9999) tax_code_id,

Line 1720: ra_customer_trx_lines line,

1716: det.ccid ref_dist_ccid,
1717: det.ref_mf_dist_flag ref_mf_dist_flag
1718: FROM ar_line_app_detail_gt det,
1719: ra_customer_trx_lines ctl,
1720: ra_customer_trx_lines line,
1721: ( SELECT customer_trx_id,
1722: nvl(decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,location_segment_id),-9999) location_segment_id,
1723: nvl(decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,vat_tax_id),-9999) tax_code_id,
1724: min(customer_trx_line_id) customer_trx_line_id

Line 1725: FROM ra_customer_trx_lines tax

1721: ( SELECT customer_trx_id,
1722: nvl(decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,location_segment_id),-9999) location_segment_id,
1723: nvl(decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,vat_tax_id),-9999) tax_code_id,
1724: min(customer_trx_line_id) customer_trx_line_id
1725: FROM ra_customer_trx_lines tax
1726: GROUP BY customer_trx_id,
1727: decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,location_segment_id),
1728: decode(g_ae_doc_rec.document_type,'ADJUSTMENT',-9999,vat_tax_id) ) tax_link
1729: WHERE det.ref_customer_trx_id = p_invoice_id

Line 2011: from ra_customer_trx_lines ctl,

2007: --{ref_dist_ccid
2008: det.ccid ref_dist_ccid,
2009: det.ref_mf_dist_flag ref_mf_dist_flag
2010: --}
2011: from ra_customer_trx_lines ctl,
2012: ra_cust_trx_line_gl_dist gld,
2013: ar_line_app_detail_gt det,
2014: (select b4.ae_link_to_cust_trx_line_id ae_link_to_cust_trx_line_id,
2015: max(decode(g_ae_rule_rec.gl_account_source1,

Line 2090: from ra_customer_trx_lines ctl,

2086: gld.gl_date,
2087: 'UNEDISC'),
2088: ''),
2089: '')) override_ccid2
2090: from ra_customer_trx_lines ctl,
2091: ra_cust_trx_line_gl_dist gld
2092: where gld.customer_trx_line_id = ctl.customer_trx_line_id
2093: and gld.account_set_flag = 'N'
2094: and ctl.customer_trx_id = p_invoice_id

Line 2097: from ra_customer_trx_lines ctl1,

2093: and gld.account_set_flag = 'N'
2094: and ctl.customer_trx_id = p_invoice_id
2095: and ctl.rowid in
2096: (select min(ctl1.rowid)
2097: from ra_customer_trx_lines ctl1,
2098: (select /*+ INDEX(b3 AR_AE_ALLOC_REC_GT_N3) */
2099: count(*) tax_count
2100: from ar_ae_alloc_rec_gt b3
2101: where b3.ae_id = g_id

Line 2124: from ra_customer_trx_lines ctl1

2120: AND det.ref_cust_trx_line_gl_dist_id = gld.cust_trx_line_gl_dist_id
2121: AND det.ledger_id = g_ae_sys_rec.set_of_books_id
2122: AND det.gt_id = g_id;
2123: /* and not exists (select 'x'
2124: from ra_customer_trx_lines ctl1
2125: where ctl1.customer_trx_id = p_invoice_id
2126: and ctl1.autorule_complete_flag = 'N') */
2127: -- group by decode(gld.account_class,
2128: -- 'REV' ,'REVEARN',

Line 2288: ra_customer_trx_lines ctl,

2284: det.from_acctd_amount ae_from_pro_acctd_amt,
2285: det.ccid ref_dist_ccid,
2286: det.ref_mf_dist_flag ref_mf_dist_flag
2287: FROM ar_line_app_detail_gt det,
2288: ra_customer_trx_lines ctl,
2289: ( SELECT customer_trx_id,
2290: NVL(location_segment_id,-9999) location_segment_id,
2291: NVL(vat_tax_id,-9999) tax_code_id,
2292: MIN(NVL(link_to_cust_trx_line_id,customer_trx_line_id)) link_to_cust_trx_line_id

Line 2293: FROM ra_customer_trx_lines tax

2289: ( SELECT customer_trx_id,
2290: NVL(location_segment_id,-9999) location_segment_id,
2291: NVL(vat_tax_id,-9999) tax_code_id,
2292: MIN(NVL(link_to_cust_trx_line_id,customer_trx_line_id)) link_to_cust_trx_line_id
2293: FROM ra_customer_trx_lines tax
2294: GROUP BY customer_trx_id,
2295: location_segment_id,
2296: vat_tax_id ) tax_link,
2297: ( select b4.ae_link_to_cust_trx_line_id ae_link_to_cust_trx_line_id,

Line 2373: from ra_customer_trx_lines ctl,

2369: gld.gl_date,
2370: 'UNEDISC'),
2371: ''),
2372: '')) override_ccid2
2373: from ra_customer_trx_lines ctl,
2374: ra_cust_trx_line_gl_dist gld
2375: where gld.customer_trx_line_id = ctl.customer_trx_line_id
2376: and gld.account_set_flag = 'N'
2377: and ctl.customer_trx_id = p_invoice_id

Line 2380: from ra_customer_trx_lines ctl1,

2376: and gld.account_set_flag = 'N'
2377: and ctl.customer_trx_id = p_invoice_id
2378: and ctl.rowid in
2379: (select min(ctl1.rowid)
2380: from ra_customer_trx_lines ctl1,
2381: (select /*+ INDEX(b3 AR_AE_ALLOC_REC_GT_N3) */
2382: count(*) tax_count
2383: from ar_ae_alloc_rec_gt b3
2384: where b3.ae_id = g_id

Line 8532: from ra_customer_trx_lines a2

8528:
8529: select sum(a1.tax_count)
8530: into l_count
8531: from (select 1 tax_count
8532: from ra_customer_trx_lines a2
8533: where a2.line_type = 'TAX'
8534: and a2.link_to_cust_trx_line_id = p_invoice_line_id
8535: group by nvl(a2.location_segment_id, a2.vat_tax_id),
8536: decode(a2.location_segment_id,

Line 9426: FROM ra_customer_trx_lines tl

9422: arp_etax_util.get_tax_account(tl.customer_trx_line_id,
9423: trunc(sysdate),
9424: 'FINCHRG',
9425: 'TAX_LINE')
9426: FROM ra_customer_trx_lines tl
9427: WHERE tl.customer_trx_id = p_customer_trx_id
9428: AND tl.line_type = 'TAX'
9429: AND tl.tax_line_id IS NOT NULL;
9430: