vali 6 лет назад
Родитель
Сommit
393978e883
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      datainf/logic/HttpServerOnlySet.php

+ 7 - 1
datainf/logic/HttpServerOnlySet.php

@@ -267,7 +267,13 @@ class HttpServerOnlySet
         }
 
         foreach ($userMonsys as $account => $money) {
-            $sql = "update account_detailed  set  cash=cash-$money where identity='$account' ";
+            if ($money>0){
+                $sql = "update account_detailed  set  cash=cash-$money where identity='$account' ";
+            }else{
+                $money =abs($money);
+                $sql = "update account_detailed  set  cash=cash+$money where identity='$account' ";
+            }
+            //$sql = "update account_detailed  set  cash=cash-$money where identity='$account' ";
             $this->PushSqlToArray($sql);
         }