解决方案: |
请在sql的查询分析器中针对错误帐套执行下面的脚本,来更改采购订单、到货单等的扣税类别idiscounttaxtype字段,使其为默认值0,则采购订单列表可以显示4月份的单据。建议您新增一张订单测试一下,看新增后,采购订单表中该订单号记录的idiscounttaxtype字段是否为0,如果为空,请检查一下您的环境,请确认补丁无误后,是否能重现问题。
执行脚本前请先备份数据: update po_pomain set idiscounttaxtype=0 where idiscounttaxtype is null
update PU_ArrivalVouch set idiscounttaxtype=0 where idiscounttaxtype is null
update purbillvouch set iDiscountTaxType=(case when purbillvouch.cpbvbilltype =N'01' THEN 0 ELSE 1 END) where iDiscountTaxType is null go
UPDATE PurBillVouchs SET ioritaxcost=(case when purbillvouchs.icost is null THEN NULL ELSE CASE WHEN ipbvquantity<>0 then iOriSum/ipbvquantity else 0 end END) where ioritaxcost is null GO
UPDATE PurBillVouchs SET ioricost=(case when purbillvouchs.iOriTaxCost is null THEN NULL ELSE iOriTaxCost*(1-purbillvouchs.itaxrate/100) end) from purbillvouchs inner join purbillvouch on purbillvouch.pbvid=purbillvouchs.pbvid where purbillvouch.cpbvbilltype<>N'01' and ioricost is null GO |