Fix filtering of active ordergroups
This commit is contained in:
parent
708f85a839
commit
15e715c9f3
2 changed files with 15 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ class Ordergroup < Group
|
|||
|
||||
after_create :update_stats!
|
||||
|
||||
scope :active, -> { joins(:orders).where(orders: { starts: (Time.now.months_ago(3)..) }).group(:id) }
|
||||
scope :active, -> { joins(:orders).where(orders: { starts: (Time.now.months_ago(3)..Time.now) }).group(:id) }
|
||||
|
||||
def contact
|
||||
"#{contact_phone} (#{contact_person})"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue