出现这种情况可能是由于尾差造成的,解决步骤如下:
1、做其他入库单,并审核
2、后台更新其他入库单表体的是否更新库存标识为0,
--其他入库单更新库存标识。xxxx为步骤1新增的单据号
select flot,FSTOCKLOCID, FPRODUCEDATE,FEXPIRYDATE,FSTOCKFLAG,*
--update b set flot=0,FSTOCKLOCID=0,FPRODUCEDATE='',FEXPIRYDATE='',FSTOCKFLAG=0
from T_STK_MISCELLANEOUS a join T_STK_MISCELLANEOUSentry b on a.fid=b.fid
where fbillno='QTRK000216'
或者:
Select * from T_STK_MISCELLANEOUSENTRY
WHERE FENTRYID IN(
select FENTRYID
from T_STK_MISCELLANEOUSENTRY
WHERE FID IN(SELECT FID
FROM T_STK_MISCELLANEOUS
WHERE FBILLNO='QTRK000214'))
UPDATE
T_STK_MISCELLANEOUSENTRY SET FSTOCKFLAG='0'
WHERE FENTRYID IN(
select FENTRYID
from T_STK_MISCELLANEOUSENTRY
WHERE FID IN(SELECT FID
FROM T_STK_MISCELLANEOUS
WHERE FBILLNO='QTRK000214'))
3、校验即时库存
4、重新核算