Browse Source

Merge branch 'wugg-dev' of wugg/phpstock into version1.5

wugg 2 years ago
parent
commit
72cc5da0a8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/admin/controller/Sale.php

+ 2 - 1
app/admin/controller/Sale.php

@@ -104,6 +104,7 @@ class Sale extends Base
         }
 
         $sale_price = isset($this->post['good_price'])&&$this->post['good_price']!="" ? floatval($this->post['good_price']):0;
+        $ct['cgd_gold_price']=0;
         if($goodtype==1){
             $good = Db::name("good_ladder")->where(["skuCode"=>$skuCode,"is_del"=>0,"status"=>1])->where([["min_num","<=",$good_num]])->order("min_num desc")->find();
             if($good==false){
@@ -3470,7 +3471,7 @@ class Sale extends Base
                     "sale_price"=>$sale_price,
                     "total_price"=>round($sale_price*$outinfo['good_num'],2),
                     "origin_price"=>$cgdinfo['good_price'],
-                    "cgd_gold_price"=>$gold["price"],
+                    "gold_price"=>$gold["price"],
                 ];
                 $upsale =Db::name("sale")->where(["orderCode"=>$outinfo['orderCode']])->update($updat);
                 if($upsale==false){