#266 UK: Adding UK report - Payment Methods Report 

Report to find order balances. Search per ordercycle and select multiple payment method options. Working, but not complete to spec yet, as not searchable per delivery option.

Purpose of this report is so that on pickup/delivery hub can print a report for all, say, Cash On Delivery and Cheque on Delivery payment methods to ensure payment collection is easy.

This is trickier than I thought at first glance. The code you have here provides a list of payment methods with unique names, which looks correct at first, but it doesn't cover the case where two distributors have payment methods with the same name (quite common, eg. "Paypal"). In that case, we'll see a "Paypal" option on the list, but it'll have the ID of just one of the payment methods with that name, and searching with it would return fewer results than expected.

If we then allow an option for each payment method with a unique ID, that leaves us with multiple options with the same name, and no easy way of knowing which to choose.

Looking at the form, I think what we really want here is to search by payment method name, not by ID. If I recall correctly, that could be done by changing the field name from `payment_method_id` to `payment_method_name_eq`. The docs on how this search works are at https://github.com/activerecord-hackery/ransack . With that solution, this method could be shortened to something like:

```ruby
def report_payment_method_options(orders)
  orders.map { |o| o.payments.first.payment_method.andand.name }.uniq
end
```