Hi,
I am sorry again ...
Here is the updated output
MemberIDReceiptIDReceiptAmtConsumedAmtBALAmt
11300012001800
2118001600200
312002000
32500020003000
4230002456544
525445440
531200600600
If the premium amount of all members is greater than the total receipt amount then only the above output should display.