【问】食通天5营业日结时提示“存在未埋单的餐桌,不能日结” | ||
【适用版本】食通天5 | 【模块】前台管理 | 【点击数】210 |
【知识编号】C2015011400024 | ||
【问题描述】日结失败,在指定日结时间段内存在未埋单的桌台。 |
go
—-1.查询出来存在未结单据
select * from cybr_u_tmp_table where ch_billno not in ( select ch_billno from cybr_u_tmp_checkout_master )
and ch_billno not in ( select ch_billno from cybr_u_tmp_togo where ch_payflag =’P’ ) and ch_state =’1′
and convert(char(10),dt_operdate,120) >= ‘2014-03-24’ –上次日结时间(改为上次日结的时间)
and convert(char(10),dt_operdate,120) <= ‘2014-03-29’ –本次日结时间(改为这次日结营业日)—2.删除上面查询出来的单据(下面单号改为上面语句查询出来的单号)
delete from cybr_u_tmp_table where ch_billno in( ‘B10032500008′,’B10032500022’)–改为上面查询出来的单据号
delete from cybr_u_tmp_master where ch_billno in( ‘B10032500008′,’B10032500022’)