Prechádzať zdrojové kódy

fix available_predeposit < bonus total

stanley-king 8 rokov pred
rodič
commit
422dc28429

+ 1 - 1
helper/model/goods_summary.php

@@ -12,7 +12,7 @@ class goods_summary
     private $goods_commonid;
     private $goods_info;
     private $bundles;
-    
+
     const new_goods_speriod = 10 * 3600 * 24;
     private $mStartTm;
 

+ 5 - 0
helper/predeposit_helper.php

@@ -269,6 +269,11 @@ class predeposit_helper
             $this->write_rates($this->mBonusState,$bonus_rate);
             $this->mRates->clean();
         }
+
+        if(intval($this->mTotalPred * 100 + 0.5) < intval($this->mRates->total() * 100 + 0.5)) {
+            $this->mTotalPred = $this->mRates->total();
+            Model('member')->editMember(array('member_id' => $this->member_id),array('available_predeposit' => $this->mTotalPred));
+        }
     }
 
     public function __destruct()