diff --git a/cli/OverheadAccounts.py b/cli/OverheadAccounts.py index f017d82..eb2dc53 100644 --- a/cli/OverheadAccounts.py +++ b/cli/OverheadAccounts.py @@ -48,7 +48,7 @@ def perform(dbh, params): where p.account = a.id and ae.account = a.id and aec.overhead_relevant = 't' and - aec.id not in (select distinct account_entry_category from account_entry_t where fiscal_year = %(year)s) and + aec.id not in (select distinct account_entry_category from account_entry_t where fiscal_year = %(year)s and account = p.account) and ae.fiscal_year = %(year)s and p.id = %(premise)s group by category, considerminusarea