📄 c_ordertax_trg.sql
字号:
CREATE OR REPLACE TRIGGER C_OrderTax_Trg
AFTER DELETE OR INSERT OR UPDATE
ON C_OrderTax
FOR EACH ROW
DECLARE
/*************************************************************************
* The contents of this file are subject to the Compiere License. You may
* obtain a copy of the License at http://www.compiere.org/license.html
* Software is on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
* express or implied. See the License for details. Code: Compiere ERP+CRM
* Copyright (C) 1999-2001 Jorg Janke, ComPiere, Inc. All Rights Reserved.
*************************************************************************
* $Id: C_OrderTax_Trg.sql,v 1.3 2003/01/31 03:03:04 jjanke Exp $
***
* Title: ReadOnly Check
* Description:
************************************************************************/
v_ID NUMBER;
v_RO NUMBER;
BEGIN
NULL;
/** Is not needed
-- Get ID
IF (UPDATING OR INSERTING) THEN
v_ID := :new.C_Order_ID;
ELSE
v_ID := :old.C_Order_ID;
END IF;
-- ReadOnly Check
SELECT COUNT(*)
INTO v_RO
FROM C_Order
WHERE C_Order_ID=v_ID
AND DocAction <> 'CL' -- allow to close order
AND (Processed='Y' OR Posted='Y');
IF (v_RO > 0) THEN
RAISE_APPLICATION_ERROR(-20501, 'Document processed/posted');
END IF;
**/
END C_OrderTax_Trg;
/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -