Query to fetch bill to customer details on install base
Hi,
There is a requirement to fetch bill to customer details for serial number in install base for Billed to address as below. It should return party name as COOR SERVICE MA.I have been able to fetch the details as per attached query. However it returns more than 300 records. I need to fetch the details of the current bill to customer corresponding to party site number 1397041
SELECT DISTINCT (cii.instance_id),
cii.instance_number,
cip.party_id,
hp.party_number,
hp.party_name,
cipa.party_account_id cust_account_id,
hca.account_name,
cipa.bill_to_address bill_to_address_id,