2017年年初數(shù)
2016年年末數(shù)
第一步:將存貨核算反年結(jié)(存貨核算反年結(jié)總賬必須將上年度12月份總賬反結(jié)賬后,在將存貨核算上年度12月份反結(jié)賬)
第二步:執(zhí)行下列語句(如果有才剛剛模塊)
update IA_valuationass set cflag=\'暫估記賬\'
from IA_valuationass left join (select * from ia_subsidiary where (isnull(iainquantity,0)-isnull(iaoutquantity,0))>0 ) IA_SubTab on IA_SubTab.id=IA_valuationass.inid left join warehouse on IA_SubTab.cwhcode=warehouse.cwhcode
where IA_valuationass.dikeepdate=IA_SubTab.dkeepdate and (Warehouse.cWhvaluestyle=\'先進(jìn)先出法\' or Warehouse.cWhvaluestyle=\'后進(jìn)先出法\')
And (IA_SubTab.iMonth>0 or (IA_SubTab.iMonth=0 and IA_SubTab.cVouType=\'34\'))
and IA_SubTab.bflag=1 and cflag is null
第三步:執(zhí)行重寫計價輔助表工具
第四步:執(zhí)行存貨總賬重算工具
先修復(fù),后重算
第五步:重新對存貨核算結(jié)賬,再重新年結(jié)