From 0c4475acea6f0fdb35c780c954a5ccdc511c6cb8 Mon Sep 17 00:00:00 2001 From: Nicolas Florentin Date: Wed, 14 Aug 2019 14:18:04 +0200 Subject: [PATCH] removes only_invoice scope from regenerate_invoices rake task --- lib/tasks/fablab/maintenance.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tasks/fablab/maintenance.rake b/lib/tasks/fablab/maintenance.rake index bd3303063..3333c5efb 100644 --- a/lib/tasks/fablab/maintenance.rake +++ b/lib/tasks/fablab/maintenance.rake @@ -11,8 +11,7 @@ namespace :fablab do end_date = start_date.next_month puts "-> Start regenerate the invoices PDF between #{I18n.l start_date, format: :long} and " \ "#{I18n.l end_date - 1.minute, format: :long}" - invoices = Invoice.only_invoice - .where('created_at >= :start_date AND created_at < :end_date', start_date: start_date, end_date: end_date) + invoices = Invoice.where('created_at >= :start_date AND created_at < :end_date', start_date: start_date, end_date: end_date) .order(created_at: :asc) invoices.each(&:regenerate_invoice_pdf) puts '-> Done'