mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
removes only_invoice scope from regenerate_invoices rake task
This commit is contained in:
parent
92d79bc9c7
commit
0c4475acea
@ -11,8 +11,7 @@ namespace :fablab do
|
|||||||
end_date = start_date.next_month
|
end_date = start_date.next_month
|
||||||
puts "-> Start regenerate the invoices PDF between #{I18n.l start_date, format: :long} and " \
|
puts "-> Start regenerate the invoices PDF between #{I18n.l start_date, format: :long} and " \
|
||||||
"#{I18n.l end_date - 1.minute, format: :long}"
|
"#{I18n.l end_date - 1.minute, format: :long}"
|
||||||
invoices = Invoice.only_invoice
|
invoices = Invoice.where('created_at >= :start_date AND created_at < :end_date', start_date: start_date, end_date: end_date)
|
||||||
.where('created_at >= :start_date AND created_at < :end_date', start_date: start_date, end_date: end_date)
|
|
||||||
.order(created_at: :asc)
|
.order(created_at: :asc)
|
||||||
invoices.each(&:regenerate_invoice_pdf)
|
invoices.each(&:regenerate_invoice_pdf)
|
||||||
puts '-> Done'
|
puts '-> Done'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user