Fix batches with no client or multiple clients

Fixes #1131
Broken suppliercontact views

Fixes #1014