eas销售出库单与销售订单税率不同步问题修复,如果销售出库单的税率错了,可以从销售订单带价格和税率过来重新计算一遍,特别是有港澳台组织的,可能会遇到这个问题
--eas销售出库单税率修复
update t_im_saleissueentry t
set (t.fsaleprice,
t.FActualPrice,
t.ftaxprice,
t.ftaxrate,
t.fprice,
t.ftax,
t.flocaltax,
t.flocalamount,
t.famount,
t.flocalprice) =
(select x.fprice,
nvl(x.fprice, 0),
x.ftaxprice,
x.ftaxrate,
x.ftaxprice,
x.fqty * (x.ftaxprice - x.fprice),
t.fqty * (x.ftaxprice - x.fprice),
x.ftaxprice * t.fqty,
x.ftaxprice * t.fqty,
x.fprice
from t_sd_saleorderentry x
where x.fparentid = t.fsourcebillid
and x.fmaterialid = t.fmaterialid
and x.fid = t.fsourcebillentryid
and x.fseq = t.fsourcebillentryseq)
where t.fparentid in (select xx.fid
from t_im_saleissuebill xx
where xx.fnumber in ('xxxx'))
)
and t.fispresent = 0;