[Reservations]Add flag to reserve upon order booking.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Thu, 25 Oct 2012 11:35:57 +0200
changeset 18662 c05cf8173234
parent 18661 2d0858b58e59
child 18663 157c92ecd0e2
[Reservations]Add flag to reserve upon order booking.
src-db/database/model/functions/C_ORDER_POST1.xml
src-db/database/model/tables/C_ORDERLINE.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/C_ORDER_POST1.xml	Thu Oct 25 11:35:33 2012 +0200
+++ b/src-db/database/model/functions/C_ORDER_POST1.xml	Thu Oct 25 11:35:57 2012 +0200
@@ -974,6 +974,103 @@
           END IF;
         END LOOP; -- For all lines needing reservation
       END; -- Reserve Inventory
+     /**************************************************************************
+      * Reservations management.
+      *************************************************************************/
+      DECLARE
+        v_reservation_id      VARCHAR2(32);
+        v_quantity            NUMBER;
+        v_reservedqty         NUMBER;
+        v_releasedqty         NUMBER;
+        v_allocated           NUMBER;
+        v_pendingtounreserve  NUMBER;
+        v_qtyaux              NUMBER;
+        v_res_status          M_RESERVATION.RES_STATUS%TYPE;
+        
+        cur_res_stock         RECORD;
+      BEGIN
+        IF (v_issotrx = 'Y') THEN
+          FOR cur_orderline IN (
+              SELECT ol.c_orderline_id, ol.create_reservation, ol.qtyordered
+              FROM c_orderline ol
+                  JOIN m_product p ON ol.m_product_id = p.m_product_id
+              WHERE ol.c_order_id = v_record_id
+                AND ol.qtyordered > 0
+                AND p.isstocked = 'Y'
+                AND p.producttype = 'I'
+          ) LOOP
+            SELECT count(*), max(m_reservation_id)
+              INTO v_aux, v_reservation_id
+            FROM m_reservation
+            WHERE c_orderline_id = cur_orderline.c_orderline_id
+              AND res_status != 'CL';
+            IF (v_aux > 1) THEN
+              RAISE_APPLICATION_ERROR(-20000, '@SOLineWithMoreThanOneOpenReservation@');
+            ELSIF (v_aux = 1) THEN
+              -- Update reservation when possible.
+              -- Read reservation.
+              SELECT r.quantity, r.reservedqty, r.releasedqty, r.res_status,
+                    COALESCE(SUM(CASE rs.isallocated WHEN 'Y' THEN rs.quantity - COALESCE(rs.releasedqty, 0) ELSE 0 END), 0)
+                INTO v_quantity, v_reservedqty, v_releasedqty, v_res_status,
+                    v_allocated
+              FROM m_reservation r
+                  LEFT JOIN m_reservation_stock rs ON r.m_reservation_id = rs.m_reservation_id
+              WHERE r.m_reservation_id = v_reservation_id
+              GROUP BY r.quantity, r.reservedqty, r.releasedqty, r.res_status;
+              IF (v_quantity != cur_orderline.qtyordered) THEN
+                IF (cur_orderline.qtyordered < v_allocated) THEN
+                  RAISE_APPLICATION_ERROR(-20000, '@ThereIsMoreAllocatedQtyThanOrdered@');
+                END IF;
+                IF (cur_orderline.qtyordered < v_releasedqty) THEN
+                  RAISE_APPLICATION_ERROR(-20000, '@CannotOrderLessThanReleasedQty@');
+                END IF;
+                IF (cur_orderline.qtyordered < v_reservedqty) THEN
+                  --Reservation quantity to decrease with more reserved quantity than new quantity, unreserve stock
+                  v_pendingtounreserve := v_reservedqty - cur_orderline.qtyordered;
+                  FOR cur_res_stock IN (
+                      SELECT m_reservation_stock_id, quantity - COALESCE(releasedqty, 0) AS reservedqty
+                      FROM m_reservation_stock
+                      WHERE m_reservation_id = v_reservation_id
+                      ORDER BY COALESCE(releasedqty, 0), quantity - COALESCE(releasedqty, 0)
+                  ) LOOP
+                    v_qtyaux := LEAST(v_pendingtounreserve, cur_res_stock.reservedqty);
+                    UPDATE m_reservation_stock
+                    SET quantity = quantity - v_qtyaux,
+                        updated = now(),
+                        updatedby = v_user
+                    WHERE m_reservation_stock_id = cur_res_stock.m_reservation_stock_id;
+                    v_pendingtounreserve := v_pendingtounreserve - v_qtyaux;
+                    IF (v_pendingtounreserve = 0) THEN
+                      EXIT;
+                    END IF;
+                  END LOOP;
+                  IF (v_pendingtounreserve > 0) THEN
+                    RAISE_APPLICATION_ERROR(-20000, '@CouldNotUnreserveNeededQty@');
+                  END IF;
+                  -- Delete reservation lines with quantity zero.
+                  DELETE FROM m_reservation_stock
+                  WHERE quantity = 0
+                    AND releasedqty = 0
+                    AND m_reservation_id = v_reservation_id;
+                END IF;
+                UPDATE m_reservation
+                SET quantity = cur_orderline.qtyordered,
+                    updated = now(),
+                    updatedby = v_user
+                WHERE m_reservation_id = v_reservation_id;
+                IF (v_quantity < cur_orderline.qtyordered AND v_res_status = 'CO') THEN
+                  --Reservation processed with higher quantity. Try to reserve the new quantity.
+                  M_RESERVE_STOCK_AUTO(v_reservation_id, v_user, v_reservedqty);
+                END IF;
+              END IF;
+            ELSIF (cur_orderline.create_reservation = 'CR') THEN
+              M_CREATE_RESERVE_FROM_SOL(cur_orderline.c_orderline_id, 'N', v_user, v_reservation_id);
+            ELSIF (cur_orderline.create_reservation = 'CRP') THEN
+              M_CREATE_RESERVE_FROM_SOL(cur_orderline.c_orderline_id, 'Y', v_user, v_reservation_id);
+            END IF;
+          END LOOP;
+        END IF;
+      END;
 
      /**************************************************************************
       * Calculate Taxes and Totals
--- a/src-db/database/model/tables/C_ORDERLINE.xml	Thu Oct 25 11:35:33 2012 +0200
+++ b/src-db/database/model/tables/C_ORDERLINE.xml	Thu Oct 25 11:35:57 2012 +0200
@@ -217,6 +217,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="CREATE_RESERVATION" 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>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Oct 25 11:35:33 2012 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Oct 25 11:35:57 2012 +0200
@@ -292324,6 +292324,41 @@
 <!--CCB0DDDAF34E4415B9DBEB51B4C36A33-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--CCB0DDDAF34E4415B9DBEB51B4C36A33--></AD_COLUMN>
 
+<!--CCCD60BB98EDDFF7E040007F01006A5A--><AD_COLUMN>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_COLUMN_ID><![CDATA[CCCD60BB98EDDFF7E040007F01006A5A]]></AD_COLUMN_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <NAME><![CDATA[Create Reservation]]></NAME>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <HELP><![CDATA[Determines if a reservation must be done when the sales order is processed.]]></HELP>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <COLUMNNAME><![CDATA[Create_Reservation]]></COLUMNNAME>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_TABLE_ID><![CDATA[260]]></AD_TABLE_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_REFERENCE_VALUE_ID><![CDATA[1852D69AB3FD453F8F031813501B26F0]]></AD_REFERENCE_VALUE_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <SEQNO><![CDATA[154]]></SEQNO>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_ELEMENT_ID><![CDATA[CCCD608D36A37221E040007F01006A53]]></AD_ELEMENT_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <POSITION><![CDATA[55]]></POSITION>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--CCCD60BB98EDDFF7E040007F01006A5A-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--CCCD60BB98EDDFF7E040007F01006A5A--></AD_COLUMN>
+
 <!--CD0B83BB40B443D9B807AD4C9AAEC31C--><AD_COLUMN>
 <!--CD0B83BB40B443D9B807AD4C9AAEC31C-->  <AD_COLUMN_ID><![CDATA[CD0B83BB40B443D9B807AD4C9AAEC31C]]></AD_COLUMN_ID>
 <!--CD0B83BB40B443D9B807AD4C9AAEC31C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Oct 25 11:35:33 2012 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Oct 25 11:35:57 2012 +0200
@@ -28753,6 +28753,19 @@
 <!--CCA48454EB41B295E040007F01006B08-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--CCA48454EB41B295E040007F01006B08--></AD_ELEMENT>
 
+<!--CCCD608D36A37221E040007F01006A53--><AD_ELEMENT>
+<!--CCCD608D36A37221E040007F01006A53-->  <AD_ELEMENT_ID><![CDATA[CCCD608D36A37221E040007F01006A53]]></AD_ELEMENT_ID>
+<!--CCCD608D36A37221E040007F01006A53-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CCCD608D36A37221E040007F01006A53-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CCCD608D36A37221E040007F01006A53-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CCCD608D36A37221E040007F01006A53-->  <COLUMNNAME><![CDATA[Create_Reservation]]></COLUMNNAME>
+<!--CCCD608D36A37221E040007F01006A53-->  <NAME><![CDATA[Create Reservation]]></NAME>
+<!--CCCD608D36A37221E040007F01006A53-->  <PRINTNAME><![CDATA[Create Reservation]]></PRINTNAME>
+<!--CCCD608D36A37221E040007F01006A53-->  <HELP><![CDATA[Determines if a reservation must be done when the sales order is processed.]]></HELP>
+<!--CCCD608D36A37221E040007F01006A53-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CCCD608D36A37221E040007F01006A53-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--CCCD608D36A37221E040007F01006A53--></AD_ELEMENT>
+
 <!--CD57A1DBADD440EC9551AE6BC51E8643--><AD_ELEMENT>
 <!--CD57A1DBADD440EC9551AE6BC51E8643-->  <AD_ELEMENT_ID><![CDATA[CD57A1DBADD440EC9551AE6BC51E8643]]></AD_ELEMENT_ID>
 <!--CD57A1DBADD440EC9551AE6BC51E8643-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Oct 25 11:35:33 2012 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Thu Oct 25 11:35:57 2012 +0200
@@ -232390,6 +232390,33 @@
 <!--CC2FA246672B53CBE040007F01002E40-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--CC2FA246672B53CBE040007F01002E40--></AD_FIELD>
 
+<!--CCCD4467ED5A4D7AE040007F01006A45--><AD_FIELD>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <AD_FIELD_ID><![CDATA[CCCD4467ED5A4D7AE040007F01006A45]]></AD_FIELD_ID>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <NAME><![CDATA[Create Reservation]]></NAME>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <HELP><![CDATA[Determines if a reservation must be done when the sales order is processed.]]></HELP>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <AD_TAB_ID><![CDATA[187]]></AD_TAB_ID>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <AD_COLUMN_ID><![CDATA[CCCD60BB98EDDFF7E040007F01006A5A]]></AD_COLUMN_ID>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <SEQNO><![CDATA[115]]></SEQNO>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--CCCD4467ED5A4D7AE040007F01006A45-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--CCCD4467ED5A4D7AE040007F01006A45--></AD_FIELD>
+
 <!--CCD52C1EC9B74ED48057A6E01A18DB8C--><AD_FIELD>
 <!--CCD52C1EC9B74ED48057A6E01A18DB8C-->  <AD_FIELD_ID><![CDATA[CCD52C1EC9B74ED48057A6E01A18DB8C]]></AD_FIELD_ID>
 <!--CCD52C1EC9B74ED48057A6E01A18DB8C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Thu Oct 25 11:35:33 2012 +0200
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Thu Oct 25 11:35:57 2012 +0200
@@ -4221,6 +4221,18 @@
 <!--180774E575694F81B753B3DD46316E0E-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--180774E575694F81B753B3DD46316E0E--></AD_REFERENCE>
 
+<!--1852D69AB3FD453F8F031813501B26F0--><AD_REFERENCE>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <AD_REFERENCE_ID><![CDATA[1852D69AB3FD453F8F031813501B26F0]]></AD_REFERENCE_ID>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <NAME><![CDATA[Create_Reservation list]]></NAME>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--1852D69AB3FD453F8F031813501B26F0-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--1852D69AB3FD453F8F031813501B26F0--></AD_REFERENCE>
+
 <!--1CC9902786384893A551465428468C2A--><AD_REFERENCE>
 <!--1CC9902786384893A551465428468C2A-->  <AD_REFERENCE_ID><![CDATA[1CC9902786384893A551465428468C2A]]></AD_REFERENCE_ID>
 <!--1CC9902786384893A551465428468C2A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Oct 25 11:35:33 2012 +0200
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Oct 25 11:35:57 2012 +0200
@@ -8782,6 +8782,17 @@
 <!--4E7D6FB11DDD4EE3B5E2C2ABCA8335B9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--4E7D6FB11DDD4EE3B5E2C2ABCA8335B9--></AD_REF_LIST>
 
+<!--50341E16858D4EE8BBF5C2E928579E61--><AD_REF_LIST>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <AD_REF_LIST_ID><![CDATA[50341E16858D4EE8BBF5C2E928579E61]]></AD_REF_LIST_ID>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <VALUE><![CDATA[CR]]></VALUE>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <NAME><![CDATA[Create In Draft Status]]></NAME>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <AD_REFERENCE_ID><![CDATA[1852D69AB3FD453F8F031813501B26F0]]></AD_REFERENCE_ID>
+<!--50341E16858D4EE8BBF5C2E928579E61-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--50341E16858D4EE8BBF5C2E928579E61--></AD_REF_LIST>
+
 <!--51E9ABC6ED344AD1A9DC0DAB968A1F65--><AD_REF_LIST>
 <!--51E9ABC6ED344AD1A9DC0DAB968A1F65-->  <AD_REF_LIST_ID><![CDATA[51E9ABC6ED344AD1A9DC0DAB968A1F65]]></AD_REF_LIST_ID>
 <!--51E9ABC6ED344AD1A9DC0DAB968A1F65-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9811,6 +9822,17 @@
 <!--9E62AD3C959646F5ADA430E17844EDC6-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--9E62AD3C959646F5ADA430E17844EDC6--></AD_REF_LIST>
 
+<!--9E6E2C72056442598014488B89C2A551--><AD_REF_LIST>
+<!--9E6E2C72056442598014488B89C2A551-->  <AD_REF_LIST_ID><![CDATA[9E6E2C72056442598014488B89C2A551]]></AD_REF_LIST_ID>
+<!--9E6E2C72056442598014488B89C2A551-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9E6E2C72056442598014488B89C2A551-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9E6E2C72056442598014488B89C2A551-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9E6E2C72056442598014488B89C2A551-->  <VALUE><![CDATA[CRP]]></VALUE>
+<!--9E6E2C72056442598014488B89C2A551-->  <NAME><![CDATA[Create and Process]]></NAME>
+<!--9E6E2C72056442598014488B89C2A551-->  <AD_REFERENCE_ID><![CDATA[1852D69AB3FD453F8F031813501B26F0]]></AD_REFERENCE_ID>
+<!--9E6E2C72056442598014488B89C2A551-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9E6E2C72056442598014488B89C2A551--></AD_REF_LIST>
+
 <!--A27B7159B661436A9A6C282BAFA4EA62--><AD_REF_LIST>
 <!--A27B7159B661436A9A6C282BAFA4EA62-->  <AD_REF_LIST_ID><![CDATA[A27B7159B661436A9A6C282BAFA4EA62]]></AD_REF_LIST_ID>
 <!--A27B7159B661436A9A6C282BAFA4EA62-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>