Use #accounts from bookings scope for tabs in salary view.

This fixes an invalid SQL statement in PostgreSQL.