abiao %!s(int64=4) %!d(string=hai) anos
pai
achega
81790201da
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      app/models/cash_balance.rb

+ 3 - 3
app/models/cash_balance.rb

@@ -42,11 +42,11 @@ class CashBalance < ActiveRecord::Base
     end
     end
   end
   end
   @total=0
   @total=0
-  @list=[]
+  list=[]
   def get_happen_total
   def get_happen_total
-    @list.append(self.id)
+    list.append(self.id)
 
 
-    total =  CashBalance.where(id: @list).sum("count")
+    total =  CashBalance.where(id: list).sum("count")
 
 
     return total
     return total
   end
   end