Changing lapsed member math to be more accurate & give more info
This commit is contained in:
parent
cefd4b3878
commit
8a7fe29f6d
|
@ -57,7 +57,7 @@ class User < ActiveRecord::Base
|
||||||
10
|
10
|
||||||
when 25..999
|
when 25..999
|
||||||
if self.payments.count > 0 then
|
if self.payments.count > 0 then
|
||||||
if self.payments.last.date < (DateTime.now - 1.month)
|
if self.payments.last.date < (DateTime.now - 45.days)
|
||||||
3
|
3
|
||||||
else
|
else
|
||||||
case self.member_level.to_i
|
case self.member_level.to_i
|
||||||
|
@ -79,7 +79,7 @@ class User < ActiveRecord::Base
|
||||||
case self.member_level.to_i
|
case self.member_level.to_i
|
||||||
when 0
|
when 0
|
||||||
if self.payments.count > 0 then
|
if self.payments.count > 0 then
|
||||||
"<span class='hoverinfo' title='Former Member'>:(</span>"
|
"<span class='hoverinfo' title='Former Member (#{(DateTime.now - self.payments.last.date).to_i} days ago)'>:(</span>"
|
||||||
else
|
else
|
||||||
"<!-- Not a member -->"
|
"<!-- Not a member -->"
|
||||||
end
|
end
|
||||||
|
@ -89,8 +89,8 @@ class User < ActiveRecord::Base
|
||||||
"<span class='hoverinfo' title='Volunteer'>◔</span>"
|
"<span class='hoverinfo' title='Volunteer'>◔</span>"
|
||||||
when 25..999
|
when 25..999
|
||||||
if self.payments.count > 0 then
|
if self.payments.count > 0 then
|
||||||
if self.payments.last.date < (DateTime.now - 1.month)
|
if self.payments.last.date < (DateTime.now - 45.days)
|
||||||
"<span class='hoverinfo' title='Lapsed'>◌</span>"
|
"<span class='hoverinfo' title='Recently Lapsed (#{(DateTime.now - self.payments.last.date).to_i} days ago)'>◌</span>"
|
||||||
else
|
else
|
||||||
case self.member_level.to_i
|
case self.member_level.to_i
|
||||||
when 25..49
|
when 25..49
|
||||||
|
|
Loading…
Reference in New Issue
Block a user