Fixes issue 0008467: Accounting templates
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Mon, 06 Apr 2009 17:26:13 +0200
changeset 6911 f0cec2adc44d
parent 6910 b2a4e9dfd00e
child 6921 b69dd370969e
Fixes issue 0008467: Accounting templates
src-db/database/model/tables/AD_CREATEFACT_TEMPLATE.xml
src-db/database/model/tables/C_ACCTSCHEMA_TABLE.xml
src-db/database/model/tables/C_ACCTSCHEMA_TABLE_DOCTYPE.xml
src-db/database/sourcedata/AD_AUXILIARINPUT.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_TAB.xml
src-db/database/sourcedata/AD_TABLE.xml
src-db/database/sourcedata/AD_WINDOW.xml
src/org/openbravo/erpCommon/ad_forms/AcctServer.java
src/org/openbravo/erpCommon/ad_forms/DocAmortization.java
src/org/openbravo/erpCommon/ad_forms/DocAmortizationTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocBank.java
src/org/openbravo/erpCommon/ad_forms/DocBankTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocCash.java
src/org/openbravo/erpCommon/ad_forms/DocCashTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java
src/org/openbravo/erpCommon/ad_forms/DocDPManagementTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocGLJournal.java
src/org/openbravo/erpCommon/ad_forms/DocGLJournalTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocInOut.java
src/org/openbravo/erpCommon/ad_forms/DocInOutTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocInventory.java
src/org/openbravo/erpCommon/ad_forms/DocInventoryTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocInvoice.java
src/org/openbravo/erpCommon/ad_forms/DocInvoiceTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocLine_Payment.java
src/org/openbravo/erpCommon/ad_forms/DocMovement.java
src/org/openbravo/erpCommon/ad_forms/DocMovementTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocOrder.java
src/org/openbravo/erpCommon/ad_forms/DocOrderTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocPayment.java
src/org/openbravo/erpCommon/ad_forms/DocPaymentTemplate.java
src/org/openbravo/erpCommon/ad_forms/DocProduction.java
src/org/openbravo/erpCommon/ad_forms/DocProductionTemplate.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/tables/AD_CREATEFACT_TEMPLATE.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+  <database name="TABLE AD_CREATEFACT_TEMPLATE">
+    <table name="AD_CREATEFACT_TEMPLATE" primaryKey="AD_CREATEFACT_TEMPLATE_KEY">
+      <column name="AD_CREATEFACT_TEMPLATE_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="NAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="CLASSNAME" primaryKey="false" required="true" type="NVARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_TABLE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <foreign-key foreignTable="AD_CLIENT" name="ADCLIENT_ADCREATEFACTTEMPLATE">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="ADORG_ADCREATEFACTTEMPLATE">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_TABLE" name="ADTABLE_ADCREATEFACTTEMPLATE">
+        <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
+      </foreign-key>
+      <check name="AD_CREAFACTTEMP_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+    </table>
+  </database>
--- a/src-db/database/model/tables/C_ACCTSCHEMA_TABLE.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_TABLE.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -41,6 +41,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="AD_CREATEFACT_TEMPLATE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <column name="ACCTDESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
         <default/>
         <onCreateDefault/>
@@ -54,6 +58,9 @@
       <foreign-key foreignTable="AD_TABLE" name="AD_TABLE_C_ACCTSCHEMA_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CREATEFACT_TEMPLATE" name="CACCTSCHEMA_ADCREATEFACTTEMP">
+        <reference local="AD_CREATEFACT_TEMPLATE_ID" foreign="AD_CREATEFACT_TEMPLATE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_ACCTSCHEMA" name="CACCTSCHEMA_CACCTSCHEMATABLE">
         <reference local="C_ACCTSCHEMA_ID" foreign="C_ACCTSCHEMA_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/C_ACCTSCHEMA_TABLE_DOCTYPE.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/model/tables/C_ACCTSCHEMA_TABLE_DOCTYPE.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -45,6 +45,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="AD_CREATEFACT_TEMPLATE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="AD_CLIENT_C_ACCTSCHEMA_TAB_DOC">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -54,6 +58,9 @@
       <foreign-key foreignTable="C_ACCTSCHEMA_TABLE" name="C_CCTSCHM_TBL_D_C_CCTSCHM_TBL">
         <reference local="C_ACCTSCHEMA_TABLE_ID" foreign="C_ACCTSCHEMA_TABLE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_CREATEFACT_TEMPLATE" name="CACCTSCHTABDOC_ADCREATEFACTEMP">
+        <reference local="AD_CREATEFACT_TEMPLATE_ID" foreign="AD_CREATEFACT_TEMPLATE_ID"/>
+      </foreign-key>
       <check name="C_ACCTSCH_TA_DO_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="C_ACCTSCH_TA_DO_NEGATIVE_CHECK"><![CDATA[ALLOWNEGATIVE IN ('Y', 'N')]]></check>
     </table>
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -716,4 +716,15 @@
 <!--CA8005C0F23945E89C4AD3C7899E5E89-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--CA8005C0F23945E89C4AD3C7899E5E89--></AD_AUXILIARINPUT>
 
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F--><AD_AUXILIARINPUT>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <AD_AUXILIARINPUT_ID><![CDATA[FB4C3FF138DD4B2AB582E7BFBEF5CA7F]]></AD_AUXILIARINPUT_ID>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <AD_TAB_ID><![CDATA[1007400000]]></AD_TAB_ID>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <NAME><![CDATA[AD_Table_ID]]></NAME>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <CODE><![CDATA[@SQL=select ad_table_id from c_acctschema_table where c_acctschema_table_id=@C_Acctschema_Table_ID@]]></CODE>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F--></AD_AUXILIARINPUT>
+
 </data>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -51071,7 +51071,7 @@
 <!--3380-->  <COLUMNNAME><![CDATA[C_Prepayment_Acct]]></COLUMNNAME>
 <!--3380-->  <AD_TABLE_ID><![CDATA[183]]></AD_TABLE_ID>
 <!--3380-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
-<!--3380-->  <AD_REFERENCE_VALUE_ID><![CDATA[25]]></AD_REFERENCE_VALUE_ID>
+<!--3380-->  <AD_REFERENCE_VALUE_ID><![CDATA[C742151051F74FE9958F584C3A145DD8]]></AD_REFERENCE_VALUE_ID>
 <!--3380-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
 <!--3380-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--3380-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -161601,7 +161601,7 @@
 <!--800511-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--800511-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--800511-->  <AD_ELEMENT_ID><![CDATA[126]]></AD_ELEMENT_ID>
-<!--800511-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--800511-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--800511-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--800511-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--800511-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
@@ -170336,7 +170336,7 @@
 <!--800843-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--800843-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--800843-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--800843-->  <POSITION><![CDATA[11]]></POSITION>
+<!--800843-->  <POSITION><![CDATA[12]]></POSITION>
 <!--800843-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--800843--></AD_COLUMN>
 
@@ -245821,6 +245821,7 @@
 <!--1007400000-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400000-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400000-->  <POSITION><![CDATA[1]]></POSITION>
 <!--1007400000--></AD_COLUMN>
 
 <!--1007400001--><AD_COLUMN>
@@ -245850,7 +245851,7 @@
 <!--1007400001-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400001-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400001-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--1007400001-->  <POSITION><![CDATA[20]]></POSITION>
+<!--1007400001-->  <POSITION><![CDATA[2]]></POSITION>
 <!--1007400001-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--1007400001--></AD_COLUMN>
 
@@ -245883,6 +245884,7 @@
 <!--1007400002-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400002-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400002-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400002-->  <POSITION><![CDATA[3]]></POSITION>
 <!--1007400002--></AD_COLUMN>
 
 <!--1007400003--><AD_COLUMN>
@@ -245914,6 +245916,7 @@
 <!--1007400003-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400003-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400003-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400003-->  <POSITION><![CDATA[4]]></POSITION>
 <!--1007400003--></AD_COLUMN>
 
 <!--1007400004--><AD_COLUMN>
@@ -245946,6 +245949,7 @@
 <!--1007400004-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400004-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400004-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400004-->  <POSITION><![CDATA[5]]></POSITION>
 <!--1007400004--></AD_COLUMN>
 
 <!--1007400005--><AD_COLUMN>
@@ -245976,6 +245980,7 @@
 <!--1007400005-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400005-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400005-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400005-->  <POSITION><![CDATA[6]]></POSITION>
 <!--1007400005--></AD_COLUMN>
 
 <!--1007400006--><AD_COLUMN>
@@ -246006,6 +246011,7 @@
 <!--1007400006-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400006-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400006-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400006-->  <POSITION><![CDATA[7]]></POSITION>
 <!--1007400006--></AD_COLUMN>
 
 <!--1007400007--><AD_COLUMN>
@@ -246036,6 +246042,7 @@
 <!--1007400007-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400007-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400007-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400007-->  <POSITION><![CDATA[8]]></POSITION>
 <!--1007400007--></AD_COLUMN>
 
 <!--1007400008--><AD_COLUMN>
@@ -246066,6 +246073,7 @@
 <!--1007400008-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400008-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400008-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1007400008-->  <POSITION><![CDATA[9]]></POSITION>
 <!--1007400008--></AD_COLUMN>
 
 <!--1007400009--><AD_COLUMN>
@@ -246095,7 +246103,7 @@
 <!--1007400009-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400009-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400009-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--1007400009-->  <POSITION><![CDATA[100]]></POSITION>
+<!--1007400009-->  <POSITION><![CDATA[10]]></POSITION>
 <!--1007400009-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--1007400009--></AD_COLUMN>
 
@@ -246128,7 +246136,7 @@
 <!--1007400010-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--1007400010-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1007400010-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--1007400010-->  <POSITION><![CDATA[110]]></POSITION>
+<!--1007400010-->  <POSITION><![CDATA[11]]></POSITION>
 <!--1007400010-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--1007400010--></AD_COLUMN>
 
@@ -246291,6 +246299,361 @@
 <!--1057799CBF9311DDB9CF001B388C61A4-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--1057799CBF9311DDB9CF001B388C61A4--></AD_COLUMN>
 
+<!--16FE92901EC411DEAD5A5B632C7F010A--><AD_COLUMN>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <AD_COLUMN_ID><![CDATA[16FE92901EC411DEAD5A5B632C7F010A]]></AD_COLUMN_ID>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <NAME><![CDATA[AD_Createfact_Template_ID]]></NAME>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <COLUMNNAME><![CDATA[AD_Createfact_Template_ID]]></COLUMNNAME>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <AD_REFERENCE_ID><![CDATA[13]]></AD_REFERENCE_ID>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISKEY><![CDATA[Y]]></ISKEY>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <AD_ELEMENT_ID><![CDATA[D4CE0D9FD3B146CC8F15295E9F3F7742]]></AD_ELEMENT_ID>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <POSITION><![CDATA[1]]></POSITION>
+<!--16FE92901EC411DEAD5A5B632C7F010A-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--16FE92901EC411DEAD5A5B632C7F010A--></AD_COLUMN>
+
+<!--1710D04A1EC411DEBC37D738C0CB2CE0--><AD_COLUMN>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_COLUMN_ID><![CDATA[1710D04A1EC411DEBC37D738C0CB2CE0]]></AD_COLUMN_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <NAME><![CDATA[AD_Client_ID]]></NAME>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <COLUMNNAME><![CDATA[AD_Client_ID]]></COLUMNNAME>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_VAL_RULE_ID><![CDATA[103]]></AD_VAL_RULE_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <DEFAULTVALUE><![CDATA[@AD_CLIENT_ID@]]></DEFAULTVALUE>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_ELEMENT_ID><![CDATA[102]]></AD_ELEMENT_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <POSITION><![CDATA[2]]></POSITION>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1710D04A1EC411DEBC37D738C0CB2CE0--></AD_COLUMN>
+
+<!--1716EF661EC411DEB3863F5FBF31587B--><AD_COLUMN>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_COLUMN_ID><![CDATA[1716EF661EC411DEB3863F5FBF31587B]]></AD_COLUMN_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <NAME><![CDATA[AD_Org_ID]]></NAME>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <COLUMNNAME><![CDATA[AD_Org_ID]]></COLUMNNAME>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_VAL_RULE_ID><![CDATA[104]]></AD_VAL_RULE_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <DEFAULTVALUE><![CDATA[@AD_ORG_ID@]]></DEFAULTVALUE>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_ELEMENT_ID><![CDATA[113]]></AD_ELEMENT_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <POSITION><![CDATA[3]]></POSITION>
+<!--1716EF661EC411DEB3863F5FBF31587B-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1716EF661EC411DEB3863F5FBF31587B--></AD_COLUMN>
+
+<!--171BE4E41EC411DEA309ABEE36C74AAB--><AD_COLUMN>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <AD_COLUMN_ID><![CDATA[171BE4E41EC411DEA309ABEE36C74AAB]]></AD_COLUMN_ID>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <NAME><![CDATA[Isactive]]></NAME>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <COLUMNNAME><![CDATA[Isactive]]></COLUMNNAME>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <AD_ELEMENT_ID><![CDATA[348]]></AD_ELEMENT_ID>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <POSITION><![CDATA[4]]></POSITION>
+<!--171BE4E41EC411DEA309ABEE36C74AAB-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--171BE4E41EC411DEA309ABEE36C74AAB--></AD_COLUMN>
+
+<!--17202ED21EC411DE8482C30FE00C8869--><AD_COLUMN>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <AD_COLUMN_ID><![CDATA[17202ED21EC411DE8482C30FE00C8869]]></AD_COLUMN_ID>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <NAME><![CDATA[Created]]></NAME>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <COLUMNNAME><![CDATA[Created]]></COLUMNNAME>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <AD_REFERENCE_ID><![CDATA[16]]></AD_REFERENCE_ID>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <FIELDLENGTH><![CDATA[8]]></FIELDLENGTH>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <AD_ELEMENT_ID><![CDATA[245]]></AD_ELEMENT_ID>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <POSITION><![CDATA[5]]></POSITION>
+<!--17202ED21EC411DE8482C30FE00C8869-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--17202ED21EC411DE8482C30FE00C8869--></AD_COLUMN>
+
+<!--1724F76E1EC411DE85BF8FAF68F519DE--><AD_COLUMN>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <AD_COLUMN_ID><![CDATA[1724F76E1EC411DE85BF8FAF68F519DE]]></AD_COLUMN_ID>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <NAME><![CDATA[Createdby]]></NAME>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <COLUMNNAME><![CDATA[Createdby]]></COLUMNNAME>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <AD_ELEMENT_ID><![CDATA[246]]></AD_ELEMENT_ID>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <POSITION><![CDATA[6]]></POSITION>
+<!--1724F76E1EC411DE85BF8FAF68F519DE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1724F76E1EC411DE85BF8FAF68F519DE--></AD_COLUMN>
+
+<!--172A62C61EC411DE8C189B82F4C9942D--><AD_COLUMN>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <AD_COLUMN_ID><![CDATA[172A62C61EC411DE8C189B82F4C9942D]]></AD_COLUMN_ID>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <NAME><![CDATA[Updated]]></NAME>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <COLUMNNAME><![CDATA[Updated]]></COLUMNNAME>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <AD_REFERENCE_ID><![CDATA[16]]></AD_REFERENCE_ID>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <FIELDLENGTH><![CDATA[8]]></FIELDLENGTH>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <AD_ELEMENT_ID><![CDATA[607]]></AD_ELEMENT_ID>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <POSITION><![CDATA[7]]></POSITION>
+<!--172A62C61EC411DE8C189B82F4C9942D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--172A62C61EC411DE8C189B82F4C9942D--></AD_COLUMN>
+
+<!--173056541EC411DEBFB28F44D4806F33--><AD_COLUMN>
+<!--173056541EC411DEBFB28F44D4806F33-->  <AD_COLUMN_ID><![CDATA[173056541EC411DEBFB28F44D4806F33]]></AD_COLUMN_ID>
+<!--173056541EC411DEBFB28F44D4806F33-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--173056541EC411DEBFB28F44D4806F33-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--173056541EC411DEBFB28F44D4806F33-->  <NAME><![CDATA[Updatedby]]></NAME>
+<!--173056541EC411DEBFB28F44D4806F33-->  <COLUMNNAME><![CDATA[Updatedby]]></COLUMNNAME>
+<!--173056541EC411DEBFB28F44D4806F33-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--173056541EC411DEBFB28F44D4806F33-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--173056541EC411DEBFB28F44D4806F33-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--173056541EC411DEBFB28F44D4806F33-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--173056541EC411DEBFB28F44D4806F33-->  <AD_ELEMENT_ID><![CDATA[608]]></AD_ELEMENT_ID>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--173056541EC411DEBFB28F44D4806F33-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--173056541EC411DEBFB28F44D4806F33-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--173056541EC411DEBFB28F44D4806F33-->  <POSITION><![CDATA[8]]></POSITION>
+<!--173056541EC411DEBFB28F44D4806F33-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--173056541EC411DEBFB28F44D4806F33--></AD_COLUMN>
+
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018--><AD_COLUMN>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <AD_COLUMN_ID><![CDATA[1736D4AC1EC411DE9D8FF33F8D5B1018]]></AD_COLUMN_ID>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <NAME><![CDATA[Name]]></NAME>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <COLUMNNAME><![CDATA[Name]]></COLUMNNAME>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <AD_ELEMENT_ID><![CDATA[469]]></AD_ELEMENT_ID>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <POSITION><![CDATA[9]]></POSITION>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1736D4AC1EC411DE9D8FF33F8D5B1018--></AD_COLUMN>
+
+<!--173E1D341EC411DE9815138D2760737D--><AD_COLUMN>
+<!--173E1D341EC411DE9815138D2760737D-->  <AD_COLUMN_ID><![CDATA[173E1D341EC411DE9815138D2760737D]]></AD_COLUMN_ID>
+<!--173E1D341EC411DE9815138D2760737D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--173E1D341EC411DE9815138D2760737D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--173E1D341EC411DE9815138D2760737D-->  <NAME><![CDATA[Classname]]></NAME>
+<!--173E1D341EC411DE9815138D2760737D-->  <COLUMNNAME><![CDATA[Classname]]></COLUMNNAME>
+<!--173E1D341EC411DE9815138D2760737D-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--173E1D341EC411DE9815138D2760737D-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--173E1D341EC411DE9815138D2760737D-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--173E1D341EC411DE9815138D2760737D-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--173E1D341EC411DE9815138D2760737D-->  <AD_ELEMENT_ID><![CDATA[1299]]></AD_ELEMENT_ID>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--173E1D341EC411DE9815138D2760737D-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--173E1D341EC411DE9815138D2760737D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--173E1D341EC411DE9815138D2760737D-->  <POSITION><![CDATA[10]]></POSITION>
+<!--173E1D341EC411DE9815138D2760737D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--173E1D341EC411DE9815138D2760737D--></AD_COLUMN>
+
+<!--174604EA1EC411DEB0C3078B9D2ECF9E--><AD_COLUMN>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <AD_COLUMN_ID><![CDATA[174604EA1EC411DEB0C3078B9D2ECF9E]]></AD_COLUMN_ID>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <NAME><![CDATA[Description]]></NAME>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <COLUMNNAME><![CDATA[Description]]></COLUMNNAME>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <FIELDLENGTH><![CDATA[255]]></FIELDLENGTH>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <AD_ELEMENT_ID><![CDATA[275]]></AD_ELEMENT_ID>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <POSITION><![CDATA[11]]></POSITION>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--174604EA1EC411DEB0C3078B9D2ECF9E--></AD_COLUMN>
+
+<!--174E582A1EC411DEA7ADDFB2CB2977ED--><AD_COLUMN>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <AD_COLUMN_ID><![CDATA[174E582A1EC411DEA7ADDFB2CB2977ED]]></AD_COLUMN_ID>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <NAME><![CDATA[AD_Table_ID]]></NAME>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <COLUMNNAME><![CDATA[AD_Table_ID]]></COLUMNNAME>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <AD_ELEMENT_ID><![CDATA[126]]></AD_ELEMENT_ID>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <POSITION><![CDATA[12]]></POSITION>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--174E582A1EC411DEA7ADDFB2CB2977ED--></AD_COLUMN>
+
 <!--1DF7EE40A13111DDAC6E5B1E22F25454--><AD_COLUMN>
 <!--1DF7EE40A13111DDAC6E5B1E22F25454-->  <AD_COLUMN_ID><![CDATA[1DF7EE40A13111DDAC6E5B1E22F25454]]></AD_COLUMN_ID>
 <!--1DF7EE40A13111DDAC6E5B1E22F25454-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -246675,6 +247038,36 @@
 <!--1E4264C0A13111DD81824378ABDB8AE6-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--1E4264C0A13111DD81824378ABDB8AE6--></AD_COLUMN>
 
+<!--226F4EAA1F0311DEB6E25B68A38E8B87--><AD_COLUMN>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_COLUMN_ID><![CDATA[226F4EAA1F0311DEB6E25B68A38E8B87]]></AD_COLUMN_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <NAME><![CDATA[AD_Createfact_Template_ID]]></NAME>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <COLUMNNAME><![CDATA[AD_Createfact_Template_ID]]></COLUMNNAME>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_TABLE_ID><![CDATA[800027]]></AD_TABLE_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_VAL_RULE_ID><![CDATA[8195248D186A4DEC89938C45837A1BCB]]></AD_VAL_RULE_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_ELEMENT_ID><![CDATA[D4CE0D9FD3B146CC8F15295E9F3F7742]]></AD_ELEMENT_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <POSITION><![CDATA[11]]></POSITION>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--226F4EAA1F0311DEB6E25B68A38E8B87--></AD_COLUMN>
+
 <!--355E0840A13011DDBC40BF005273E923--><AD_COLUMN>
 <!--355E0840A13011DDBC40BF005273E923-->  <AD_COLUMN_ID><![CDATA[355E0840A13011DDBC40BF005273E923]]></AD_COLUMN_ID>
 <!--355E0840A13011DDBC40BF005273E923-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -261739,6 +262132,36 @@
 <!--7FCA79F6A6804336A083FEE0C8964D6E-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--7FCA79F6A6804336A083FEE0C8964D6E--></AD_COLUMN>
 
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8--><AD_COLUMN>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_COLUMN_ID><![CDATA[80F1BCD61F0F11DE8BE5DF56446CB1D8]]></AD_COLUMN_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <NAME><![CDATA[AD_Createfact_Template_ID]]></NAME>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <COLUMNNAME><![CDATA[AD_Createfact_Template_ID]]></COLUMNNAME>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_TABLE_ID><![CDATA[1007400000]]></AD_TABLE_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_VAL_RULE_ID><![CDATA[8195248D186A4DEC89938C45837A1BCB]]></AD_VAL_RULE_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_ELEMENT_ID><![CDATA[D4CE0D9FD3B146CC8F15295E9F3F7742]]></AD_ELEMENT_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <POSITION><![CDATA[12]]></POSITION>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--80F1BCD61F0F11DE8BE5DF56446CB1D8--></AD_COLUMN>
+
 <!--8200738EF14611DDB9650016D4EE9DB3--><AD_COLUMN>
 <!--8200738EF14611DDB9650016D4EE9DB3-->  <AD_COLUMN_ID><![CDATA[8200738EF14611DDB9650016D4EE9DB3]]></AD_COLUMN_ID>
 <!--8200738EF14611DDB9650016D4EE9DB3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -24479,6 +24479,19 @@
 <!--D498E8A6CB6711DDBAC06BA41F5FDE11-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D498E8A6CB6711DDBAC06BA41F5FDE11--></AD_ELEMENT>
 
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742--><AD_ELEMENT>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <AD_ELEMENT_ID><![CDATA[D4CE0D9FD3B146CC8F15295E9F3F7742]]></AD_ELEMENT_ID>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <COLUMNNAME><![CDATA[AD_Createfact_Template_ID]]></COLUMNNAME>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <NAME><![CDATA[Accounting Template]]></NAME>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <PRINTNAME><![CDATA[Accounting Template]]></PRINTNAME>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <DESCRIPTION><![CDATA[Accounting Template]]></DESCRIPTION>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <HELP><![CDATA[Accounting Template]]></HELP>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D4CE0D9FD3B146CC8F15295E9F3F7742--></AD_ELEMENT>
+
 <!--F6D57D6135DA4C4B9FF73062A73E020E--><AD_ELEMENT>
 <!--F6D57D6135DA4C4B9FF73062A73E020E-->  <AD_ELEMENT_ID><![CDATA[F6D57D6135DA4C4B9FF73062A73E020E]]></AD_ELEMENT_ID>
 <!--F6D57D6135DA4C4B9FF73062A73E020E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -127856,7 +127856,7 @@
 <!--801078-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--801078-->  <DISPLAYLENGTH><![CDATA[2000]]></DISPLAYLENGTH>
 <!--801078-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--801078-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--801078-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--801078-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--801078-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--801078-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -181393,6 +181393,194 @@
 <!--36E2378ABF9F11DDB805001B388C61A4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--36E2378ABF9F11DDB805001B388C61A4--></AD_FIELD>
 
+<!--429B7EB81EC411DE88A8A7138DF7459E--><AD_FIELD>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <AD_FIELD_ID><![CDATA[429B7EB81EC411DE88A8A7138DF7459E]]></AD_FIELD_ID>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <NAME><![CDATA[Table]]></NAME>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <AD_COLUMN_ID><![CDATA[174E582A1EC411DEA7ADDFB2CB2977ED]]></AD_COLUMN_ID>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--429B7EB81EC411DE88A8A7138DF7459E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--429B7EB81EC411DE88A8A7138DF7459E--></AD_FIELD>
+
+<!--42A998181EC411DE8B4ED7036F75A048--><AD_FIELD>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <AD_FIELD_ID><![CDATA[42A998181EC411DE8B4ED7036F75A048]]></AD_FIELD_ID>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <NAME><![CDATA[Description]]></NAME>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <AD_COLUMN_ID><![CDATA[174604EA1EC411DEB0C3078B9D2ECF9E]]></AD_COLUMN_ID>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <DISPLAYLENGTH><![CDATA[255]]></DISPLAYLENGTH>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--42A998181EC411DE8B4ED7036F75A048-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--42A998181EC411DE8B4ED7036F75A048--></AD_FIELD>
+
+<!--42AA0D021EC411DE9F90339CA6E9F175--><AD_FIELD>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <AD_FIELD_ID><![CDATA[42AA0D021EC411DE9F90339CA6E9F175]]></AD_FIELD_ID>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <NAME><![CDATA[Classname]]></NAME>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <AD_COLUMN_ID><![CDATA[173E1D341EC411DE9815138D2760737D]]></AD_COLUMN_ID>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--42AA0D021EC411DE9F90339CA6E9F175-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--42AA0D021EC411DE9F90339CA6E9F175--></AD_FIELD>
+
+<!--42AA75F81EC411DE9214BB95DE00284B--><AD_FIELD>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <AD_FIELD_ID><![CDATA[42AA75F81EC411DE9214BB95DE00284B]]></AD_FIELD_ID>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <NAME><![CDATA[Active]]></NAME>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <AD_COLUMN_ID><![CDATA[171BE4E41EC411DEA309ABEE36C74AAB]]></AD_COLUMN_ID>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--42AA75F81EC411DE9214BB95DE00284B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--42AA75F81EC411DE9214BB95DE00284B--></AD_FIELD>
+
+<!--42AADE801EC411DE9D3E8F211A781634--><AD_FIELD>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <AD_FIELD_ID><![CDATA[42AADE801EC411DE9D3E8F211A781634]]></AD_FIELD_ID>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <NAME><![CDATA[Name]]></NAME>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <AD_COLUMN_ID><![CDATA[1736D4AC1EC411DE9D8FF33F8D5B1018]]></AD_COLUMN_ID>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--42AADE801EC411DE9D3E8F211A781634-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--42AADE801EC411DE9D3E8F211A781634--></AD_FIELD>
+
+<!--42AB4BC21EC411DE85076BE4393DBCA6--><AD_FIELD>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <AD_FIELD_ID><![CDATA[42AB4BC21EC411DE85076BE4393DBCA6]]></AD_FIELD_ID>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <NAME><![CDATA[AD_Createfact_Template_ID]]></NAME>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <AD_COLUMN_ID><![CDATA[16FE92901EC411DEAD5A5B632C7F010A]]></AD_COLUMN_ID>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--42AB4BC21EC411DE85076BE4393DBCA6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--42AB4BC21EC411DE85076BE4393DBCA6--></AD_FIELD>
+
+<!--42ABC0F21EC411DE8A9117082B42AFF5--><AD_FIELD>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <AD_FIELD_ID><![CDATA[42ABC0F21EC411DE8A9117082B42AFF5]]></AD_FIELD_ID>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <NAME><![CDATA[Organization]]></NAME>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <AD_COLUMN_ID><![CDATA[1716EF661EC411DEB3863F5FBF31587B]]></AD_COLUMN_ID>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--42ABC0F21EC411DE8A9117082B42AFF5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--42ABC0F21EC411DE8A9117082B42AFF5--></AD_FIELD>
+
+<!--42AC2C721EC411DE9B75BFB15F5B3F20--><AD_FIELD>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <AD_FIELD_ID><![CDATA[42AC2C721EC411DE9B75BFB15F5B3F20]]></AD_FIELD_ID>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <NAME><![CDATA[Client]]></NAME>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <AD_COLUMN_ID><![CDATA[1710D04A1EC411DEBC37D738C0CB2CE0]]></AD_COLUMN_ID>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--42AC2C721EC411DE9B75BFB15F5B3F20--></AD_FIELD>
+
+<!--442155661F0311DE9D79FB818B325E82--><AD_FIELD>
+<!--442155661F0311DE9D79FB818B325E82-->  <AD_FIELD_ID><![CDATA[442155661F0311DE9D79FB818B325E82]]></AD_FIELD_ID>
+<!--442155661F0311DE9D79FB818B325E82-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--442155661F0311DE9D79FB818B325E82-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--442155661F0311DE9D79FB818B325E82-->  <NAME><![CDATA[Accounting template]]></NAME>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--442155661F0311DE9D79FB818B325E82-->  <AD_TAB_ID><![CDATA[800041]]></AD_TAB_ID>
+<!--442155661F0311DE9D79FB818B325E82-->  <AD_COLUMN_ID><![CDATA[226F4EAA1F0311DEB6E25B68A38E8B87]]></AD_COLUMN_ID>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--442155661F0311DE9D79FB818B325E82-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--442155661F0311DE9D79FB818B325E82-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--442155661F0311DE9D79FB818B325E82-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--442155661F0311DE9D79FB818B325E82-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--442155661F0311DE9D79FB818B325E82-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--442155661F0311DE9D79FB818B325E82--></AD_FIELD>
+
 <!--521EE779CFDCEC8EE040007F010019B7--><AD_FIELD>
 <!--521EE779CFDCEC8EE040007F010019B7-->  <AD_FIELD_ID><![CDATA[521EE779CFDCEC8EE040007F010019B7]]></AD_FIELD_ID>
 <!--521EE779CFDCEC8EE040007F010019B7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -190150,6 +190338,27 @@
 <!--7CB8CB38E8A911DDAD520016D4EE9DB3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7CB8CB38E8A911DDAD520016D4EE9DB3--></AD_FIELD>
 
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0--><AD_FIELD>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <AD_FIELD_ID><![CDATA[9B6EEA981F0F11DEB6C6070C7D7693B0]]></AD_FIELD_ID>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <NAME><![CDATA[Accounting template]]></NAME>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <AD_TAB_ID><![CDATA[1007400000]]></AD_TAB_ID>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <AD_COLUMN_ID><![CDATA[80F1BCD61F0F11DE8BE5DF56446CB1D8]]></AD_COLUMN_ID>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9B6EEA981F0F11DEB6C6070C7D7693B0--></AD_FIELD>
+
 <!--A7E35A90998544979EFADB945942D8E1--><AD_FIELD>
 <!--A7E35A90998544979EFADB945942D8E1-->  <AD_FIELD_ID><![CDATA[A7E35A90998544979EFADB945942D8E1]]></AD_FIELD_ID>
 <!--A7E35A90998544979EFADB945942D8E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TAB.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/sourcedata/AD_TAB.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -9320,6 +9320,7 @@
 <!--800165-->  <ISTRANSLATIONTAB><![CDATA[N]]></ISTRANSLATIONTAB>
 <!--800165-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--800165-->  <HASTREE><![CDATA[N]]></HASTREE>
+<!--800165-->  <ORDERBYCLAUSE><![CDATA[created]]></ORDERBYCLAUSE>
 <!--800165-->  <PROCESSING><![CDATA[N]]></PROCESSING>
 <!--800165-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
 <!--800165-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
@@ -12151,6 +12152,27 @@
 <!--7580F9AE37704571BB0D3935252CAC5A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7580F9AE37704571BB0D3935252CAC5A--></AD_TAB>
 
+<!--81F3CB82FABC4208BA76DEBB3728A14B--><AD_TAB>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <AD_TAB_ID><![CDATA[81F3CB82FABC4208BA76DEBB3728A14B]]></AD_TAB_ID>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <NAME><![CDATA[Templates]]></NAME>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <AD_WINDOW_ID><![CDATA[B15DDE526F724EBCB11439BDDB483FA6]]></AD_WINDOW_ID>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <TABLEVEL><![CDATA[0]]></TABLEVEL>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <ISSINGLEROW><![CDATA[N]]></ISSINGLEROW>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <ISINFOTAB><![CDATA[N]]></ISINFOTAB>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <ISTRANSLATIONTAB><![CDATA[N]]></ISTRANSLATIONTAB>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <HASTREE><![CDATA[N]]></HASTREE>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <PROCESSING><![CDATA[N]]></PROCESSING>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
+<!--81F3CB82FABC4208BA76DEBB3728A14B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--81F3CB82FABC4208BA76DEBB3728A14B--></AD_TAB>
+
 <!--8652BB9E40664869A5132CEB8A907B9B--><AD_TAB>
 <!--8652BB9E40664869A5132CEB8A907B9B-->  <AD_TAB_ID><![CDATA[8652BB9E40664869A5132CEB8A907B9B]]></AD_TAB_ID>
 <!--8652BB9E40664869A5132CEB8A907B9B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TABLE.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -9910,6 +9910,27 @@
 <!--2E558CB7A6D94238A6789C092EE60AD6-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1CC4B84E040007F01006125]]></AD_PACKAGE_ID>
 <!--2E558CB7A6D94238A6789C092EE60AD6--></AD_TABLE>
 
+<!--359738C46111461EA0CA2A13E5709519--><AD_TABLE>
+<!--359738C46111461EA0CA2A13E5709519-->  <AD_TABLE_ID><![CDATA[359738C46111461EA0CA2A13E5709519]]></AD_TABLE_ID>
+<!--359738C46111461EA0CA2A13E5709519-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--359738C46111461EA0CA2A13E5709519-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--359738C46111461EA0CA2A13E5709519-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--359738C46111461EA0CA2A13E5709519-->  <NAME><![CDATA[AD_CreateFact_template]]></NAME>
+<!--359738C46111461EA0CA2A13E5709519-->  <TABLENAME><![CDATA[AD_CreateFact_template]]></TABLENAME>
+<!--359738C46111461EA0CA2A13E5709519-->  <CLASSNAME><![CDATA[ADCreatefactTemplate]]></CLASSNAME>
+<!--359738C46111461EA0CA2A13E5709519-->  <ISVIEW><![CDATA[N]]></ISVIEW>
+<!--359738C46111461EA0CA2A13E5709519-->  <ACCESSLEVEL><![CDATA[6]]></ACCESSLEVEL>
+<!--359738C46111461EA0CA2A13E5709519-->  <AD_WINDOW_ID><![CDATA[B15DDE526F724EBCB11439BDDB483FA6]]></AD_WINDOW_ID>
+<!--359738C46111461EA0CA2A13E5709519-->  <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED>
+<!--359738C46111461EA0CA2A13E5709519-->  <ISDELETEABLE><![CDATA[N]]></ISDELETEABLE>
+<!--359738C46111461EA0CA2A13E5709519-->  <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME>
+<!--359738C46111461EA0CA2A13E5709519-->  <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE>
+<!--359738C46111461EA0CA2A13E5709519-->  <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG>
+<!--359738C46111461EA0CA2A13E5709519-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
+<!--359738C46111461EA0CA2A13E5709519-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--359738C46111461EA0CA2A13E5709519-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1DE4B84E040007F01006125]]></AD_PACKAGE_ID>
+<!--359738C46111461EA0CA2A13E5709519--></AD_TABLE>
+
 <!--42EFE5EEF79147C791EFAF73D4FEA5D7--><AD_TABLE>
 <!--42EFE5EEF79147C791EFAF73D4FEA5D7-->  <AD_TABLE_ID><![CDATA[42EFE5EEF79147C791EFAF73D4FEA5D7]]></AD_TABLE_ID>
 <!--42EFE5EEF79147C791EFAF73D4FEA5D7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_WINDOW.xml	Thu Mar 26 12:40:34 2009 +0100
+++ b/src-db/database/sourcedata/AD_WINDOW.xml	Mon Apr 06 17:26:13 2009 +0200
@@ -2989,6 +2989,21 @@
 <!--578DD45CF2BF4D3CA27E4C0EEEF5E5E6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--578DD45CF2BF4D3CA27E4C0EEEF5E5E6--></AD_WINDOW>
 
+<!--B15DDE526F724EBCB11439BDDB483FA6--><AD_WINDOW>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <AD_WINDOW_ID><![CDATA[B15DDE526F724EBCB11439BDDB483FA6]]></AD_WINDOW_ID>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <NAME><![CDATA[Accounting templates]]></NAME>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <DESCRIPTION><![CDATA[Accounting templates to overwrite default accounting behavior]]></DESCRIPTION>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <HELP><![CDATA[Accounting templates to overwrite default accounting behavior. Each template is related to an specific table.]]></HELP>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <WINDOWTYPE><![CDATA[M]]></WINDOWTYPE>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <ISSOTRX><![CDATA[Y]]></ISSOTRX>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <PROCESSING><![CDATA[N]]></PROCESSING>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <ISDEFAULT><![CDATA[N]]></ISDEFAULT>
+<!--B15DDE526F724EBCB11439BDDB483FA6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--B15DDE526F724EBCB11439BDDB483FA6--></AD_WINDOW>
+
 <!--D586192D06C14EC182B44CAD34CA4295--><AD_WINDOW>
 <!--D586192D06C14EC182B44CAD34CA4295-->  <AD_WINDOW_ID><![CDATA[D586192D06C14EC182B44CAD34CA4295]]></AD_WINDOW_ID>
 <!--D586192D06C14EC182B44CAD34CA4295-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/erpCommon/ad_forms/AcctServer.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer.java	Mon Apr 06 17:26:13 2009 +0200
@@ -256,7 +256,8 @@
   }
 
   public void run(VariablesSecureApp vars) throws IOException, ServletException {
-    AD_Client_ID = vars.getClient();
+    if (AD_Client_ID.equals(""))
+      AD_Client_ID = vars.getClient();
     try {
       Connection con = connectionProvider.getTransactionConnection();
       String strIDs = "";
--- a/src/org/openbravo/erpCommon/ad_forms/DocAmortization.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocAmortization.java	Mon Apr 06 17:26:13 2009 +0200
@@ -36,7 +36,22 @@
 
   private String SeqNo = "0";
   /** Account Type - Asset */
-  public static final String ACCTTYPE_Depreciation = "1";
+  private static final String ACCTTYPE_Depreciation = "1";
+
+  /**
+   * @return the aCCTTYPE_Depreciation
+   */
+  public static String getACCTTYPE_Depreciation() {
+    return ACCTTYPE_Depreciation;
+  }
+
+  /**
+   * @return the aCCTTYPE_AccumDepreciation
+   */
+  public static String getACCTTYPE_AccumDepreciation() {
+    return ACCTTYPE_AccumDepreciation;
+  }
+
   public static final String ACCTTYPE_AccumDepreciation = "2";
 
   /**
@@ -50,6 +65,43 @@
     super(AD_Client_ID, AD_Org_ID, connectionProvider);
   }
 
+  /**
+   * @return the log4jDocAmortization
+   */
+  public static Logger getLog4jDocAmortization() {
+    return log4jDocAmortization;
+  }
+
+  /**
+   * @param log4jDocAmortization
+   *          the log4jDocAmortization to set
+   */
+  public static void setLog4jDocAmortization(Logger log4jDocAmortization) {
+    DocAmortization.log4jDocAmortization = log4jDocAmortization;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   public void loadObjectFieldProvider(ConnectionProvider conn, String AD_Client_ID, String Id)
       throws ServletException {
     setObjectFieldProvider(DocAmortizationData.selectRegistro(conn, AD_Client_ID, Id));
@@ -126,6 +178,17 @@
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
     log4jDocAmortization.debug("createFact - Inicio");
+    // Select specific definition
+    String strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocAmortizationTemplate newTemplate = (DocAmortizationTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     // create Fact Header
     Fact fact = null;
     String Fact_Acct_Group_ID = SequenceIdData.getUUID();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocAmortizationTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,51 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocAmortizationTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocAmortization = Logger.getLogger(DocAmortization.class);
+
+  /**
+   * Constructor
+   *
+   */
+  public DocAmortizationTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for
+   *
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocAmortization docAmortization, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocBank.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocBank.java	Mon Apr 06 17:26:13 2009 +0200
@@ -32,6 +32,43 @@
   private static final long serialVersionUID = 1L;
   static Logger log4jDocBank = Logger.getLogger(DocBank.class);
 
+  /**
+   * @return the log4jDocBank
+   */
+  public static Logger getLog4jDocBank() {
+    return log4jDocBank;
+  }
+
+  /**
+   * @param log4jDocBank
+   *          the log4jDocBank to set
+   */
+  public static void setLog4jDocBank(Logger log4jDocBank) {
+    DocBank.log4jDocBank = log4jDocBank;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   private String SeqNo = "0";
 
   /**
@@ -178,6 +215,19 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocBankTemplate newTemplate = (DocBankTemplate) Class.forName(strClassname).newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     log4jDocBank.debug("createFact - Inicio");
     // create Fact Header
     Fact fact = null;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocBankTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,58 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocBankTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocBank = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   */
+  public DocBankTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for CMB.
+   * 
+   * <pre>
+   *      BankAsset       DR      CR  (Statement)
+   *      BankInTransit   DR      CR              (Payment)
+   *      Charge          DR          (Charge)
+   *      Interest        DR      CR  (Interest)
+   * </pre>
+   * 
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocBank docBank, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocCash.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocCash.java	Mon Apr 06 17:26:13 2009 +0200
@@ -30,6 +30,44 @@
 
 public class DocCash extends AcctServer {
   private static final long serialVersionUID = 1L;
+
+  /**
+   * @return the log4jDocCash
+   */
+  public static Logger getLog4jDocCash() {
+    return log4jDocCash;
+  }
+
+  /**
+   * @param log4jDocCash
+   *          the log4jDocCash to set
+   */
+  public static void setLog4jDocCash(Logger log4jDocCash) {
+    DocCash.log4jDocCash = log4jDocCash;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   static Logger log4jDocCash = Logger.getLogger(DocCash.class);
 
   private String SeqNo = "0";
@@ -194,7 +232,19 @@
       log4jDocCash.warn("createFact - C_CashBook_ID not set");
       return null;
     }
-
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocCashTemplate newTemplate = (DocCashTemplate) Class.forName(strClassname).newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     // create Fact Header
     Fact fact = new Fact(this, as, Fact.POST_Actual);
     String Fact_Acct_Group_ID = SequenceIdData.getUUID();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocCashTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,78 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocCashTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocCash = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocCashTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for CMC.
+   * 
+   * <pre>
+   *  Expense
+   *          CashExpense     DR
+   *          CashAsset               CR
+   *  Receipt
+   *          CashAsset       DR
+   *          CashReceipt             CR
+   *  Charge
+   *          Charge          DR
+   *          CashAsset               CR
+   * jarenor
+   *  G/L Item
+   *          Charge          DR
+   *          CashAsset               CR
+   *  Difference
+   *          CashDifference  DR
+   *          CashAsset               CR
+   *  Invoice
+   *          CashAsset       DR
+   *          CashTransfer            CR
+   *  Transfer
+   *          BankInTransit   DR
+   *          CashAsset               CR
+   * </pre>
+   * 
+   * @param as
+   *          account schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocCash docCash, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocDPManagement.java	Mon Apr 06 17:26:13 2009 +0200
@@ -37,6 +37,43 @@
   private String SeqNo = "0";
 
   /**
+   * @return the log4j
+   */
+  public static Logger getLog4j() {
+    return log4j;
+  }
+
+  /**
+   * @param log4j
+   *          the log4j to set
+   */
+  public static void setLog4j(Logger log4j) {
+    DocDPManagement.log4j = log4j;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
+  /**
    * Constructor
    * 
    * @param AD_Client_ID
@@ -124,6 +161,20 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocDPManagementTemplate newTemplate = (DocDPManagementTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     log4j.debug("createFact - Inicio");
     // create Fact Header
     Fact fact = null;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocDPManagementTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,53 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocDPManagementTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocDPManagement = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocDPManagementTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for
+   * 
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocDPManagement docDPManagement, AcctSchema as,
+      ConnectionProvider conn, Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocGLJournal.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocGLJournal.java	Mon Apr 06 17:26:13 2009 +0200
@@ -160,6 +160,20 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocGLJournalTemplate newTemplate = (DocGLJournalTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     // create Fact Header
     Fact fact = new Fact(this, as, m_PostingType);
     String Fact_Acct_Group_ID = SequenceIdData.getUUID();
@@ -181,6 +195,58 @@
     return fact;
   } // createFact
 
+  /**
+   * @return the log4jDocGLJournal
+   */
+  public static Logger getLog4jDocGLJournal() {
+    return log4jDocGLJournal;
+  }
+
+  /**
+   * @param log4jDocGLJournal
+   *          the log4jDocGLJournal to set
+   */
+  public static void setLog4jDocGLJournal(Logger log4jDocGLJournal) {
+    DocGLJournal.log4jDocGLJournal = log4jDocGLJournal;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the m_PostingType
+   */
+  public String getM_PostingType() {
+    return m_PostingType;
+  }
+
+  /**
+   * @param postingType
+   *          the m_PostingType to set
+   */
+  public void setM_PostingType(String postingType) {
+    m_PostingType = postingType;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   public String nextSeqNo(String oldSeqNo) {
     log4jDocGLJournal.debug("DocGLJournal - oldSeqNo = " + oldSeqNo);
     BigDecimal seqNo = new BigDecimal(oldSeqNo);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocGLJournalTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,57 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocGLJournalTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocGLJournal = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocGLJournalTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for GLJ. (only for the accounting scheme, it was created)
+   * 
+   * <pre>
+   *      account     DR          CR
+   * </pre>
+   * 
+   * @param as
+   *          acct schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocGLJournal docGLJournal, AcctSchema as,
+      ConnectionProvider conn, Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocInOut.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInOut.java	Mon Apr 06 17:26:13 2009 +0200
@@ -136,6 +136,19 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocInOutTemplate newTemplate = (DocInOutTemplate) Class.forName(strClassname).newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     C_Currency_ID = as.getC_Currency_ID();
     // create Fact Header
     Fact fact = new Fact(this, as, Fact.POST_Actual);
@@ -214,6 +227,43 @@
     return fact;
   } // createFact
 
+  /**
+   * @return the log4jDocInOut
+   */
+  public static Logger getLog4jDocInOut() {
+    return log4jDocInOut;
+  }
+
+  /**
+   * @param log4jDocInOut
+   *          the log4jDocInOut to set
+   */
+  public static void setLog4jDocInOut(Logger log4jDocInOut) {
+    DocInOut.log4jDocInOut = log4jDocInOut;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   public String nextSeqNo(String oldSeqNo) {
     log4jDocInOut.debug("DocInOut - oldSeqNo = " + oldSeqNo);
     BigDecimal seqNo = new BigDecimal(oldSeqNo);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInOutTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,65 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocInOutTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocInOut = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocInOutTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for MMS, MMR.
+   * 
+   * <pre>
+   *  Shipment
+   *      CoGS            DR
+   *      Inventory               CR
+   *  Shipment of Project Issue
+   *      CoGS            DR
+   *      Project                 CR
+   *  Receipt
+   *      Inventory       DR
+   *      NotInvoicedReceipt      CR
+   * </pre>
+   * 
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocInOut docInOut, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocInventory.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInventory.java	Mon Apr 06 17:26:13 2009 +0200
@@ -135,6 +135,20 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocInventoryTemplate newTemplate = (DocInventoryTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     // Log.trace(Log.l4_Data, "Doc.Inventory.createFact");
     C_Currency_ID = as.getC_Currency_ID();
     // create Fact Header
@@ -173,6 +187,43 @@
     return fact;
   } // createFact
 
+  /**
+   * @return the log4jDocInventory
+   */
+  public static Logger getLog4jDocInventory() {
+    return log4jDocInventory;
+  }
+
+  /**
+   * @param log4jDocInventory
+   *          the log4jDocInventory to set
+   */
+  public static void setLog4jDocInventory(Logger log4jDocInventory) {
+    DocInventory.log4jDocInventory = log4jDocInventory;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   public String nextSeqNo(String oldSeqNo) {
     log4jDocInventory.debug("DocInventory - oldSeqNo = " + oldSeqNo);
     BigDecimal seqNo = new BigDecimal(oldSeqNo);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInventoryTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,57 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocInventoryTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocInventory = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   */
+  public DocInventoryTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for MMI.
+   * 
+   * <pre>
+   *  Inventory
+   *      Inventory       DR      CR
+   *      InventoryDiff   DR      CR   (or Charge)
+   * </pre>
+   * 
+   * @param as
+   *          account schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocInventory docInventory, AcctSchema as,
+      ConnectionProvider conn, Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInvoice.java	Mon Apr 06 17:26:13 2009 +0200
@@ -32,8 +32,8 @@
   private static final long serialVersionUID = 1L;
   static Logger log4jDocInvoice = Logger.getLogger(DocInvoice.class);
 
-  private DocTax[] m_taxes = null;
-  private String SeqNo = "0";
+  DocTax[] m_taxes = null;
+  String SeqNo = "0";
 
   /**
    * Constructor
@@ -106,6 +106,58 @@
     return dl;
   } // loadLines
 
+  /**
+   * @return the log4jDocInvoice
+   */
+  public static Logger getLog4jDocInvoice() {
+    return log4jDocInvoice;
+  }
+
+  /**
+   * @param log4jDocInvoice
+   *          the log4jDocInvoice to set
+   */
+  public static void setLog4jDocInvoice(Logger log4jDocInvoice) {
+    DocInvoice.log4jDocInvoice = log4jDocInvoice;
+  }
+
+  /**
+   * @return the m_taxes
+   */
+  public DocTax[] getM_taxes() {
+    return m_taxes;
+  }
+
+  /**
+   * @param m_taxes
+   *          the m_taxes to set
+   */
+  public void setM_taxes(DocTax[] m_taxes) {
+    this.m_taxes = m_taxes;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   private DocTax[] loadTaxes() {
     ArrayList<Object> list = new ArrayList<Object>();
     DocInvoiceData[] data = null;
@@ -195,6 +247,20 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocInvoiceTemplate newTemplate = (DocInvoiceTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     log4jDocInvoice.debug("Starting create fact");
     // create Fact Header
     Fact fact = new Fact(this, as, Fact.POST_Actual);
@@ -407,7 +473,7 @@
    * @param C_AcctSchema_ID
    *          accounting schema
    */
-  private void updateProductInfo(String C_AcctSchema_ID, ConnectionProvider conn, Connection con) {
+  public void updateProductInfo(String C_AcctSchema_ID, ConnectionProvider conn, Connection con) {
     log4jDocInvoice.debug("updateProductInfo - C_Invoice_ID=" + this.Record_ID);
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInvoiceTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,76 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocInvoiceTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocInvoice = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocInvoiceTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for ARI, ARC, ARF, API, APC.
+   * 
+   * <pre>
+   *  ARI, ARF
+   *      Receivables     DR
+   *      Charge                  CR
+   *      TaxDue                  CR
+   *      Revenue                 CR
+   *  ARC
+   *      Receivables             CR
+   *      Charge          DR
+   *      TaxDue          DR
+   *      Revenue         RR
+   *  API
+   *      Payables                CR
+   *      Charge          DR
+   *      TaxCredit       DR
+   *      Expense         DR
+   *  APC
+   *      Payables        DR
+   *      Charge                  CR
+   *      TaxCredit               CR
+   *      Expense                 CR
+   * </pre>
+   * 
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocInvoice docInvoice, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocLine_Payment.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLine_Payment.java	Mon Apr 06 17:26:13 2009 +0200
@@ -39,6 +39,337 @@
   String C_INVOICE_ID = "";
   String C_BPARTNER_ID = "";
   String C_WITHHOLDING_ID = "";
+
+  /**
+   * @return the isReceipt
+   */
+  public String getIsReceipt() {
+    return isReceipt;
+  }
+
+  /**
+   * @return the amount
+   */
+  public String getAmount() {
+    return Amount;
+  }
+
+  /**
+   * @return the log4jDocLine_Payment
+   */
+  public static Logger getLog4jDocLine_Payment() {
+    return log4jDocLine_Payment;
+  }
+
+  /**
+   * @param log4jDocLine_Payment
+   *          the log4jDocLine_Payment to set
+   */
+  public static void setLog4jDocLine_Payment(Logger log4jDocLine_Payment) {
+    DocLine_Payment.log4jDocLine_Payment = log4jDocLine_Payment;
+  }
+
+  /**
+   * @return the line_ID
+   */
+  public String getLine_ID() {
+    return Line_ID;
+  }
+
+  /**
+   * @param line_ID
+   *          the line_ID to set
+   */
+  public void setLine_ID(String line_ID) {
+    Line_ID = line_ID;
+  }
+
+  /**
+   * @return the writeOffAmt
+   */
+  public String getWriteOffAmt() {
+    return WriteOffAmt;
+  }
+
+  /**
+   * @param writeOffAmt
+   *          the writeOffAmt to set
+   */
+  public void setWriteOffAmt(String writeOffAmt) {
+    WriteOffAmt = writeOffAmt;
+  }
+
+  /**
+   * @return the isManual
+   */
+  public String getIsManual() {
+    return isManual;
+  }
+
+  /**
+   * @param isManual
+   *          the isManual to set
+   */
+  public void setIsManual(String isManual) {
+    this.isManual = isManual;
+  }
+
+  /**
+   * @return the isPaid
+   */
+  public String getIsPaid() {
+    return isPaid;
+  }
+
+  /**
+   * @param isPaid
+   *          the isPaid to set
+   */
+  public void setIsPaid(String isPaid) {
+    this.isPaid = isPaid;
+  }
+
+  /**
+   * @return the c_Settlement_Cancel_ID
+   */
+  public String getC_Settlement_Cancel_ID() {
+    return C_Settlement_Cancel_ID;
+  }
+
+  /**
+   * @param settlement_Cancel_ID
+   *          the c_Settlement_Cancel_ID to set
+   */
+  public void setC_Settlement_Cancel_ID(String settlement_Cancel_ID) {
+    C_Settlement_Cancel_ID = settlement_Cancel_ID;
+  }
+
+  /**
+   * @return the c_Settlement_Generate_ID
+   */
+  public String getC_Settlement_Generate_ID() {
+    return C_Settlement_Generate_ID;
+  }
+
+  /**
+   * @param settlement_Generate_ID
+   *          the c_Settlement_Generate_ID to set
+   */
+  public void setC_Settlement_Generate_ID(String settlement_Generate_ID) {
+    C_Settlement_Generate_ID = settlement_Generate_ID;
+  }
+
+  /**
+   * @return the c_GLItem_ID
+   */
+  public String getC_GLItem_ID() {
+    return C_GLItem_ID;
+  }
+
+  /**
+   * @param item_ID
+   *          the c_GLItem_ID to set
+   */
+  public void setC_GLItem_ID(String item_ID) {
+    C_GLItem_ID = item_ID;
+  }
+
+  /**
+   * @return the isDirectPosting
+   */
+  public String getIsDirectPosting() {
+    return IsDirectPosting;
+  }
+
+  /**
+   * @param isDirectPosting
+   *          the isDirectPosting to set
+   */
+  public void setIsDirectPosting(String isDirectPosting) {
+    IsDirectPosting = isDirectPosting;
+  }
+
+  /**
+   * @return the dpStatus
+   */
+  public String getDpStatus() {
+    return dpStatus;
+  }
+
+  /**
+   * @param dpStatus
+   *          the dpStatus to set
+   */
+  public void setDpStatus(String dpStatus) {
+    this.dpStatus = dpStatus;
+  }
+
+  /**
+   * @return the conversionDate
+   */
+  public String getConversionDate() {
+    return conversionDate;
+  }
+
+  /**
+   * @param conversionDate
+   *          the conversionDate to set
+   */
+  public void setConversionDate(String conversionDate) {
+    this.conversionDate = conversionDate;
+  }
+
+  /**
+   * @return the c_INVOICE_ID
+   */
+  public String getC_INVOICE_ID() {
+    return C_INVOICE_ID;
+  }
+
+  /**
+   * @param c_invoice_id
+   *          the c_INVOICE_ID to set
+   */
+  public void setC_INVOICE_ID(String c_invoice_id) {
+    C_INVOICE_ID = c_invoice_id;
+  }
+
+  /**
+   * @return the c_BPARTNER_ID
+   */
+  public String getC_BPARTNER_ID() {
+    return C_BPARTNER_ID;
+  }
+
+  /**
+   * @param c_bpartner_id
+   *          the c_BPARTNER_ID to set
+   */
+  public void setC_BPARTNER_ID(String c_bpartner_id) {
+    C_BPARTNER_ID = c_bpartner_id;
+  }
+
+  /**
+   * @return the c_WITHHOLDING_ID
+   */
+  public String getC_WITHHOLDING_ID() {
+    return C_WITHHOLDING_ID;
+  }
+
+  /**
+   * @param c_withholding_id
+   *          the c_WITHHOLDING_ID to set
+   */
+  public void setC_WITHHOLDING_ID(String c_withholding_id) {
+    C_WITHHOLDING_ID = c_withholding_id;
+  }
+
+  /**
+   * @return the withHoldAmt
+   */
+  public String getWithHoldAmt() {
+    return WithHoldAmt;
+  }
+
+  /**
+   * @param withHoldAmt
+   *          the withHoldAmt to set
+   */
+  public void setWithHoldAmt(String withHoldAmt) {
+    WithHoldAmt = withHoldAmt;
+  }
+
+  /**
+   * @return the c_BANKACCOUNT_ID
+   */
+  public String getC_BANKACCOUNT_ID() {
+    return C_BANKACCOUNT_ID;
+  }
+
+  /**
+   * @param c_bankaccount_id
+   *          the c_BANKACCOUNT_ID to set
+   */
+  public void setC_BANKACCOUNT_ID(String c_bankaccount_id) {
+    C_BANKACCOUNT_ID = c_bankaccount_id;
+  }
+
+  /**
+   * @return the c_BANKSTATEMENTLINE_ID
+   */
+  public String getC_BANKSTATEMENTLINE_ID() {
+    return C_BANKSTATEMENTLINE_ID;
+  }
+
+  /**
+   * @param c_bankstatementline_id
+   *          the c_BANKSTATEMENTLINE_ID to set
+   */
+  public void setC_BANKSTATEMENTLINE_ID(String c_bankstatementline_id) {
+    C_BANKSTATEMENTLINE_ID = c_bankstatementline_id;
+  }
+
+  /**
+   * @return the c_CASHBOOK_ID
+   */
+  public String getC_CASHBOOK_ID() {
+    return C_CASHBOOK_ID;
+  }
+
+  /**
+   * @param c_cashbook_id
+   *          the c_CASHBOOK_ID to set
+   */
+  public void setC_CASHBOOK_ID(String c_cashbook_id) {
+    C_CASHBOOK_ID = c_cashbook_id;
+  }
+
+  /**
+   * @return the c_CASHLINE_ID
+   */
+  public String getC_CASHLINE_ID() {
+    return C_CASHLINE_ID;
+  }
+
+  /**
+   * @param c_cashline_id
+   *          the c_CASHLINE_ID to set
+   */
+  public void setC_CASHLINE_ID(String c_cashline_id) {
+    C_CASHLINE_ID = c_cashline_id;
+  }
+
+  /**
+   * @param amount
+   *          the amount to set
+   */
+  public void setAmount(String amount) {
+    Amount = amount;
+  }
+
+  /**
+   * @return the c_Currency_ID_From
+   */
+  public String getC_Currency_ID_From() {
+    return C_Currency_ID_From;
+  }
+
+  /**
+   * @param currency_ID_From
+   *          the c_Currency_ID_From to set
+   */
+  public void setC_Currency_ID_From(String currency_ID_From) {
+    C_Currency_ID_From = currency_ID_From;
+  }
+
+  /**
+   * @param isReceipt
+   *          the isReceipt to set
+   */
+  public void setIsReceipt(String isReceipt) {
+    this.isReceipt = isReceipt;
+  }
+
   String WithHoldAmt = "";
   String C_BANKACCOUNT_ID = "";
   String C_BANKSTATEMENTLINE_ID = "";
--- a/src/org/openbravo/erpCommon/ad_forms/DocMovement.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocMovement.java	Mon Apr 06 17:26:13 2009 +0200
@@ -124,6 +124,20 @@
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
     C_Currency_ID = as.getC_Currency_ID();
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocMovementTemplate newTemplate = (DocMovementTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     // create Fact Header
     Fact fact = new Fact(this, as, Fact.POST_Actual);
     String Fact_Acct_Group_ID = SequenceIdData.getUUID();
@@ -156,6 +170,43 @@
     return fact;
   } // createFact
 
+  /**
+   * @return the log4jDocMovement
+   */
+  public static Logger getLog4jDocMovement() {
+    return log4jDocMovement;
+  }
+
+  /**
+   * @param log4jDocMovement
+   *          the log4jDocMovement to set
+   */
+  public static void setLog4jDocMovement(Logger log4jDocMovement) {
+    DocMovement.log4jDocMovement = log4jDocMovement;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   public String nextSeqNo(String oldSeqNo) {
     log4jDocMovement.debug("DocMovement - oldSeqNo = " + oldSeqNo);
     BigDecimal seqNo = new BigDecimal(oldSeqNo);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocMovementTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,59 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocMovementTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocMovement = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocMovementTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for MMM.
+   * 
+   * <pre>
+   *  Movement
+   *      Inventory       DR      CR
+   *      InventoryTo     DR      CR
+   * </pre>
+   * 
+   * @param as
+   *          account schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocMovement docMovement, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocOrder.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocOrder.java	Mon Apr 06 17:26:13 2009 +0200
@@ -32,7 +32,7 @@
   static Logger log4jDocOrder = Logger.getLogger(DocOrder.class);
 
   /** Contained Optional Tax Lines */
-  public DocTax[] m_taxes = null;
+  private DocTax[] m_taxes = null;
 
   /**
    * Constructor
@@ -191,6 +191,19 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocOrderTemplate newTemplate = (DocOrderTemplate) Class.forName(strClassname).newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     // Purchase Order
     if (DocumentType.equals(AcctServer.DOCTYPE_POrder))
       updateProductInfo(as.getC_AcctSchema_ID(), conn, con);
@@ -201,6 +214,43 @@
   } // createFact
 
   /**
+   * @return the log4jDocOrder
+   */
+  public static Logger getLog4jDocOrder() {
+    return log4jDocOrder;
+  }
+
+  /**
+   * @param log4jDocOrder
+   *          the log4jDocOrder to set
+   */
+  public static void setLog4jDocOrder(Logger log4jDocOrder) {
+    DocOrder.log4jDocOrder = log4jDocOrder;
+  }
+
+  /**
+   * @return the m_taxes
+   */
+  public DocTax[] getM_taxes() {
+    return m_taxes;
+  }
+
+  /**
+   * @param m_taxes
+   *          the m_taxes to set
+   */
+  public void setM_taxes(DocTax[] m_taxes) {
+    this.m_taxes = m_taxes;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
+  /**
    * Update Product Info. - Costing (PriceLastPO) - PO (PriceLastPO)
    * 
    * @param C_AcctSchema_ID
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocOrderTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,56 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocOrderTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocOrder = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocOrderTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for SOO, POO, POR.
+   * 
+   * <pre>
+   * </pre>
+   * 
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocOrder docOrder, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocPayment.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocPayment.java	Mon Apr 06 17:26:13 2009 +0200
@@ -138,7 +138,7 @@
    * <pre>
    * 
    *  Flow:
-   *    1. Currency conversion variations 
+   *    1. Currency conversion variations
    *    2. Non manual DPs in settlement
    *       2.1 Cancelled
    *       2.2 Generated
@@ -156,6 +156,20 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocPaymentTemplate newTemplate = (DocPaymentTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     if (log4j.isDebugEnabled())
       log4j.debug("DocPayment - createFact - p_lines.length - " + p_lines.length);
     Fact fact = new Fact(this, as, Fact.POST_Actual);
@@ -326,6 +340,65 @@
     return fact;
   }
 
+  /**
+   * @return the log4j
+   */
+  public static Logger getLog4j() {
+    return log4j;
+  }
+
+  /**
+   * @param log4j
+   *          the log4j to set
+   */
+  public static void setLog4j(Logger log4j) {
+    DocPayment.log4j = log4j;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the settlementType
+   */
+  public String getSettlementType() {
+    return SettlementType;
+  }
+
+  /**
+   * @param settlementType
+   *          the settlementType to set
+   */
+  public void setSettlementType(String settlementType) {
+    SettlementType = settlementType;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
+  /**
+   * @return the zERO
+   */
+  public static BigDecimal getZERO() {
+    return ZERO;
+  }
+
   public String convertAmount(String Amount, boolean isReceipt, String DateAcct,
       String conversionDate, String C_Currency_ID_From, String C_Currency_ID, DocLine line,
       AcctSchema as, Fact fact, String Fact_Acct_Group_ID, ConnectionProvider conn)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocPaymentTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,68 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocPaymentTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocPayment = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocPaymentTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for STT, APP.
+   * 
+   * <pre>
+   * 
+   *  Flow:
+   *    1. Currency conversion variations
+   *    2. Non manual DPs in settlement
+   *       2.1 Cancelled
+   *       2.2 Generated
+   *    3. Manual DPs in settlement
+   *       3.1 Transitory account
+   *    4. Conceptos contables (manual sett and cancelation DP)
+   *    5. Writeoff
+   *    6. Bank in transit
+   * 
+   * </pre>
+   * 
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocPayment docPayment, AcctSchema as, ConnectionProvider conn,
+      Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocProduction.java	Thu Mar 26 12:40:34 2009 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocProduction.java	Mon Apr 06 17:26:13 2009 +0200
@@ -126,6 +126,20 @@
    */
   public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con,
       VariablesSecureApp vars) throws ServletException {
+    // Select specific definition
+    String strClassname = AcctServerData
+        .selectTemplateDoc(conn, as.m_C_AcctSchema_ID, DocumentType);
+    if (strClassname.equals(""))
+      strClassname = AcctServerData.selectTemplate(conn, as.m_C_AcctSchema_ID, AD_Table_ID);
+    if (!strClassname.equals("")) {
+      try {
+        DocProductionTemplate newTemplate = (DocProductionTemplate) Class.forName(strClassname)
+            .newInstance();
+        return newTemplate.createFact(this, as, conn, con, vars);
+      } catch (Exception e) {
+        e.printStackTrace();
+      }
+    }
     log4j.debug("createFact - Inicio");
     // create Fact Header
     Fact fact = null;
@@ -159,6 +173,43 @@
     return fact;
   } // createFact
 
+  /**
+   * @return the log4j
+   */
+  public static Logger getLog4j() {
+    return log4j;
+  }
+
+  /**
+   * @param log4j
+   *          the log4j to set
+   */
+  public static void setLog4j(Logger log4j) {
+    DocProduction.log4j = log4j;
+  }
+
+  /**
+   * @return the seqNo
+   */
+  public String getSeqNo() {
+    return SeqNo;
+  }
+
+  /**
+   * @param seqNo
+   *          the seqNo to set
+   */
+  public void setSeqNo(String seqNo) {
+    SeqNo = seqNo;
+  }
+
+  /**
+   * @return the serialVersionUID
+   */
+  public static long getSerialVersionUID() {
+    return serialVersionUID;
+  }
+
   public String nextSeqNo(String oldSeqNo) {
     log4j.debug("DocAmortization - oldSeqNo = " + oldSeqNo);
     BigDecimal seqNo = new BigDecimal(oldSeqNo);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/DocProductionTemplate.java	Mon Apr 06 17:26:13 2009 +0200
@@ -0,0 +1,53 @@
+/*
+ ******************************************************************************
+ * The contents of this file are subject to the   Compiere License  Version 1.1
+ * ("License"); You may not use this file except in compliance with the License
+ * You may obtain a copy of the License at http://www.compiere.org/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                  Compiere  ERP & CRM  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 SL
+ * Contributions are Copyright (C) 2001-2009 Openbravo S.L.
+ ******************************************************************************
+ */
+package org.openbravo.erpCommon.ad_forms;
+
+import java.sql.Connection;
+
+import javax.servlet.ServletException;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.database.ConnectionProvider;
+
+public abstract class DocProductionTemplate {
+  private static final long serialVersionUID = 1L;
+  static Logger log4jDocProduction = Logger.getLogger(DocInvoice.class);
+
+  /**
+   * Constructor
+   * 
+   * @param AD_Client_ID
+   *          AD_Client_ID
+   */
+  public DocProductionTemplate() {
+  }
+
+  /**
+   * Create Facts (the accounting logic) for
+   * 
+   * @param as
+   *          accounting schema
+   * @return Fact
+   */
+  public abstract Fact createFact(DocProduction docProduction, AcctSchema as,
+      ConnectionProvider conn, Connection con, VariablesSecureApp vars) throws ServletException;
+
+  public String getServletInfo() {
+    return "Servlet for the accounting";
+  } // end of getServletInfo() method
+}