百科问答

百科问答 国内资讯 公司资讯 政策法规 培训资料 产品下载

年结后某存货没有任何发生数,但删除时提示: 删除失败!用友t+标准版 用友t6怎么反记账 畅捷通t+标准版下载 用友t6软件使用教程

发布时间:2025-11-16 

特价活动:>>>> 用友U8、T6、T+、T3软件产品4折优惠,畅捷通T+cloud、好会计、好业财、好生意云产品8折优惠,另有话费赠送。

 

问:年结后某存货没有任何发生数,但删除时提示: 删除失败!

   

答:
      情况1:
      分析:该存货在ST_TotalAccount表(库存总账)中有记录,但没有任何发生数(iBeginQuantity=0)
      解决:删除此表记录,参考如下语句
      delete ST_TotalAccount
      from ST_TotalAccount as a inner join
      (
      select cWhCode,cInvCode,cBatch,cFree1,cFree2 from  ST_TotalAccount
      group by cWhCode,cInvCode,cBatch,cFree1,cFree2
      having isnull(sum(ibeginquantity),0)=0 and
      isnull(sum(iBeginNum),0)=0 and
      isnull(sum(iIncomeQuantity),0)=0 and
      isnull(sum(iIncomeNum),0)=0 and
      isnull(sum(iSentOutQuantity),0)=0 and
      isnull(sum(iSentOutNum),0)=0
      )as b
      on b.cWhCode=a.cWhCode
      and b.cInvCode=a.cInvCode
      and isnull(b.cBatch,'')=isnull(a.cBatch,'')
      and isnull(b.cFree1,'')=isnull(a.cFree1,'')
      and isnull(b.cFree2,'')=isnull(a.cFree2,'')

X畅捷通软件官方正版.用友软件.企业云服务

截屏,微信识别二维码

客服QQ:5151867

(点击QQ号复制,添加好友)