panlumeng vor 3 Jahren
Ursprung
Commit
9d25bf767c
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      application/Home/controller/Order.php

+ 4 - 4
application/Home/controller/Order.php

@@ -160,14 +160,14 @@ class Order extends Base
                 $orderpost=Db::name("order_post")->insert($post);
                 if($orderpost){
                    $updatestock= Db::name("account_stock")->where($stock)->update
-                    (['stock_balance'=>$stock['stock_balance']-$num,
-                        "stock_delivery"=>$stock['stock_delivery']+$num,"updatetime"=>date("Y-m-d H:i:s")]);
+                    (['stock_balance'=>$stock['stock_balance']-$count,
+                        "stock_delivery"=>$stock['stock_delivery']+$count,"updatetime"=>date("Y-m-d H:i:s")]);
                    if($updatestock){
                        $log=[
                            "accountid"=>$this->userinfo['id'],
-                           "run_stock"=>$num,
+                           "run_stock"=>$count,
                            "type"=>3,
-                           "after_stock"=>$stock['stock_balance']-$num,
+                           "after_stock"=>$stock['stock_balance']-$count,
                            "before_stock"=>$stock['stock_balance'],
                            "action_uid"=>$this->userinfo['id'],
                            "action_name"=>$this->userinfo['nickname'],