From: Jorg J. <jj...@us...> - 2002-02-14 23:57:59
|
Update of /cvsroot/compiere/db/database/Triggers In directory usw-pr-cvs1:/tmp/cvs-serv5806/database/Triggers Modified Files: M_Product_Trg.sql Log Message: . Index: M_Product_Trg.sql =================================================================== RCS file: /cvsroot/compiere/db/database/Triggers/M_Product_Trg.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** M_Product_Trg.sql 8 Oct 2001 22:19:22 -0000 1.1.1.1 --- M_Product_Trg.sql 14 Feb 2002 23:57:56 -0000 1.2 *************** *** 3,17 **** ON M_Product 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 ! ****************************************************************************** ! * Product new record * - create default accounts and costing records * - create translation row * - create treenode ! */ DECLARE xTree_ID NUMBER; --- 3,21 ---- ON M_Product FOR EACH ROW ! /************************************************************************* ! * 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$ ! *** ! * Title: Product new record ! * Description: * - create default accounts and costing records * - create translation row * - create treenode ! ************************************************************************/ DECLARE xTree_ID NUMBER; *************** *** 24,28 **** WHERE d.M_Product_Category_ID=:new.M_Product_Category_ID; BEGIN ! FOR cd IN Cur_Defaults LOOP -- Account INSERT INTO M_Product_Acct --- 28,32 ---- WHERE d.M_Product_Category_ID=:new.M_Product_Category_ID; BEGIN ! FOR cd IN Cur_Defaults LOOP -- Account INSERT INTO M_Product_Acct *************** *** 40,58 **** -- Costing ! INSERT INTO M_Product_Costing ! (M_Product_ID, C_AcctSchema_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, ! CurrentCostPrice, FutureCostPrice, CostStandard, CostStandardDifference, ! CostAverage, CostLiFo, CostFiFo, ! LastPOPrice, LastTrxAmt, LastTrxQty, ! TotalCumPOQty, TotalCumPOAmt, CumPOQty, CumPOAmt) VALUES (:new.M_Product_ID, cd.C_AcctSchema_ID, :new.AD_Client_ID, :new.AD_ORG_ID, 'Y', SysDate, :new.CreatedBy, SysDate, :new.UpdatedBy, ! 0,0,0,0, ! 0,0,0, ! 0,0,0, ! 0,0,0,0); ! END LOOP; -- Create Translation Row --- 44,61 ---- -- Costing ! INSERT INTO M_Product_Costing ! (M_Product_ID, C_AcctSchema_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, ! CurrentCostPrice, CostStandard, FutureCostPrice, ! CostStandardPOQty,CostStandardPOAmt,CostStandardCumQty,CostStandardCumAmt, ! CostAverage, CostAverageCumQty, CostAverageCumAmt, ! PriceLastPO, PriceLastInv, ! TotalInvQty, TotalInvAmt) VALUES (:new.M_Product_ID, cd.C_AcctSchema_ID, :new.AD_Client_ID, :new.AD_ORG_ID, 'Y', SysDate, :new.CreatedBy, SysDate, :new.UpdatedBy, ! 0,0,0, 0,0,0,0, 0,0,0, 0,0, 0,0); ! END LOOP; ! -- Create Translation Row |