[Reservations]Add res status in SO and SOL.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Mon, 12 Nov 2012 18:05:28 +0100
changeset 18693 7b17189c848b
parent 18692 f9f27a33fbda
child 18694 57becadd32b4
[Reservations]Add res status in SO and SOL.
src-db/database/model/functions/M_RESERVATION_POST.xml
src-db/database/model/tables/C_ORDER.xml
src-db/database/model/tables/C_ORDERLINE.xml
src-db/database/model/triggers/M_RESERVATION_TRG.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
--- a/src-db/database/model/functions/M_RESERVATION_POST.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/model/functions/M_RESERVATION_POST.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -40,6 +40,8 @@
   v_newaction       VARCHAR2(60);
   v_orderline_id    VARCHAR2(32);
   v_count           NUMBER;
+  v_quantity        NUMBER;
+  v_reservedqty     NUMBER;
 
 TYPE RECORD IS REF CURSOR;
   Cur_Parameter RECORD;
@@ -73,8 +75,8 @@
   END IF;
 
 BEGIN
-  SELECT res_status, c_orderline_id
-    INTO v_resstatus, v_orderline_id
+  SELECT res_status, c_orderline_id, quantity, reservedqty
+    INTO v_resstatus, v_orderline_id, v_quantity, v_reservedqty
   FROM m_reservation
   WHERE m_reservation_id = v_reservation_id;
   
@@ -82,24 +84,52 @@
   /*
     Reservation Complete Process
   */
-    IF (v_resstatus != 'DR') THEN
-      RAISE_APPLICATION_ERROR(-20000, '@ActionNotSupported@');
-    END IF;
-    IF (v_orderline_id IS NOT NULL) THEN
-      SELECT count(*) INTO v_count
-      FROM m_reservation
-      WHERE c_orderline_id = v_orderline_id
-        AND res_status != 'CL'
-        AND m_reservation_id != v_reservation_id;
-      IF (v_count > 0) THEN
-        RAISE_APPLICATION_ERROR(-20000, '@SOLineWithMoreThanOneOpenReservation@');
+    DECLARE
+      v_sales_order_id        VARCHAR2(32);
+      v_linecount             NUMBER;
+      v_creservedcount        NUMBER;
+      v_preservedcount        NUMBER;
+    BEGIN
+      IF (v_resstatus != 'DR') THEN
+        RAISE_APPLICATION_ERROR(-20000, '@ActionNotSupported@');
       END IF;
-    END IF;
-
-    v_newstatus := 'CO';
-    v_newaction := 'HO';
-    -- ADD RESERVED STOCK
-    M_RESERVE_STOCK_AUTO(v_reservation_id, v_user_id, v_message);
+      IF (v_orderline_id IS NOT NULL) THEN
+        SELECT count(*) INTO v_count
+        FROM m_reservation
+        WHERE c_orderline_id = v_orderline_id
+          AND res_status != 'CL'
+          AND m_reservation_id != v_reservation_id;
+        IF (v_count > 0) THEN
+          RAISE_APPLICATION_ERROR(-20000, '@SOLineWithMoreThanOneOpenReservation@');
+        END IF;
+  
+        UPDATE c_orderline
+        SET so_res_status = CASE WHEN v_quantity = v_reservedqty THEN 'CR'
+                                 ELSE 'PR'
+                            END
+        WHERE c_orderline_id = v_orderline_id;
+  
+        SELECT c_order_id INTO v_sales_order_id
+        FROM c_orderline
+        WHERE c_orderline_id = v_orderline_id;
+        SELECT COUNT(*), SUM(CASE so_res_status WHEN 'CR' THEN 1 ELSE 0 END), SUM(CASE so_res_status WHEN 'PR' THEN 1 ELSE 0 END)
+          INTO v_linecount, v_creservedcount, v_preservedcount
+        FROM c_orderline
+        WHERE c_order_id = v_sales_order_id;
+  
+        UPDATE c_order
+        SET so_res_status = CASE WHEN v_linecount = v_creservedcount THEN 'CR'
+                                 WHEN v_creservedcount + v_preservedcount > 0 THEN 'PR'
+                                 ELSE 'NR'
+                            END
+        WHERE c_order_id = v_sales_order_id;
+      END IF;
+  
+      v_newstatus := 'CO';
+      v_newaction := 'HO';
+      -- ADD RESERVED STOCK
+      M_RESERVE_STOCK_AUTO(v_reservation_id, v_user_id, v_message);
+    END;
 
   ELSIF (v_resaction = 'HO') THEN
   /*
@@ -126,11 +156,36 @@
   /*
     Reservation Reactivate Process
   */
-    IF (v_resstatus != 'CO') THEN
-      RAISE_APPLICATION_ERROR(-20000, '@ActionNotSupported@');
-    END IF;
-    v_newstatus := 'DR';
-    v_newaction := 'PR';
+    DECLARE
+      v_sales_order_id        VARCHAR2(32);
+      v_reservedcount         NUMBER;
+    BEGIN
+
+      IF (v_resstatus != 'CO') THEN
+        RAISE_APPLICATION_ERROR(-20000, '@ActionNotSupported@');
+      END IF;
+
+      UPDATE c_orderline
+      SET so_res_status = 'NR'
+      WHERE c_orderline_id = v_orderline_id;
+
+      SELECT c_order_id INTO v_sales_order_id
+      FROM c_orderline
+      WHERE c_orderline_id = v_orderline_id;
+      SELECT COUNT(*) INTO v_reservedcount
+      FROM c_orderline
+      WHERE c_order_id = v_sales_order_id
+        AND so_res_status <> 'NR';
+
+      UPDATE c_order
+      SET so_res_status = CASE WHEN v_reservedcount > 0 THEN 'PR'
+                               ELSE 'NR'
+                          END
+      WHERE c_order_id = v_sales_order_id;
+
+      v_newstatus := 'DR';
+      v_newaction := 'PR';
+    END;
   
   ELSIF (v_resaction = 'CL') THEN
   /*
--- a/src-db/database/model/tables/C_ORDER.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/model/tables/C_ORDER.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -297,6 +297,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="SO_RES_STATUS" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="C_DOCTYPE" name="C_DOCTYPE_CORDER">
         <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/C_ORDERLINE.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/model/tables/C_ORDERLINE.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -221,6 +221,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="SO_RES_STATUS" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="C_ORDERLINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/M_RESERVATION_TRG.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER M_RESERVATION_TRG">
+    <trigger name="M_RESERVATION_TRG" table="M_RESERVATION" fires="before" insert="true" update="true" delete="true" 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) 2012 Openbravo SLU
+* All Rights Reserved.
+* Contributor(s):  ______________________________________.
+************************************************************************/
+  v_sales_order_id      VARCHAR2(32);
+  v_linecount           NUMBER;
+  v_creservedcount        NUMBER;
+  v_preservedcount        NUMBER;
+  v_reservedcount       NUMBER;
+BEGIN
+  IF (AD_isTriggerEnabled()='N') THEN
+    RETURN;
+  END IF;
+
+  IF (INSERTING OR UPDATING) THEN
+    IF (:NEW.res_status NOT IN ('DR', 'CL') AND :NEW.c_orderline_id IS NOT NULL) THEN
+      UPDATE c_orderline
+      SET so_res_status = CASE WHEN :NEW.quantity = :NEW.reservedqty THEN 'CR'
+                               ELSE 'PR'
+                          END
+      WHERE c_orderline_id = :NEW.c_orderline_id;
+
+      SELECT c_order_id INTO v_sales_order_id
+      FROM c_orderline
+      WHERE c_orderline_id = :NEW.c_orderline_id;
+      SELECT COUNT(*), SUM(CASE so_res_status WHEN 'CR' THEN 1 ELSE 0 END), SUM(CASE so_res_status WHEN 'PR' THEN 1 ELSE 0 END)
+        INTO v_linecount, v_creservedcount, v_preservedcount
+      FROM c_orderline
+      WHERE c_order_id = v_sales_order_id;
+
+      UPDATE c_order
+      SET so_res_status = CASE WHEN v_linecount = v_creservedcount THEN 'CR'
+                               WHEN v_creservedcount + v_preservedcount > 0 THEN 'PR'
+                               ELSE 'NR'
+                          END
+      WHERE c_order_id = v_sales_order_id;
+    END IF;
+  END IF;
+
+  IF (DELETING) THEN
+    IF (:OLD.res_status NOT IN ('DR', 'CL') AND :OLD.c_orderline_id IS NOT NULL) THEN
+      UPDATE c_orderline
+      SET so_res_status = 'NR'
+      WHERE c_orderline_id = :OLD.c_orderline_id;
+
+      SELECT c_order_id INTO v_sales_order_id
+      FROM c_orderline
+      WHERE c_orderline_id = :OLD.c_orderline_id;
+      SELECT COUNT(*) INTO v_reservedcount
+      FROM c_orderline
+      WHERE c_order_id = v_sales_order_id
+        AND so_res_status <> 'NR';
+
+      UPDATE c_order
+      SET so_res_status = CASE WHEN v_reservedcount > 0 THEN 'PR'
+                               ELSE 'NR'
+                          END
+      WHERE c_order_id = v_sales_order_id;
+    END IF;
+  END IF;
+END M_RESERVATION_TRG
+]]></body>
+    </trigger>
+  </database>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -293263,6 +293263,76 @@
 <!--CE0F0D775D8D6C8FE040007F01007137-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--CE0F0D775D8D6C8FE040007F01007137--></AD_COLUMN>
 
+<!--CE4DBA92A2E80C3CE040007F0100316C--><AD_COLUMN>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_COLUMN_ID><![CDATA[CE4DBA92A2E80C3CE040007F0100316C]]></AD_COLUMN_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <NAME><![CDATA[Reservation Status]]></NAME>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <HELP><![CDATA[Identifies if the Sales Order is completely or partially reserved]]></HELP>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <COLUMNNAME><![CDATA[SO_Res_Status]]></COLUMNNAME>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_TABLE_ID><![CDATA[260]]></AD_TABLE_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_REFERENCE_VALUE_ID><![CDATA[C3C19DE8AB3B42E78748E20D986FBBC9]]></AD_REFERENCE_VALUE_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <SEQNO><![CDATA[164]]></SEQNO>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_ELEMENT_ID><![CDATA[CE4E2705AE157709E040007F0100279F]]></AD_ELEMENT_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <POSITION><![CDATA[56]]></POSITION>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--CE4DBA92A2E80C3CE040007F0100316C-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--CE4DBA92A2E80C3CE040007F0100316C--></AD_COLUMN>
+
+<!--CE4E26D99C2EC060E040007F010027BD--><AD_COLUMN>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_COLUMN_ID><![CDATA[CE4E26D99C2EC060E040007F010027BD]]></AD_COLUMN_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <NAME><![CDATA[Reservation Status]]></NAME>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <HELP><![CDATA[Identifies if the Sales Order is completely or partially reserved]]></HELP>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <COLUMNNAME><![CDATA[SO_Res_Status]]></COLUMNNAME>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_TABLE_ID><![CDATA[259]]></AD_TABLE_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_REFERENCE_VALUE_ID><![CDATA[C3C19DE8AB3B42E78748E20D986FBBC9]]></AD_REFERENCE_VALUE_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <SEQNO><![CDATA[610]]></SEQNO>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_ELEMENT_ID><![CDATA[CE4E2705AE157709E040007F0100279F]]></AD_ELEMENT_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <POSITION><![CDATA[75]]></POSITION>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--CE4E26D99C2EC060E040007F010027BD-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--CE4E26D99C2EC060E040007F010027BD--></AD_COLUMN>
+
 <!--CEC2AA7C93F4423A97CE96BDD1C4B49F--><AD_COLUMN>
 <!--CEC2AA7C93F4423A97CE96BDD1C4B49F-->  <AD_COLUMN_ID><![CDATA[CEC2AA7C93F4423A97CE96BDD1C4B49F]]></AD_COLUMN_ID>
 <!--CEC2AA7C93F4423A97CE96BDD1C4B49F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -28623,19 +28623,6 @@
 <!--CA9E531DC5FAEB11E040007F0100672C-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--CA9E531DC5FAEB11E040007F0100672C--></AD_ELEMENT>
 
-<!--CA9E531DC5FBEB11E040007F0100672C--><AD_ELEMENT>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <AD_ELEMENT_ID><![CDATA[CA9E531DC5FBEB11E040007F0100672C]]></AD_ELEMENT_ID>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <COLUMNNAME><![CDATA[IsOnHold]]></COLUMNNAME>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <NAME><![CDATA[On Hold]]></NAME>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <PRINTNAME><![CDATA[On Hold]]></PRINTNAME>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <HELP><![CDATA[An On Hold Reservation might not have any owner. It is used to avoid being used the Reserved Stock in any other process, for example because some quality tests are being performed on it.]]></HELP>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--CA9E531DC5FBEB11E040007F0100672C-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
-<!--CA9E531DC5FBEB11E040007F0100672C--></AD_ELEMENT>
-
 <!--CA9E531DC5FCEB11E040007F0100672C--><AD_ELEMENT>
 <!--CA9E531DC5FCEB11E040007F0100672C-->  <AD_ELEMENT_ID><![CDATA[CA9E531DC5FCEB11E040007F0100672C]]></AD_ELEMENT_ID>
 <!--CA9E531DC5FCEB11E040007F0100672C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -28855,6 +28842,19 @@
 <!--CE0CE91E4BFD17FDE040007F0100600C-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--CE0CE91E4BFD17FDE040007F0100600C--></AD_ELEMENT>
 
+<!--CE4E2705AE157709E040007F0100279F--><AD_ELEMENT>
+<!--CE4E2705AE157709E040007F0100279F-->  <AD_ELEMENT_ID><![CDATA[CE4E2705AE157709E040007F0100279F]]></AD_ELEMENT_ID>
+<!--CE4E2705AE157709E040007F0100279F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4E2705AE157709E040007F0100279F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4E2705AE157709E040007F0100279F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CE4E2705AE157709E040007F0100279F-->  <COLUMNNAME><![CDATA[SO_Res_Status]]></COLUMNNAME>
+<!--CE4E2705AE157709E040007F0100279F-->  <NAME><![CDATA[Reservation Status]]></NAME>
+<!--CE4E2705AE157709E040007F0100279F-->  <PRINTNAME><![CDATA[Reservation Status]]></PRINTNAME>
+<!--CE4E2705AE157709E040007F0100279F-->  <HELP><![CDATA[Identifies if the Sales Order is completely or partially reserved]]></HELP>
+<!--CE4E2705AE157709E040007F0100279F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4E2705AE157709E040007F0100279F-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--CE4E2705AE157709E040007F0100279F--></AD_ELEMENT>
+
 <!--CEFF12045E10490496BA6CE8AC1AD27A--><AD_ELEMENT>
 <!--CEFF12045E10490496BA6CE8AC1AD27A-->  <AD_ELEMENT_ID><![CDATA[CEFF12045E10490496BA6CE8AC1AD27A]]></AD_ELEMENT_ID>
 <!--CEFF12045E10490496BA6CE8AC1AD27A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -233157,6 +233157,138 @@
 <!--CE12B62FCF03457CBF7C23202FBF1B34-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--CE12B62FCF03457CBF7C23202FBF1B34--></AD_FIELD>
 
+<!--CE4DBA92A2EE0C3CE040007F0100316C--><AD_FIELD>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <AD_FIELD_ID><![CDATA[CE4DBA92A2EE0C3CE040007F0100316C]]></AD_FIELD_ID>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <NAME><![CDATA[Create Reservation]]></NAME>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <HELP><![CDATA[Determines if a reservation must be done when the sales order is processed.]]></HELP>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <AD_TAB_ID><![CDATA[293]]></AD_TAB_ID>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <AD_COLUMN_ID><![CDATA[CCCD60BB98EDDFF7E040007F01006A5A]]></AD_COLUMN_ID>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--CE4DBA92A2EE0C3CE040007F0100316C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--CE4DBA92A2EE0C3CE040007F0100316C--></AD_FIELD>
+
+<!--CE4DBA92A2EF0C3CE040007F0100316C--><AD_FIELD>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <AD_FIELD_ID><![CDATA[CE4DBA92A2EF0C3CE040007F0100316C]]></AD_FIELD_ID>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <NAME><![CDATA[Reservation Status]]></NAME>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <HELP><![CDATA[Identifies if the Sales Order is completely or partially reserved]]></HELP>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <AD_TAB_ID><![CDATA[293]]></AD_TAB_ID>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <AD_COLUMN_ID><![CDATA[CE4DBA92A2E80C3CE040007F0100316C]]></AD_COLUMN_ID>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--CE4DBA92A2EF0C3CE040007F0100316C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--CE4DBA92A2EF0C3CE040007F0100316C--></AD_FIELD>
+
+<!--CE4E26D99C3CC060E040007F010027BD--><AD_FIELD>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <AD_FIELD_ID><![CDATA[CE4E26D99C3CC060E040007F010027BD]]></AD_FIELD_ID>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <NAME><![CDATA[Reservation Status]]></NAME>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <HELP><![CDATA[Identifies if the Sales Order is completely or partially reserved]]></HELP>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <AD_TAB_ID><![CDATA[294]]></AD_TAB_ID>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <AD_COLUMN_ID><![CDATA[CE4E26D99C2EC060E040007F010027BD]]></AD_COLUMN_ID>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--CE4E26D99C3CC060E040007F010027BD-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--CE4E26D99C3CC060E040007F010027BD--></AD_FIELD>
+
+<!--CE4E2705AE237709E040007F0100279F--><AD_FIELD>
+<!--CE4E2705AE237709E040007F0100279F-->  <AD_FIELD_ID><![CDATA[CE4E2705AE237709E040007F0100279F]]></AD_FIELD_ID>
+<!--CE4E2705AE237709E040007F0100279F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4E2705AE237709E040007F0100279F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CE4E2705AE237709E040007F0100279F-->  <NAME><![CDATA[Reservation Status]]></NAME>
+<!--CE4E2705AE237709E040007F0100279F-->  <HELP><![CDATA[Identifies if the Sales Order is completely or partially reserved]]></HELP>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CE4E2705AE237709E040007F0100279F-->  <AD_TAB_ID><![CDATA[186]]></AD_TAB_ID>
+<!--CE4E2705AE237709E040007F0100279F-->  <AD_COLUMN_ID><![CDATA[CE4E26D99C2EC060E040007F010027BD]]></AD_COLUMN_ID>
+<!--CE4E2705AE237709E040007F0100279F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--CE4E2705AE237709E040007F0100279F-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--CE4E2705AE237709E040007F0100279F-->  <SEQNO><![CDATA[440]]></SEQNO>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CE4E2705AE237709E040007F0100279F-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--CE4E2705AE237709E040007F0100279F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4E2705AE237709E040007F0100279F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--CE4E2705AE237709E040007F0100279F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--CE4E2705AE237709E040007F0100279F-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
+<!--CE4E2705AE237709E040007F0100279F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--CE4E2705AE237709E040007F0100279F--></AD_FIELD>
+
+<!--CE4E2705AE457709E040007F0100279F--><AD_FIELD>
+<!--CE4E2705AE457709E040007F0100279F-->  <AD_FIELD_ID><![CDATA[CE4E2705AE457709E040007F0100279F]]></AD_FIELD_ID>
+<!--CE4E2705AE457709E040007F0100279F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE4E2705AE457709E040007F0100279F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CE4E2705AE457709E040007F0100279F-->  <NAME><![CDATA[Reservation Status]]></NAME>
+<!--CE4E2705AE457709E040007F0100279F-->  <HELP><![CDATA[Identifies if the Sales Order is completely or partially reserved]]></HELP>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CE4E2705AE457709E040007F0100279F-->  <AD_TAB_ID><![CDATA[187]]></AD_TAB_ID>
+<!--CE4E2705AE457709E040007F0100279F-->  <AD_COLUMN_ID><![CDATA[CE4DBA92A2E80C3CE040007F0100316C]]></AD_COLUMN_ID>
+<!--CE4E2705AE457709E040007F0100279F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--CE4E2705AE457709E040007F0100279F-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--CE4E2705AE457709E040007F0100279F-->  <SEQNO><![CDATA[290]]></SEQNO>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CE4E2705AE457709E040007F0100279F-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--CE4E2705AE457709E040007F0100279F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CE4E2705AE457709E040007F0100279F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--CE4E2705AE457709E040007F0100279F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--CE4E2705AE457709E040007F0100279F-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
+<!--CE4E2705AE457709E040007F0100279F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--CE4E2705AE457709E040007F0100279F--></AD_FIELD>
+
 <!--CE5BB1DDE01F4FF4B79B6FA34CE7F657--><AD_FIELD>
 <!--CE5BB1DDE01F4FF4B79B6FA34CE7F657-->  <AD_FIELD_ID><![CDATA[CE5BB1DDE01F4FF4B79B6FA34CE7F657]]></AD_FIELD_ID>
 <!--CE5BB1DDE01F4FF4B79B6FA34CE7F657-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -5066,6 +5066,18 @@
 <!--C01DEDDA9B35427786058CB649FB972F-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--C01DEDDA9B35427786058CB649FB972F--></AD_REFERENCE>
 
+<!--C3C19DE8AB3B42E78748E20D986FBBC9--><AD_REFERENCE>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <AD_REFERENCE_ID><![CDATA[C3C19DE8AB3B42E78748E20D986FBBC9]]></AD_REFERENCE_ID>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <NAME><![CDATA[SO_Res_Status]]></NAME>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--C3C19DE8AB3B42E78748E20D986FBBC9--></AD_REFERENCE>
+
 <!--C5C21C28B39E4683A91779F16C112E40--><AD_REFERENCE>
 <!--C5C21C28B39E4683A91779F16C112E40-->  <AD_REFERENCE_ID><![CDATA[C5C21C28B39E4683A91779F16C112E40]]></AD_REFERENCE_ID>
 <!--C5C21C28B39E4683A91779F16C112E40-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Mon Nov 12 18:03:04 2012 +0100
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Mon Nov 12 18:05:28 2012 +0100
@@ -9089,6 +9089,28 @@
 <!--6968D8669BBA4F839D4015ACC4A61F68-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--6968D8669BBA4F839D4015ACC4A61F68--></AD_REF_LIST>
 
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB--><AD_REF_LIST>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <AD_REF_LIST_ID><![CDATA[6B9D0ECDE0644FB29B12EC4FFE6DF8FB]]></AD_REF_LIST_ID>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <VALUE><![CDATA[PR]]></VALUE>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <NAME><![CDATA[Partially Reserved]]></NAME>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <AD_REFERENCE_ID><![CDATA[C3C19DE8AB3B42E78748E20D986FBBC9]]></AD_REFERENCE_ID>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--6B9D0ECDE0644FB29B12EC4FFE6DF8FB--></AD_REF_LIST>
+
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C--><AD_REF_LIST>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <AD_REF_LIST_ID><![CDATA[6C1155810B0E4C2E9AAFC9A04B1F8C5C]]></AD_REF_LIST_ID>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <VALUE><![CDATA[NR]]></VALUE>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <NAME><![CDATA[Not Reserved]]></NAME>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <AD_REFERENCE_ID><![CDATA[C3C19DE8AB3B42E78748E20D986FBBC9]]></AD_REFERENCE_ID>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--6C1155810B0E4C2E9AAFC9A04B1F8C5C--></AD_REF_LIST>
+
 <!--6FAB6C5F138E4314B32DD534A569F2B0--><AD_REF_LIST>
 <!--6FAB6C5F138E4314B32DD534A569F2B0-->  <AD_REF_LIST_ID><![CDATA[6FAB6C5F138E4314B32DD534A569F2B0]]></AD_REF_LIST_ID>
 <!--6FAB6C5F138E4314B32DD534A569F2B0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9374,6 +9396,17 @@
 <!--85EB37162F364360A537301472F0914E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--85EB37162F364360A537301472F0914E--></AD_REF_LIST>
 
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D--><AD_REF_LIST>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <AD_REF_LIST_ID><![CDATA[864A1FFAF1EB4C0F97BA3AF313C33A6D]]></AD_REF_LIST_ID>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <VALUE><![CDATA[CR]]></VALUE>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <NAME><![CDATA[Completely Reserved]]></NAME>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <AD_REFERENCE_ID><![CDATA[C3C19DE8AB3B42E78748E20D986FBBC9]]></AD_REFERENCE_ID>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--864A1FFAF1EB4C0F97BA3AF313C33A6D--></AD_REF_LIST>
+
 <!--8651A7AD601D42CDAC894806800F73AB--><AD_REF_LIST>
 <!--8651A7AD601D42CDAC894806800F73AB-->  <AD_REF_LIST_ID><![CDATA[8651A7AD601D42CDAC894806800F73AB]]></AD_REF_LIST_ID>
 <!--8651A7AD601D42CDAC894806800F73AB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>