mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix spelling mistake
This commit is contained in:
@@ -55,7 +55,7 @@ Spree.user_class.class_eval do
|
||||
end
|
||||
|
||||
# Returns orders and their associated payments for all distributors that have been ordered from
|
||||
def compelete_orders_by_distributor
|
||||
def complete_orders_by_distributor
|
||||
Enterprise
|
||||
.includes(distributed_orders: { payments: :payment_method })
|
||||
.where(enterprises: { id: enterprises_ordered_from },
|
||||
@@ -65,7 +65,7 @@ Spree.user_class.class_eval do
|
||||
|
||||
def orders_by_distributor
|
||||
# Remove uncompleted payments as these will not be reflected in order balance
|
||||
data_array = compelete_orders_by_distributor.to_a
|
||||
data_array = complete_orders_by_distributor.to_a
|
||||
remove_uncompleted_payments(data_array)
|
||||
data_array.sort! { |a, b| b.distributed_orders.length <=> a.distributed_orders.length }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user