Compute party receivable/payable for account without party required
The method to compute the sum uses a SQL query that filter lines on party. But users could have a setup where they create one account per party and they don't set party required on the account. This result of having receivable/payable lines without party set.
I think the method should add the balance of the linked account if it does not have party required set.