DBA Data[Home] [Help]

APPS.ARRX_SALES_TAX_REP dependencies on RA_CUSTOMER_TRX

Line 568: from ra_customer_trx;

564:
565: if trx_date_low is null then
566: select min(trx_date)
567: into trx_date_low_1
568: from ra_customer_trx;
569:
570: select nvl(min(gl_date), trx_date_low_1)
571: into trx_date_low_2
572: from ar_adjustments;

Line 583: from ra_customer_trx;

579:
580: if trx_date_high is null then
581: select max(trx_date)
582: into trx_date_high_1
583: from ra_customer_trx;
584:
585: select nvl(max(gl_date), trx_date_high_1)
586: into trx_date_high_2
587: from ar_adjustments;

Line 709: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, hz_cust_acct_sites acct_site, '||

705:
706: select_trx_from :=
707: 'FROM fnd_currencies cy, ra_cust_trx_types types, ar_lookups lk, hz_cust_accounts c, hz_parties party '||
708: 'ar_vat_tax vat, ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, '||
709: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, hz_cust_acct_sites acct_site, '||
710: 'hz_party_sites party_site, hz_loc_assignments loc_assign, hz_locations loc, ' ||
711: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||
712: 'gl_code_combinations gltax, ra_cust_trx_line_gl_dist dist, '||
713: 'ra_customer_trx trx ';

Line 711: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||

707: 'FROM fnd_currencies cy, ra_cust_trx_types types, ar_lookups lk, hz_cust_accounts c, hz_parties party '||
708: 'ar_vat_tax vat, ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, '||
709: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, hz_cust_acct_sites acct_site, '||
710: 'hz_party_sites party_site, hz_loc_assignments loc_assign, hz_locations loc, ' ||
711: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||
712: 'gl_code_combinations gltax, ra_cust_trx_line_gl_dist dist, '||
713: 'ra_customer_trx trx ';
714:
715: select_adj_from :=

Line 713: 'ra_customer_trx trx ';

709: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, hz_cust_acct_sites acct_site, '||
710: 'hz_party_sites party_site, hz_loc_assignments loc_assign, hz_locations loc, ' ||
711: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||
712: 'gl_code_combinations gltax, ra_cust_trx_line_gl_dist dist, '||
713: 'ra_customer_trx trx ';
714:
715: select_adj_from :=
716: 'FROM gl_code_combinations cc, ar_adjustments adj, hz_cust_accounts c, hz_parties party, ar_vat_tax vat, '||
717: 'ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, fnd_currencies cy, '||

Line 718: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ra_customer_trx trx, '||

714:
715: select_adj_from :=
716: 'FROM gl_code_combinations cc, ar_adjustments adj, hz_cust_accounts c, hz_parties party, ar_vat_tax vat, '||
717: 'ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, fnd_currencies cy, '||
718: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ra_customer_trx trx, '||
719: 'hz_cust_site_uses su, hz_cust_acct_sites acct_site, ' ||
720: 'hz_locations loc, hz_loc_assignments loc_assign, hz_party_sites party_site ';
721: ELSE
722: select_trx_from :=

Line 725: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ' ||

721: ELSE
722: select_trx_from :=
723: 'FROM fnd_currencies cy, ra_cust_trx_types types, ar_lookups lk, hz_cust_accounts c, hz_parties party, '||
724: 'ar_vat_tax vat, ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, '||
725: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ' ||
726: ' hz_cust_acct_sites acct_site, hz_locations loc, hz_loc_assignments loc_assign, hz_party_sites party_site, '||
727: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||
728: 'gl_code_combinations gltax, '||
729: 'ra_customer_trx trx,ra_cust_trx_line_gl_dist dist ';

Line 727: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||

723: 'FROM fnd_currencies cy, ra_cust_trx_types types, ar_lookups lk, hz_cust_accounts c, hz_parties party, '||
724: 'ar_vat_tax vat, ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, '||
725: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ' ||
726: ' hz_cust_acct_sites acct_site, hz_locations loc, hz_loc_assignments loc_assign, hz_party_sites party_site, '||
727: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||
728: 'gl_code_combinations gltax, '||
729: 'ra_customer_trx trx,ra_cust_trx_line_gl_dist dist ';
730:
731: select_adj_from :=

Line 729: 'ra_customer_trx trx,ra_cust_trx_line_gl_dist dist ';

725: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ' ||
726: ' hz_cust_acct_sites acct_site, hz_locations loc, hz_loc_assignments loc_assign, hz_party_sites party_site, '||
727: 'hz_cust_site_uses su, ra_customer_trx othertrx, ra_cust_trx_line_gl_dist taxdist, '||
728: 'gl_code_combinations gltax, '||
729: 'ra_customer_trx trx,ra_cust_trx_line_gl_dist dist ';
730:
731: select_adj_from :=
732: 'FROM hz_cust_accounts c, hz_parties party, ar_vat_tax vat, '||
733: 'ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, fnd_currencies cy, '||

Line 734: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ra_customer_trx trx, '||

730:
731: select_adj_from :=
732: 'FROM hz_cust_accounts c, hz_parties party, ar_vat_tax vat, '||
733: 'ra_tax_exemptions ex, ar_lookups lk2, ar_lookups lk3, fnd_currencies cy, '||
734: 'ra_customer_trx_lines line, ra_customer_trx_lines tax, ra_customer_trx trx, '||
735: 'hz_cust_site_uses su, hz_cust_acct_sites acct_site, hz_party_sites party_site, ' ||
736: 'hz_locations loc, hz_loc_assignments loc_assign, gl_code_combinations cc, ar_adjustments adj ';
737: END IF;
738:

Line 1439: from ra_customer_trx_lines l

1435: sum(abs(decode(l.line_type, 'FREIGHT', l.extended_amount, 0))),
1436: sum(decode(l.line_type, 'LINE', 1, 0)),
1437: sum(decode(l.line_type, 'TAX', 1, 0)),
1438: sum(decode(l.line_type, 'FREIGHT', 1, 0))
1439: from ra_customer_trx_lines l
1440: where customer_trx_id = fc_cust_trx_id ;
1441:
1442: BEGIN
1443: if nvl(fc_type_flag, 'INVOICE') = 'ADJUSTMENT'

Line 1537: calc_amount ra_customer_trx_lines.extended_amount%TYPE;

1533: c_adj_tax_amount IN NUMBER)
1534: RETURN NUMBER is
1535:
1536:
1537: calc_amount ra_customer_trx_lines.extended_amount%TYPE;
1538: total_adjust_amount ar_adjustments.line_adjusted%TYPE;
1539: count_lines number;
1540: abs_total number;
1541: tax_amount number;

Line 1604: from ra_customer_trx_lines

1600: nvl(global_attribute2, 0) + nvl(global_attribute4, 0) + nvl(global_attribute6, 0),
1601: 'AVP', nvl(global_attribute2, 0) + nvl(global_attribute4, 0) + nvl(global_attribute6, 0),
1602: extended_amount),0)),
1603: sum(decode(line_type, 'LINE', extended_amount,0))
1604: from ra_customer_trx_lines
1605: where customer_trx_id = fc_cust_trx_id
1606: and line_type in ( 'LINE', 'TAX');
1607:
1608: cursor exlinesum is

Line 1610: from ra_customer_trx_lines trx

1606: and line_type in ( 'LINE', 'TAX');
1607:
1608: cursor exlinesum is
1609: select sum(trx.extended_amount)
1610: from ra_customer_trx_lines trx
1611: where trx.customer_trx_id = fc_cust_trx_id
1612: and trx.line_type = 'LINE'
1613: and trx.customer_trx_line_id in
1614: ( select tax.link_to_cust_trx_line_id

Line 1615: from ra_customer_trx_lines tax, ra_tax_exemptions ex

1611: where trx.customer_trx_id = fc_cust_trx_id
1612: and trx.line_type = 'LINE'
1613: and trx.customer_trx_line_id in
1614: ( select tax.link_to_cust_trx_line_id
1615: from ra_customer_trx_lines tax, ra_tax_exemptions ex
1616: where tax.customer_trx_id = fc_cust_trx_id
1617: and tax.line_type = 'TAX'
1618: and tax.tax_exemption_id = ex.tax_exemption_id
1619: and ex.status = fc_exemption_status );

Line 1626: from ra_customer_trx_lines tax, ra_tax_exemptions ex

1622: select sum(decode(tax.global_attribute_category, 'VERTEX', nvl(tax.global_attribute2, 0)
1623: + nvl(tax.global_attribute4, 0) + nvl(tax.global_attribute6, 0), 'AVP',
1624: nvl(tax.global_attribute2, 0) + nvl(tax.global_attribute4, 0) + nvl(tax.global_attribute6, 0),
1625: tax.extended_amount))
1626: from ra_customer_trx_lines tax, ra_tax_exemptions ex
1627: where tax.customer_trx_id = fc_cust_trx_id
1628: and tax.line_type = 'TAX'
1629: and tax.tax_exemption_id = ex.tax_exemption_id
1630: and ex.status = fc_exemption_status ;

Line 1722: ra_customer_trx trx, hz_cust_accounts c,

1718: loc.address1, loc.address2, loc.address3,
1719: loc.address4, loc.city , loc.postal_code,
1720: loc.state, loc.province,loc.county
1721: from
1722: ra_customer_trx trx, hz_cust_accounts c,
1723: hz_parties party,
1724: hz_cust_site_uses su, hz_cust_acct_sites acct_site,
1725: hz_locations loc, hz_party_sites party_site
1726: where c.cust_account_id = fc_customer_id_in

Line 1841: ra_customer_trx trx, ra_customer_trx_lines tax

1837: else
1838: select min(decode(taxdist.code_combination_id,null,'N','Y'))
1839: into warn_gltax_range
1840: from ra_cust_trx_line_gl_dist taxdist, gl_code_combinations cc,
1841: ra_customer_trx trx, ra_customer_trx_lines tax
1842: where taxdist.customer_trx_line_id = tax.customer_trx_line_id
1843: AND tax.line_type = 'TAX'
1844: AND trx.customer_trx_id = tax.customer_trx_id
1845: AND trx.customer_trx_id = c_trx_id

Line 1990: from ra_customer_trx_lines

1986: min_tax_line_id NUMBER;
1987:
1988: BEGIN
1989: select min(customer_trx_line_id) into min_tax_line_id
1990: from ra_customer_trx_lines
1991: where link_to_cust_trx_line_id = fc_trx_line_id
1992: and line_type = 'TAX';
1993:
1994: return(min_tax_line_id);

Line 2072: select count(*) into cnt_tax_lines from ra_customer_trx_lines

2068: fc_trx_line_id IN NUMBER)
2069: RETURN NUMBER is
2070: cnt_tax_lines NUMBER;
2071: BEGIN
2072: select count(*) into cnt_tax_lines from ra_customer_trx_lines
2073: where link_to_cust_trx_line_id = fc_trx_line_id
2074: and line_type = 'TAX';
2075: if nvl(cnt_tax_lines,0) = 0 then
2076: cnt_tax_lines := 1;

Line 2092: select count(*) into cnt_inv_lines from ra_customer_trx_lines

2088: f_trx_id IN NUMBER)
2089: RETURN NUMBER is
2090: cnt_inv_lines NUMBER;
2091: BEGIN
2092: select count(*) into cnt_inv_lines from ra_customer_trx_lines
2093: where customer_trx_id = f_trx_id
2094: and line_type = 'LINE';
2095: if nvl(cnt_inv_lines,0) = 0 then
2096: cnt_inv_lines := 0;

Line 2114: SELECT customer_trx_line_id from ra_customer_trx_lines

2110: RETURN NUMBER is
2111: cus_trx_line_id NUMBER;
2112:
2113: cursor get_customer_trx_line_id is
2114: SELECT customer_trx_line_id from ra_customer_trx_lines
2115: WHERE customer_trx_id = fn_trx_id
2116: AND line_type = 'LINE'
2117: AND line_number = fn_cnt_lines;
2118: BEGIN

Line 2149: SELECT customer_trx_line_id, extended_amount from ra_customer_trx_lines

2145: l_tax_exemption_id NUMBER;
2146: l_line_amount NUMBER;
2147:
2148: cursor get_customer_trx_line_id is
2149: SELECT customer_trx_line_id, extended_amount from ra_customer_trx_lines
2150: WHERE customer_trx_id = fg_trx_id
2151: AND line_type = 'LINE';
2152:
2153: cursor get_customer_trx_tax_id is

Line 2154: SELECT customer_trx_line_id, tax_exemption_id, tax_rate from ra_customer_trx_lines

2150: WHERE customer_trx_id = fg_trx_id
2151: AND line_type = 'LINE';
2152:
2153: cursor get_customer_trx_tax_id is
2154: SELECT customer_trx_line_id, tax_exemption_id, tax_rate from ra_customer_trx_lines
2155: WHERE link_to_cust_trx_line_id = cus_trx_line_id
2156: AND line_type = 'TAX';
2157:
2158: cursor get_tax_exemption_rate is

Line 2180: select count(*) into cnt_tax_lines from ra_customer_trx_lines

2176: exemption_amount_for_line_tot := 0;
2177: -- first we check does the invoice lile have tax lines at all, if not
2178: -- whole line amount is exempt amount
2179:
2180: select count(*) into cnt_tax_lines from ra_customer_trx_lines
2181: where link_to_cust_trx_line_id = cus_trx_line_id
2182: and line_type = 'TAX';
2183: if cnt_tax_lines = 0 then
2184: exemption_amount_for_line_tot := l_line_amount;