mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Fix test
This commit is contained in:
parent
41c2e2d5e4
commit
b6fd215d29
2 changed files with 10 additions and 3 deletions
|
@ -109,4 +109,11 @@ class Invoice < ActiveRecord::Base
|
|||
def sum
|
||||
sum_without_vat + vat
|
||||
end
|
||||
|
||||
class << self
|
||||
def cancel_overdue_invoices
|
||||
cr_at = Time.zone.now - Setting.days_to_keep_overdue_invoices_active.days
|
||||
self.class.where('due_date < ? AND created_at < ?', Time.zone.now, cr_at)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue