json.array!(@purchases) do |purchase|
  json.extract! purchase, :id, :supplier_id, :pointsale_id, :purchase_code, :amount, :tax, :total, :observations, :purchase_date, :userid
  json.url purchase_url(purchase, format: :json)
end
