Fix issue with medic sales search

The joins defined were creating a cross join, which was multiplying the real
value of the sale by the number of work orders. Fixed that

Also added a sale details button in this same search

Change-Id: I60a553acab70a2debc3556f4a3c824df2be0b2bd