|
@@ -370,6 +370,7 @@ abstract class PaymentService
|
|
$goods = ShopGoods::mk()->where('code',$info['goods_code'])->findOrEmpty();
|
|
$goods = ShopGoods::mk()->where('code',$info['goods_code'])->findOrEmpty();
|
|
$item = ShopGoodsItem::mk()->where('goods_sku',$info['goods_sku'])->findOrEmpty();
|
|
$item = ShopGoodsItem::mk()->where('goods_sku',$info['goods_sku'])->findOrEmpty();
|
|
$goods->stock_total -=$info['stock_sales'];
|
|
$goods->stock_total -=$info['stock_sales'];
|
|
|
|
+ $goods->stock_sales +=$info['stock_sales'];
|
|
$item->stock_total -=$info['stock_sales'];
|
|
$item->stock_total -=$info['stock_sales'];
|
|
$goods->save();
|
|
$goods->save();
|
|
$item->save();
|
|
$item->save();
|