问题现象: |
在销售系统中根据上年退货单今年所开红字发票在存货系统的正常单据记帐中无法筛选出来。
|
问题原因: |
经检查发现上年结转过来未开发票的退货单,在rdrecord表中其相应记录的caccounter字段不为空所以今年据其所开红字发票在存货系统的正常单据记帐中筛选不出来, |
解决方案: |
执行下面的语句更新即可:
update rdrecord
set rdrecord.caccounter=null
from rdrecord join rdrecords on rdrecord.id=rdrecords.id
where rdrecords.idlsid in select idlsid
from dispatchlist join dispatchlists on dispatchlist.dlid=dispatchlists.dlid
where ddate<‘2003-01-01‘ and breturnflag=‘1‘
and rdrecord.caccounter is not null
and rdrecords.idlsid not in select salebillvouchs.idlsid
from ia_subsidiary
join salebillvouch on salebillvouch.csbvcode=ia_subsidiary.cvoucode
and salebillvouch.cvouchtype=ia_subsidiary.cvoutype
join salebillvouchs on salebillvouchs.sbvid=salebillvouch.sbvid
where cvoutype in‘26‘,‘27‘ |
相关补丁: |
|
版本: |
其他 |
模块: |
销售管理 |
产品: |
u821 |
问题名称: |
根据上年退货单今年所开红字发票在存货系统的正常单据记帐中无法筛选出来 |
最后更新: |
2006-03-10 00:00:00 |