DBA Data[Home] [Help]

APPS.AR_INVOICE_UTILS dependencies on HZ_CUST_SITE_USES

Line 541: hz_cust_site_uses site_uses

537: WHERE gt.paying_site_use_id IS NOT NULL
538: AND NOT EXISTS
539: (SELECT 'X'
540: FROM hz_cust_acct_sites acct_site,
541: hz_cust_site_uses site_uses
542: WHERE acct_site.cust_acct_site_id = site_uses.cust_acct_site_id
543: AND acct_site.cust_account_id = gt.paying_customer_id
544: AND site_uses.site_use_id = gt.paying_site_use_id
545: AND site_uses.site_use_code IN

Line 1691: FROM hz_cust_site_uses ct

1687: FROM ar_trx_header_gt gt
1688: WHERE gt.bill_to_site_use_id IS NOT NULL
1689: AND NOT EXISTS (
1690: SELECT 'X'
1691: FROM hz_cust_site_uses ct
1692: WHERE site_use_code = 'BILL_TO'
1693: AND cust_acct_site_id in (
1694: SELECT cust_acct_site_id
1695: FROM hz_cust_acct_sites

Line 1740: HZ_CUST_SITE_USES SU

1736: SELECT 'X'
1737: FROM HZ_CUST_ACCT_SITES ACCT_SITE,
1738: HZ_PARTY_SITES PARTY_SITE,
1739: --HZ_LOCATIONS LOC,
1740: HZ_CUST_SITE_USES SU
1741: -- FND_TERRITORIES_VL T
1742: WHERE ACCT_SITE.CUST_ACCT_SITE_ID = SU.CUST_ACCT_SITE_ID
1743: AND ACCT_SITE.PARTY_SITE_ID = PARTY_SITE.PARTY_SITE_ID
1744: --AND LOC.LOCATION_ID = PARTY_SITE.LOCATION_ID

Line 1850: FROM hz_cust_site_uses ct

1846: WHERE gt.ship_to_site_use_id IS NOT NULL
1847: AND gt.ship_to_customer_id IS NOT NULL
1848: AND NOT EXISTS (
1849: SELECT 'X'
1850: FROM hz_cust_site_uses ct
1851: WHERE site_use_code = 'SHIP_TO'
1852: and cust_acct_site_id in (
1853: select cust_acct_site_id from hz_cust_acct_sites
1854: where cust_account_id = gt.ship_to_customer_id)

Line 1913: HZ_CUST_SITE_USES SU

1909: SU.STATUS SU_STATUS ,
1910: SU.SITE_USE_ID SITE_USE_ID
1911: FROM
1912: HZ_CUST_ACCT_SITES A,
1913: HZ_CUST_SITE_USES SU
1914: WHERE
1915: A.CUST_ACCT_SITE_ID = SU.CUST_ACCT_SITE_ID
1916: AND SU.SITE_USE_CODE = 'SHIP_TO'
1917: ) asa

Line 1954: FROM hz_cust_site_uses

1950:
1951: UPDATE ar_trx_header_gt gt
1952: SET ship_to_site_use_id = (
1953: SELECT site_use_id
1954: FROM hz_cust_site_uses
1955: WHERE site_use_code = 'SHIP_TO'
1956: AND status = 'A' /* 10041924, try active first */
1957: AND cust_acct_site_id = gt.ship_to_address_id
1958: AND gt.ship_to_site_use_id IS NULL

Line 1968: FROM hz_cust_site_uses

1964: sites, use the max inactive one */
1965: UPDATE ar_trx_header_gt gt
1966: SET ship_to_site_use_id = (
1967: SELECT MAX(site_use_id)
1968: FROM hz_cust_site_uses
1969: WHERE site_use_code = 'SHIP_TO'
1970: AND status = 'I' /* 10041924, try inactive */
1971: AND cust_acct_site_id = gt.ship_to_address_id
1972: AND gt.ship_to_site_use_id IS NULL

Line 1984: FROM hz_cust_site_uses

1980:
1981: UPDATE ar_trx_header_gt gt
1982: SET ship_to_site_use_id = (
1983: SELECT site_use_id
1984: FROM hz_cust_site_uses
1985: WHERE primary_flag = 'Y'
1986: AND site_use_code = 'SHIP_TO'
1987: AND cust_acct_site_id IN (
1988: SELECT cust_acct_site_id

Line 2047: HZ_CUST_SITE_USES SU

2043: SU.STATUS SU_STATUS ,
2044: SU.SITE_USE_ID SITE_USE_ID
2045: FROM
2046: HZ_CUST_ACCT_SITES A,
2047: HZ_CUST_SITE_USES SU
2048: WHERE
2049: A.CUST_ACCT_SITE_ID = SU.CUST_ACCT_SITE_ID
2050: AND SU.SITE_USE_CODE = 'SHIP_TO'
2051: )asa

Line 2160: HZ_CUST_SITE_USES SU,

2156: SELECT 'X'
2157: FROM HZ_CUST_ACCT_SITES ACCT_SITE,
2158: HZ_PARTY_SITES PARTY_SITE,
2159: HZ_LOCATIONS LOC,
2160: HZ_CUST_SITE_USES SU,
2161: FND_TERRITORIES_VL T
2162: WHERE ACCT_SITE.CUST_ACCT_SITE_ID = SU.CUST_ACCT_SITE_ID
2163: AND ACCT_SITE.PARTY_SITE_ID = PARTY_SITE.PARTY_SITE_ID
2164: AND LOC.LOCATION_ID = PARTY_SITE.LOCATION_ID

Line 2960: HZ_CUST_SITE_USES SU,

2956: ( SELECT SU.PRIMARY_SALESREP_ID
2957: FROM HZ_CUST_ACCT_SITES ACCT_SITE,
2958: HZ_PARTY_SITES PARTY_SITE,
2959: HZ_LOCATIONS LOC,
2960: HZ_CUST_SITE_USES SU,
2961: FND_TERRITORIES_VL T
2962: WHERE ACCT_SITE.CUST_ACCT_SITE_ID = SU.CUST_ACCT_SITE_ID
2963: AND ACCT_SITE.PARTY_SITE_ID = PARTY_SITE.PARTY_SITE_ID
2964: AND LOC.LOCATION_ID = PARTY_SITE.LOCATION_ID

Line 3092: FROM hz_cust_site_uses

3088:
3089: UPDATE ar_trx_header_gt gt
3090: SET bill_to_site_use_id = (
3091: SELECT site_use_id
3092: FROM hz_cust_site_uses
3093: WHERE site_use_code = 'BILL_TO'
3094: AND status = 'A'
3095: AND cust_acct_site_id = gt.bill_to_address_id
3096: AND gt.bill_to_site_use_id IS NULL

Line 3106: FROM hz_cust_site_uses

3102: sites, use the max inactive one */
3103: UPDATE ar_trx_header_gt gt
3104: SET bill_to_site_use_id = (
3105: SELECT MAX(site_use_id)
3106: FROM hz_cust_site_uses
3107: WHERE site_use_code = 'BILL_TO'
3108: AND status = 'I' /* 10041924, try inactive */
3109: AND cust_acct_site_id = gt.bill_to_address_id
3110: AND gt.bill_to_site_use_id IS NULL

Line 3122: FROM hz_cust_site_uses

3118:
3119: UPDATE ar_trx_header_gt gt
3120: SET bill_to_site_use_id = (
3121: SELECT site_use_id
3122: FROM hz_cust_site_uses
3123: WHERE primary_flag = 'Y'
3124: AND site_use_code = 'BILL_TO'
3125: AND cust_acct_site_id IN (
3126: SELECT cust_acct_site_id

Line 3180: FROM hz_cust_site_uses

3176:
3177: UPDATE ar_trx_header_gt gt
3178: SET paying_site_use_id = (
3179: SELECT site_use_id
3180: FROM hz_cust_site_uses
3181: WHERE primary_flag = 'Y'
3182: AND site_use_code = 'BILL_TO'
3183: AND cust_acct_site_id IN (
3184: SELECT cust_acct_site_id

Line 3214: FROM hz_cust_site_uses

3210:
3211: UPDATE ar_trx_header_gt gt
3212: SET bill_to_address_id = (
3213: SELECT site_use_id
3214: FROM hz_cust_site_uses
3215: WHERE site_use_code = 'BILL_TO'
3216: AND site_use_id= gt.bill_to_site_use_id
3217: AND gt.bill_to_address_id IS NULL
3218: AND gt.bill_to_site_use_id IS NOT NULL)

Line 3231: hz_cust_site_uses su,

3227: SELECT su.cust_acct_site_id
3228: FROM hz_cust_acct_sites acct_site,
3229: hz_party_sites party_site,
3230: hz_locations loc,
3231: hz_cust_site_uses su,
3232: fnd_territories_vl t
3233: WHERE acct_site.cust_acct_site_id = su.cust_acct_site_id
3234: AND acct_site.party_site_id = party_site.party_site_id
3235: AND loc.location_id = party_site.location_id

Line 3281: hz_cust_site_uses su

3277: loc.postal_code
3278: FROM hz_cust_acct_sites acct_site,
3279: hz_party_sites party_site,
3280: hz_locations loc,
3281: hz_cust_site_uses su
3282: WHERE acct_site.cust_acct_site_id = su.cust_acct_site_id
3283: AND su.site_use_id = l_site_use_id
3284: AND acct_site.party_site_id = party_site.party_site_id
3285: AND loc.location_id = party_site.location_id;

Line 3521: FROM hz_cust_site_uses

3517:
3518: UPDATE ar_trx_header_gt gt
3519: SET ship_to_address_id = (
3520: SELECT site_use_id
3521: FROM hz_cust_site_uses
3522: WHERE site_use_code = 'SHIP_TO'
3523: AND site_use_id= gt.ship_to_site_use_id
3524: AND gt.ship_to_address_id IS NULL
3525: AND gt.ship_to_site_use_id IS NOT NULL)

Line 3539: hz_cust_site_uses su,

3535: SELECT su.cust_acct_site_id
3536: FROM hz_cust_acct_sites acct_site,
3537: hz_party_sites party_site,
3538: hz_locations loc,
3539: hz_cust_site_uses su,
3540: fnd_territories_vl t
3541: WHERE acct_site.cust_acct_site_id = su.cust_acct_site_id
3542: AND acct_site.party_site_id = party_site.party_site_id
3543: AND loc.location_id = party_site.location_id

Line 3656: FROM HZ_CUST_SITE_USES hz, ar_trx_header_gt gt

3652: AND NVL(st.end_date_active(+), gt.trx_date );
3653:
3654: CURSOR cBillTo IS
3655: SELECT /*+ LEADING(gt) */ hz.territory_id, gt.bill_to_site_use_id
3656: FROM HZ_CUST_SITE_USES hz, ar_trx_header_gt gt
3657: WHERE hz.site_use_id = gt.bill_to_site_use_id;
3658:
3659: CURSOR cShipTo IS
3660: SELECT /*+ LEADING(gt) */ site_uses.territory_id, gt.ship_to_site_use_id,

Line 3662: FROM HZ_CUST_SITE_USES site_uses,

3658:
3659: CURSOR cShipTo IS
3660: SELECT /*+ LEADING(gt) */ site_uses.territory_id, gt.ship_to_site_use_id,
3661: gt.ship_to_customer_id
3662: FROM HZ_CUST_SITE_USES site_uses,
3663: ar_trx_header_gt gt
3664: WHERE site_uses.SITE_USE_CODE = 'SHIP_TO'
3665: AND site_uses.site_use_id = gt.ship_to_site_use_id
3666: AND site_uses.primary_flag = 'Y';

Line 3796: hz_cust_site_uses su

3792: ra_terms t_cp2,
3793: ra_terms tl, /*Bug 3984916*/
3794: hz_customer_profiles cp1,
3795: hz_customer_profiles cp2,
3796: hz_cust_site_uses su
3797: WHERE gt.bill_to_customer_id = cp1.cust_account_id(+)
3798: AND su.site_use_id = gt.bill_to_site_use_id
3799: AND cp2.cust_account_id = gt.bill_to_customer_id
3800: AND su.site_use_id = cp1.site_use_id(+)