解决方案: |
在期末处理过程中计算存货差异率时,选择按明细级次计算即可。 下面是检查当月存货总帐差异率与材料出库单实际差异率是否一致的脚本(注意修改a.imonth、b.cmonth参数): select c.iprice/c.iPPrice AS 单据上差异率,d.idifrate AS 存货总帐差异率,c.cinvcode as 存货编码,e.ccode as 材料出库单号,E.* from ia_subsidiary a inner join Inventory b on a.cinvcode=b.cinvcode inner join rdrecords c on a.id=c.autoid and a.cinvcode=c.cinvcode inner join rdrecord e on c.id=e.id inner join ia_summary d on a.imonth=d.imonth and a.cinvcode=d.cinvcode and ROUND(c.iprice/c.iPPrice,6)<>ROUND(1+d.idifrate,6) where a.imonth=9 and a.cvoutype='1' and a.bmoneyflag=0 and b.cmonth=200601 |