t_billcoderule 1.对老单 select * from t_billcoderule where fbilltypeid=(select fid from ictemplate where fcaption like '销售订单')
1.对新单 select * from t_billcoderule where fbilltypeid=(select fid from icclasstype where fname_chs like '收款单单')
3.icbillno 记录当前单据的最新内码
4.icmaxnum