常见问题数据库语句(个人整理的,欢迎指正)原创
金蝶云社区-多吃蔬菜
多吃蔬菜
84人赞赏了该文章 1819次浏览 未经作者许可,禁止转载编辑于2022年02月21日 09:40:16

一、K3 14.3 生产任务结案后不能反结案,

 

select * from icmo  where fbillno= '单据号' ----查询


update icmo set fstatus=1,fmrpclosed=0,fhandworkclose=0  where  fbillno = '单据号'  ---更改


二、修改入库单记账标志

select  fposterid , * from where fbillno = '单据号' --查询这个字段是否有值

update ICStockBill set fposterid='' where fbillno='单据号'    删除凭证记账标记

update Icstockbill set fvchinterid=0 where fbillno='单据号'   删除凭证内部ID号


三、修改外购入库单往来科目为暂估

select* from t_Account where FName like '%暂估%' 

update t1 set t1.FCussentAcctID= 1131

from ICStockBill t1  -- inner join ICStockBillEntry t2 on t1.FInterID= t2.FInterID 

where  t1.FHookStatus =0 and FTranType=1  


四、结账存在未审核的库存单据,前台查不到。


select*from icstockbill where (fcheckerid is null or fcheckerid=0) 

and fcancellation=0 and fdate>='2018-09-01' and fdate<'2019-09-30'

select*from icstockbillentry where finterid= '单据号'


五、

--修改启用年份

update t_systemprofile set fvalue='2000' where fkey='StartYear' and fcategory='GL'

--修改启用期间

update t_systemprofile set fvalue='1' where fkey='StartPeriod' and fcategory='GL'

--修改当前年份

update t_systemprofile set fvalue='2015' where fkey='CurrentYear' and fcategory='GL'

--修改当前期间

update t_systemprofile set fvalue='11' where fkey='CurrentPeriod' and fcategory='GL'


【t_systemprofile】系统参数表

【StartPeriod】表示启用期间,【StartYear】表示启用年度

【GL】财务处理,【FA】固定资产、【PA 】工资管理,【IC】业务系统

【CN】出纳管理,【CN_START_YEAR】表示出纳启用期间,【CN_START_YEAR】表示出纳的启用年度


赞 84