采购发票下推付款单携带金额不正确?

栏目:k3wise知识作者:金蝶来源:金蝶云社区发布:2024-09-22浏览:1

采购发票下推付款单携带金额不正确?

[概述]

采购发票付款关联金额错误,执行语句处理,参考语句:

----修复发票付款关联金额

--备份有问题发票分录体记录

select c.* into icpurchaseentry_bak20181027

from icpurchaseentry c left join

(select a.fbillno_src,a.fid_src,a.fentryid_src,sum(freceiveamount)+sum(fdiscount) as famount_commit ,sum(freceiveamountfor)+sum(fdiscountfor) as famountfor_commit ,

sum(FQuantity)as FQuantityReceive_Commit

from t_rp_arbillofsh a

where a.fclassid_src in (1000003,1000004)

group by a.fbillno_src,a.fid_src,a.fentryid_src) b

on c.fdetailid=b.fentryid_src and c.finterid=b.fid_src

where (c.famount_commit<> isnull( b.famount_commit,0)

or c.famountfor_commit<> isnull(b.famountfor_commit,0))


--更改发票付款关联金额

update c set c.famount_commit=isnull( b.famount_commit,0), c.famountfor_commit= isnull(b.famountfor_commit,0)

--select c.famount_commit, b.famount_commit, c.famountfor_commit, b.famountfor_commit,*

from icpurchaseentry c left join

(select a.fbillno_src,a.fid_src,a.fentryid_src,sum(freceiveamount)+sum(fdiscount) as famount_commit ,sum(freceiveamountfor)+sum(fdiscountfor) as famountfor_commit ,

sum(FQuantity)as FQuantityReceive_Commit

from t_rp_arbillofsh a

where a.fclassid_src in (1000003,1000004)

group by a.fbillno_src,a.fid_src,a.fentryid_src) b

on c.fdetailid=b.fentryid_src and c.finterid=b.fid_src

where (c.famount_commit<> isnull( b.famount_commit,0)

or c.famountfor_commit<> isnull(b.famountfor_commit,0))

and b.famount_commit is null

采购发票下推付款单携带金额不正确?

[概述]采购发票付款关联金额错误,执行语句处理,参考语句:----修复发票付款关联金额--备份有问题发票分录体记录select c.* into icpurcha...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息