diff --git a/app/common/service/InvItemService.php b/app/common/service/InvItemService.php index 7bd19b4..4048d1f 100644 --- a/app/common/service/InvItemService.php +++ b/app/common/service/InvItemService.php @@ -145,7 +145,7 @@ class InvItemService $uid = $request->user->uid; $name = $uid ? User::where('id', $uid)->value('name') : ''; $item = InvItem::where('id', $data['id'])->first(); - $change_qty = $data['change_qty'] - $item['stock_qty']; + $change_qty = $data['stock_qty'] - $item['stock_qty']; // 记录库存变化日志 $this->recordStockLog([ 'item_id' => $data['id'],