DBA Data[Home] [Help]

APPS.HZ_CUSTOMER_INT dependencies on HZ_CUST_ACCOUNTS

Line 22: FROM hz_cust_accounts

18: RETURN NUMBER IS
19: l_cust_account_id NUMBER;
20: CURSOR c1 IS
21: SELECT cust_account_id
22: FROM hz_cust_accounts
23: WHERE orig_system_reference = p_orig_system_customer_ref;
24: BEGIN
25: OPEN c1;
26: FETCH c1 INTO l_cust_account_id;

Line 119: from hz_cust_accounts

115: CURSOR org_name IS
116: SELECT party_name
117: FROM hz_parties
118: WHERE party_id = (select party_id
119: from hz_cust_accounts
120: where orig_system_reference = p_orig_system_customer_ref);
121:
122: BEGIN
123: OPEN cont_name;

Line 235: FROM hz_cust_accounts

231: RETURN NUMBER IS
232: l_party_id NUMBER;
233: CURSOR c6 IS
234: SELECT party_id
235: FROM hz_cust_accounts
236: WHERE orig_system_reference = p_orig_system_customer_ref;
237: BEGIN
238: OPEN c6;
239: FETCH c6 into l_party_id;

Line 579: AND exists (select 'X' from hz_cust_accounts where party_id = party.party_id)

575: SELECT party_id
576: FROM hz_parties party
577: WHERE party.orig_system_reference = p_orig_system_customer_ref
578: AND party.PARTY_TYPE = decode(p_person_flag, 'Y', 'PERSON','ORGANIZATION')
579: AND exists (select 'X' from hz_cust_accounts where party_id = party.party_id)
580: AND rownum = 1;
581: --For orig_system_customer_ref
582: CURSOR cust_ref_cur IS
583: SELECT party_id

Line 584: FROM hz_cust_accounts

580: AND rownum = 1;
581: --For orig_system_customer_ref
582: CURSOR cust_ref_cur IS
583: SELECT party_id
584: FROM hz_cust_accounts
585: WHERE orig_system_reference = p_orig_system_customer_ref;
586: --For any orig_system_party_ref
587: CURSOR any_party_ref_cur IS
588: SELECT party_id

Line 633: FROM hz_cust_accounts y

629: WHERE c.orig_system_reference = p_orig_system_contact_ref
630: AND c.request_id = p_request_id
631: AND NOT EXISTS
632: (SELECT 'X'
633: FROM hz_cust_accounts y
634: WHERE y.orig_system_reference = p_orig_system_contact_ref
635: AND y.party_id = c.party_id);
636: BEGIN
637: OPEN c9;

Line 722: from hz_cust_accounts cust

718:
719: BEGIN
720: select 'X'
721: into l_count
722: from hz_cust_accounts cust
723: ,hz_cust_acct_sites site
724: ,hz_cust_site_uses su
725: where site.orig_system_reference = p_bill_to_orig_address_ref
726: and site.cust_acct_site_id = su.cust_acct_site_id

Line 761: FROM hz_cust_accounts cust,

757: */
758:
759: CURSOR c IS -- Checkif the customer or the related customer already exists
760: SELECT 'x'
761: FROM hz_cust_accounts cust,
762: hz_cust_acct_sites_all site, -- bug 4454799
763: hz_cust_site_uses_all su -- bug 4454799
764: WHERE cust.orig_system_reference = p_orig_system_customer_ref
765: AND site.orig_system_reference = p_bill_to_orig_address_ref

Line 775: FROM hz_cust_accounts cust,

771: AND su.status = 'A'
772: AND site.status = 'A'
773: UNION ALL
774: SELECT 'x'
775: FROM hz_cust_accounts cust,
776: hz_cust_acct_sites_all site, -- bug 4454799
777: hz_cust_site_uses_all su -- bug 4454799
778: WHERE cust.orig_system_reference = p_orig_system_parent_ref
779: AND site.orig_system_reference = p_bill_to_orig_address_ref

Line 790: FROM hz_cust_accounts cust,

786: AND site.status = 'A';
787:
788: CURSOR c2 IS -- Checking if the relationship already exists
789: SELECT 'x'
790: FROM hz_cust_accounts cust,
791: hz_cust_acct_relate_all rel, -- bug 4454799
792: hz_cust_acct_sites_all site, -- bug 4454799
793: hz_cust_site_uses_all su -- bug 4454799
794: WHERE cust.orig_system_reference = p_orig_system_customer_ref

Line 1305: FROM hz_customer_profiles p ,hz_cust_accounts c

1301: AND request_id = v_request_id;
1302:
1303: CURSOR c2 IS -- Checking if Profile exists at Cust Level , thats why site_use_id is null
1304: SELECT 'x'
1305: FROM hz_customer_profiles p ,hz_cust_accounts c
1306: WHERE c.orig_system_reference = v_orig_system_customer_ref
1307: AND p.cust_account_id = c.cust_account_id
1308: AND p.site_use_id is null;
1309:

Line 1312: FROM hz_cust_acct_sites_all ra, hz_cust_site_uses_all rsu, hz_cust_accounts rc -- bug 4454799

1308: AND p.site_use_id is null;
1309:
1310: CURSOR c3 IS
1311: SELECT 'x' -- The address ref should exist as Bill To and defined for the customer
1312: FROM hz_cust_acct_sites_all ra, hz_cust_site_uses_all rsu, hz_cust_accounts rc -- bug 4454799
1313: WHERE ra.orig_system_reference = v_orig_system_address_ref
1314: AND ra.org_id = v_org_id -- bug 4454799
1315: AND rc.orig_system_reference = v_orig_system_customer_ref
1316: AND rc.cust_account_id = ra.cust_account_id

Line 1901: FROM hz_cust_accounts cust

1897:
1898:
1899: CURSOR c IS -- Check if the customer_number already exists
1900: SELECT decode(cust.orig_system_reference,p_orig_system_customer_ref,'','A5,')
1901: FROM hz_cust_accounts cust
1902: WHERE cust.account_number = p_customer_number;
1903:
1904: CURSOR c1 IS -- Check if the customer_number already exists in the interface table
1905: SELECT decode(i.orig_system_customer_ref,p_orig_system_customer_ref,'','A5,')

Line 2358: hz_cust_accounts cust,

2354: decode(sst.tax_reference, '', 'Y', 'N'),nvl(org.version_number,1)+1
2355: FROM hz_organization_profiles org,
2356: hz_organization_profiles sst,
2357: ra_customers_interface_all i, -- Bug 4956131
2358: hz_cust_accounts cust,
2359: (SELECT min(i1.rowid) myrowid
2360: FROM ra_customers_interface_all i1 -- Bug 4956131
2361: WHERE i1.request_id = p_request_id
2362: AND i1.interface_status IS NULL

Line 2681: hz_cust_accounts cust,

2677: decode(sst.tax_reference, '', 'Y', 'N'),nvl(per.version_number,1)+1
2678: FROM hz_person_profiles per,
2679: hz_person_profiles sst,
2680: ra_customers_interface_all i, -- Bug 4956131
2681: hz_cust_accounts cust,
2682: (SELECT min(i1.rowid) myrowid
2683: FROM ra_customers_interface_all i1 -- Bug 4956131
2684: WHERE i1.request_id = p_request_id
2685: AND i1.interface_status IS NULL

Line 3044: FROM hz_cust_accounts cust,

3040: /* 3535808. Modified cursor. */
3041: /* 4588090. Modified site use condition in the cursor. */
3042: CURSOR pflag is
3043: SELECT su.primary_flag
3044: FROM hz_cust_accounts cust,
3045: hz_cust_acct_sites_all site, -- bug 4454799
3046: hz_cust_site_uses_all su -- bug 4454799
3047: WHERE cust.orig_system_reference = p_orig_system_customer_ref
3048: and cust.cust_account_id = site.cust_account_id

Line 3101: FROM hz_cust_accounts cust,

3097: l_site_use_id hz_cust_site_uses_all.site_use_id%TYPE;
3098:
3099: CURSOR pflag is
3100: SELECT site.cust_acct_site_id,suse.site_use_id
3101: FROM hz_cust_accounts cust,
3102: hz_cust_acct_sites_all site,
3103: hz_cust_site_uses_all suse
3104: WHERE cust.orig_system_reference = p_orig_system_customer_ref
3105: and cust.cust_account_id = site.cust_account_id

Line 3411: from hz_cust_accounts

3407: ,hzp.party_id -- PARTY_ID
3408: ,'CUSTOMER' -- PARTY_USAGE_CODE
3409: ,trunc(SYSDATE) -- EFFECTIVE_START_DATE
3410: ,decode((select min(status)
3411: from hz_cust_accounts
3412: where party_id = hzp.party_id),
3413: 'A',to_date('31-12-4712','DD-MM-YYYY')
3414: ,trunc(SYSDATE)) -- EFFECTIVE_END_DATE
3415: ,(select min(status)

Line 3416: from hz_cust_accounts

3412: where party_id = hzp.party_id),
3413: 'A',to_date('31-12-4712','DD-MM-YYYY')
3414: ,trunc(SYSDATE)) -- EFFECTIVE_END_DATE
3415: ,(select min(status)
3416: from hz_cust_accounts
3417: where party_id = hzp.party_id) -- STATUS_FLAG
3418: ,'' -- COMMENTS
3419: ,'' -- OWNER_TABLE_NAME
3420: ,'' -- OWNER_TABLE_ID

Line 3487: from hz_cust_accounts

3483: ,hzp.party_id -- PARTY_ID
3484: ,'CUSTOMER' -- PARTY_USAGE_CODE
3485: ,trunc(SYSDATE) -- EFFECTIVE_START_DATE
3486: ,decode((select min(status)
3487: from hz_cust_accounts
3488: where party_id = hzp.party_id),
3489: 'A',to_date('31-12-4712','DD-MM-YYYY')
3490: ,trunc(SYSDATE)) -- EFFECTIVE_END_DATE
3491: ,(select min(status)

Line 3492: from hz_cust_accounts

3488: where party_id = hzp.party_id),
3489: 'A',to_date('31-12-4712','DD-MM-YYYY')
3490: ,trunc(SYSDATE)) -- EFFECTIVE_END_DATE
3491: ,(select min(status)
3492: from hz_cust_accounts
3493: where party_id = hzp.party_id)-- STATUS_FLAG
3494: ,'' -- COMMENTS
3495: ,'' -- OWNER_TABLE_NAME
3496: ,'' -- OWNER_TABLE_ID

Line 3539: from hz_cust_accounts

3535: from hz_party_usg_assignments pua
3536: where pua.party_id = hzp.party_id
3537: and party_usage_code = 'CUSTOMER'
3538: and pua.status_flag = ( select min(status)
3539: from hz_cust_accounts
3540: where party_id = hzp.party_id)
3541: and pua.effective_start_date <= decode((select min(status)
3542: from hz_cust_accounts
3543: where party_id = hzp.party_id),

Line 3542: from hz_cust_accounts

3538: and pua.status_flag = ( select min(status)
3539: from hz_cust_accounts
3540: where party_id = hzp.party_id)
3541: and pua.effective_start_date <= decode((select min(status)
3542: from hz_cust_accounts
3543: where party_id = hzp.party_id),
3544: 'A',trunc(SYSDATE)
3545: ,pua.effective_start_date)
3546: and nvl(pua.effective_end_date,to_date('31-12-4712','DD-MM-YYYY')) >= decode((select min(status)

Line 3547: from hz_cust_accounts

3543: where party_id = hzp.party_id),
3544: 'A',trunc(SYSDATE)
3545: ,pua.effective_start_date)
3546: and nvl(pua.effective_end_date,to_date('31-12-4712','DD-MM-YYYY')) >= decode((select min(status)
3547: from hz_cust_accounts
3548: where party_id = hzp.party_id),
3549: 'A',trunc(SYSDATE)
3550: ,nvl(pua.effective_start_date,
3551: to_date('31-12-4712','DD-MM-YYYY')

Line 4083: hz_cust_accounts hca,

4079: select distinct ipi.ext_pmt_party_id, max(ipi.order_of_preference), count(ipi.instrument_payment_use_id)
4080: FROM iby_external_payers_all iep,
4081: iby_pmt_instr_uses_all ipi,
4082: iby_ext_bank_accounts eba,
4083: hz_cust_accounts hca,
4084: ra_customer_banks_int_all cbi
4085: WHERE
4086: cbi.request_id = p_request_id
4087: AND eba.currency_code = cbi.bank_account_currency_code

Line 4156: hz_cust_accounts hca,

4152: select ipi.instrument_payment_use_id, ipi.order_of_preference
4153: FROM iby_external_payers_all iep,
4154: iby_pmt_instr_uses_all ipi,
4155: iby_ext_bank_accounts eba,
4156: hz_cust_accounts hca,
4157: ra_customer_banks_int_all cbi
4158: WHERE cbi.orig_system_address_ref is null
4159: AND cbi.request_id = p_request_id
4160: AND cbi.primary_flag = 'Y'

Line 4181: hz_cust_accounts hcu,

4177: iby_pmt_instr_uses_all ipi,
4178: iby_ext_bank_accounts eba,
4179: hz_cust_acct_sites_all hca,
4180: hz_cust_site_uses_all hcs,
4181: hz_cust_accounts hcu,
4182: ra_customer_banks_int_all cbi
4183: WHERE cbi.request_id = p_request_id
4184: AND cbi.primary_flag = 'Y'
4185: AND cbi.orig_system_address_ref= hca.orig_system_reference