金蝶销售出库单出库状态为待出库,导致无法正确下推退货通知单

发布于 2021-09-09 15:34:41

1. 销售出库单的出库状态不正确修复主要有2个表:

image.png

select * into T_BD_SERIALMASTERORG_bak20210909 from T_BD_SERIALMASTERORG 
update T_BD_SERIALMASTERORG
             set
              FSTOCKSTATUS=3
              from T_BD_SERIALMASTER a inner join T_BD_SERIALMASTERORG b on a.FSERIALID=b.FSERIALID where
 a.FSERIALID in (select  FSERIALID  from  t_sal_outstock a inner join t_sal_outstockentry b on a.fid =b.fid
                                   inner join t_sal_outstockserial c on b.fentryid=c.fentryid  
                                    where fbillno ='xsckd097611')

image.png

第二个主要是序列号查询的需要修复, 否则序列号和库存不一致

select * INTO T_BD_SERIALBILLTRACE_BAL20210909 FROM T_BD_SERIALBILLTRACE 
 UPDATE T_BD_SERIALBILLTRACE
       set FINVID='000c2961-05ee-813c-11ec-009b819bf83e' ,FSTATE=3
        from T_BD_SERIALBILLTRACE where  FSERIALID in (select  FSERIALID  from  t_sal_outstock a inner join t_sal_outstockentry b on a.fid =b.fid
                                   inner join t_sal_outstockserial c on b.fentryid=c.fentryid  
                                    where fbillno ='xsckd097611') and fstate=2

image.png

0 条评论

发布
问题