abiao 4 éve
szülő
commit
778e03d8f7
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      app/models/cash_balance.rb

+ 3 - 3
app/models/cash_balance.rb

@@ -41,10 +41,10 @@ class CashBalance < ActiveRecord::Base
       return self.count
     end
   end
-  const total=0
+  $total=0
   def get_happen_total
-    total= total+self.count
-    return total
+    $total= $total+self.count
+    return $total
   end
 
   def profit_state