minor tweaks

- avoiding N+1 queries on Api::ComprasController and
Api::VentasController
- bugfixes