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

+ 5 - 5
app/models/cash_balance.rb

@@ -41,14 +41,14 @@ class CashBalance < ActiveRecord::Base
       return self.count
     end
   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)
     end
 
-    total =  CashBalance.where(id: list).sum("count")
+    total =  CashBalance.where(id: @list).sum("count")
 
     return total
   end