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