当前位置:首页 > 用友交流 > 畅捷通T+ > 正文内容

用友畅捷通T+收发存汇总表和存货总账结存不一致

xmyonyou2年前 (2023-02-16)畅捷通T+1539

账套备份

 执行以下语句


UPDATE r2 SET r2.amount = xx.outAmount , r2.price = round (xx.outAmount/r2.quantity,2),


r2.basePrice = ROUND(xx.outAmount/r2.baseQuantity,2)



FROM dbo.ST_RDRecord r1


JOIN dbo.ST_RDRecord_b r2 ON r1.id = r2.idRDRecordDTO


JOIN dbo.AA_Inventory i ON r2.idinventory = i.id


JOIN (



SELECT s.idvouchertype, s.voucherDetailID, s.voucherID, SUM(s.outAmount) AS outAmount


FROM dbo.ST_SubsidiaryBook s


GROUP BY s.idvouchertype, s.voucherDetailID, s.voucherID


) xx ON r1.id = xx.voucherID AND r1.idvouchertype = xx.idvouchertype AND r2.id = xx.voucherDetailID 


WHERE r2.amount <> xx.outAmount AND r1.rdDirectionFlag = 0



扫描二维码推送至手机访问。

版权声明:本文由用友畅捷通软件维护服务社区--厦门用友软件发布,如需转载请注明出处。

本文链接:https://xmyonyou.cn/post/48.html

分享给朋友: