src-db/database/model/triggers/MA_WRPHASE_TRG.xml
changeset 14983 fcf3ccf492f3
parent 14979 da3863fa640f
child 25175 9e11efa4229f
--- a/src-db/database/model/triggers/MA_WRPHASE_TRG.xml	Mon Sep 19 19:12:18 2011 +0200
+++ b/src-db/database/model/triggers/MA_WRPHASE_TRG.xml	Thu Sep 22 18:28:46 2011 +0200
@@ -27,19 +27,19 @@
 
 IF (INSERTING) THEN
 	UPDATE MA_WORKREQUIREMENT 
-	SET ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME
+	SET ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME, RUNTIME = RUNTIME + :NEW.RUNTIME
 	WHERE MA_WORKREQUIREMENT_ID = :NEW.MA_WORKREQUIREMENT_ID;
 END IF;
 
 IF (UPDATING) THEN
 	UPDATE MA_WORKREQUIREMENT 
-	SET ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME - :OLD.ESTIMATEDTIME
+	SET ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME - :OLD.ESTIMATEDTIME, RUNTIME = RUNTIME + :NEW.RUNTIME - :OLD.RUNTIME
 	WHERE MA_WORKREQUIREMENT_ID = :NEW.MA_WORKREQUIREMENT_ID;
 END IF;
 
 IF (DELETING) THEN
 	UPDATE MA_WORKREQUIREMENT 
-	SET ESTIMATEDTIME = ESTIMATEDTIME - :OLD.ESTIMATEDTIME
+	SET ESTIMATEDTIME = ESTIMATEDTIME - :OLD.ESTIMATEDTIME, RUNTIME = RUNTIME - :OLD.RUNTIME
 	WHERE MA_WORKREQUIREMENT_ID = :OLD.MA_WORKREQUIREMENT_ID;
 END IF;