abiao 4 年之前
父節點
當前提交
778e03d8f7
共有 1 個文件被更改,包括 3 次插入3 次删除
  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