Group accounts per company when computing the balance, debit or credit
The Move.query_get relies on the contextual company to filter the lines. So when computing an amount for an account, its company must be in the context of the query_get call otherwise no lines will be selected and the amount is always 0.
Closes #13483 (closed)