mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix order_cycle_management_report shipping methods filter
The original fix to adapt to v2 was wrong and still using deprecated order.shipping_method_id, this new version is now filtering the correct shipping_method_id in shipping_rates
This commit is contained in:
@@ -107,7 +107,7 @@ module OpenFoodNetwork
|
||||
|
||||
def filter_to_shipping_method(orders)
|
||||
if params[:shipping_method_in].present?
|
||||
orders.joins(shipments: :shipping_methods).where(shipping_method_id: params[:shipping_method_in])
|
||||
orders.joins(shipments: :shipping_rates).where(spree_shipping_rates: { shipping_method_id: params[:shipping_method_in] })
|
||||
else
|
||||
orders
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user