I am assuming these relationship details:
customer::CustomerID = Invoice::CustomerID
If so, then...
Go to a layout based on Customer. that has either Invoice::CustomerID or Invoice::InvoiceID also located on that layout. (can be in a portal or not in a portal).
enter find mode and put an "*" into one of those two ID fields from Invoice. This will find all customers that made at least one purchase.
To find all customers that did NOT make at least one purchase, do the same, but then also click the "omit" button in the status tool bar.
And omit type finds can also be scripted: Scripted Find Examples