解决方案: |
将不需要货位管理的存货统一设置一虚拟货位。将所有单据货位清除掉。在数据库中执行 update invposition
set invposition.cposcode=InvPosContrapose.cposcode
from invposition join InvPosContrapose on invposition.cinvcode=InvPosContrapose.cinvcode
where invposition.cinvcode=InvPosContrapose.cinvcode
*将货位纪录表中存货的货位改为存货货位对应中表的货位* update RdRecords
set RdRecords.cposition=InvPosContrapose.cposcode
from RdRecords join InvPosContrapose on RdRecords.cinvcode=InvPosContrapose.cinvcode
join RdRecord on RdRecords.id=RdRecord.id
where RdRecords.cinvcode=InvPosContrapose.cinvcode
and RdRecords.id =RdRecord.id and RdRecord.ddate<'2007-01-01' * 补填期初结存中的货位* |