解决方案: |
如果下年业务未做过计划价调整的前提下,在该帐套2004年度执行如下语句即可:
1、修改1月份差异记录
update ia_subsidiary
set cDifhead=null,iDebitDifCost=null,iCreditDifCost=null
from ia_subsidiary
where cwhcode in ('51','53','54','55')
AND cvoucode in (Select cvoucode
From ((((IA_Subsidiary Left Join Warehouse On IA_Subsidiary.cWhCode=Warehouse.cWhCode)
Left Join Inventory On IA_Subsidiary.cInvCode=Inventory.cInvCode)
Left Join VouchType On IA_Subsidiary.cVouType=VouchType.cVouchType)
Left Join Rd_Style On IA_Subsidiary.cRdCode=Rd_Style.cRdCode)
Where not cPzid is null and cDifhead='121102' and imonth=1)
and not cPzid is null and cDifhead='121102' and imonth=1
2、调整期初明细帐记录中错误的差异
update ia_subsidiary
set icreditdifcost=null
from ia_subsidiary
where cwhcode in ('51','53','54','55') and iainprice=iCreditDifCost and bflag=1 and imonth=0 |