Hi , I want to get all order id numbers for selected customer which not payed till now, my data show as following:

What I want is Write a SELECT statement that answers this question:
select orderID from order where customer id = @custID and Total cashmovementValue for current order id is less than total (sold quantity * salePrice ) for current order id.
How to do it?
Thanks.