U8/单据记账列表查不到

执行存储过程

exec IA_SP_WriteUnAccountVouchForST Null,'01'

exec IA_SP_WriteUnAccountVouchForST Null,'08'

exec IA_SP_WriteUnAccountVouchForST Null,'09'

exec IA_SP_WriteUnAccountVouchForST Null,'10'

exec IA_SP_WriteUnAccountVouchForST Null,'11'

exec IA_SP_WriteUnAccountVouchForST32 Null,'32'

exec IA_SP_WriteUnAccountVouchForSA Null,'05'

exec IA_SP_WriteUnAccountVouchForSA Null,'26'

exec IA_SP_WriteUnAccountVouchForSA Null,'27'

不行        IA_ST_UnAccountVouch09(未记账单据表)        无数据        强行写入

insert into IA_ST_UnAccountVouch01(IDUN,IDSUN,cVouTypeUN,cBustypeUN)
select a.ID,b.AutoID,cvouchtype,a.cBusType from rdrecord01 a inner join rdrecords01 b on a.ID=b.ID
where a.ID not in (select idun from IA_ST_UnAccountVouch01)
and b.AutoID not in (select idsun from IA_ST_UnAccountVouch01)
and isnull(cbaccounter,'') ='' and bcosting=1 and isnull(bisstqc,0)=0

insert into IA_ST_UnAccountVouch08(IDUN,IDSUN,cVouTypeUN,cBustypeUN)
select a.ID,b.AutoID,cvouchtype,a.cBusType from rdrecord08 a inner join rdrecords08 b on a.ID=b.ID
where a.ID not in (select idun from IA_ST_UnAccountVouch08)
and b.AutoID not in (select idsun from IA_ST_UnAccountVouch08)
and isnull(cbaccounter,'') ='' and bcosting=1 and isnull(bisstqc,0)=0

insert into IA_ST_UnAccountVouch09(IDUN,IDSUN,cVouTypeUN,cBustypeUN)
select a.ID,b.AutoID,cvouchtype,a.cBusType from rdrecord09 a inner join rdrecords09 b on a.ID=b.ID
where a.ID not in (select idun from IA_ST_UnAccountVouch09)
and b.AutoID not in (select idsun from IA_ST_UnAccountVouch09)
and isnull(cbaccounter,'') ='' and bcosting=1 and isnull(bisstqc,0)=0

insert into IA_SA_UnAccountVouch(IDUN,IDSUN,cVouTypeUN,cBustypeUN)
select a.sbvID,b.AutoID,cvouchtype,a.cBusType from salebillvouch inner join salebillvouchs b on a.sbvID=b.sbvID
where a.sbvID not in (select idun from IA_SA_UnAccountVouch)
and b.AutoID not in (select idsun from IA_SA_UnAccountVouch)
and isnull(cbaccounter,'') ='' and bcosting=1 and isnull(bisstqc,0)=0 and isnull(cbustype,'')='普通销售'

还不行                调拨单其他出库单(特殊)

主子表ID写入出库单的           rdrecords09sub               一个控制两个表

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值