1. The Account Types sent were sqlqueries and not integer literals 2. Voucher Types and Account Types were being compared to VoucherTypesSelected and AccountTypesSelected objects and not their ids.