实际成本计算时 反记账操作出现无限循环! 因为已记账的单据中 kbr_dates 这个字段的格式不对
Delete oias_inout
From oias_tally_temp as a
Where oias_inout.month_no=@month_no and oias_inout.kbr_dates=convert(varchar(10),a.sheet_date,121)
and oias_inout.kbr_seq=a.kbr_seq and oias_inout.sheet_lot=a.sheet_lot and oias_inout.source_sta=a.source_sta and oias_inout.org_no=@org_no
在执行这个时 取不到要删除的单据(错误单据kbr_dates=20220430 实际应该是 2022-04-30)