|
|
@@ -716,7 +716,8 @@ class Order extends Backend |
|
|
|
$product = new \app\admin\model\unishop\Product(); |
|
|
|
foreach ($list as $val){ |
|
|
|
try { |
|
|
|
$product->where(["id" => $val['product_id']])->setInc("stock", $val["number"])->setInc("real_sales", -$val["number"]); |
|
|
|
$product->where(["id" => $val['product_id']])->setInc("stock", $val["number"]); |
|
|
|
$product->where(["id" => $val['product_id']])->setInc("real_sales", -$val["number"]); |
|
|
|
} catch (Exception $e) { |
|
|
|
} |
|
|
|
} |
|
|
|