产品版本: | 1089-T6-企业管理软件V6.0 | 适用产品: | T6系列 |
产品模块: | 16-存货核算 | 提交时间: | 2012-06-12 |
问题现象: |
年度数据结转,提示核算结转失败,日志错误如下: 最后语句:SELECT IA_Subsidiary.cWhCode,'34',IA_Subsidiary.cInvCode,IA_Subsidiary.cInvHead,1 as PZID,cfree1,cfree2,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10, cast(str(Sum(IsNull(IA_Subsidiary.iAInQuantity,0)-IsNull(IA_Subsidiary.iAOutQuantity,0)),20,4) as flOAt) AS SumQ, Sum(ISNULL(IA_Subsidiary.iAInPrice,0)-ISNULL(IA_Subsidiary.iAOutPrice,0)) AS SumM FROM (IA_Subsidiary inner join warehouse on IA_Subsidiary.cwhcode=warehouse.cwhcode) WHERE Warehouse.cWhvaluestyle<>'个别计价法' and Warehouse.cWhvaluestyle<>'先进先出法' and Warehouse.cWhvaluestyle<>'后进先出法' And (IA_Subsidiary.iMonth>0 or (IA_Subsidiary.iMonth=0 and IA_Subsidiary.cVouType='34')) GROUP BY IA_Subsidiary.cWhCode,IA_Subsidiary.cInvCode,IA_Subsidiary.cInvHead,cfree1,cfree2,cfree3,cfree4,cfree5,cfree6,cfree7,cfree8,cfree9,cfree10 having Sum(IsNull(IA_Subsidiary.iAInQuantity,0)-IsNull(IA_Subsidiary.iAOutQuantity,0))<>0 or Sum(ISNULL(IA_Subsidiary.iAInPrice,0)-ISNULL(IA_Subsidiary.iAOutPrice,0))<>0将 expression 转换为数据类型 money 时发生算术溢出错误。
| ||
原因分析: | 因用户日常操作没有注意零成本出库问题,导致移动平均法软件自动计算的出库单价过大(超过1亿),无法结转下年。 | ||
解决方案: | 在上年度中使用调整单调整结存成本,使单价正常后重新年结。 |