[Production-Development] Movement Date in Production Run Window Remove
authorrafaeldemiguel <rdm@openbravo.com>
Wed, 05 Oct 2011 10:47:08 +0200
changeset 14994 081881603f57
parent 14993 6c5df1ec582f
child 14995 c6a3cbc06c65
[Production-Development] Movement Date in Production Run Window Remove
src-db/database/model/functions/MA_PRODUCTION_COST.xml
src-db/database/model/tables/M_PRODUCTIONPLAN.xml
src-db/database/model/triggers/M_PRODUCTIONPLAN_TRG2.xml
src-db/database/model/triggers/M_PRODUCTION_TRG2.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/model/functions/MA_PRODUCTION_COST.xml	Tue Oct 04 13:58:23 2011 +0200
+++ b/src-db/database/model/functions/MA_PRODUCTION_COST.xml	Wed Oct 05 10:47:08 2011 +0200
@@ -98,7 +98,7 @@
                         AND pl.CALCULATED = 'N'
                         AND pl.M_PRODUCT_ID = M_PRODUCTIONLINE.M_PRODUCT_ID);
 
-    SELECT MAX(pr.ad_client_id), MAX(pr.ad_org_id), MAX(pr.movementdate), COUNT (*), MAX(pr.DOCUMENTNO)
+    SELECT MAX(pr.ad_client_id), MAX(pr.ad_org_id), MAX(movementdate), COUNT (*), MAX(pr.DOCUMENTNO)
     INTO v_Client_ID, v_Org_ID, v_ProductionDate, v_count, v_ProductionNo
     FROM M_PRODUCTION pr, M_PRODUCTIONLINE pl, M_PRODUCTIONPLAN pp
     WHERE pr.m_production_id = p_Production_ID
--- a/src-db/database/model/tables/M_PRODUCTIONPLAN.xml	Tue Oct 04 13:58:23 2011 +0200
+++ b/src-db/database/model/tables/M_PRODUCTIONPLAN.xml	Wed Oct 05 10:47:08 2011 +0200
@@ -133,10 +133,6 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="MOVEMENTDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
       <foreign-key foreignTable="AD_CLIENT" name="M_PRODUCTIONPLAN_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/model/triggers/M_PRODUCTIONPLAN_TRG2.xml	Tue Oct 04 13:58:23 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER M_PRODUCTIONPLAN_TRG2">
-    <trigger name="M_PRODUCTIONPLAN_TRG2" table="M_PRODUCTIONPLAN" fires="before" insert="true" update="false" delete="false" foreach="row">
-      <body><![CDATA[
-
-  /*************************************************************************
-  * The contents of this file are subject to the Compiere Public
-  * License 1.1 ("License"); You may not use this file except in
-  * compliance with the License. You may obtain a copy of the License in
-  * the legal folder of your Openbravo installation.
-  * Software distributed under the License is distributed on an
-  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-  * implied. See the License for the specific language governing rights
-  * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
-  * The Initial Developer of the Original Code is Jorg Janke and ComPiere, Inc.
-  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
-  * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
-  * All Rights Reserved.
-  * Contributor(s): Openbravo SLU
-  * Contributions are Copyright (C) 2011 Openbravo, S.L.U.
-  *
-  * Specifically, this derivative work is based upon the following Compiere
-  * file and version.
-  *************************************************************************/
-
-      v_MovementDate timestamp without time zone;
-      
-BEGIN
-    
-    IF AD_isTriggerEnabled()='N' THEN RETURN;
-    END IF;
-
-    IF (INSERTING) THEN
-	    SELECT MOVEMENTDATE
-	    INTO v_MovementDate
-	    FROM M_PRODUCTION
-	    WHERE M_PRODUCTION_ID = :NEW.M_PRODUCTION_ID;
-
-    -- RAISE_APPLICATION_ERROR(-20000, v_MovementDate);
-
-	    :NEW.MOVEMENTDATE := v_MovementDate;
-    END IF;
-
-END M_PRODUCTIONPLAN_TRG2
-]]></body>
-    </trigger>
-  </database>
--- a/src-db/database/model/triggers/M_PRODUCTION_TRG2.xml	Tue Oct 04 13:58:23 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER M_PRODUCTION_TRG2">
-    <trigger name="M_PRODUCTION_TRG2" table="M_PRODUCTION" fires="after" insert="false" update="true" delete="false" foreach="row">
-      <body><![CDATA[
-/*************************************************************************
-    * The contents of this file are subject to the Openbravo  Public  License
-    * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
-    * Version 1.1  with a permitted attribution clause; you may not  use this
-    * file except in compliance with the License. You  may  obtain  a copy of
-    * the License at http://www.openbravo.com/legal/license.html
-    * Software distributed under the License  is  distributed  on  an "AS IS"
-    * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-    * License for the specific  language  governing  rights  and  limitations
-    * under the License.
-    * The Original Code is Openbravo ERP.
-    * The Initial Developer of the Original Code is Openbravo SLU
-    * All portions are Copyright (C) 2011 Openbravo SLU
-    * All Rights Reserved.
-    * Contributor(s):  ______________________________________.
-    ************************************************************************/
-
-v_DateNull DATE := TO_DATE('01-01-1900', 'DD-MM-YYYY');
-    
-BEGIN
-    
-    IF AD_isTriggerEnabled()='N' THEN RETURN;
-    END IF;
-
-    IF (UPDATING) AND(
-     (COALESCE(:old.MOVEMENTDATE, v_DateNull) <> COALESCE(:new.MOVEMENTDATE, v_DateNull))) THEN
-        UPDATE M_PRODUCTIONPLAN
-	SET MOVEMENTDATE = :new.MOVEMENTDATE
-        WHERE M_PRODUCTION_ID = :new.M_PRODUCTION_ID;
-    END IF;
- 
-END M_PRODUCTION_TRG2
-]]></body>
-    </trigger>
-  </database>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Oct 04 13:58:23 2011 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed Oct 05 10:47:08 2011 +0200
@@ -260028,39 +260028,6 @@
 <!--AD58859226F648569B51EA63B05DE83D-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--AD58859226F648569B51EA63B05DE83D--></AD_COLUMN>
 
-<!--AE46D0846378449596CE97242E4A0035--><AD_COLUMN>
-<!--AE46D0846378449596CE97242E4A0035-->  <AD_COLUMN_ID><![CDATA[AE46D0846378449596CE97242E4A0035]]></AD_COLUMN_ID>
-<!--AE46D0846378449596CE97242E4A0035-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--AE46D0846378449596CE97242E4A0035-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--AE46D0846378449596CE97242E4A0035-->  <NAME><![CDATA[Movement Date]]></NAME>
-<!--AE46D0846378449596CE97242E4A0035-->  <DESCRIPTION><![CDATA[The date that a certain item is moved from one location to another.]]></DESCRIPTION>
-<!--AE46D0846378449596CE97242E4A0035-->  <HELP><![CDATA[The Movement Date indicates the date that a product moved in or out of inventory.  This is the result of a shipment, receipt or inventory movement.]]></HELP>
-<!--AE46D0846378449596CE97242E4A0035-->  <COLUMNNAME><![CDATA[Movementdate]]></COLUMNNAME>
-<!--AE46D0846378449596CE97242E4A0035-->  <AD_TABLE_ID><![CDATA[385]]></AD_TABLE_ID>
-<!--AE46D0846378449596CE97242E4A0035-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
-<!--AE46D0846378449596CE97242E4A0035-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISKEY><![CDATA[N]]></ISKEY>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
-<!--AE46D0846378449596CE97242E4A0035-->  <SEQNO><![CDATA[242]]></SEQNO>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
-<!--AE46D0846378449596CE97242E4A0035-->  <AD_ELEMENT_ID><![CDATA[1037]]></AD_ELEMENT_ID>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
-<!--AE46D0846378449596CE97242E4A0035-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
-<!--AE46D0846378449596CE97242E4A0035-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--AE46D0846378449596CE97242E4A0035-->  <POSITION><![CDATA[35]]></POSITION>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
-<!--AE46D0846378449596CE97242E4A0035-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
-<!--AE46D0846378449596CE97242E4A0035-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
-<!--AE46D0846378449596CE97242E4A0035--></AD_COLUMN>
-
 <!--B03312E5CE4446EABE1179DC075FA773--><AD_COLUMN>
 <!--B03312E5CE4446EABE1179DC075FA773-->  <AD_COLUMN_ID><![CDATA[B03312E5CE4446EABE1179DC075FA773]]></AD_COLUMN_ID>
 <!--B03312E5CE4446EABE1179DC075FA773-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Tue Oct 04 13:58:23 2011 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Wed Oct 05 10:47:08 2011 +0200
@@ -177665,33 +177665,6 @@
 <!--68BFB03020DB4D599CD407BDB8B09AA1-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--68BFB03020DB4D599CD407BDB8B09AA1--></AD_FIELD>
 
-<!--6950A67F214947E9ADFB7A67F09D3014--><AD_FIELD>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <AD_FIELD_ID><![CDATA[6950A67F214947E9ADFB7A67F09D3014]]></AD_FIELD_ID>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <NAME><![CDATA[Movement Date]]></NAME>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <DESCRIPTION><![CDATA[The date that a certain item is moved from one location to another.]]></DESCRIPTION>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <HELP><![CDATA[The Movement Date indicates the date that a product moved in or out of inventory.  This is the result of a shipment, receipt or inventory movement.]]></HELP>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <AD_TAB_ID><![CDATA[C9B5394DBA8C465C9CE26A361696B06E]]></AD_TAB_ID>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <AD_COLUMN_ID><![CDATA[AE46D0846378449596CE97242E4A0035]]></AD_COLUMN_ID>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <SEQNO><![CDATA[7]]></SEQNO>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <GRID_SEQNO><![CDATA[7]]></GRID_SEQNO>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
-<!--6950A67F214947E9ADFB7A67F09D3014-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
-<!--6950A67F214947E9ADFB7A67F09D3014--></AD_FIELD>
-
 <!--69E5B4C314D149728ACB78A496645D9E--><AD_FIELD>
 <!--69E5B4C314D149728ACB78A496645D9E-->  <AD_FIELD_ID><![CDATA[69E5B4C314D149728ACB78A496645D9E]]></AD_FIELD_ID>
 <!--69E5B4C314D149728ACB78A496645D9E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>