🧾 反过账 SQL 命令
DELETE FROM t_SystemProfile WHERE FKey='unPosKey'
INSERT INTO t_SystemProfile (FCategory, FKey, FValue, FReadonly, FDescription, FLevel, FExplanation, FFormat, FSort, FDescription_cht, FDescription_en)
VALUES ('General', 'unPosKey', '1', 0, '', ' ', ' ', '', 1, '', '')
GO
UPDATE t_objectaccesstype
SET FObjectID = 0
WHERE FObjectType = 4 AND FObjectID = -1 AND fname = '反过账'
GO
💡 会计信息化(完整版本)
DELETE FROM t_SystemProfile WHERE FKey='unPosKey'
INSERT INTO t_SystemProfile (FCategory, FKey, FValue, FReadonly, FDescription, FLevel, FExplanation, FFormat, FSort, FDescription_cht, FDescription_en)
VALUES ('General', 'unPosKey', '1', 0, '', ' ', ' ', '', 1, '', '')
GO
UPDATE t_objectaccesstype
SET FObjectID = 0
WHERE FObjectType = 4 AND FObjectID = -1 AND fname='反过账'
GO
-- 若参数不存在则插入(开启反过账及其他可见性功能)
IF NOT EXISTS (SELECT 1 FROM t_SystemProfile WHERE FCategory='General' AND FKey='unPosKey')
INSERT t_SystemProfile (FCategory,FKey,FValue,FReadonly,FDescription,FLevel)
VALUES ('General','unPosKey','On',0,'允许反过账',1)
IF NOT EXISTS (SELECT 1 FROM t_SystemProfile WHERE FCategory='GL' AND FKey='NewVchUseNumberVisible')
INSERT t_SystemProfile (FCategory,FKey,FValue,FReadonly,FDescription,FLevel)
VALUES ('GL','NewVchUseNumberVisible',0,0,'新增凭证自动填补断号可见性',1)
IF NOT EXISTS (SELECT 1 FROM t_SystemProfile WHERE FCategory='General' AND FKey='ClearLogToolVisible')
INSERT t_SystemProfile (FCategory,FKey,FValue,FReadonly,FDescription,FLevel)
VALUES ('General','ClearLogToolVisible',0,0,'删除日志功能可见性',1)
GO
-- 更新参数值
UPDATE t_SystemProfile SET FValue='On' WHERE FCategory='General' AND FKey='unPosKey'
UPDATE t_SystemProfile SET FValue=1 WHERE FCategory='GL' AND FKey='NewVchUseNumber'
UPDATE t_SystemProfile SET FValue=1 WHERE FCategory='GL' AND FKey='NewVchUseNumberVisible'
UPDATE t_SystemProfile SET FValue=1 WHERE FCategory='General' AND FKey='ClearLogToolVisible'
GO