Withdraw amount from account

In General WE can group by the clients, sum Up the group members amount and subtract the dedicated value from IT. Depending of the result(< or > 0 ) we can calculate OK or Not ok