Select * From VoucherNumber Where CardNumber='26' -- 单据规则设置表
Select * from VoucherPrefabricateview Where CardNumber='26' -- 可用类型前缀表
Select cValue from AccInformation Where cSysID='AA' and cName='cID' -- 帐套参数表
Select cCode,* from Vouchercontrapose Where cContent='PurchaseType' and cSeed='10' -- 单据前缀对照表
Select CODINGRULE,* from GradeDef Where KEYWORD='Department' -- 编码规则表
Select cCode from Vouchercontrapose Where cContent='Department' and cSeed='1002' -- 单据前缀对照表
select cNumber as Maxnumber From VoucherHistory with (NOLOCK) Where CardNumber='26' and cContent='远程号|采购类型' and cSeed='00CG' -- 单据流水号历史表