mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-29 06:21:16 +00:00
simplify filtering condition to select only invoiceable orders on OrdersReflex
This commit is contained in:
@@ -72,7 +72,7 @@ module Admin
|
||||
def send_invoices(params)
|
||||
count = 0
|
||||
editable_orders.where(id: params[:bulk_ids]).find_each do |o|
|
||||
next unless o.distributor.can_invoice? && (o.resumed? || o.complete?)
|
||||
next unless o.distributor.can_invoice? && o.invoiceable?
|
||||
|
||||
Spree::OrderMailer.invoice_email(o.id).deliver_later
|
||||
count += 1
|
||||
|
||||
Reference in New Issue
Block a user