src-db/database/model/functions/M_INTERNAL_CONSUMPTION_POST1.xml
changeset 24913 e10ca5e6571f
parent 20976 3f5e8c7117d6
child 29706 a8a6d8bd52e5
equal deleted inserted replaced
24912:fa7c2a34e0fc 24913:e10ca5e6571f
   228       SET status = 'VO',
   228       SET status = 'VO',
   229           updated = now(),
   229           updated = now(),
   230           updatedby = v_user
   230           updatedby = v_user
   231       WHERE m_internal_consumption_id = v_voidintconsumption_id;
   231       WHERE m_internal_consumption_id = v_voidintconsumption_id;
   232 
   232 
       
   233       -- transactions related with original inout and with voided inout will be mark as is cost permanent
       
   234       UPDATE M_TRANSACTION TRX
       
   235       SET ISCOSTPERMANENT='Y'
       
   236       WHERE TRX.M_INTERNAL_CONSUMPTIONLINE_ID IN (SELECT M_INTERNAL_CONSUMPTIONLINE_ID 
       
   237                                    FROM M_INTERNAL_CONSUMPTIONLINE
       
   238                                    WHERE (M_INTERNAL_CONSUMPTION_ID = record_id
       
   239                                           OR M_INTERNAL_CONSUMPTION_ID =  v_voidintconsumption_id));
   233     END;
   240     END;
   234   END IF;
   241   END IF;
   235    v_ResultStr := 'UnLockingMovement';
   242    v_ResultStr := 'UnLockingMovement';
   236   --<<END_PROCESSING>>
   243   --<<END_PROCESSING>>
   237   --  Update AD_PInstance
   244   --  Update AD_PInstance