Fix spelling mistake

This commit is contained in:
Steve Pettitt
2016-04-09 10:05:45 +01:00
parent 17f168ed06
commit 4414a3f287

View File

@@ -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