Browse Source

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

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

+ 3 - 3
app/admin/controller/Sale.php

@@ -1858,8 +1858,8 @@ class Sale extends Base
                 "good_type" => 1,
                 "weight" => $good['noble_weight'],
                 "gold_price" => isset($good['cgd_gold_price']) ? $good['cgd_gold_price'] : 0,
-                "createrid" => $good['createrid'],
-                "creater" => $good['creater'],
+                "createrid" => $supplier_temp_info['personid'],
+                "creater" => $supplier_temp_info['person'],
                 "order_type" => $good['is_stock'] == 1 ? 1 : 2,
                 'order_source' => 3,//3项目
                 'send_way' => 2,
@@ -1885,7 +1885,7 @@ class Sale extends Base
 //            }
             $stock_arr = Db::name("good_stock")->alias("a")
 	            ->leftJoin("warehouse_info b", "a.wsm_code=b.wsm_code")
-	            ->leftJoin("good_stock_info c", "a.id=c.stockid and c.balance_name>0")
+	            ->leftJoin("good_stock_info c", "a.id=c.stockid and c.balance_num>0")
 	            ->where(["spuCode" => $good['spuCode'], "a.is_del" => 0, "a.status" => 1, "b.wsm_type" => 5, "b.companyNo" =>$data['companyNo']])
 	            ->column('stockid,balance_num');
                 $stock_num = array_sum(array_column($stock_arr,"balance_num"));