From 70a4a67f79d78f66ba24a35b635f7d694358378f Mon Sep 17 00:00:00 2001 From: devil_gong Date: Fri, 9 Nov 2018 18:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=89=A3=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/Application/Service/BuyService.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/Application/Service/BuyService.class.php b/service/Application/Service/BuyService.class.php index d280f4ff4..9cdcfa1a1 100755 --- a/service/Application/Service/BuyService.class.php +++ b/service/Application/Service/BuyService.class.php @@ -795,7 +795,7 @@ class BuyService $log_m = M('OrderGoodsInventoryLog'); foreach($order_detail as $v) { - $goods = $goods_m->field('is_deduction_inventory,inventory')->find(); + $goods = $goods_m->field('is_deduction_inventory,inventory')->find($v['goods_id']); if(isset($goods['is_deduction_inventory']) && $goods['is_deduction_inventory'] == 1) { // 扣除操作 @@ -817,6 +817,7 @@ class BuyService } } } + return DataReturn('没有需要扣除库存的数据', 0); } } -- GitLab