库存盘点修复

This commit is contained in:
杨建炊 2024-11-15 15:46:36 +08:00
parent 1b2481a6be
commit ffe74fd672

View File

@ -159,7 +159,7 @@ class GoodsCombinationController extends Controller
$externalSkuId = $request->input('external_sku_id') ??
GeneratorUtils::generateCombinationGoodNumber($request->combination_goods);
$hasCodeSku = GoodsSku::query()->where("external_sku_id", $externalSkuId)->first();
if (!empty($hasCodeSku)) {
if (!empty($hasCodeSku) && $hasCodeSku->id != $request->input('id')) {
throw new \Exception("该组合商品编码已存在");
}
DB::beginTransaction();