问题原因::库存期初里有商品没启用序列号但是录入了序列号
解决办法:执行下面语句,可以查询出对应商品:
SELECT b.typeId,b.UserCode,b.FullName,c.typeId,c.UserCode,c.FullName FROM (
SELECT PtypeID,KtypeID FROM dbo.gp_initPtypeSerial GROUP BY PtypeID,KtypeID) a
INNER JOIN dbo.ptype b ON a.PtypeID=b.typeId
INNER JOIN dbo.Stock c ON a.KtypeID=c.typeId
WHERE b.IfSerial=0