服务热线:022-26677809 , 13821206318
坚守“用户之友”的初心,做“专业的奋斗者”,始终坚持“持续创新”
首页 > 知识库 > 正文

销售订单统计表查询

- 浏览:1542 - 发布时间:2008-04-28 21:10:00.0
问题版本: 57-用友通标准版10.2 问题模块: 17-销售管理
所属行业: 0-通用 问题状态: 1-UU通注册用户
关 键 字: 销售订单统计表 适用产品:
补 丁 号: 开放状态: 0-UU通注册用户
原问题号: 提交时间: 2008-4-28 21:10:00
问题名称: 销售订单统计表查询
问题现象: 在查询销售订单统计表时发现:订货数量一栏有数量,订货金额一栏有金额,发货数量一栏无数量,发货金额一栏有金额,开票数量一栏无数量,开票金额一栏有金额,待发数量一栏有数量。好多这种情况,而且是由订单生成发货单,再由发货单生成发票的,也都做了审核 ,也好成了销售出库单,做了相应审核。07年的账套出现这种情况,08年没有此种情况。
原因分析: 请在2007年度账套执行脚本,在执行脚本文件前请备份账套. 脚本: --更新销售订单累计出库数量 Begin --发货单更新累计发货数量和金额 Update so_sodetails Set iFHQuantity = (Select Sum(IsNull(iQuantity, 0)) From Dispatchlists bs Where bs.iSOsID = so_sodetails.iSOsID ), iFHNum = (Select Sum(IsNull(iNum, 0)) From Dispatchlists bs Where bs.iSOsID = so_sodetails.iSOsID ), iFHMoney = (Select Sum(IsNull(iSum, 0)) From Dispatchlists bs Where bs.iSOsID = so_sodetails.iSOsID ) --发票更新累计开票金额 Update SO_SODetails Set iKPQuantity = (Select Sum(IsNull(iQuantity, 0)) From SaleBillVouchs bs Where bs.iSOsID = so_sodetails.iSOsID ), iKPNum = (Select Sum(IsNull(iNum, 0)) From SaleBillVouchs bs Where bs.iSOsID = so_sodetails.iSOsID ), iKPMoney = (Select Sum(IsNull(iSum, 0)) From SaleBillVouchs bs Where bs.iSOsID = so_sodetails.iSOsID ) End
解决方案: 请在2007年度账套执行脚本,在执行脚本文件前请备份账套. 脚本: --更新销售订单累计出库数量 Begin --发货单更新累计发货数量和金额 Update so_sodetails Set iFHQuantity = (Select Sum(IsNull(iQuantity, 0)) From Dispatchlists bs Where bs.iSOsID = so_sodetails.iSOsID ), iFHNum = (Select Sum(IsNull(iNum, 0)) From Dispatchlists bs Where bs.iSOsID = so_sodetails.iSOsID ), iFHMoney = (Select Sum(IsNull(iSum, 0)) From Dispatchlists bs Where bs.iSOsID = so_sodetails.iSOsID ) --发票更新累计开票金额 Update SO_SODetails Set iKPQuantity = (Select Sum(IsNull(iQuantity, 0)) From SaleBillVouchs bs Where bs.iSOsID = so_sodetails.iSOsID ), iKPNum = (Select Sum(IsNull(iNum, 0)) From SaleBillVouchs bs Where bs.iSOsID = so_sodetails.iSOsID ), iKPMoney = (Select Sum(IsNull(iSum, 0)) From SaleBillVouchs bs Where bs.iSOsID = so_sodetails.iSOsID ) End