📄 s_expensetype_trg.sql
字号:
CREATE OR REPLACE TRIGGER S_ExpenseType_Trg
AFTER INSERT OR UPDATE
ON S_EXPENSETYPE
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-2002 Jorg Janke, ComPiere, Inc. All Rights Reserved.
*************************************************************************
* $Id: S_ExpenseType_Trg.sql,v 1.3 2003/02/07 05:49:59 jjanke Exp $
***
* Title: S_Expense Type
* Description:
* Syncronize Resource with Product
************************************************************************/
NextNo M_Product.M_Product_ID%TYPE;
BEGIN
IF (INSERTING) THEN
AD_Sequence_Next('M_Product', :new.AD_Client_ID, NextNo);
INSERT INTO M_PRODUCT
(M_Product_ID, AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,
Value, Name, Description,
DOCUMENTNOTE, HELP, UPC, SKU, C_UOM_ID,
SALESREP_ID, ISSUMMARY, ProductType, ISSTOCKED, ISPURCHASED, ISSOLD, ISBOM,
ISINVOICEPRINTDETAILS, ISPICKLISTPRINTDETAILS, ISVERIFIED,
C_REVENUERECOGNITION_ID, M_Product_Category_ID, CLASSIFICATION,
VOLUME,WEIGHT, SHELFWIDTH,SHELFHEIGHT,SHELFDEPTH,UNITSPERPALLET,
C_TaxCategory_ID, S_Resource_ID, S_ExpenseType_ID,
DISCONTINUED,DISCONTINUEDBY, PROCESSING)
VALUES
(NextNo, :new.AD_Client_ID,:new.AD_Org_ID,:new.IsActive,:new.Created,:new.CreatedBy,:new.Updated,:new.UpdatedBy,
:new.Value, :new.Name, :new.Description,
null, null, null, null, :new.C_UOM_ID,
null, 'N', 'E', 'N', 'N', 'Y', 'N',
'N', 'N', 'N',
null, :new.M_Product_Category_ID, null,
0,0, 0,0,0,0,
:new.C_TaxCategory_ID, null, :new.S_ExpenseType_ID,
'N',null, null);
ELSIF (UPDATING) THEN
UPDATE M_Product
SET IsActive = :new.IsActive,
Updated = :new.Updated,
UpdatedBy = :new.UpdatedBy,
Value = :new.Value,
Name = :new.Name,
Description = :new.Description,
C_UOM_ID = :new.C_UOM_ID,
M_Product_Category_ID = :new.M_Product_Category_ID,
C_TaxCategory_ID = :new.C_TaxCategory_ID
WHERE S_ExpenseType_ID = :new.S_ExpenseType_ID;
END IF;
END S_ExpenseType_Trg;
/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -