882: and rel.status = 'A'
883: and rel.bill_to_flag = 'Y'
884: union
885: select rel.related_cust_account_id
886: from ar_paying_relationships_v rel,
887: hz_cust_accounts acc
888: where rel.party_id = acc.party_id
889: and acc.cust_account_id = l_customer_id
890: and l_receipt_date BETWEEN effective_start_date
930: and rel.status = 'A'
931: and rel.bill_to_flag = 'Y'
932: union
933: select rel.related_cust_account_id
934: from ar_paying_relationships_v rel,
935: hz_cust_accounts acc
936: where rel.party_id = acc.party_id
937: and acc.cust_account_id
938: = l_customer_id
958: and rel.status = 'A'
959: and rel.bill_to_flag = 'Y'
960: union
961: select rel.related_cust_account_id
962: from ar_paying_relationships_v rel,
963: hz_cust_accounts acc
964: where rel.party_id = acc.party_id
965: and acc.cust_account_id = l_customer_id
966: and l_receipt_date BETWEEN effective_start_date
1414: and rel.status = 'A'
1415: and rel.bill_to_flag = 'Y'
1416: union
1417: select rel.related_cust_account_id
1418: from ar_paying_relationships_v rel,
1419: hz_cust_accounts acc
1420: where rel.party_id = acc.party_id
1421: and acc.cust_account_id = l_customer_id
1422: and l_receipt_date BETWEEN effective_start_date
1462: and rel.status = 'A'
1463: and rel.bill_to_flag = 'Y'
1464: union
1465: select rel.related_cust_account_id
1466: from ar_paying_relationships_v rel,
1467: hz_cust_accounts acc
1468: where rel.party_id = acc.party_id
1469: and acc.cust_account_id
1470: = l_customer_id
1490: and rel.status = 'A'
1491: and rel.bill_to_flag = 'Y'
1492: union
1493: select rel.related_cust_account_id
1494: from ar_paying_relationships_v rel,
1495: hz_cust_accounts acc
1496: where rel.party_id = acc.party_id
1497: and acc.cust_account_id = l_customer_id
1498: and l_receipt_date BETWEEN effective_start_date
1938: and rel.status = 'A'
1939: and rel.bill_to_flag = 'Y'
1940: union
1941: select rel.related_cust_account_id
1942: from ar_paying_relationships_v rel,
1943: hz_cust_accounts acc
1944: where rel.party_id = acc.party_id
1945: and acc.cust_account_id = l_customer_id
1946: and l_receipt_date BETWEEN effective_start_date
1986: and rel.status = 'A'
1987: and rel.bill_to_flag = 'Y'
1988: union
1989: select rel.related_cust_account_id
1990: from ar_paying_relationships_v rel,
1991: hz_cust_accounts acc
1992: where rel.party_id = acc.party_id
1993: and acc.cust_account_id
1994: = l_customer_id
2014: and rel.status = 'A'
2015: and rel.bill_to_flag = 'Y'
2016: union
2017: select rel.related_cust_account_id
2018: from ar_paying_relationships_v rel,
2019: hz_cust_accounts acc
2020: where rel.party_id = acc.party_id
2021: and acc.cust_account_id = l_customer_id
2022: and l_receipt_date BETWEEN effective_start_date
2468: and rel.status = 'A'
2469: and rel.bill_to_flag = 'Y'
2470: union
2471: select rel.related_cust_account_id
2472: from ar_paying_relationships_v rel,
2473: hz_cust_accounts acc
2474: where rel.party_id = acc.party_id
2475: and acc.cust_account_id = l_customer_id
2476: and l_receipt_date BETWEEN effective_start_date
2516: and rel.status = 'A'
2517: and rel.bill_to_flag = 'Y'
2518: union
2519: select rel.related_cust_account_id
2520: from ar_paying_relationships_v rel,
2521: hz_cust_accounts acc
2522: where rel.party_id = acc.party_id
2523: and acc.cust_account_id
2524: = l_customer_id
2544: and rel.status = 'A'
2545: and rel.bill_to_flag = 'Y'
2546: union
2547: select rel.related_cust_account_id
2548: from ar_paying_relationships_v rel,
2549: hz_cust_accounts acc
2550: where rel.party_id = acc.party_id
2551: and acc.cust_account_id = l_customer_id
2552: and l_receipt_date BETWEEN effective_start_date
2994: and rel.status = 'A'
2995: and rel.bill_to_flag = 'Y'
2996: union
2997: select rel.related_cust_account_id
2998: from ar_paying_relationships_v rel,
2999: hz_cust_accounts acc
3000: where rel.party_id = acc.party_id
3001: and acc.cust_account_id = l_customer_id
3002: and l_receipt_date BETWEEN effective_start_date
3042: and rel.status = 'A'
3043: and rel.bill_to_flag = 'Y'
3044: union
3045: select rel.related_cust_account_id
3046: from ar_paying_relationships_v rel,
3047: hz_cust_accounts acc
3048: where rel.party_id = acc.party_id
3049: and acc.cust_account_id
3050: = l_customer_id
3070: and rel.status = 'A'
3071: and rel.bill_to_flag = 'Y'
3072: union
3073: select rel.related_cust_account_id
3074: from ar_paying_relationships_v rel,
3075: hz_cust_accounts acc
3076: where rel.party_id = acc.party_id
3077: and acc.cust_account_id = l_customer_id
3078: and l_receipt_date BETWEEN effective_start_date
3519: and rel.status = 'A'
3520: and rel.bill_to_flag = 'Y'
3521: union
3522: select rel.related_cust_account_id
3523: from ar_paying_relationships_v rel,
3524: hz_cust_accounts acc
3525: where rel.party_id = acc.party_id
3526: and acc.cust_account_id = l_customer_id
3527: and l_receipt_date BETWEEN effective_start_date
3567: and rel.status = 'A'
3568: and rel.bill_to_flag = 'Y'
3569: union
3570: select rel.related_cust_account_id
3571: from ar_paying_relationships_v rel,
3572: hz_cust_accounts acc
3573: where rel.party_id = acc.party_id
3574: and acc.cust_account_id
3575: = l_customer_id
3595: and rel.status = 'A'
3596: and rel.bill_to_flag = 'Y'
3597: union
3598: select rel.related_cust_account_id
3599: from ar_paying_relationships_v rel,
3600: hz_cust_accounts acc
3601: where rel.party_id = acc.party_id
3602: and acc.cust_account_id = l_customer_id
3603: and l_receipt_date BETWEEN effective_start_date
4043: and rel.status = 'A'
4044: and rel.bill_to_flag = 'Y'
4045: union
4046: select rel.related_cust_account_id
4047: from ar_paying_relationships_v rel,
4048: hz_cust_accounts acc
4049: where rel.party_id = acc.party_id
4050: and acc.cust_account_id = l_customer_id
4051: and l_receipt_date BETWEEN effective_start_date
4091: and rel.status = 'A'
4092: and rel.bill_to_flag = 'Y'
4093: union
4094: select rel.related_cust_account_id
4095: from ar_paying_relationships_v rel,
4096: hz_cust_accounts acc
4097: where rel.party_id = acc.party_id
4098: and acc.cust_account_id
4099: = l_customer_id
4119: and rel.status = 'A'
4120: and rel.bill_to_flag = 'Y'
4121: union
4122: select rel.related_cust_account_id
4123: from ar_paying_relationships_v rel,
4124: hz_cust_accounts acc
4125: where rel.party_id = acc.party_id
4126: and acc.cust_account_id = l_customer_id
4127: and l_receipt_date BETWEEN effective_start_date
4568: and rel.status = 'A'
4569: and rel.bill_to_flag = 'Y'
4570: union
4571: select rel.related_cust_account_id
4572: from ar_paying_relationships_v rel,
4573: hz_cust_accounts acc
4574: where rel.party_id = acc.party_id
4575: and acc.cust_account_id = l_customer_id
4576: and l_receipt_date BETWEEN effective_start_date
4616: and rel.status = 'A'
4617: and rel.bill_to_flag = 'Y'
4618: union
4619: select rel.related_cust_account_id
4620: from ar_paying_relationships_v rel,
4621: hz_cust_accounts acc
4622: where rel.party_id = acc.party_id
4623: and acc.cust_account_id
4624: = l_customer_id
4644: and rel.status = 'A'
4645: and rel.bill_to_flag = 'Y'
4646: union
4647: select rel.related_cust_account_id
4648: from ar_paying_relationships_v rel,
4649: hz_cust_accounts acc
4650: where rel.party_id = acc.party_id
4651: and acc.cust_account_id = l_customer_id
4652: and l_receipt_date BETWEEN effective_start_date