sales and purchase forms now query database for select fields