📄 c_withholding_trg.sql
字号:
CREATE OR REPLACE TRIGGER C_Withholding_Trg
AFTER INSERT
ON C_Withholding
FOR EACH ROW
/******************************************************************************
* ** Compiere Product ** Copyright (c) 1999-2001 Accorto, Inc. USA
* Open Source Software Provided "AS IS" without warranty or liability
* When you use any parts (changed or unchanged), add "Powered by Compiere" to
* your product name; See license details http://www.compiere.org/license.html
******************************************************************************
* New Accounting Defaults
*/
DECLARE
CURSOR Cur_Defaults IS
SELECT * FROM C_AcctSchema_Default d
WHERE EXISTS (SELECT * FROM AD_ClientInfo c
WHERE d.C_AcctSchema_ID IN (c.C_AcctSchema1_ID, c.C_AcctSchema2_ID, c.C_AcctSchema3_ID)
AND AD_Client_ID=:new.AD_Client_ID);
BEGIN
FOR cd IN Cur_Defaults LOOP
INSERT INTO C_Withholding_Acct
(C_Withholding_ID, C_AcctSchema_ID,
AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,
Withholding_Acct)
VALUES
(:new.C_Withholding_ID, cd.C_AcctSchema_ID,
:new.AD_Client_ID, :new.AD_ORG_ID, 'Y', SysDate, :new.CreatedBy, SysDate, :new.UpdatedBy,
cd.Withholding_Acct);
END LOOP;
END C_Withholding_Trg;
/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -