Fixed issue 30037: Completed quantity in the Work Requirement is not updated
authorJorge Garcia <jorge.garcia@openbravo.com>
Tue, 02 Jun 2015 09:06:32 +0200
changeset 26856 1fe773745b2d
parent 26855 672ff4b32ead
child 26857 807a09f2e66c
Fixed issue 30037: Completed quantity in the Work Requirement is not updated

Completed quantity in the Work Requirement is not updated under some
circumstances.

The problem was that the ma_workeffort_validate wasn't updated the UPDATED
column of the ma_wrpahse table and you can save even if the line had changed in
the work effort window.

The solution is to update the column with the actual date. Now, when you try to
save it, a error appears in the grid and the save is canceled.
src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
--- a/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml	Thu Jun 04 16:53:27 2015 +0200
+++ b/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml	Tue Jun 02 09:06:32 2015 +0200
@@ -395,7 +395,8 @@
         (SELECT *  FROM M_PRODUCTIONPLAN pp  WHERE pp.M_PRODUCTION_ID=v_Record_ID)
       LOOP
         UPDATE MA_WRPHASE
-          SET DONEQUANTITY=DONEQUANTITY + Cur_ProductionPlan.PRODUCTIONQTY, RUNTIME=Cur_ProductionPlan.RUNTIME
+          SET DONEQUANTITY=DONEQUANTITY + Cur_ProductionPlan.PRODUCTIONQTY, RUNTIME=Cur_ProductionPlan.RUNTIME,
+          UPDATED=now()
         WHERE MA_WRPhase_ID=Cur_ProductionPlan.MA_WRPHASE_ID;
         -- Close Phase if its marked
 	IF (Cur_ProductionPlan.CLOSEPHASE='Y') THEN