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