@@ -43,15 +43,15 @@ class CashBalance < ActiveRecord::Base
end
@total=0
- @list=[]
- def get_happen_total
+ def get_happen_total
+ @list=[]
unless @list.include?(self.id)
@list.append(self.id)
# list.append(self.id)
- total = CashBalance.where(id: list).sum("count")
+ total = CashBalance.where(id:@list).sum("count")
return total